/* ============================================================
   壹點學園 · Oneness Academy — 苹果主站风格全站样式
   配色主题：宣纸白底 + 国风暖色系彩虹高亮（暖为主，冷点缀）
   结构：全局变量 / 导航 / Hero / 板块卡 / 二级页 / Footer / 响应式
   ============================================================ */

:root {
  --nav-h: 44px;

  /* 纸张与墨色 */
  --white: #ffffff;
  --paper: #fdfaf3;          /* 宣纸暖白 */
  --ink: #2b2622;            /* 墨色（暖黑，替代纯黑） */
  --ink-soft: #6b625a;       /* 暖灰 */
  --ink-faint: #9a9188;
  --hairline: #eae4d9;

  /* 品牌赤红 */
  --brand-red: #c3272b;

  /* 国风暖色系（暖为主 + 冷点缀） */
  --c-red:    #c3272b;  /* 朱砂赤红 */
  --c-ochre:  #a65e2e;  /* 赭石棕 */
  --c-orange: #e8682a;  /* 朱膘橙 */
  --c-gold:   #d9a441;  /* 藤黄金 */
  --c-teal:   #2f8c7c;  /* 石青绿（冷） */
  --c-rose:   #c14b63;  /* 胭脂玫 */
  --c-blue:   #3b5a7a;  /* 黛蓝（冷） */
  --c-tomato: #d4572b;  /* 柿红橙 */
  --c-dawn:   #cf7a2a;  /* 晨晖橙（早课马拉松） */

  /* 暖色系彩虹（顶部装饰条 + 高亮文字） */
  --rainbow: linear-gradient(90deg,
    var(--c-red) 0%, var(--c-orange) 14%, var(--c-gold) 28%,
    var(--c-ochre) 42%, var(--c-rose) 57%, var(--c-teal) 71%,
    var(--c-blue) 85%, var(--c-tomato) 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
               "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

/* ---------- 顶部彩虹装饰条 ---------- */
.rainbow-bar {
  height: 4px;
  background: var(--rainbow);
}

/* ---------- 顶部全局导航（白底毛玻璃） ---------- */
.globalnav {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.globalnav-content {
  max-width: 1024px;
  height: var(--nav-h);
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  justify-content: center;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.globalnav a {
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.globalnav a:hover { color: var(--brand-red); }

.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 22px; width: auto; }

.nav-search {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-soft);
  padding: 4px;
  transition: color 0.2s ease;
}
.nav-search:hover { color: var(--brand-red); }

.nav-login {
  padding: 5px 16px;
  border: 1px solid var(--hairline);
  border-radius: 20px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav-login:hover { color: var(--brand-red); border-color: var(--brand-red); }

/* 搜索面板 */
.search-panel {
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--hairline);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.08);
  display: none;
}
.search-panel.open { display: block; }
.search-inner { max-width: 1024px; margin: 0 auto; padding: 22px; }
.search-box { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--hairline); padding-bottom: 12px; }
.search-box svg { color: var(--ink-faint); flex: none; }
.search-box input { flex: 1; border: none; outline: none; font-size: 17px; color: var(--ink); background: transparent; font-family: inherit; }
.search-close { background: none; border: none; cursor: pointer; color: var(--ink-faint); font-size: 18px; padding: 0 4px; }
.search-close:hover { color: var(--brand-red); }
.search-results { list-style: none; }
.search-results li a { display: block; padding: 13px 4px; border-bottom: 1px solid var(--hairline); color: var(--ink); font-size: 14px; }
.search-results li a:hover { color: var(--brand-red); }
.search-hint { color: var(--ink-faint); font-size: 13px; padding: 18px 4px 4px; }

/* ---------- Hero 首屏（宣纸白 · 大 logo · 主题句） ---------- */
.hero {
  background: var(--paper);
  color: var(--ink);
  text-align: center;
  padding: 104px 22px 92px;
}

.hero-logo {
  width: 150px;
  height: auto;
  margin: 0 auto 52px;
}

.hero h1 {
  font-size: clamp(38px, 7vw, 72px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.08;
}

.hero .rainbow-text {
  background: linear-gradient(90deg, var(--c-red), var(--c-orange), var(--c-gold), var(--c-rose));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .hero-sub {
  margin: 22px auto 0;
  max-width: 820px;
  font-size: clamp(17px, 2.8vw, 26px);
  font-weight: 400;
  color: var(--ink-soft);
  line-height: 1.55;
}

.hero .hero-em { color: var(--brand-red); }

/* ---------- 横向板块大卡（白/暖白交替 · 每板块一色） ---------- */
.section {
  display: block;
  overflow: hidden;
  background: var(--white);
}

.section:nth-of-type(even) { background: var(--paper); }

.section-inner {
  max-width: 1024px;
  margin: 0 auto;
  text-align: center;
  padding: 92px 22px 84px;
}

.section h2 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--accent, var(--ink));
}

.section .section-sub {
  margin-top: 14px;
  font-size: clamp(17px, 2.4vw, 24px);
  color: var(--ink-soft);
  line-height: 1.5;
}

.section .learn-more {
  display: inline-block;
  margin-top: 18px;
  font-size: 19px;
  color: var(--accent, var(--brand-red));
}

.section:hover .learn-more { text-decoration: underline; }

/* 巨型背景字（占位视觉，后续替换为横向大图） */
.giant {
  margin-top: 44px;
  font-size: clamp(90px, 18vw, 230px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  user-select: none;
  color: var(--accent, var(--ink));
  opacity: 0.10;
}

/* ---------- 二级页（占位模板） ---------- */
.page-hero {
  background: var(--paper);
  color: var(--ink);
  text-align: center;
  padding: 92px 22px 84px;
}

.page-hero .page-logo {
  width: 64px;
  height: auto;
  margin: 0 auto 34px;
}

.page-hero h1 {
  font-size: clamp(34px, 6vw, 60px);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.page-hero .page-sub {
  margin-top: 16px;
  font-size: clamp(16px, 2.4vw, 22px);
  color: var(--ink-soft);
  line-height: 1.55;
}

.page-hero .page-rule {
  width: 48px;
  height: 3px;
  margin: 22px auto 0;
  background: var(--rainbow);
  border-radius: 2px;
}

.page-body {
  background: var(--white);
  text-align: center;
  padding: 88px 22px;
}

.page-body .page-note {
  font-size: clamp(15px, 2vw, 19px);
  color: var(--ink-soft);
  line-height: 1.6;
}

.page-body .back-home {
  display: inline-block;
  margin-top: 22px;
  font-size: 17px;
  color: var(--brand-red);
}

.page-body .back-home:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.footer {
  background: var(--paper);
  padding: 36px 22px 44px;
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.6;
}

.footer-content {
  max-width: 1024px;
  margin: 0 auto;
  border-top: 1px solid var(--hairline);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
}

.footer-links a { color: var(--ink-soft); }
.footer-links a:hover { color: var(--brand-red); }

.footer-legal {
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.footer-brand img { height: 18px; width: auto; }

/* ---------- 二级大菜单（悬停展开 · 苹果式全宽面板） ---------- */
.mega-panel {
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--hairline);
  box-shadow: 0 28px 56px rgba(43, 38, 34, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.26s ease, transform 0.26s ease, visibility 0s linear 0.26s;
  z-index: 10000;
}
.mega-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.26s ease, transform 0.26s ease;
}
.mega-inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 38px 22px 44px;
  display: flex;
  gap: 56px;
  align-items: flex-start;
}
.mega-col { min-width: 140px; }
.mega-col + .mega-col {
  border-left: 1px solid var(--hairline);
  padding-left: 56px;
  margin-left: -28px;
}
.mega-col-head {
  font-size: 12px;
  color: var(--ink-faint);
  margin-bottom: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.mega-col a {
  display: block;
  padding: 7px 0;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.2s ease;
}
.mega-col a.mega-soft {
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-soft);
}
.mega-col a:hover { color: var(--brand-red); }

/* 大菜单展开时页面背景压暗 */
.dim-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 38, 34, 0.16);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.dim-overlay.show { opacity: 1; }

/* ---------- 汉堡按钮（仅移动端显示） ---------- */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 8px 7px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-burger span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
body.mobile-open .nav-burger span:nth-child(1) { transform: translateY(3.25px) rotate(45deg); }
body.mobile-open .nav-burger span:nth-child(2) { transform: translateY(-3.25px) rotate(-45deg); }

/* ---------- 移动端全屏菜单（手风琴） ---------- */
.mobile-menu {
  position: fixed;
  top: calc(var(--nav-h) + 4px);
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  overflow-y: auto;
  padding: 12px 28px 48px;
  display: none;
  z-index: 9999;
}
body.mobile-open .mobile-menu { display: block; }
body.mobile-open { overflow: hidden; }

.mm-group { border-bottom: 1px solid var(--hairline); }
.mm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
}
.mm-head .mm-chevron {
  width: 12px;
  height: 12px;
  border-right: 1.5px solid var(--ink-faint);
  border-bottom: 1.5px solid var(--ink-faint);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
  flex: none;
  margin-right: 4px;
}
.mm-group.open .mm-chevron { transform: rotate(225deg); }
.mm-sub { display: none; padding: 0 0 16px; }
.mm-group.open .mm-sub { display: block; }
.mm-sub a {
  display: block;
  padding: 10px 0;
  font-size: 15px;
  color: var(--ink-soft);
}
.mm-sub a:active { color: var(--brand-red); }

/* ---------- 响应式 ---------- */
@media (max-width: 834px) {
  /* 导航：汉堡菜单取代横排入口 */
  .nav-menu { display: none; }
  .nav-burger { display: flex; }
  .globalnav-content { padding: 0 16px; gap: 14px; }
  .nav-actions { margin-left: auto; flex: none; gap: 12px; }
  .globalnav a { font-size: 12px; }
  .mega-panel { display: none; }

  /* Hero 首屏 */
  .hero { padding: 64px 20px 56px; }
  .hero-logo { width: 104px; margin-bottom: 36px; }
  .hero h1 { font-size: clamp(34px, 9vw, 44px); }
  .hero .hero-sub { font-size: clamp(16px, 4.2vw, 20px); }

  /* 板块大卡 */
  .section-inner { padding: 60px 20px 56px; }
  .section h2 { font-size: clamp(30px, 8vw, 40px); }
  .section .section-sub { font-size: clamp(15px, 3.8vw, 18px); }
  .section .learn-more { font-size: 16px; }
  .giant { margin-top: 28px; font-size: clamp(80px, 26vw, 130px); }

  /* 二级页 */
  .page-hero { padding: 64px 20px 56px; }
  .page-hero .page-logo { width: 52px; margin-bottom: 24px; }
  .page-body { padding: 56px 20px; }

  /* Footer */
  .footer { padding: 28px 16px 36px; }
  .footer-links { gap: 8px 20px; }
  .footer-legal { flex-direction: column; gap: 6px; }

  /* 登录页 */
  .login-card { padding: 36px 24px 28px; }
}

/* 超窄屏（≤380px）再收一档 */
@media (max-width: 380px) {
  .hero-logo { width: 88px; }
  .hero h1 { font-size: 30px; }
  .nav-login { padding: 5px 12px; }
}

/* ---------- 登录 / 注册页 ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
.login-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 22px;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 18px;
  padding: 44px 36px 36px;
  text-align: center;
}
.login-logo { width: 72px; height: auto; margin: 0 auto 24px; }
.login-card h1 { font-size: 26px; font-weight: 600; color: var(--ink); }
.login-card .login-sub { margin-top: 8px; font-size: 14px; color: var(--ink-faint); }
.login-tabs { display: flex; margin: 28px 0 8px; border-bottom: 1px solid var(--hairline); }
.login-tabs button {
  flex: 1; background: none; border: none; cursor: pointer;
  padding: 10px 0; font-size: 14px; color: var(--ink-faint);
  border-bottom: 2px solid transparent; font-family: inherit;
}
.login-tabs button.active { color: var(--brand-red); border-bottom-color: var(--brand-red); font-weight: 500; }
.login-form { text-align: left; margin-top: 20px; display: none; }
.login-form.active { display: block; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px; font-size: 15px; color: var(--ink);
  border: 1px solid var(--hairline); border-radius: 10px; outline: none;
  background: #fff; font-family: inherit; transition: border-color 0.2s;
}
.field input:focus { border-color: var(--brand-red); }
.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; }
.code-btn {
  flex: none; padding: 0 16px; font-size: 13px; color: var(--brand-red);
  background: none; border: 1px solid var(--hairline); border-radius: 10px; cursor: pointer;
  white-space: nowrap; font-family: inherit;
}
.code-btn:hover { border-color: var(--brand-red); }
.login-submit {
  width: 100%; margin-top: 8px; padding: 13px; font-size: 16px; font-weight: 500;
  color: #fff; background: var(--brand-red); border: none; border-radius: 10px; cursor: pointer;
  font-family: inherit; transition: opacity 0.2s;
}
.login-submit:hover { opacity: 0.9; }
.login-agree { margin-top: 18px; font-size: 12px; color: var(--ink-faint); line-height: 1.6; }
.login-agree a { color: var(--ink-soft); text-decoration: underline; }
.login-back { display: block; margin-top: 22px; font-size: 13px; color: var(--ink-soft); }
.login-back:hover { color: var(--brand-red); }
.login-note { margin-top: 14px; font-size: 12px; color: var(--ink-faint); }

/* ---------- 图书馆页 · 入馆二维码 ---------- */
.lib-grid {
  display: grid; grid-template-columns: 1fr 360px; gap: 52px;
  align-items: start; max-width: 920px; margin: 0 auto; text-align: left;
}
.lib-intro h2 {
  font-size: 21px; font-weight: 600; letter-spacing: 0.02em;
  margin-bottom: 14px;
}
.lib-intro p {
  font-size: 15px; line-height: 1.9; color: var(--ink-soft); margin-bottom: 22px;
}
.lib-list { list-style: none; margin-bottom: 22px; }
.lib-list li {
  padding: 13px 2px; border-bottom: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: 3px;
}
.lib-list li strong { font-size: 15px; font-weight: 600; color: var(--ink); }
.lib-list li span { font-size: 13px; line-height: 1.7; color: var(--ink-faint); }
.lib-hint { font-size: 13px; line-height: 1.8; color: var(--ink-faint); }
.lib-qr {
  margin: 0; padding: 14px; background: var(--white);
  border: 1px solid var(--hairline); border-radius: 18px; text-align: center;
  box-shadow: 0 6px 24px rgba(43, 38, 34, 0.06);
}
.lib-qr img { width: 100%; height: auto; border-radius: 12px; }
.lib-qr figcaption { padding-top: 10px; font-size: 13px; color: var(--ink-soft); }
@media (max-width: 760px) {
  .lib-grid { grid-template-columns: 1fr; gap: 36px; }
  .lib-qr { max-width: 340px; margin: 0 auto; }
}

/* ============================================================
   早课马拉松 · 二级列表 / 三级课程目录 / 四级论文正文
   ============================================================ */

.marathon-wrap { max-width: 860px; margin: 0 auto; text-align: left; }
.marathon-lead {
  font-size: 15px; line-height: 1.9; color: var(--ink-soft);
  margin-bottom: 40px; text-align: center;
}
.marathon-lead strong { color: var(--brand-red); font-weight: 600; }

/* 面包屑 */
.crumbs {
  font-size: 13px; color: var(--ink-faint);
  margin-bottom: 24px; text-align: left; line-height: 1.8;
}
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--brand-red); }
.crumbs span { margin: 0 6px; }
.crumbs .crumbs-here { color: var(--ink); }

/* 课程列表（一行一行） */
.course-list { display: flex; flex-direction: column; gap: 14px; }
.course-row {
  display: flex; align-items: center; gap: 20px;
  padding: 22px 24px;
  border: 1px solid var(--hairline); border-radius: 16px;
  background: var(--white); text-align: left;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.course-row:hover {
  box-shadow: 0 10px 30px rgba(43, 38, 34, 0.08);
  transform: translateY(-2px);
}
.course-row-mark {
  flex: none; width: 48px; height: 48px; border-radius: 12px;
  background: var(--accent, var(--brand-red)); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 600; letter-spacing: 0;
}
.course-row-main { flex: 1; min-width: 0; }
.course-row-head { display: flex; align-items: baseline; gap: 12px; }
.course-row-head h3 { font-size: 19px; font-weight: 600; color: var(--ink); }
.course-row-count { font-size: 12px; font-weight: 500; color: var(--accent, var(--brand-red)); white-space: nowrap; }
.course-row-en { font-size: 12px; color: var(--ink-faint); margin-top: 3px; letter-spacing: 0.02em; }
.course-row-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.7; margin-top: 8px; }
.course-row-go { flex: none; font-size: 14px; color: var(--accent, var(--brand-red)); }

/* 论文目录 */
.paper-list { display: flex; flex-direction: column; border-top: 1px solid var(--hairline); }
.paper-row {
  display: flex; align-items: center; gap: 16px;
  padding: 15px 4px; border-bottom: 1px solid var(--hairline);
  transition: background 0.15s ease;
}
.paper-row:hover { background: var(--paper); }
.paper-row-date { flex: none; font-size: 13px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.paper-row-dnn {
  flex: none; font-size: 12px; font-weight: 600; color: var(--brand-red);
  border: 1px solid var(--hairline); border-radius: 6px; padding: 2px 8px;
}
.paper-row-title { flex: 1; font-size: 15px; color: var(--ink); }
.paper-row-go { flex: none; color: var(--ink-faint); font-size: 14px; }

/* 论文页 */
.page-hero-paper { padding-bottom: 60px; }
.paper-tag {
  font-size: 13px; color: var(--brand-red); letter-spacing: 0.04em;
  margin-bottom: 16px; font-weight: 500;
}
.page-hero-paper h1 { font-size: clamp(26px, 5vw, 42px); line-height: 1.25; }
.page-body-paper { text-align: left; }
.page-body-paper .back-home { display: block; text-align: center; }
.article { max-width: 720px; margin: 0 auto; }

/* 摘要块 */
.paper-abstract {
  background: var(--paper); border-left: 3px solid var(--brand-red);
  padding: 20px 24px; border-radius: 0 12px 12px 0;
  font-size: 15px; line-height: 1.9; color: var(--ink-soft);
}
.paper-abstract p { margin: 0; }
.paper-abstract strong { color: var(--ink); }

/* 关键词 */
.paper-keywords {
  font-size: 13px; color: var(--ink-soft);
  margin: 14px 0 8px; line-height: 1.8;
}
.paper-keywords strong { color: var(--ink); }

/* 论文正文排版 */
.paper-body h2 {
  font-size: 22px; font-weight: 600; color: var(--ink);
  margin: 44px 0 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline); letter-spacing: 0.01em;
}
.paper-body h3 { font-size: 17px; font-weight: 600; color: var(--ink); margin: 28px 0 12px; }
.paper-body p { font-size: 16px; line-height: 2.0; color: var(--ink); margin: 14px 0; }
.paper-body strong { color: var(--ink); font-weight: 600; }
.paper-body em { font-style: italic; }
.paper-body code {
  background: var(--paper); border: 1px solid var(--hairline); border-radius: 5px;
  padding: 1px 6px; font-size: 13px;
  font-family: "SF Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
.paper-body table { border-collapse: collapse; width: 100%; margin: 20px 0; font-size: 14px; }
.paper-body th, .paper-body td {
  border: 1px solid var(--hairline); padding: 10px 12px;
  text-align: left; vertical-align: top; line-height: 1.7;
}
.paper-body th { background: var(--paper); font-weight: 600; color: var(--ink); }
.paper-body tr:nth-child(even) td { background: #fcfaf5; }
.paper-body blockquote {
  margin: 20px 0; padding: 16px 20px;
  border-left: 3px solid var(--c-gold); background: var(--paper);
  border-radius: 0 12px 12px 0; color: var(--ink-soft);
  font-size: 15px; line-height: 1.9;
}
.paper-body blockquote p { margin: 0; }
.paper-body ol, .paper-body ul { margin: 14px 0; padding-left: 26px; }
.paper-body li { font-size: 15px; line-height: 1.9; color: var(--ink); margin: 6px 0; }
.paper-body hr { border: none; border-top: 1px solid var(--hairline); margin: 32px 0; }

/* 移动端适配 */
@media (max-width: 760px) {
  .course-row { gap: 14px; padding: 18px 16px; }
  .course-row-mark { width: 40px; height: 40px; font-size: 18px; }
  .paper-row { gap: 10px; flex-wrap: wrap; }
  .paper-row-title { flex-basis: 100%; order: 3; }
  .paper-body { font-size: 15px; }
}

/* ============================================================
   2048 故事页（about.html 专用）
   ============================================================ */

/* 当前导航项高亮 */
.globalnav a.active { color: var(--brand-red); font-weight: 500; }

/* 导言 */
.story-wrap { background: var(--white); }
.story-lead {
  background: var(--white);
  padding: 56px 22px 24px;
}
.story-lead-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.lead-kicker {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  margin-bottom: 26px;
}
.lead-text {
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 500;
  line-height: 1.7;
  color: var(--ink);
  letter-spacing: 0.01em;
}

/* 章节故事 */
.story-chapter { background: var(--white); }
.chapter-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 22px;
}
.chapter-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  background: var(--chap, var(--brand-red));
  width: 34px;
  height: 34px;
  border-radius: 50%;
  margin-bottom: 20px;
}
.chapter-title {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.chapter-body { margin-top: 20px; }
.chapter-body p {
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink-soft);
}

/* 时间线 */
.story-timeline { background: var(--paper); }
.timeline-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 22px;
}
.timeline-head {
  text-align: center;
  font-size: clamp(22px, 3.6vw, 30px);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 44px;
}
.timeline-list {
  list-style: none;
  position: relative;
  margin: 0;
  padding: 0;
}
.timeline-list::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--hairline);
}
.timeline-item {
  position: relative;
  padding: 0 0 32px 36px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-red);
  border: 4px solid var(--paper);
  box-shadow: 0 0 0 1px var(--brand-red);
}
.timeline-time {
  display: inline-block;
  font-size: 13px;
  color: var(--brand-red);
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.timeline-text {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
}

/* 图片 */
.story-photos {
  background: var(--white);
  padding: 72px 22px;
}
.story-photo {
  max-width: 880px;
  margin: 0 auto 48px;
}
.story-photo:last-child { margin-bottom: 0; }
.photo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  aspect-ratio: 16 / 9;
  background: var(--paper);
  border: 1px dashed var(--hairline);
  border-radius: 12px;
  color: var(--ink-faint);
  font-size: 15px;
  line-height: 1.8;
}
.photo-caption {
  margin-top: 14px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
}

/* 结语 */
.story-epilogue {
  background: var(--paper);
  text-align: center;
  padding: 84px 22px 72px;
}
.epilogue-text {
  max-width: 720px;
  margin: 0 auto;
  font-size: clamp(20px, 3.2vw, 30px);
  font-weight: 500;
  line-height: 1.8;
  color: var(--ink);
}
.epilogue-text .rainbow-text {
  background: linear-gradient(90deg, var(--c-red), var(--c-orange), var(--c-gold), var(--c-rose));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.story-epilogue .back-home {
  display: inline-block;
  margin-top: 30px;
  font-size: 17px;
  color: var(--brand-red);
}
.story-epilogue .back-home:hover { text-decoration: underline; }

/* 2048 故事页 · 移动端 */
@media (max-width: 834px) {
  .story-lead { padding: 40px 20px 16px; }
  .chapter-inner { padding: 48px 20px; }
  .timeline-inner { padding: 52px 20px; }
  .story-photos { padding: 52px 20px; }
  .story-epilogue { padding: 60px 20px 52px; }
  .chapter-body p { font-size: 16px; }
  .timeline-text { font-size: 16px; }
}

/* ============================================================
   艺术鉴赏 · 名画每日一读
   二级索引页 art.html + 三级详情页 art/*.html
   ============================================================ */

/* ── 索引页 ── */
.art-wrap { max-width: 860px; margin: 0 auto; text-align: left; }
.art-lead {
  font-size: 16px; line-height: 2.0; color: var(--ink-soft);
  margin-bottom: 14px; text-align: center;
}
.art-lead strong { color: var(--brand-red); font-weight: 600; }
.art-note {
  font-size: 14px; line-height: 1.9; color: var(--ink-faint);
  text-align: center; margin-bottom: 44px;
}

.art-item {
  display: flex; gap: 22px; align-items: flex-start;
  padding: 22px 4px; border-bottom: 1px solid var(--hairline);
  transition: background 0.18s ease;
}
.art-item:hover { background: var(--paper); }
.art-item-thumb {
  flex: none; width: 168px; height: 112px; overflow: hidden;
  border-radius: 8px; background: var(--paper);
  border: 1px solid var(--hairline);
}
.art-item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-item-main { flex: 1; min-width: 0; }
.art-item-no {
  font-size: 11.5px; font-weight: 600; color: var(--brand-red);
  letter-spacing: 0.1em; margin-bottom: 5px;
}
.art-item-title {
  font-size: 20px; font-weight: 600; color: var(--ink);
  letter-spacing: 0.04em; margin-bottom: 7px;
}
.art-item-desc {
  font-size: 14px; line-height: 1.85; color: var(--ink-soft); margin-bottom: 9px;
}
.art-item-meta { font-size: 12.5px; color: var(--ink-faint); }
.art-item-meta span { margin-right: 14px; white-space: nowrap; }

/* ── 详情页 ── */
.art-body { max-width: 780px; margin: 0 auto; text-align: left; }

.art-facts {
  display: flex; flex-wrap: wrap; gap: 8px 26px;
  padding: 18px 0; margin: 26px 0 34px;
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  font-size: 13.5px; color: var(--ink-soft);
}
.art-facts b { color: var(--ink); font-weight: 600; }

.art-plate { margin: 0 0 12px; }
.art-plate img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--hairline); border-radius: 8px; background: var(--paper);
}
.art-plate figcaption {
  margin-top: 11px; font-size: 12.5px; line-height: 1.8; color: var(--ink-faint);
}
.art-plate figcaption b { color: var(--ink-soft); }

.art-plate-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--hairline); border-radius: 8px; background: var(--paper);
  margin-bottom: 12px;
}
.art-plate-scroll img { width: 100%; min-width: 900px; height: auto; display: block; }
.art-scroll-tip { font-size: 11.5px; color: var(--ink-faint); margin-bottom: 30px; }

.art-h2 {
  font-size: 21px; font-weight: 600; color: var(--ink);
  letter-spacing: 0.04em; margin: 52px 0 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--hairline);
}
.art-h2 .no {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--brand-red); letter-spacing: 0.16em; margin-bottom: 6px;
}
.art-h3 {
  font-size: 17px; font-weight: 600; color: var(--ink);
  margin: 32px 0 10px; letter-spacing: 0.03em;
}
.art-p { font-size: 16px; line-height: 2.0; margin: 14px 0; color: var(--ink); }
.art-p em {
  font-style: normal; background: linear-gradient(transparent 62%, rgba(217,164,65,.28) 62%);
  padding: 0 2px;
}
.art-p strong { font-weight: 600; }

.art-quote {
  margin: 24px 0; padding: 20px 24px; background: var(--paper);
  border-left: 3px solid var(--c-gold); border-radius: 0 8px 8px 0;
  font-size: 16px; line-height: 1.95;
}
.art-quote .src {
  display: block; margin-top: 11px; font-size: 12.5px; color: var(--ink-faint);
}

/* 对立观点卡 */
.art-duel { margin: 28px 0; border: 1px solid var(--hairline); border-radius: 10px; overflow: hidden; }
.art-duel-head {
  padding: 14px 22px; background: var(--ink); color: #fdfaf3; font-size: 14.5px;
}
.art-duel-head .q {
  display: block; margin-top: 4px; font-size: 12.5px;
  color: rgba(253,250,243,.65); font-weight: 400;
}
.art-duel-body > div { padding: 22px; }
.art-duel-body > div + div { border-top: 1px solid var(--hairline); }
.art-duel-who { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; margin-bottom: 3px; }
.art-duel-who.a { color: var(--c-blue); }
.art-duel-who.b { color: var(--brand-red); }
.art-duel-org { font-size: 11.5px; color: var(--ink-faint); margin-bottom: 12px; }
.art-duel-body p { font-size: 15.5px; line-height: 1.9; margin: 0 0 11px; }
.art-duel-body p:last-child { margin-bottom: 0; }

/* 证据卡 */
.art-ev {
  margin: 22px 0; padding: 20px 22px; background: var(--paper);
  border: 1px solid var(--hairline); border-radius: 10px;
}
.art-ev .lbl { font-size: 11.5px; font-weight: 600; letter-spacing: 0.14em; color: var(--c-blue); margin-bottom: 10px; }
.art-ev.amber { border-left: 3px solid var(--c-gold); }
.art-ev.amber .lbl { color: var(--c-ochre); }
.art-ev.crimson { border-left: 3px solid var(--brand-red); }
.art-ev.crimson .lbl { color: var(--brand-red); }
.art-ev p { font-size: 15.5px; line-height: 1.9; margin: 0 0 10px; }
.art-ev p:last-child { margin-bottom: 0; }

/* 深色要点块 */
.art-concl {
  margin: 34px 0; padding: 24px 26px; background: var(--ink); color: #e8e2d9;
  border-radius: 10px;
}
.art-concl .lbl { font-size: 11px; letter-spacing: 0.2em; color: var(--c-gold); font-weight: 600; margin-bottom: 13px; }
.art-concl p { font-size: 15.5px; line-height: 1.95; margin: 0 0 12px; color: #cfc7bc; }
.art-concl p:last-child { margin-bottom: 0; }
.art-concl strong { color: #f0c674; }

/* 共识与存疑表 */
.art-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
.art-table th, .art-table td { padding: 13px 14px; text-align: left; vertical-align: top; line-height: 1.8; border-bottom: 1px solid var(--hairline); }
.art-table th { background: var(--ink); color: #fdfaf3; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; }
.art-table td:first-child { font-weight: 600; color: var(--ink); }
.art-table-tag {
  display: inline-block; font-size: 11px; padding: 2px 8px; margin-right: 6px;
  border: 1px solid currentColor; border-radius: 4px;
}
.art-table-tag.debate { color: var(--brand-red); }
.art-table-tag.pending { color: var(--ink-faint); }
.art-table-tag.consensus { color: var(--c-teal); }

/* 细节图组 */
.art-details { margin: 26px 0; }
.art-detail {
  margin-bottom: 22px; padding: 16px; background: var(--paper);
  border: 1px solid var(--hairline); border-radius: 10px;
}
.art-detail img {
  width: 100%; height: auto; display: block; border-radius: 6px;
}
.art-detail figcaption { margin-top: 10px; font-size: 13px; line-height: 1.8; color: var(--ink-soft); }
.art-detail figcaption b { color: var(--ink); }

/* 页尾导航 */
.art-pagenav {
  display: flex; justify-content: space-between; gap: 14px;
  margin: 56px 0 0; padding-top: 26px; border-top: 1px solid var(--hairline);
}
.art-pagenav a {
  font-size: 13.5px; color: var(--ink-soft); text-decoration: none;
  padding: 11px 16px; border: 1px solid var(--hairline); border-radius: 8px;
  transition: all 0.15s ease; flex: 1; min-width: 0;
}
.art-pagenav a:hover { border-color: var(--brand-red); color: var(--brand-red); }
.art-pagenav .next { text-align: right; }
.art-pagenav .lbl2 { display: block; font-size: 11px; color: var(--ink-faint); letter-spacing: 0.1em; margin-bottom: 3px; }

/* 艺术鉴赏 · 移动端 */
@media (max-width: 834px) {
  .art-item { gap: 14px; padding: 18px 2px; }
  .art-item-thumb { width: 108px; height: 74px; }
  .art-item-title { font-size: 17px; }
  .art-item-desc { font-size: 13.5px; line-height: 1.75; }
  .art-item-meta { font-size: 11.5px; }
  .art-item-meta span { margin-right: 10px; }

  .art-facts { gap: 6px 18px; font-size: 12.5px; padding: 14px 0; margin: 20px 0 26px; }
  .art-facts span { width: 100%; }

  .art-h2 { font-size: 19px; margin: 40px 0 12px; }
  .art-h3 { font-size: 16px; margin: 26px 0 8px; }
  .art-p { font-size: 16px; line-height: 1.95; }

  .art-duel-body > div { padding: 18px; }
  .art-duel-body p { font-size: 15.5px; line-height: 1.88; }
  .art-duel-body > div + div { border-top: 2px solid var(--hairline); }
  .art-ev { padding: 18px; }
  .art-ev p { font-size: 15.5px; }
  .art-concl { padding: 20px; }
  .art-concl p { font-size: 15.5px; }

  .art-quote { padding: 18px 20px; font-size: 16px; }

  /* 表格卡片化（长内容在窄屏不可读） */
  .art-table { font-size: 14.5px; display: block; }
  .art-table thead { display: none; }
  .art-table tr {
    display: block; margin-bottom: 12px; padding: 12px 16px;
    background: var(--paper); border: 1px solid var(--hairline); border-radius: 8px;
  }
  .art-table td { display: block; border-bottom: none; padding: 4px 0; font-size: 14.5px; }
  .art-table td:first-child {
    font-size: 13px; letter-spacing: 0.06em; color: var(--ink-soft);
    padding-bottom: 6px; margin-bottom: 5px; border-bottom: 1px dashed var(--hairline);
  }

  .art-pagenav { flex-direction: column; }
  .art-pagenav .next { text-align: left; }
}

/* ============================================================
   艺术页 · 图片与溢出处理（统一规则，勿重复添加）
   原则：任何图片不得撑破窄屏容器；长卷图例外，走横向滚动容器。
   ============================================================ */
.art-body img { max-width: 100%; height: auto; display: block; }
.art-body table { max-width: 100%; }

/* 细节图卡：竖排，图不溢出 */
.art-detail { overflow: hidden; }
.art-detail img { width: 100%; }

/* 全卷长图：横向可拖动容器（长卷被压到手机宽度后完全看不清） */
.art-plate {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--hairline); border-radius: 8px; background: var(--paper);
  padding: 10px;
}
.art-plate .art-plate-img { width: 100%; min-width: 880px; max-width: none; border-radius: 0; }
.art-plate figcaption { padding: 0 4px; }
.art-plate figcaption b { color: var(--ink-soft); }

/* 长卷拖动提示 */
.art-plate-hint {
  display: none; font-size: 11.5px; color: var(--ink-faint);
  letter-spacing: 0.08em; margin-bottom: 30px;
}
@media (max-width: 834px) {
  .art-plate-hint { display: block; }
  .art-concl p, .art-ev p, .art-duel-body p, .art-quote, .art-table td {
    overflow-wrap: break-word; word-break: normal;
  }
  .art-h2, .art-h3 { line-height: 1.45; }
}

/* v3 修正：长卷滚动容器必须真正截住 min-width；长 URL/代码不得撑破窄屏 */
.art-plate {
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.art-plate > .art-plate-img {
  width: auto; max-width: none;
  min-width: 880px; height: auto; display: block;
}
.art-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em; line-height: 1.6;
  word-break: break-all; overflow-wrap: anywhere;
}
.art-p code, .art-table code, .art-ev code { word-break: break-all; }

/* ============================================================
   v5 · 全卷长图最终方案
   长卷原图本身很宽（洛神 1502px、步辇 1260px、千里 1500px），
   压到手机宽度就完全看不清。因此：
     - 容器 .art-plate 固定 width:100% + overflow-x:auto
     - 图片设固定像素宽（保持原始比例），靠容器横向拖动查看
   ============================================================ */
.art-plate {
  width: 100%; max-width: 100%;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 10px;
}
.art-plate > .art-plate-img {
  display: block;
  width: 1400px;         /* 固定像素宽：足够看清细节，比例由图片自身维持 */
  max-width: none;
  height: auto;
  margin: 0 auto;
}
@media (max-width: 834px) {
  .art-plate > .art-plate-img { width: 1300px; }
}

/* v6 兜底：art-body 内任何块级与行内元素都不得撑破容器
   （源页面残留的 tag/span 长文本是溢出主因） */
.art-body p, .art-body li, .art-body figcaption,
.art-body dd, .art-body dt, .art-body blockquote {
  overflow-wrap: break-word;
}
/* 表格 / 代码 / 标签单独处理，避免 min-width:0 破坏表格布局 */
.art-body table { max-width: 100%; width: 100%; }
.art-body td, .art-body th { overflow-wrap: break-word; word-break: normal; }
.art-body code { word-break: break-all; }
/* 源页面遗留的标签类（站点未定义，给个中性样式） */
.art-body .tag {
  display: inline-block; font-size: 11px; padding: 1px 6px; margin: 0 4px;
  border: 1px solid currentColor; border-radius: 3px; vertical-align: 1px;
  white-space: nowrap;
}
.art-body .t-pending { color: var(--ink-faint); }
.art-body .t-debate   { color: var(--brand-red); }
.art-body .t-consensus { color: var(--c-teal); }
.art-body .t-infer    { color: var(--c-ochre); }
/* figcaption 内的长段落注释 */
.art-plate figcaption > span { display: inline-block; max-width: 100%; }

/* ============================================================
   宽表（≥3 列）处理：窄屏下横向滚动，不做卡片化
   卡片化适合 2 列表；3 列以上卡片化后每格独占一行，反而更难读。
   ============================================================ */
.art-table-wide { table-layout: auto; }
.art-table-wide th, .art-table-wide td { min-width: 7em; }
@media (max-width: 834px) {
  /* 宽表：整体横向滚动，容器裁切 */
  .art-table-wide {
    display: block; width: 100%; max-width: 100%;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    border: 1px solid var(--hairline); border-radius: 8px;
  }
  .art-table-wide thead { display: table-header-group; }  /* 宽表保留表头 */
  .art-table-wide tbody, .art-table-wide tr { display: table; width: 100%; table-layout: auto; }
  .art-table-wide tr { border: none; background: none; padding: 0; margin: 0; }
  .art-table-wide td { display: table-cell; border-bottom: 1px solid var(--hairline); padding: 10px 12px; }
  .art-table-wide td:first-child {
    display: table-cell; font-size: 13.5px; color: var(--ink);
    border-bottom: none; padding-bottom: 10px; margin: 0;
  }
  .art-table-wide th {
    display: table-cell; background: var(--ink); color: #fdfaf3;
    font-size: 12px; text-align: left; padding: 9px 12px; white-space: nowrap;
  }
}

/* ============================================================
   v7 · 最终版溢出治理
   根因：全卷长图与宽表都是「超宽内容」，必须由一个真正形成
   formatting context 的容器裁切。contain:inline-size 是唯一可靠手段
   （overflow:auto 单独用时，父级 scrollWidth 仍会按子元素算）。
   ============================================================ */
.art-plate,
.art-table-wide {
  contain: inline-size;
  /* 兜底：不支持 contain 时用 clip-path 强制裁切 */
  clip-path: inset(0);
}
@supports (contain: inline-size) {
  .art-plate, .art-table-wide { clip-path: none; }  /* 支持 contain 就别裁，滚动才可见 */
}
html, body { overflow-x: hidden; }

/* ============================================================
   会员中心 · 登录页改造 + 用户专属页（member.html）
   ============================================================ */

/* 登录页 · 错误提示 */
.login-error {
  display: none;
  margin: 0 0 6px;
  font-size: 12.5px;
  color: var(--brand-red);
  text-align: left;
}
.login-error:not(:empty) { display: block; }

/* 登录页 · 测试账号提示 */
.login-demo {
  margin-top: 16px;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px dashed var(--hairline);
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.7;
}
.login-demo code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--brand-red);
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 5px;
  padding: 1px 6px;
}

/* 会员中心 · 导航用户名 */
.nav-user {
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* 会员中心 · 内容容器 */
.member-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 8px 22px 72px;
  background: var(--white);
}

/* 会员中心 · 标签页 */
.member-tabs {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--hairline);
}
.member-tabs button {
  flex: none;
  padding: 12px 22px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.member-tabs button:hover { color: var(--brand-red); }
.member-tabs button.active {
  color: var(--brand-red);
  font-weight: 500;
  border-bottom-color: var(--brand-red);
}

/* 会员中心 · 面板 */
.member-panel { display: none; }
.member-panel.active { display: block; }

/* 会员中心 · 移动端 */
@media (max-width: 834px) {
  .member-wrap { padding: 8px 16px 56px; }
  .member-tabs {
    gap: 2px;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .member-tabs button { padding: 11px 16px; font-size: 14px; white-space: nowrap; }
}

/* ============================================================
   图书馆 · 书架预览 + 书籍详情页
   ============================================================ */

/* 书架预览 */
.shelf-section { margin-top: 60px; text-align: center; }
.shelf-head {
  font-size: 22px; font-weight: 600; color: var(--ink);
  letter-spacing: 0.02em;
}
.shelf-sub { font-size: 13px; color: var(--ink-faint); margin: 8px 0 30px; }
.shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 26px;
  max-width: 860px;
  margin: 0 auto;
}
.shelf-card { display: flex; flex-direction: column; gap: 12px; text-align: center; }
.shelf-cover {
  aspect-ratio: 2 / 3;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(43, 38, 34, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.shelf-card:hover .shelf-cover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(43, 38, 34, 0.15);
}
.shelf-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shelf-title { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.shelf-author { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.shelf-empty .shelf-cover {
  color: var(--ink-faint);
  font-size: 13px;
  border: 1px dashed var(--hairline);
  box-shadow: none;
}
.shelf-empty .shelf-title { color: var(--ink-faint); font-weight: 400; }

/* 书籍详情页 */
.book-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 22px 72px;
  text-align: left;
}
.book-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}
.book-cover-col { display: flex; flex-direction: column; gap: 16px; }
.book-cover {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  box-shadow: 0 10px 30px rgba(43, 38, 34, 0.12);
}
.book-download {
  display: block;
  text-align: center;
  padding: 12px;
  background: var(--brand-red);
  color: #fff;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.2s;
}
.book-download:hover { opacity: 0.9; }

.book-kicker {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--brand-red);
  font-weight: 600;
  margin-bottom: 10px;
}
.book-title { font-size: 26px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.book-title-en { font-size: 15px; color: var(--ink-faint); margin-top: 6px; line-height: 1.5; }
.book-author { font-size: 15px; color: var(--ink-soft); margin-top: 14px; }
.book-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 20px 0;
  padding: 16px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  font-size: 13.5px;
  color: var(--ink-soft);
}
.book-facts b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.book-desc p { font-size: 15px; line-height: 1.9; color: var(--ink-soft); margin-bottom: 14px; }
.book-desc p:last-child { margin-bottom: 0; }

.book-toc-section { margin-top: 48px; }
.book-toc-head {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline);
}
.book-toc { list-style: none; }
.book-toc li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--hairline);
}
.book-toc .toc-zh { font-size: 15px; color: var(--ink); flex: 1; }
.book-toc .toc-en { font-size: 12.5px; color: var(--ink-faint); }

/* 图书馆 · 移动端 */
@media (max-width: 760px) {
  .shelf-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .book-grid { grid-template-columns: 1fr; gap: 28px; }
  .book-cover-col { max-width: 200px; margin: 0 auto; }
  .book-title { font-size: 22px; }
  .book-toc li { flex-direction: column; gap: 4px; }
  .book-toc .toc-en { font-size: 11.5px; }
}

/* ── 艺术鉴赏 · 立轴/方幅图（响应式，不走横向滚动） ── */
.art-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 4px;
}
.art-body figure.art-detail { contain: inline-size; }
.art-body figure.art-plate { contain: inline-size; }
.art-body code { word-break: break-all; }

/* ============================================================
   客户界面（member-home.html / course.html）· 2026-10-21
   ============================================================ */

/* hidden 属性兜底（display:flex/grid 的容器会覆盖 UA 的 hidden 规则，需显式压制） */
[hidden] { display: none !important; }

/* 紧凑页首 */
.page-hero-compact { padding: 56px 22px 44px; }
.page-hero-compact h1 { font-size: clamp(28px, 5vw, 44px); }

/* ---------- 导航头像区 ---------- */
.nav-member { position: relative; }
.avatar-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer;
  font-family: inherit; padding: 2px;
}
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand-red); color: #fff;
  font-size: 13px; font-weight: 600; flex: none;
}
.avatar-lg { width: 44px; height: 44px; font-size: 20px; }
.avatar-name { font-size: 12px; color: var(--ink-soft); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-btn:hover .avatar-name { color: var(--brand-red); }
.avatar-menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: 280px; background: #fff;
  border: 1px solid var(--hairline); border-radius: 14px;
  box-shadow: 0 18px 44px rgba(43, 38, 34, 0.16);
  padding: 18px; display: none; z-index: 10001; text-align: left;
}
.avatar-menu.open { display: block; }
.am-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--hairline); }
.am-name { font-size: 16px; font-weight: 600; color: var(--ink); }
.am-account { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.am-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 13px; border-bottom: 1px solid var(--hairline); }
.am-row span { color: var(--ink-faint); flex: none; }
.am-row b { color: var(--ink); font-weight: 500; text-align: right; }
.am-edit { padding: 12px 0 4px; }
.am-edit label { display: block; font-size: 12px; color: var(--ink-faint); margin-bottom: 6px; }
.am-edit-row { display: flex; gap: 8px; }
.am-edit-row input {
  flex: 1; padding: 8px 10px; font-size: 14px; color: var(--ink);
  border: 1px solid var(--hairline); border-radius: 8px; outline: none; font-family: inherit;
}
.am-edit-row input:focus { border-color: var(--brand-red); }
.am-edit-row button {
  flex: none; padding: 0 14px; font-size: 13px; color: #fff; background: var(--brand-red);
  border: none; border-radius: 8px; cursor: pointer; font-family: inherit;
}
.am-logout {
  width: 100%; margin-top: 12px; padding: 9px; font-size: 13px;
  color: var(--ink-soft); background: none; border: 1px solid var(--hairline);
  border-radius: 8px; cursor: pointer; font-family: inherit;
}
.am-logout:hover { color: var(--brand-red); border-color: var(--brand-red); }
.nav-member-mini { display: flex; align-items: center; gap: 8px; }

/* ---------- 未登录引导卡 ---------- */
.mh-wrap { background: var(--white); padding: 48px 22px 88px; }
.mh-guest { display: flex; justify-content: center; }
.mh-guest-card {
  width: 100%; max-width: 460px; background: var(--paper);
  border-radius: 18px; padding: 44px 36px; text-align: center;
}
.mh-guest-card h2 { font-size: 22px; font-weight: 600; color: var(--ink); }
.mh-guest-card p { margin-top: 10px; font-size: 14px; color: var(--ink-soft); line-height: 1.7; }
.mh-guest-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.mh-btn {
  display: block; padding: 12px 16px; border-radius: 10px;
  font-size: 15px; font-weight: 600; text-align: center;
  cursor: pointer; font-family: inherit; border: none; text-decoration: none;
}
.mh-btn-primary { background: var(--brand-red); color: #fff; }
.mh-btn-primary:hover { opacity: 0.9; }
.mh-btn-ghost { background: #fff; color: var(--brand-red); border: 1px solid var(--brand-red); }
.mh-btn-ghost:hover { background: rgba(195, 39, 43, 0.06); }
.mh-guest-note { font-size: 12px; color: var(--ink-faint); }

/* ---------- 双栏布局 ---------- */
.mh-layout {
  max-width: 1024px; margin: 0 auto;
  display: flex; gap: 32px; align-items: flex-start;
}
.mh-side { flex: none; width: 264px; position: sticky; top: calc(var(--nav-h) + 24px); }
.mh-side-head { font-size: 12px; letter-spacing: 0.1em; color: var(--ink-faint); margin-bottom: 12px; }
.mh-side-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.mh-side-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; background: var(--paper); border: 1px solid transparent;
  border-radius: 12px; cursor: pointer; text-align: left; font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.mh-side-item:hover { border-color: var(--hairline); }
.mh-side-item.active { background: #fff; border-color: var(--brand-red); }
.mh-side-mark {
  flex: none; width: 34px; height: 34px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 600;
}
.mh-side-text b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.mh-side-text i { display: block; font-style: normal; font-size: 12px; color: var(--ink-faint); margin-top: 2px; }

.mh-main { flex: 1; min-width: 0; }
.mh-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 18px;
}
.mh-toolbar-title { font-size: 18px; font-weight: 600; color: var(--ink); }
.view-toggle { display: flex; gap: 6px; }
.view-toggle button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; font-size: 13px; color: var(--ink-soft);
  background: #fff; border: 1px solid var(--hairline); border-radius: 20px;
  cursor: pointer; font-family: inherit;
}
.view-toggle button.active { color: #fff; background: var(--ink); border-color: var(--ink); }
.mh-empty { padding: 64px 0; text-align: center; color: var(--ink-faint); font-size: 15px; }
.mh-course-brief { margin-bottom: 20px; }
.mh-course-en { font-size: 12px; letter-spacing: 0.08em; color: var(--accent, var(--ink-faint)); }
.mh-course-desc { margin-top: 6px; font-size: 14px; color: var(--ink-soft); line-height: 1.7; }

/* ---------- 课时：list 视图 ---------- */
.lesson-list { display: flex; flex-direction: column; gap: 10px; }
.lesson-row {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 18px; background: #fff;
  border: 1px solid var(--hairline); border-radius: 12px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.lesson-row:hover { border-color: var(--accent, var(--brand-red)); transform: translateY(-1px); }
.lesson-row.current { border-color: var(--accent, var(--brand-red)); background: var(--paper); }
.lesson-no {
  flex: none; width: 34px; height: 34px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent, var(--brand-red)); color: #fff;
  font-size: 13px; font-weight: 600;
}
.lesson-title { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; color: var(--ink); }
.lesson-badge {
  flex: none; font-size: 12px; color: var(--ink-faint);
  border: 1px solid var(--hairline); border-radius: 20px; padding: 3px 10px;
}
.lesson-badge.has { color: var(--c-teal); border-color: var(--c-teal); }
.lesson-go { flex: none; font-size: 13px; color: var(--accent, var(--brand-red)); }
.lesson-row:hover .lesson-go { text-decoration: underline; }

/* ---------- 课时：grid 方块视图 ---------- */
.lesson-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.lesson-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 22px 18px; background: var(--paper); border-radius: 14px;
  border: 1px solid transparent;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.lesson-card:hover { border-color: var(--accent, var(--brand-red)); transform: translateY(-2px); }
.lesson-card-no {
  width: 30px; height: 30px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent, var(--brand-red)); color: #fff;
  font-size: 12px; font-weight: 600;
}
.lesson-card-title { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.lesson-card .lesson-badge { align-self: flex-start; }

/* ---------- 课程观看页（course.html） ---------- */
.cw-wrap { background: var(--white); padding: 48px 22px 88px; }
.cw-inner { max-width: 760px; margin: 0 auto; }
.cw-guest { margin: 24px auto 0; }
.cw-crumb { font-size: 13px; color: var(--ink-faint); margin-bottom: 26px; }
.cw-crumb a { color: var(--ink-soft); }
.cw-crumb a:hover { color: var(--brand-red); }
.cw-head { margin-bottom: 30px; }
.cw-no {
  display: inline-block; font-size: 12px; letter-spacing: 0.1em;
  color: var(--accent, var(--brand-red)); margin-bottom: 10px;
}
.cw-head h1 { font-size: clamp(26px, 5vw, 38px); font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.cw-sub { margin-top: 8px; font-size: 14px; color: var(--ink-faint); }
.cw-replay, .cw-notes, .cw-admin, .cw-all {
  background: var(--paper); border-radius: 16px; padding: 26px 24px; margin-bottom: 18px;
}
.cw-replay h2, .cw-notes h2, .cw-admin h2, .cw-all h2 {
  font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 14px;
}
.cw-admin h2 i { font-style: normal; font-size: 12px; color: var(--ink-faint); font-weight: 400; }
.cw-watch {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; background: var(--accent, var(--brand-red)); color: #fff;
  border-radius: 12px; font-size: 15px; font-weight: 600;
}
.cw-watch:hover { opacity: 0.9; }
.cw-link { margin-top: 12px; font-size: 12px; color: var(--ink-faint); word-break: break-all; }
.cw-pending { font-size: 14px; color: var(--ink-soft); line-height: 1.7; }
.cw-notes-link { font-size: 15px; color: var(--accent, var(--brand-red)); font-weight: 500; }
.cw-notes-link:hover { text-decoration: underline; }
.cw-admin { background: #fff; border: 1px dashed var(--hairline); }
.cw-admin-tip { font-size: 13px; color: var(--ink-faint); margin-bottom: 12px; line-height: 1.6; }
.cw-admin-row { display: flex; gap: 10px; }
.cw-admin-row input {
  flex: 1; padding: 11px 14px; font-size: 14px; color: var(--ink);
  border: 1px solid var(--hairline); border-radius: 10px; outline: none; font-family: inherit;
}
.cw-admin-row input:focus { border-color: var(--brand-red); }
.cw-admin-row button {
  flex: none; padding: 0 18px; font-size: 14px; color: #fff; background: var(--brand-red);
  border: none; border-radius: 10px; cursor: pointer; font-family: inherit;
}
.cw-admin-status { margin-top: 8px; font-size: 12px; color: var(--c-teal); }
.cw-pager { display: flex; justify-content: space-between; gap: 16px; margin: 22px 0; font-size: 14px; }
.cw-pager a { color: var(--brand-red); }
.cw-pager a:hover { text-decoration: underline; }
.cw-all .lesson-row { background: #fff; }

/* ---------- 客户界面 · 移动端 ---------- */
@media (max-width: 834px) {
  .mh-layout { flex-direction: column; gap: 20px; }
  .mh-side { width: 100%; position: static; }
  .mh-side-list { flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .mh-side-item { flex: none; width: 200px; }
  .lesson-grid { grid-template-columns: repeat(2, 1fr); }
  .avatar-name { display: none; }
  .avatar-menu { width: 260px; }
  .cw-admin-row { flex-direction: column; }
  .cw-admin-row button { padding: 11px; }
}
@media (max-width: 480px) {
  .lesson-grid { grid-template-columns: 1fr; }
  .lesson-title { font-size: 15px; }
}

/* ============================================================
   全站导航登录态（nav-auth.js 配套）· 2026-10-22
   ============================================================ */
.nav-member-link { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.nav-member-link:hover { text-decoration: none; }
.nav-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: #c3272b; color: #fff;
  font-size: 13px; font-weight: 600; line-height: 1;
  flex: none;
}
.nav-member-name { font-size: 14px; color: #1d1d1f; max-width: 8em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-member-link:hover .nav-member-name { color: #c3272b; }
