/* ============================================================
   同学大讲堂 djt.zblgzg.top
   黑板 / 教室 / 手写粉笔 视觉系统
   ============================================================ */
@font-face {
  font-family: "WenKai";
  src: url("./fonts/wenkai.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --room: #0d1311;
  --room-2: #131c18;
  --board: #1e3b32;
  --board-deep: #172f28;
  --board-line: rgba(236, 240, 226, 0.16);
  --chalk: #f2eee0;
  --chalk-soft: rgba(242, 238, 224, 0.78);
  --chalk-dim: rgba(242, 238, 224, 0.54);
  --chalk-faint: rgba(242, 238, 224, 0.28);
  --yellow: #efd28c;
  --pink: #e7a9ae;
  --blue: #a9d3df;
  --green: #b8d9b0;
  --wood: #7a5237;
  --wood-dark: #4b3020;
  --wood-light: #9a6c47;
  --paper: #f3ead6;
  --paper-2: #eadfc6;
  --ink: #2b2721;
  --ink-soft: #5b5347;
  --red-pen: #b0523f;
  --brass: #d8b36b;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  --font-hand: "WenKai", "Kaiti SC", "KaiTi", "STKaiti", "FangSong", "Songti SC", serif;
  --font-ui: "WenKai", "Kaiti SC", "KaiTi", "PingFang SC", "Microsoft YaHei", sans-serif;
  --wrap: 1200px;
  --radius: 5px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--room);
  color: var(--chalk);
  font-family: var(--font-hand);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
::selection { background: rgba(239, 210, 140, 0.28); color: #fff; }
:focus-visible { outline: 2px dashed var(--yellow); outline-offset: 3px; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 1.15em; height: 1.15em; display: inline-block; vertical-align: -0.16em; flex: none; }

/* ------------------------------------------------------------ 房间背景 */
.room {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1100px 700px at 16% -8%, rgba(244, 209, 145, 0.14), transparent 62%),
    radial-gradient(900px 600px at 92% 4%, rgba(120, 175, 150, 0.09), transparent 58%),
    radial-gradient(1200px 900px at 50% 108%, rgba(0, 0, 0, 0.55), transparent 60%),
    linear-gradient(180deg, #141d19 0%, #0d1311 55%, #090d0b 100%);
}
.room::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
.room-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 42% at 22% 6%, rgba(255, 228, 170, 0.1), transparent 70%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.25), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.3));
}
.room-dust {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 28%, rgba(255, 255, 255, 0.35), transparent 100%),
    radial-gradient(1px 1px at 38% 68%, rgba(255, 255, 255, 0.22), transparent 100%),
    radial-gradient(1.4px 1.4px at 64% 22%, rgba(255, 245, 215, 0.28), transparent 100%),
    radial-gradient(1px 1px at 78% 58%, rgba(255, 255, 255, 0.2), transparent 100%),
    radial-gradient(1.3px 1.3px at 88% 34%, rgba(255, 255, 255, 0.18), transparent 100%),
    radial-gradient(1px 1px at 48% 84%, rgba(255, 255, 255, 0.16), transparent 100%);
  opacity: 0.55;
  animation: dust 18s ease-in-out infinite alternate;
}
@keyframes dust {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-10px, 18px, 0); }
}

/* ------------------------------------------------------------ 顶部 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 26px;
  height: 78px;
  padding: 0 clamp(18px, 4vw, 46px);
  background: linear-gradient(180deg, rgba(13, 19, 17, 0.94), rgba(13, 19, 17, 0.72) 70%, transparent);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}
.topbar::after {
  content: "";
  position: absolute;
  left: clamp(18px, 4vw, 46px);
  right: clamp(18px, 4vw, 46px);
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242, 238, 224, 0.18), transparent);
}
.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand-mark { width: 42px; height: 42px; display: block; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45)); }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.08; }
.brand-text b {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--chalk);
  text-shadow: 0.6px 0.5px 0 rgba(255, 255, 255, 0.12);
}
.brand-text small {
  margin-top: 5px;
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--chalk-faint);
  font-family: Georgia, "Times New Roman", serif;
}
.nav { display: flex; align-items: center; gap: clamp(10px, 2vw, 30px); margin-left: 8px; }
.nav a {
  position: relative;
  padding: 8px 2px 10px;
  font-size: 16px;
  color: var(--chalk-dim);
  transition: color 0.2s ease;
}
.nav a i {
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 6px;
  transform: translateX(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='6' viewBox='0 0 44 6'%3E%3Cpath d='M1 4c6-2.6 10 1.4 16-1S29 4.6 43 2' fill='none' stroke='%23efd28c' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  opacity: 0;
  transition: width 0.25s ease, opacity 0.2s ease;
}
.nav a:hover, .nav a.is-active { color: var(--chalk); }
.nav a:hover i, .nav a.is-active i { width: 30px; opacity: 1; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.only-mobile { display: none !important; }
.mobile-menu {
  position: absolute;
  top: 62px;
  right: 12px;
  width: 172px;
  padding: 8px;
  border: 1px solid rgba(242, 238, 224, 0.2);
  border-radius: 5px;
  background: rgba(15, 27, 23, 0.97);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  z-index: 50;
}
.mobile-menu a { display: block; padding: 9px 12px; border-radius: 3px; font-size: 14.5px; color: var(--chalk-soft); }
.mobile-menu a:hover { background: rgba(255, 255, 255, 0.06); color: var(--chalk); }
.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(242, 238, 224, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.025);
  color: var(--chalk-dim);
  transition: 0.2s ease;
}
.icon-btn:hover { color: var(--chalk); border-color: rgba(242, 238, 224, 0.4); transform: rotate(24deg); }

/* ------------------------------------------------------------ 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 20px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 16px;
  letter-spacing: 0.03em;
  transition: transform 0.16s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:active { transform: translateY(1px) rotate(-0.2deg); }
.btn--chalk {
  border-color: rgba(242, 238, 224, 0.46);
  color: var(--chalk);
  background: rgba(242, 238, 224, 0.055);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.22);
}
.btn--chalk:hover { background: rgba(242, 238, 224, 0.12); border-color: var(--chalk); box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.28); }
.btn--solid {
  background: var(--chalk);
  color: #1b2b25;
  border-color: var(--chalk);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
}
.btn--solid:hover { background: #fffaf0; transform: translateY(-1px); }
.btn--plain { color: var(--chalk-soft); padding-inline: 8px; }
.btn--plain:hover { color: var(--chalk); }
.btn--small { min-height: 34px; padding: 5px 13px; font-size: 14px; }
.btn--danger { color: #f0b8b0; border-color: rgba(240, 184, 176, 0.45); }
.btn--danger:hover { background: rgba(240, 184, 176, 0.12); }
.btn[disabled] { opacity: 0.42; pointer-events: none; }
.btn--publish svg { width: 1.05em; height: 1.05em; }

/* ------------------------------------------------------------ 通用版式 */
.view { min-height: 62vh; }
.wrap { width: min(var(--wrap), calc(100% - clamp(32px, 7vw, 88px))); margin: 0 auto; }
.kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: var(--chalk-faint);
  text-transform: uppercase;
}
.kicker i { width: 22px; height: 1px; background: currentColor; opacity: 0.6; }
.kicker--ink { color: rgba(43, 39, 33, 0.55); }
.section { padding: clamp(58px, 8vw, 96px) 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 32px;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(27px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-shadow: 0.7px 0.6px 0 rgba(255, 255, 255, 0.1);
}
.section-head h2 em { font-style: normal; color: var(--yellow); }
.section-deck { max-width: 380px; margin: 0 0 4px; font-size: 15px; color: var(--chalk-dim); text-align: right; }
.hand-rule {
  height: 8px;
  margin: 14px 0 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='8' viewBox='0 0 220 8'%3E%3Cpath d='M1 5.5C28 2.5 48 6.6 76 4.2s49 .2 70-1.4 51 2.8 73-.6' fill='none' stroke='%23efd28c' stroke-width='1.4' stroke-linecap='round' opacity='.7'/%3E%3C/svg%3E") left center / 220px 8px repeat-x;
}
.chalk-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px 4px;
  border: 1px solid rgba(242, 238, 224, 0.26);
  border-radius: 3px 7px 4px 6px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--chalk-soft);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--subj, var(--yellow)); box-shadow: 0 0 8px color-mix(in srgb, var(--subj, #efd28c) 65%, transparent); }

/* ------------------------------------------------------------ 黑板组件 */
.board-frame {
  position: relative;
  padding: 14px;
  border-radius: 9px;
  background:
    repeating-linear-gradient(94deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 7px),
    linear-gradient(135deg, var(--wood-light) 0%, var(--wood) 18%, var(--wood-dark) 52%, var(--wood) 78%, #6a452d 100%);
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.55),
    0 10px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 226, 186, 0.28),
    inset 0 -2px 2px rgba(0, 0, 0, 0.45);
}
.board-frame::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255, 220, 170, 0.09);
}
.board {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  background:
    radial-gradient(90% 70% at 22% 12%, rgba(84, 126, 108, 0.38), transparent 60%),
    radial-gradient(70% 60% at 82% 90%, rgba(16, 43, 35, 0.75), transparent 65%),
    linear-gradient(160deg, #22443a 0%, #1c3a31 45%, #163028 100%);
  box-shadow:
    inset 0 0 70px rgba(0, 0, 0, 0.5),
    inset 0 0 12px rgba(0, 0, 0, 0.45);
  color: var(--chalk);
}
.board::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)'/%3E%3C/svg%3E");
}
.board::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(32% 24% at 18% 22%, rgba(255, 255, 255, 0.07), transparent 70%),
    radial-gradient(24% 30% at 66% 74%, rgba(255, 255, 255, 0.035), transparent 70%),
    radial-gradient(90% 90% at 50% 50%, transparent 52%, rgba(0, 0, 0, 0.42) 100%);
}
.board > * { position: relative; z-index: 1; }
.chalk-tray {
  position: relative;
  height: 20px;
  margin: 10px -14px -14px;
  border-radius: 0 0 8px 8px;
  background:
    linear-gradient(180deg, #5b3a26, #3d2719 70%, #2c1c12);
  box-shadow: inset 0 1px 0 rgba(255, 224, 180, 0.2), 0 8px 18px rgba(0, 0, 0, 0.4);
}
.chalk-tray::after {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 4px;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

/* 装饰粉笔与黑板擦 */
.chalk-stick {
  position: absolute;
  width: 54px;
  height: 9px;
  border-radius: 5px 3px 3px 5px;
  background: linear-gradient(180deg, #fffdf4, #e8e1cd 60%, #cfc6ae);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.35);
}
.chalk-stick--y { background: linear-gradient(180deg, #f7e3a9, #e6cb86 60%, #c5aa66); }
.chalk-stick--p { background: linear-gradient(180deg, #f3c3c7, #dfa3a9 60%, #bd8288); }
.eraser {
  position: absolute;
  width: 62px;
  height: 20px;
  border-radius: 3px;
  background: linear-gradient(180deg, #8a6443 0 55%, #3f3a34 55% 100%);
  box-shadow: 0 4px 7px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 235, 200, 0.25);
}

/* ------------------------------------------------------------ 首页 Hero */
.hero { padding: clamp(20px, 4vw, 42px) 0 clamp(46px, 6vw, 72px); }
.hero-board { min-height: 494px; }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(300px, 0.68fr);
  gap: clamp(26px, 5vw, 62px);
  padding: clamp(30px, 4.4vw, 54px) clamp(26px, 4.4vw, 58px) 28px;
}
.hero-copy { align-self: center; min-width: 0; }
.hero-kicker { color: var(--yellow); opacity: 0.85; }
.hero h1 {
  margin: 10px 0 0;
  font-size: clamp(40px, 5.9vw, 74px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0.01em;
  text-shadow:
    0.8px 0.7px 0 rgba(255, 255, 255, 0.15),
    -0.6px -0.4px 0 rgba(0, 0, 0, 0.35),
    0 0 30px rgba(242, 238, 224, 0.08);
  animation: chalk-in 1.2s cubic-bezier(0.22, 0.9, 0.3, 1) both;
}
.hero h1 .hero-line { display: block; white-space: nowrap; }
.hero h1 .line2 { display: block; color: var(--yellow); font-size: 0.48em; margin-top: 12px; line-height: 1.3; white-space: normal; max-width: 18em; }
@keyframes chalk-in {
  from { clip-path: inset(0 100% 0 0); transform: translateX(-4px); opacity: 0.4; }
  to { clip-path: inset(0 0 0 0); transform: none; opacity: 1; }
}
.hero-sub {
  max-width: 440px;
  margin: 22px 0 0;
  font-size: clamp(15px, 1.5vw, 17.5px);
  line-height: 1.9;
  color: var(--chalk-soft);
}
.hero-sub b { font-weight: 400; color: var(--chalk); border-bottom: 1px dashed rgba(242, 238, 224, 0.35); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { display: flex; align-items: center; gap: 8px; margin-top: 20px; font-size: 12.5px; color: var(--chalk-faint); }
.hero-note i { display: block; width: 26px; height: 1px; background: rgba(242, 238, 224, 0.25); }

/* 今日开讲 */
.today {
  align-self: start;
  position: relative;
  padding: 20px 20px 16px;
  border: 1px dashed rgba(242, 238, 224, 0.28);
  border-radius: 5px 9px 6px 8px;
  background: rgba(8, 20, 16, 0.18);
  transform: rotate(0.35deg);
}
.today::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 52px;
  height: 1px;
  background: rgba(242, 238, 224, 0.14);
}
.today-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; letter-spacing: 0.14em; color: var(--chalk-faint); }
.today-head b { font-weight: 400; color: var(--yellow); letter-spacing: 0.05em; }
.today-list { list-style: none; margin: 14px 0 0; padding: 0; }
.today-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0 10px;
  border-bottom: 1px dashed rgba(242, 238, 224, 0.12);
}
.today-item:last-child { border-bottom: 0; padding-bottom: 2px; }
.today-time { font-family: Georgia, serif; font-size: 15px; color: var(--yellow); letter-spacing: 0.02em; line-height: 1.35; }
.today-time small { display: block; font-size: 9.5px; color: var(--chalk-faint); letter-spacing: 0.1em; }
.today-body b { display: block; font-weight: 400; font-size: 15px; line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.today-body span { display: block; margin-top: 3px; font-size: 11.5px; color: var(--chalk-dim); }
.today-empty { padding: 26px 4px 18px; color: var(--chalk-dim); font-size: 14px; line-height: 1.8; }
.today-empty em { display: block; font-style: normal; color: var(--yellow); font-size: 17px; margin-bottom: 6px; }
.today-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px dashed rgba(242, 238, 224, 0.14); font-size: 11.5px; color: var(--chalk-faint); }
.today-foot a { color: var(--yellow); }

/* 统计 */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 0 clamp(26px, 4.4vw, 58px) 26px;
}
.stat {
  position: relative;
  padding: 16px 20px 4px;
  border-top: 1px dashed rgba(242, 238, 224, 0.16);
}
.stat + .stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 12px;
  width: 1px;
  background: rgba(242, 238, 224, 0.12);
  transform: rotate(1.2deg);
}
.stat b {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 2.8vw, 34px);
  font-weight: 400;
  line-height: 1;
  color: var(--chalk);
  text-shadow: 0 0 14px rgba(242, 238, 224, 0.14);
}
.stat b small { font-size: 12px; color: var(--chalk-faint); margin-left: 4px; letter-spacing: 0.08em; }
.stat span { display: block; margin-top: 8px; font-size: 11.5px; letter-spacing: 0.12em; color: var(--chalk-faint); }

/* 黑板上的小涂鸦 */
.doodle { position: absolute; pointer-events: none; opacity: 0.22; color: var(--chalk); }
.doodle--formula { right: 40%; top: 6%; font-family: Georgia, serif; font-size: 17px; transform: rotate(-7deg); opacity: 0.16; }
.doodle--star { right: 7%; bottom: 18%; width: 34px; height: 34px; transform: rotate(9deg); }
.doodle--arrow { left: 46%; top: 12%; width: 58px; height: 30px; transform: rotate(-4deg); }

/* ------------------------------------------------------------ 学科与筛选 */
.lobby { padding-top: clamp(34px, 5vw, 52px); }
.lobby-tools {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}
.subject-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: none;
  flex: 1;
}
.subject-tabs::-webkit-scrollbar { display: none; }
@media (min-width: 901px) {
  .subject-tabs { flex-wrap: wrap; overflow: visible; }
}
.subject-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px 7px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--chalk-dim);
  font-size: 15px;
  white-space: nowrap;
  transition: 0.18s ease;
}
.subject-tab .stamp {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--subj) 65%, transparent);
  border-radius: 50%;
  color: var(--subj);
  font-size: 12px;
  line-height: 1;
}
.subject-tab small { font-size: 10.5px; color: var(--chalk-faint); font-family: Georgia, serif; }
.subject-tab:hover { color: var(--chalk); border-color: rgba(242, 238, 224, 0.18); }
.subject-tab.is-active {
  color: #17251f;
  background: color-mix(in srgb, var(--subj) 82%, #f2eee0);
  border-color: transparent;
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.subject-tab.is-active .stamp { color: #17251f; border-color: rgba(23, 37, 31, 0.4); }
.subject-tab.is-active small { color: rgba(23, 37, 31, 0.55); }

.search-box {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 210px;
  padding: 6px 2px 8px;
  border-bottom: 1px solid rgba(242, 238, 224, 0.28);
  color: var(--chalk-faint);
}
.search-box input {
  width: 100%;
  border: 0;
  background: none;
  outline: none;
  font-size: 14.5px;
  color: var(--chalk);
  padding: 2px 0;
}
.search-box input::placeholder { color: var(--chalk-faint); }
.search-box:focus-within { border-color: var(--yellow); color: var(--yellow); }
.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chip {
  padding: 5px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  color: var(--chalk-faint);
  font-size: 13.5px;
  transition: 0.18s ease;
}
.chip:hover { color: var(--chalk); }
.chip.is-active { color: var(--yellow); border-color: rgba(239, 210, 140, 0.4); background: rgba(239, 210, 140, 0.07); }
.result-note { font-size: 12.5px; color: var(--chalk-faint); letter-spacing: 0.06em; }

/* ------------------------------------------------------------ 题卡 */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card {
  --subj: #cfd3d6;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 252px;
  padding: 21px 22px 17px;
  border: 1px solid rgba(242, 238, 224, 0.14);
  border-radius: 5px 9px 6px 8px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012) 46%, rgba(0, 0, 0, 0.12)),
    rgba(11, 24, 20, 0.28);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  animation: card-in 0.55s ease both;
  animation-delay: calc(var(--i, 0) * 38ms);
}
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  bottom: 20px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--subj);
  opacity: 0.62;
  box-shadow: 0 0 16px color-mix(in srgb, var(--subj) 40%, transparent);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(70% 55% at 100% 0%, color-mix(in srgb, var(--subj) 8%, transparent), transparent 65%);
}
.card:hover {
  transform: translateY(-4px) rotate(-0.15deg);
  border-color: color-mix(in srgb, var(--subj) 45%, rgba(242, 238, 224, 0.2));
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.32), 0 0 0 1px color-mix(in srgb, var(--subj) 12%, transparent);
}
.card:focus-visible { border-color: var(--yellow); }
.card--new {
  align-items: center;
  justify-content: center;
  text-align: center;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.018);
}
.card--new::before { display: none; }
.card--new:hover { border-color: rgba(239, 210, 140, 0.45); }
.new-plus {
  display: block;
  width: 46px;
  height: 46px;
  margin-bottom: 4px;
  border: 1px dashed rgba(242, 238, 224, 0.28);
  border-radius: 50%;
  color: var(--chalk-faint);
  font-size: 26px;
  line-height: 44px;
}
.card--new h3 { font-size: 19px; margin-bottom: 6px; -webkit-line-clamp: 1; }
.card--new .card-excerpt { -webkit-line-clamp: 3; max-width: 300px; }
.card--new .card-foot { border-top: 0; justify-content: center; gap: 14px; padding-top: 14px; }
.card--new .card-when { margin-left: 0; color: var(--yellow); }
.card-top { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; }
.card-stamp {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--subj) 62%, transparent);
  border-radius: 50%;
  color: var(--subj);
  font-size: 14px;
}
.card-subject { font-size: 12px; letter-spacing: 0.12em; color: color-mix(in srgb, var(--subj) 80%, var(--chalk)); }
.card-top .card-grade { margin-left: auto; font-size: 11px; color: var(--chalk-faint); }
.diff { display: inline-flex; gap: 3px; align-items: center; margin-left: 2px; }
.diff i { width: 5px; height: 5px; border-radius: 50%; background: rgba(242, 238, 224, 0.16); }
.diff i.on { background: var(--yellow); box-shadow: 0 0 6px rgba(239, 210, 140, 0.5); }
.card h3 {
  margin: 0 0 8px;
  font-size: 19.5px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.01em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.card-excerpt {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--chalk-dim);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.card-kps { display: flex; flex-wrap: wrap; gap: 5px; margin: 13px 0 0; }
.kp-mini {
  padding: 2px 8px 3px;
  border-radius: 2px 5px 3px 4px;
  background: rgba(242, 238, 224, 0.055);
  border: 1px solid rgba(242, 238, 224, 0.1);
  color: var(--chalk-dim);
  font-size: 11.5px;
  line-height: 1.55;
}
.kp-mini.is-more { background: none; border-color: transparent; color: var(--chalk-faint); }
.card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px dashed rgba(242, 238, 224, 0.11);
}
.avatar {
  width: 27px;
  height: 27px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(242, 238, 224, 0.25);
  background: rgba(242, 238, 224, 0.06);
  font-size: 12.5px;
  color: var(--chalk-soft);
}
.who-mini { min-width: 0; line-height: 1.25; }
.who-mini b { display: block; font-weight: 400; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-mini span { display: block; font-size: 10.5px; color: var(--chalk-faint); margin-top: 2px; }
.card-when { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--chalk-faint); white-space: nowrap; }
.card-when.is-soon { color: var(--yellow); }
.card-foot .card-when { margin-left: 0; }
.card-foot .card-when:last-child { margin-left: auto; }
.card-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: 1px solid rgba(242, 238, 224, 0.18);
  border-radius: 999px;
  font-size: 10px;
  color: var(--chalk-faint);
  background: rgba(10, 20, 17, 0.5);
}
.card-badge--live { color: var(--pink); border-color: rgba(231, 169, 174, 0.4); }

.empty-board {
  grid-column: 1 / -1;
  padding: 44px 26px 40px;
  text-align: center;
  border: 1px dashed rgba(242, 238, 224, 0.2);
  border-radius: 6px;
  color: var(--chalk-dim);
}
.empty-board .empty-doodle { width: 96px; height: 64px; margin: 0 auto 14px; opacity: 0.5; }
.empty-board b { display: block; font-weight: 400; font-size: 21px; color: var(--chalk); margin-bottom: 6px; }
.empty-board p { margin: 0 0 16px; font-size: 14px; }

/* ------------------------------------------------------------ 三步 & 图谱 */
.how { position: relative; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step {
  position: relative;
  padding: 24px 24px 22px;
  border-top: 1px solid rgba(242, 238, 224, 0.18);
}
.step-no {
  display: block;
  font-family: Georgia, serif;
  font-size: 34px;
  line-height: 1;
  color: var(--yellow);
  opacity: 0.85;
}
.step h3 { margin: 14px 0 8px; font-size: 21px; font-weight: 400; }
.step p { margin: 0; font-size: 14.5px; line-height: 1.9; color: var(--chalk-dim); }
.step .step-tag { display: inline-block; margin-top: 16px; font-size: 11px; letter-spacing: 0.12em; color: var(--chalk-faint); border-bottom: 1px dashed rgba(242, 238, 224, 0.18); padding-bottom: 2px; }
.step::after {
  content: "";
  position: absolute;
  right: -12px;
  top: 42%;
  width: 22px;
  height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='12'%3E%3Cpath d='M1 6h18M14 1l5 5-5 5' fill='none' stroke='%23f2eee0' stroke-opacity='.3' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
}
.step:last-child::after { display: none; }

.graph-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 22px;
  margin-top: 34px;
  padding: 24px;
  border: 1px solid rgba(242, 238, 224, 0.14);
  border-radius: 5px;
  background: rgba(8, 18, 15, 0.24);
}
.graph-canvas { position: relative; min-height: 260px; }
.graph-canvas svg { width: 100%; height: 100%; display: block; overflow: visible; }
.graph-mobile { display: none; }
.graph-side { border-left: 1px dashed rgba(242, 238, 224, 0.14); padding-left: 22px; }
.graph-side .gs-kicker { font-family: Georgia, serif; font-size: 10px; letter-spacing: 0.22em; color: var(--chalk-faint); }
.graph-side h4 { margin: 8px 0 8px; font-size: 19px; font-weight: 400; color: var(--yellow); }
.graph-side p { margin: 0; font-size: 13.5px; line-height: 1.85; color: var(--chalk-dim); }
.graph-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; font-size: 11px; color: var(--chalk-faint); }
.graph-legend i { display: inline-block; width: 18px; height: 1px; border-top: 1px dashed var(--chalk-faint); vertical-align: middle; margin-right: 5px; }

/* ------------------------------------------------------------ 排期 */
.schedule-board { padding: 26px clamp(20px, 3.4vw, 40px) 30px; }
.schedule-table { width: 100%; border-collapse: collapse; }
.schedule-table th {
  padding: 8px 10px 12px;
  font-weight: 400;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--chalk-faint);
  text-align: left;
  border-bottom: 1px solid rgba(242, 238, 224, 0.18);
}
.schedule-table td { padding: 13px 10px; border-bottom: 1px dashed rgba(242, 238, 224, 0.11); vertical-align: middle; font-size: 14.5px; }
.schedule-table tr:last-child td { border-bottom: 0; }
.schedule-date { font-family: Georgia, serif; color: var(--yellow); white-space: nowrap; }
.schedule-date small { display: block; font-family: var(--font-hand); font-size: 10.5px; color: var(--chalk-faint); }
.schedule-title { color: var(--chalk); }
.schedule-title:hover { text-decoration: underline; text-decoration-style: dashed; text-underline-offset: 4px; }
.schedule-who { color: var(--chalk-dim); white-space: nowrap; }
.schedule-subj { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--subj); white-space: nowrap; }
.schedule-empty { padding: 30px 6px; color: var(--chalk-dim); font-size: 14px; }

/* ------------------------------------------------------------ 页脚 */
.footer { position: relative; margin-top: clamp(30px, 6vw, 70px); padding-top: 30px; }
.footer-inner {
  width: min(var(--wrap), calc(100% - clamp(32px, 7vw, 88px)));
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 26px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-chalk {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(242, 238, 224, 0.24);
  border-radius: 3px 6px 4px 5px;
  color: var(--chalk-soft);
  font-size: 18px;
}
.footer-brand b { display: block; font-weight: 400; font-size: 15px; letter-spacing: 0.1em; }
.footer-brand small { display: block; margin-top: 2px; font-size: 11px; color: var(--chalk-faint); letter-spacing: 0.04em; }
.footer-links { display: flex; gap: 20px; font-size: 12px; color: var(--chalk-faint); }
.footer-links a:hover { color: var(--yellow); }
.footer-beian { display: flex; gap: 7px; align-items: center; font-size: 11px; color: rgba(242, 238, 224, 0.34); }
.footer-beian a:hover { color: var(--chalk-soft); }
.footer-ledge {
  height: 16px;
  background:
    linear-gradient(180deg, #6b472e, #4a2f1f 55%, #2c1c12);
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 225, 180, 0.16);
}

/* ------------------------------------------------------------ 详情页 */
.detail { padding: clamp(22px, 4vw, 40px) 0 clamp(50px, 7vw, 86px); }
.crumb { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; font-size: 12.5px; color: var(--chalk-faint); }
.crumb a:hover { color: var(--chalk); }
.crumb .sep { opacity: 0.4; }
.detail-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 24px; }
.detail-stamp {
  width: 54px;
  height: 54px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--subj) 60%, transparent);
  border-radius: 50%;
  color: var(--subj);
  font-size: 22px;
  box-shadow: 0 0 24px color-mix(in srgb, var(--subj) 12%, transparent);
}
.detail-head h1 {
  margin: 0;
  font-size: clamp(27px, 3.6vw, 40px);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.01em;
}
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 10px; font-size: 12.5px; color: var(--chalk-faint); }
.detail-meta .dot-sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.detail-meta .subj-name { color: color-mix(in srgb, var(--subj) 85%, var(--chalk)); }
.detail-meta .diff { margin-left: 0; }
.detail-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: clamp(20px, 3.2vw, 42px); align-items: start; }
.detail-grid > * { min-width: 0; }

/* 题纸 */
.problem-paper {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: clamp(26px, 3.6vw, 44px) clamp(24px, 3.8vw, 46px) 34px;
  color: var(--ink);
  background:
    linear-gradient(93deg, transparent 0 38px, rgba(176, 82, 63, 0.22) 38px 39px, transparent 39px),
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(66, 83, 74, 0.09) 31px 32px),
    linear-gradient(160deg, #f6efdd, #eee3ca);
  border-radius: 2px 4px 3px 3px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.48), 0 2px 0 rgba(255, 255, 255, 0.28) inset;
  transform: rotate(-0.22deg);
}
.problem-paper::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 128px;
  height: 24px;
  transform: translateX(-50%) rotate(-1.6deg);
  background: rgba(214, 198, 158, 0.62);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
  clip-path: polygon(2% 8%, 98% 0, 100% 92%, 0 100%);
}
.problem-paper::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23p)' opacity='.16'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
.paper-top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 10.5px; letter-spacing: 0.18em; color: rgba(43, 39, 33, 0.48); font-family: Georgia, serif; }
.paper-top .paper-stamp {
  margin-left: auto;
  padding: 2px 8px;
  border: 1px solid rgba(176, 82, 63, 0.5);
  border-radius: 2px;
  color: var(--red-pen);
  font-family: var(--font-hand);
  letter-spacing: 0.08em;
  transform: rotate(-2deg);
}
.paper-body { position: relative; font-size: 17px; line-height: 2; white-space: pre-wrap; word-break: break-word; }
.paper-body p { margin: 0 0 0.7em; }
.problem-paper mark { background: rgba(239, 210, 140, 0.42); color: #7a4d16; border-bottom-color: rgba(122, 77, 22, 0.35); }
.analysis-map { width: 100%; height: 252px; margin: 2px 0 20px; }
.analysis-map svg { width: 100%; height: 100%; display: block; overflow: visible; }
.analysis-map text { font-family: var(--font-hand); }
.paper-images { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 18px 0 6px; }
.paper-image {
  min-width: 0;
  padding: 7px 7px 26px;
  background: #fffdf6;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  transform: rotate(0.4deg);
  cursor: zoom-in;
}
.paper-image:nth-child(even) { transform: rotate(-0.7deg); }
.paper-image img { width: 100%; max-height: 430px; object-fit: contain; margin: 0 auto; }
.answer-box { margin-top: 26px; border-top: 1px dashed rgba(43, 39, 33, 0.22); padding-top: 16px; }
.answer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid rgba(43, 39, 33, 0.28);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.25);
  color: var(--ink-soft);
  font-size: 13px;
}
.answer-toggle:hover { border-color: var(--red-pen); color: var(--red-pen); }
.answer-content { margin-top: 14px; font-size: 15.5px; line-height: 1.95; color: var(--ink-soft); white-space: pre-wrap; display: none; }
.answer-box.is-open .answer-content { display: block; }
.paper-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; padding-top: 12px; border-top: 1px solid rgba(43, 39, 33, 0.14); font-size: 11px; color: rgba(43, 39, 33, 0.5); letter-spacing: 0.06em; }

/* 讲题票 */
.lecture-ticket {
  position: relative;
  padding: 22px 22px 18px;
  color: var(--ink);
  background: linear-gradient(160deg, #f4ead5, #e9dcc0);
  border-radius: 3px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.4);
  transform: rotate(0.5deg);
}
.lecture-ticket::before,
.lecture-ticket::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 9px;
  background: radial-gradient(circle at 8px -2px, transparent 6px, #f0e5cf 6.5px) 0 0 / 16px 9px repeat-x;
}
.lecture-ticket::before { top: -1px; transform: rotate(180deg); }
.lecture-ticket::after { bottom: -1px; }
.ticket-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px dashed rgba(43, 39, 33, 0.25); }
.ticket-head span { font-family: Georgia, serif; font-size: 9.5px; letter-spacing: 0.24em; color: rgba(43, 39, 33, 0.5); }
.ticket-status {
  padding: 2px 8px;
  border: 1px solid rgba(176, 82, 63, 0.5);
  border-radius: 2px;
  color: var(--red-pen);
  font-size: 11px;
  transform: rotate(-2deg);
  letter-spacing: 0.08em;
}
.ticket-status.is-done { border-color: rgba(43, 39, 33, 0.35); color: rgba(43, 39, 33, 0.55); }
.ticket-main { padding: 16px 0 12px; }
.ticket-main .t-label { font-size: 10px; letter-spacing: 0.2em; color: rgba(43, 39, 33, 0.45); font-family: Georgia, serif; }
.ticket-main .t-name { margin-top: 5px; font-size: 23px; line-height: 1.2; }
.ticket-main .t-class { font-size: 12.5px; color: rgba(43, 39, 33, 0.6); margin-top: 4px; }
.ticket-rows { display: grid; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed rgba(43, 39, 33, 0.22); }
.ticket-row { display: flex; align-items: baseline; gap: 10px; font-size: 13.5px; }
.ticket-row span { flex: none; width: 42px; font-size: 10px; letter-spacing: 0.16em; color: rgba(43, 39, 33, 0.45); font-family: Georgia, serif; }
.ticket-row b { font-weight: 400; color: var(--ink); }
.ticket-row small { margin-left: auto; font-size: 10.5px; color: rgba(43, 39, 33, 0.5); }
.ticket-actions { display: grid; gap: 8px; margin-top: 18px; }
.ticket-actions .btn { width: 100%; }
.ticket-actions .btn--solid { background: #26352e; color: var(--chalk); border-color: #26352e; box-shadow: 3px 3px 0 rgba(43, 39, 33, 0.22); }
.ticket-actions .btn--solid:hover { background: #31453b; }
.ticket-actions .btn--chalk { color: var(--ink); border-color: rgba(43, 39, 33, 0.35); background: rgba(255, 255, 255, 0.25); }
.ticket-actions .btn--chalk:hover { background: rgba(255, 255, 255, 0.5); }
.ticket-note { margin-top: 12px; font-size: 10.5px; line-height: 1.7; color: rgba(43, 39, 33, 0.5); text-align: center; }
.ticket-thumb { position: relative; margin-top: 14px; border: 1px solid rgba(43, 39, 33, 0.2); background: #15312a; cursor: pointer; overflow: hidden; }
.ticket-thumb img { width: 100%; opacity: 0.9; }
.ticket-thumb .play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.25);
  color: var(--chalk);
}
.ticket-thumb .play span { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(242, 238, 224, 0.7); border-radius: 50%; background: rgba(0, 0, 0, 0.25); }

/* 知识点区 */
.knowledge { margin-top: clamp(42px, 6vw, 72px); }
.knowledge-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.knowledge-head h2 { margin: 0; font-size: clamp(25px, 3vw, 34px); font-weight: 400; }
.knowledge-head h2 em { color: var(--yellow); font-style: normal; }
.coverage { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--chalk-dim); }
.coverage-ring {
  --v: 0.5;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--yellow) calc(var(--v) * 1turn), rgba(242, 238, 224, 0.12) 0);
  position: relative;
}
.coverage-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #1a352d; }
.coverage-ring b { position: relative; font-family: Georgia, serif; font-size: 14px; font-weight: 400; }
.kp-core-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.kp-card {
  position: relative;
  padding: 17px 18px 15px;
  border: 1px solid rgba(242, 238, 224, 0.16);
  border-radius: 4px 8px 5px 7px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.045), rgba(0, 0, 0, 0.1));
  cursor: pointer;
  transition: 0.2s ease;
  text-align: left;
  color: inherit;
}
.kp-card:hover { border-color: rgba(239, 210, 140, 0.55); transform: translateY(-2px); background: rgba(255, 255, 255, 0.055); }
.kp-card h3 { margin: 0 0 7px; font-size: 18px; font-weight: 400; color: var(--chalk); display: flex; align-items: center; gap: 8px; }
.kp-card h3 .kp-grade { margin-left: auto; font-size: 9.5px; letter-spacing: 0.12em; color: var(--chalk-faint); border: 1px solid rgba(242, 238, 224, 0.16); padding: 1px 5px; border-radius: 2px; }
.kp-card p { margin: 0; font-size: 12.8px; line-height: 1.75; color: var(--chalk-dim); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.kp-card .kp-open { position: absolute; right: 14px; bottom: 12px; font-size: 11px; color: var(--yellow); opacity: 0; transition: 0.2s; }
.kp-card:hover .kp-open { opacity: 1; }

.prereq-strip { margin-top: 26px; }
.strip-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 13px; color: var(--chalk-soft); letter-spacing: 0.05em; }
.strip-title i { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(242, 238, 224, 0.18), transparent); }
.prereq-list { display: grid; gap: 8px; }
.prereq-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px dashed rgba(242, 238, 224, 0.16);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
  width: 100%;
  color: inherit;
}
.prereq-item:hover { border-color: rgba(242, 238, 224, 0.36); background: rgba(255, 255, 255, 0.045); }
.prereq-item .pi-depth { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(242, 238, 224, 0.22); font-family: Georgia, serif; font-size: 10.5px; color: var(--chalk-dim); }
.prereq-item b { font-weight: 400; font-size: 14.5px; }
.prereq-item small { color: var(--chalk-faint); font-size: 11px; margin-left: auto; flex: none; }
.prereq-item span.pv { color: var(--chalk-faint); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.plan-strip { margin-top: 30px; }
.plan-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.plan-item { padding: 14px 15px; border-top: 2px solid rgba(239, 210, 140, 0.45); background: rgba(255, 255, 255, 0.02); }
.plan-item b { display: block; font-weight: 400; font-size: 12px; letter-spacing: 0.1em; color: var(--yellow); margin-bottom: 6px; }
.plan-item p { margin: 0; font-size: 12.5px; line-height: 1.8; color: var(--chalk-dim); }

/* 铺垫 */
.prep-section { margin-top: 34px; padding-top: 26px; border-top: 1px dashed rgba(242, 238, 224, 0.16); }
.prep-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.prep-head h3 { margin: 0; font-size: 19px; font-weight: 400; }
.prep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.prep-card {
  padding: 14px 16px;
  border-left: 2px solid var(--yellow);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 0 4px 4px 0;
}
.prep-card h4 { margin: 0 0 5px; font-size: 14.5px; font-weight: 400; }
.prep-card p { margin: 0; font-size: 12.5px; line-height: 1.8; color: var(--chalk-dim); white-space: pre-wrap; }
.prep-card a { color: var(--blue); word-break: break-all; font-size: 12.5px; }
.prep-card img { margin-top: 8px; border: 1px solid rgba(242, 238, 224, 0.2); cursor: zoom-in; }
.prep-empty { padding: 16px; border: 1px dashed rgba(242, 238, 224, 0.16); color: var(--chalk-faint); font-size: 12.5px; }
.prep-note { margin-top: 12px; padding: 13px 15px; background: rgba(239, 210, 140, 0.06); border: 1px solid rgba(239, 210, 140, 0.18); font-size: 13px; color: var(--chalk-soft); white-space: pre-wrap; }

/* 相关 */
.related { margin-top: 36px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.related-item { padding: 13px 15px; border: 1px solid rgba(242, 238, 224, 0.12); border-radius: 3px; display: flex; gap: 10px; align-items: center; }
.related-item:hover { border-color: rgba(242, 238, 224, 0.3); background: rgba(255, 255, 255, 0.035); }
.related-item .rm { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--subj) 55%, transparent); color: var(--subj); font-size: 12px; }
.related-item b { display: block; font-weight: 400; font-size: 13px; line-height: 1.45; }
.related-item span { font-size: 10.5px; color: var(--chalk-faint); }

/* 详情页底部操作 */
.detail-bar { display: none; }

/* ------------------------------------------------------------ 编辑器 */
.editor { padding: clamp(22px, 4vw, 38px) 0 70px; }
.editor-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.editor-head h1 { margin: 0; font-size: clamp(28px, 3.6vw, 40px); font-weight: 400; }
.editor-head p { margin: 6px 0 0; font-size: 13px; color: var(--chalk-dim); }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.72fr); gap: 22px; align-items: start; }
.editor-paper {
  position: relative;
  padding: clamp(24px, 3.2vw, 38px);
  color: var(--ink);
  background:
    repeating-linear-gradient(180deg, transparent 0 33px, rgba(66, 83, 74, 0.075) 33px 34px),
    linear-gradient(160deg, #f6efdd, #eee3ca);
  border-radius: 3px;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.44);
}
.editor-paper::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 44px;
  width: 110px;
  height: 22px;
  background: rgba(214, 198, 158, 0.6);
  transform: rotate(-2deg);
  clip-path: polygon(2% 8%, 98% 0, 100% 92%, 0 100%);
}
.form-section { margin-bottom: 26px; }
.form-section > .fs-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 13px; padding-bottom: 7px; border-bottom: 1px solid rgba(43, 39, 33, 0.16); }
.fs-title b { font-weight: 400; font-size: 15px; letter-spacing: 0.06em; }
.fs-title span { font-family: Georgia, serif; font-size: 9.5px; letter-spacing: 0.16em; color: rgba(43, 39, 33, 0.42); }
.field { display: block; margin-bottom: 14px; }
.field > span.fl { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 5px; font-size: 11.5px; letter-spacing: 0.08em; color: rgba(43, 39, 33, 0.55); }
.field > span.fl i { font-style: normal; font-size: 10px; color: rgba(43, 39, 33, 0.38); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 8px 2px;
  border: 0;
  border-bottom: 1px solid rgba(43, 39, 33, 0.25);
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  outline: none;
  border-radius: 0;
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.9; border: 1px solid rgba(43, 39, 33, 0.18); padding: 10px 12px; background: rgba(255, 255, 255, 0.25); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--red-pen); box-shadow: 0 1px 0 var(--red-pen); }
.field input::placeholder, .field textarea::placeholder { color: rgba(43, 39, 33, 0.32); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.subject-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.subject-pick {
  padding: 5px 12px;
  border: 1px solid rgba(43, 39, 33, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: var(--ink-soft);
  font-size: 13px;
}
.subject-pick:hover { border-color: rgba(43, 39, 33, 0.45); }
.subject-pick.is-on { background: var(--pick, #2b2721); color: #f6efdd; border-color: transparent; }
.diff-picker { display: flex; gap: 6px; }
.diff-pick { flex: 1; padding: 5px 0; border: 1px solid rgba(43, 39, 33, 0.22); background: rgba(255, 255, 255, 0.2); font-size: 12px; color: var(--ink-soft); }
.diff-pick.is-on { background: rgba(43, 39, 33, 0.82); color: #f6efdd; border-color: transparent; }
.tag-input-wrap { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border-bottom: 1px solid rgba(43, 39, 33, 0.25); padding: 5px 0; }
.tag-input-wrap input { flex: 1; min-width: 100px; border: 0; background: none; padding: 3px 2px; font-size: 14px; outline: none; }
.tag-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border: 1px solid rgba(43, 39, 33, 0.25); border-radius: 2px; font-size: 11.5px; background: rgba(255, 255, 255, 0.3); }
.tag-pill button { border: 0; background: none; color: rgba(43, 39, 33, 0.5); padding: 0; font-size: 12px; }
.image-drop {
  border: 1px dashed rgba(43, 39, 33, 0.3);
  border-radius: 3px;
  padding: 14px;
  text-align: center;
  font-size: 12.5px;
  color: rgba(43, 39, 33, 0.5);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.16);
}
.image-drop:hover, .image-drop.is-over { border-color: var(--red-pen); color: var(--red-pen); }
.image-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.image-thumb { position: relative; width: 96px; height: 72px; border: 1px solid rgba(43, 39, 33, 0.2); background: #fff; }
.image-thumb img { width: 100%; height: 100%; object-fit: cover; }
.image-thumb button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(43, 39, 33, 0.3); background: #f6efdd; color: var(--red-pen); font-size: 11px; line-height: 1; }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.form-actions .btn { white-space: nowrap; }
.form-actions .hint { margin-left: auto; font-size: 11px; color: rgba(43, 39, 33, 0.45); }
.form-actions .btn--solid { background: #26352e; color: var(--chalk); border-color: #26352e; }
.form-actions .btn--chalk { color: var(--ink); border-color: rgba(43, 39, 33, 0.35); background: rgba(255, 255, 255, 0.2); }

/* 实时分析 */
.analysis-panel {
  position: sticky;
  top: 96px;
  padding: 20px 20px 18px;
  border: 1px solid rgba(242, 238, 224, 0.16);
  border-radius: 5px 3px 6px 4px;
  background: rgba(9, 20, 16, 0.46);
  backdrop-filter: blur(4px);
}
.ap-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.ap-head b { font-weight: 400; font-size: 15px; letter-spacing: 0.06em; }
.ap-head span { font-family: Georgia, serif; font-size: 9px; letter-spacing: 0.18em; color: var(--chalk-faint); }
.ap-status { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--chalk-faint); margin-bottom: 12px; }
.ap-status i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 7px var(--green); }
.ap-status.is-busy i { background: var(--yellow); box-shadow: 0 0 7px var(--yellow); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
.ap-summary { margin: 0 0 14px; font-size: 12.5px; line-height: 1.85; color: var(--chalk-dim); }
.ap-block { margin-top: 14px; }
.ap-block h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 11px; font-weight: 400; letter-spacing: 0.12em; color: var(--chalk-faint); }
.ap-block h4 i { flex: 1; height: 1px; background: rgba(242, 238, 224, 0.12); }
.ap-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ap-chip { padding: 3px 8px; border: 1px solid rgba(239, 210, 140, 0.3); border-radius: 2px; background: rgba(239, 210, 140, 0.06); color: var(--yellow); font-size: 11.5px; }
.ap-chip--pre { border-color: rgba(242, 238, 224, 0.16); background: none; color: var(--chalk-dim); }
.ap-plan { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ap-plan li { display: grid; grid-template-columns: 16px 1fr; gap: 7px; font-size: 11.5px; line-height: 1.65; color: var(--chalk-dim); }
.ap-plan li b { color: var(--chalk-soft); font-weight: 400; }
.ap-plan li i { width: 14px; height: 14px; margin-top: 2px; display: grid; place-items: center; border: 1px solid rgba(242, 238, 224, 0.2); border-radius: 50%; font-size: 8px; font-style: normal; }
.ap-empty { padding: 16px 0; font-size: 12px; color: var(--chalk-faint); line-height: 1.8; }

/* ------------------------------------------------------------ 图谱页 */
.graph-page { padding: clamp(24px, 4vw, 42px) 0 70px; }
.graph-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.graph-hero h1 { margin: 0; font-size: clamp(30px, 4vw, 46px); font-weight: 400; }
.graph-hero h1 em { font-style: normal; color: var(--yellow); }
.graph-hero p { max-width: 400px; margin: 0 0 4px; font-size: 13px; color: var(--chalk-dim); text-align: right; }
.graph-stage { position: relative; min-height: 620px; padding: 12px; border: 1px solid rgba(242, 238, 224, 0.14); border-radius: 6px; background: rgba(9, 20, 16, 0.32); display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0; }
.graph-svg-wrap { min-width: 0; }
.graph-stage svg { display: block; width: 100%; height: 620px; }
.gnode { cursor: pointer; }
.gnode circle { fill: rgba(242, 238, 224, 0.06); stroke: rgba(242, 238, 224, 0.3); stroke-width: 1; transition: 0.2s; }
.gnode text { fill: var(--chalk-dim); font-size: 11.5px; font-family: var(--font-hand); pointer-events: none; paint-order: stroke; stroke: #0c1512; stroke-width: 2.4px; stroke-linejoin: round; }.gnode.is-on circle { fill: rgba(239, 210, 140, 0.18); stroke: var(--yellow); }
.gnode.is-on text { fill: var(--yellow); }
.gnode.is-near circle { stroke: rgba(239, 210, 140, 0.6); }
.gnode.is-dim { opacity: 0.25; }
.gedge { stroke: rgba(242, 238, 224, 0.14); stroke-width: 1; stroke-dasharray: 2 3; }
.gedge.is-on { stroke: rgba(239, 210, 140, 0.65); stroke-dasharray: none; }
.graph-side-panel { position: static; width: auto; padding: 20px 4px 20px 22px; background: none; border-left: 1px dashed rgba(242, 238, 224, 0.14); border-radius: 0; backdrop-filter: none; }
.graph-side-panel h3 { margin: 0 0 6px; font-size: 20px; font-weight: 400; color: var(--yellow); }
.graph-side-panel p { margin: 0 0 8px; font-size: 12.5px; line-height: 1.8; color: var(--chalk-dim); }
.graph-side-panel .gs-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.graph-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.view-switch { display: flex; gap: 2px; margin-left: auto; padding: 3px; border: 1px solid rgba(242, 238, 224, 0.16); border-radius: 999px; background: rgba(255, 255, 255, 0.025); }
.view-switch button { padding: 5px 13px; border: 0; border-radius: 999px; background: none; color: var(--chalk-faint); font-size: 12.5px; }
.view-switch button:hover { color: var(--chalk); }
.view-switch button.is-on { background: rgba(239, 210, 140, 0.14); color: var(--yellow); }
.path-board { display: grid; gap: 14px; }
.path-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 22px 18px;
  border: 1px solid rgba(242, 238, 224, 0.13);
  border-radius: 5px 8px 6px 7px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.08));
}
.path-index { padding-right: 16px; border-right: 1px dashed rgba(242, 238, 224, 0.14); font-family: Georgia, serif; font-size: 9.5px; letter-spacing: 0.18em; color: var(--chalk-faint); }
.path-index b { display: block; margin-top: 4px; font-family: Georgia, serif; font-weight: 400; font-size: 26px; color: var(--yellow); letter-spacing: 0.02em; }
.path-main { min-width: 0; }
.path-nodes { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.path-node {
  padding: 5px 12px;
  border: 1px solid rgba(242, 238, 224, 0.2);
  border-radius: 3px 6px 4px 5px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--chalk-soft);
  font-size: 14px;
  line-height: 1.5;
  transition: 0.18s ease;
}
.path-node:hover { color: var(--yellow); border-color: rgba(239, 210, 140, 0.55); transform: translateY(-1px); }
.path-node.is-end { color: var(--yellow); border-color: rgba(239, 210, 140, 0.48); background: rgba(239, 210, 140, 0.07); }
.path-arrow { color: var(--chalk-faint); font-size: 12px; }
.path-desc { margin: 10px 0 0; font-size: 12px; line-height: 1.8; color: var(--chalk-faint); }
.path-foot { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-top: 8px; padding: 20px 24px; border: 1px dashed rgba(242, 238, 224, 0.16); border-radius: 5px; }
.path-foot p { margin: 0; font-size: 12.5px; line-height: 1.9; color: var(--chalk-dim); }

/* ------------------------------------------------------------ 关于页 */
.about { padding: clamp(24px, 4vw, 42px) 0 70px; }
.about-hero { max-width: 760px; }
.about-hero h1 { margin: 6px 0 14px; font-size: clamp(32px, 4.4vw, 52px); font-weight: 400; line-height: 1.25; }
.about-hero h1 em { font-style: normal; color: var(--yellow); }
.about-hero p { font-size: 16px; line-height: 1.95; color: var(--chalk-dim); }
.about-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 36px; }
.about-card { padding: 22px 24px; border: 1px solid rgba(242, 238, 224, 0.14); border-radius: 4px; background: rgba(255, 255, 255, 0.025); }
.about-card h3 { margin: 0 0 10px; font-size: 18px; font-weight: 400; color: var(--yellow); }
.about-card p, .about-card li { font-size: 13.5px; line-height: 1.9; color: var(--chalk-dim); }
.about-card ul { margin: 0; padding-left: 18px; }
.about-card kbd { padding: 1px 6px; border: 1px solid rgba(242, 238, 224, 0.25); border-radius: 3px; font-family: Georgia, serif; font-size: 11px; background: rgba(255, 255, 255, 0.06); }
.about-card .hl { color: var(--chalk); }

/* ------------------------------------------------------------ 管理页 */
.admin { padding: clamp(24px, 4vw, 40px) 0 70px; }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.admin-head h1 { margin: 0; font-size: clamp(28px, 3.6vw, 38px); font-weight: 400; }
.admin-tabs { display: flex; gap: 4px; border-bottom: 1px solid rgba(242, 238, 224, 0.16); margin-bottom: 20px; }
.admin-tab { padding: 8px 16px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--chalk-dim); font-size: 14px; }
.admin-tab.is-on { color: var(--yellow); border-bottom-color: var(--yellow); }
.admin-list { display: grid; gap: 6px; }
.admin-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid rgba(242, 238, 224, 0.1); border-radius: 3px; }
.admin-row .ar-subj { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--subj) 55%, transparent); color: var(--subj); font-size: 11px; }
.admin-row b { font-weight: 400; font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row small { font-size: 11px; color: var(--chalk-faint); white-space: nowrap; }
.admin-row .ar-actions { display: flex; gap: 4px; margin-left: auto; }
.admin-form { max-width: 560px; display: grid; gap: 14px; }
.admin-form .field { margin: 0; }
.admin-form .field input, .admin-form .field textarea { color: var(--chalk); border-color: rgba(242, 238, 224, 0.22); background: rgba(255, 255, 255, 0.03); padding: 8px 10px; border: 1px solid rgba(242, 238, 224, 0.18); }
.admin-form .field > span.fl { color: var(--chalk-dim); }
.admin-form .field textarea { min-height: 80px; }
.key-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--green); }
.key-state.is-locked { color: var(--chalk-faint); }

/* ------------------------------------------------------------ 弹层 */
.modal-root { position: fixed; inset: 0; z-index: 90; display: none; }
.modal-root.is-open { display: block; }
.modal-mask { position: absolute; inset: 0; background: rgba(4, 8, 7, 0.72); backdrop-filter: blur(4px); animation: fade 0.2s ease both; }
@keyframes fade { from { opacity: 0; } }
.modal {
  position: relative;
  width: min(460px, calc(100% - 32px));
  max-height: calc(100vh - 60px);
  overflow: auto;
  margin: 8vh auto 0;
  padding: 26px 26px 22px;
  background: linear-gradient(160deg, #1b352c, #142b24);
  border: 1px solid rgba(242, 238, 224, 0.2);
  border-radius: 5px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6);
  animation: modal-in 0.24s ease both;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(0.985); } }
.modal--wide { width: min(760px, calc(100% - 32px)); }
.modal--paper { background: linear-gradient(160deg, #f6efdd, #ece0c8); color: var(--ink); border-color: rgba(43, 39, 33, 0.2); }
.modal-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.modal-head h2 { margin: 0; font-size: 22px; font-weight: 400; line-height: 1.3; }
.modal-head p { margin: 4px 0 0; font-size: 12px; color: var(--chalk-faint); }
.modal--paper .modal-head p { color: rgba(43, 39, 33, 0.5); }
.modal-close { margin-left: auto; flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid rgba(242, 238, 224, 0.2); border-radius: 50%; background: none; color: var(--chalk-dim); }
.modal-close:hover { color: var(--chalk); }
.modal--paper .modal-close { border-color: rgba(43, 39, 33, 0.2); color: rgba(43, 39, 33, 0.55); }
.modal p.m-text { font-size: 13px; line-height: 1.8; color: var(--chalk-dim); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.modal .field { margin-bottom: 12px; }
.modal .field input { color: var(--chalk); border-color: rgba(242, 238, 224, 0.3); }
.modal--paper .field input { color: var(--ink); border-color: rgba(43, 39, 33, 0.3); }
.modal-tip { padding: 10px 12px; background: rgba(239, 210, 140, 0.07); border-left: 2px solid var(--yellow); font-size: 12px; line-height: 1.75; color: var(--chalk-dim); }
.modal--paper .modal-tip { background: rgba(176, 82, 63, 0.06); border-left-color: var(--red-pen); color: var(--ink-soft); }

/* 知识卡抽屉 */
.drawer-mask { position: fixed; inset: 0; z-index: 80; background: rgba(4, 8, 7, 0.5); opacity: 0; pointer-events: none; transition: 0.25s; }
.drawer-mask.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 81;
  width: min(440px, 100%);
  padding: 30px 28px 40px;
  overflow-y: auto;
  background: linear-gradient(170deg, #1c352d, #132a23 60%, #10241e);
  border-left: 1px solid rgba(242, 238, 224, 0.16);
  box-shadow: -30px 0 70px rgba(0, 0, 0, 0.45);
  transform: translateX(102%);
  transition: transform 0.3s cubic-bezier(0.22, 0.9, 0.3, 1);
}
.drawer.is-open { transform: none; }
.drawer .d-kicker { font-family: Georgia, serif; font-size: 9.5px; letter-spacing: 0.22em; color: var(--chalk-faint); }
.drawer h2 { margin: 8px 0 4px; font-size: 28px; font-weight: 400; color: var(--yellow); }
.drawer .d-grade { font-size: 10px; letter-spacing: 0.12em; color: var(--chalk-faint); }
.drawer .d-block { margin-top: 20px; padding-top: 14px; border-top: 1px dashed rgba(242, 238, 224, 0.14); }
.drawer .d-block h4 { margin: 0 0 6px; font-size: 10.5px; font-weight: 400; letter-spacing: 0.16em; color: var(--chalk-faint); }
.drawer .d-block p { margin: 0; font-size: 13.5px; line-height: 1.9; color: var(--chalk-soft); white-space: pre-wrap; }
.drawer .d-check { padding: 12px 14px; background: rgba(239, 210, 140, 0.06); border: 1px solid rgba(239, 210, 140, 0.2); }
.drawer .d-check button { margin-top: 8px; font-size: 11.5px; color: var(--yellow); background: none; border: 0; border-bottom: 1px dashed currentColor; padding: 0 0 2px; }
.drawer .d-check .d-answer { margin-top: 8px; color: var(--chalk-dim); font-size: 13px; display: none; }
.drawer .d-check.is-open .d-answer { display: block; }
.drawer .d-close { position: absolute; top: 20px; right: 20px; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(242, 238, 224, 0.2); border-radius: 50%; background: none; color: var(--chalk-dim); }
.drawer .d-pre { display: flex; flex-wrap: wrap; gap: 6px; }
.drawer .d-pre a { padding: 3px 8px; border: 1px solid rgba(242, 238, 224, 0.16); border-radius: 2px; font-size: 11.5px; color: var(--chalk-dim); }
.drawer .d-pre a:hover { color: var(--yellow); border-color: rgba(239, 210, 140, 0.4); }

/* 图片查看 */
.lightbox { position: fixed; inset: 0; z-index: 95; display: none; place-items: center; background: rgba(0, 0, 0, 0.86); padding: 4vw; }
.lightbox.is-open { display: grid; }
.lightbox img { max-width: 100%; max-height: 92vh; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6); }
.lightbox button { position: absolute; top: 22px; right: 26px; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 50%; background: rgba(0, 0, 0, 0.3); color: #fff; }

/* Toast */
.toast-root { position: fixed; left: 50%; bottom: 34px; z-index: 120; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  padding: 9px 18px;
  border: 1px solid rgba(242, 238, 224, 0.24);
  border-radius: 3px;
  background: rgba(20, 40, 33, 0.94);
  color: var(--chalk);
  font-size: 13px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  animation: toast-in 0.25s ease both;
  white-space: nowrap;
}
.toast.is-bad { border-color: rgba(231, 169, 174, 0.5); color: #f3c9cb; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Loading */
.page-loading { min-height: 52vh; display: grid; place-items: center; align-content: center; gap: 16px; color: var(--chalk-faint); font-size: 13px; }
.chalk-loader { width: 42px; height: 42px; border: 1px dashed rgba(242, 238, 224, 0.4); border-radius: 50%; animation: spin 1.6s linear infinite; position: relative; }
.chalk-loader::after { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(239, 210, 140, 0.5); border-radius: 50%; border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 杂项 */
.muted { color: var(--chalk-faint); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.nowrap { white-space: nowrap; }
mark { background: rgba(239, 210, 140, 0.18); color: var(--yellow); border-bottom: 1px dashed rgba(239, 210, 140, 0.5); padding: 0 1px; }

/* ------------------------------------------------------------ 响应式 */
@media (max-width: 1080px) {
  .problem-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .plan-list { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .editor-grid { grid-template-columns: minmax(0, 1.2fr) 320px; }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .hero-inner { grid-template-columns: 1fr; }
  .today { transform: none; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 4px 0; }
  .stat:nth-child(3)::before { display: none; }
  .how-grid { grid-template-columns: 1fr; gap: 6px; }
  .step::after { display: none; }
  .graph-panel { grid-template-columns: 1fr; }
  .graph-side { border-left: 0; border-top: 1px dashed rgba(242, 238, 224, 0.14); padding: 16px 0 0; }
  .detail-grid { grid-template-columns: 1fr; }
  .lecture-ticket { transform: none; max-width: 420px; }
  .editor-grid { grid-template-columns: 1fr; }
  .analysis-panel { position: static; }
  .about-grid { grid-template-columns: 1fr; }
  .graph-stage svg { height: 460px; }
  .graph-stage { grid-template-columns: 1fr; min-height: 0; }
  .graph-side-panel { position: static; width: auto; margin-top: 0; border-left: 0; border-top: 1px dashed rgba(242, 238, 224, 0.14); padding: 16px 4px 4px; }
  .detail-actions { width: 100%; margin-left: 0; }
  .detail-head { flex-wrap: wrap; }
  .detail-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    gap: 8px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(13, 19, 17, 0.4), rgba(13, 19, 17, 0.96));
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(242, 238, 224, 0.12);
  }
  .detail-bar .btn { flex: 1; }
  .detail { padding-bottom: 92px; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .only-mobile { display: grid !important; }
  .hero h1 { font-size: clamp(30px, 10.2vw, 46px); }
  .graph-canvas { display: none; }
  .graph-mobile { display: block; }
  .analysis-map { display: none; }
  .graph-mobile .gm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 8px; font-size: 13px; color: var(--chalk-dim); }
  .graph-mobile .gm-row span { padding: 3px 9px; border: 1px dashed rgba(242, 238, 224, 0.22); border-radius: 3px; }
  .graph-mobile .gm-row b { padding: 3px 9px; border: 1px solid rgba(239, 210, 140, 0.4); border-radius: 3px; color: var(--yellow); font-weight: 400; }
  .graph-mobile .gm-row i { font-style: normal; color: var(--chalk-faint); }
  .graph-mobile p { margin: 12px 0 0; font-size: 12.5px; line-height: 1.85; color: var(--chalk-dim); }
  .topbar { height: 66px; gap: 14px; }
  .brand-text b { font-size: 19px; }
  .brand-text small { font-size: 8px; }
  .brand-mark { width: 36px; height: 36px; }
  .btn--publish span { display: none; }
  .btn--publish { width: 42px; padding: 0; border-radius: 50%; }
  .hero-board { min-height: 0; }
  .hero-inner { padding: 26px 20px 20px; gap: 24px; }
  .hero-sub { margin-top: 16px; font-size: 14.5px; }
  .hero-stats { padding: 0 20px 20px; }
  .stat { padding: 12px 10px 2px; }
  .stat b { font-size: 26px; }
  .problem-grid { grid-template-columns: 1fr; }
  .lobby-tools { flex-direction: column; align-items: stretch; gap: 8px; }
  .search-box { width: 100%; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .section-deck { text-align: left; }
  .card { min-height: 0; }
  .schedule-board { overflow-x: auto; }
  .schedule-table { min-width: 560px; }
  .detail-stamp { width: 44px; height: 44px; font-size: 18px; }
  .detail-head h1 { font-size: 26px; }
  .problem-paper { border-radius: 2px; }
  .paper-body { font-size: 16px; }
  .plan-list { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .editor-head { flex-direction: column; align-items: flex-start; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .form-actions .btn { flex: 1 1 auto; }
  .form-actions .hint { flex: 1 1 100%; margin-left: 0; }
  .knowledge-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .prereq-item .pv { display: none; }
  .strip-title .muted { display: none; }
  .modal { margin-top: 5vh; padding: 22px 18px 18px; }
  .graph-hero { flex-direction: column; align-items: flex-start; gap: 10px; }
  .graph-hero p { text-align: left; }
  .view-switch { margin-left: 0; }
  .path-row { grid-template-columns: 1fr; gap: 10px; padding: 16px 15px; }
  .path-index { display: flex; align-items: baseline; gap: 8px; padding-right: 0; border-right: 0; }
  .path-index b { margin-top: 0; font-size: 20px; }
  .path-desc { margin-top: 8px; }
  .path-foot { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .toast { white-space: normal; text-align: center; max-width: 86vw; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* 打印：题纸与知识卡 */
@media print {
  .topbar, .footer, .hero, .detail-bar, .detail-actions, .lobby-tools, .filter-row, .related, .prep-section, .drawer, .modal-root, .toast-root { display: none !important; }
  body { background: #fff; color: #111; }
  .room { display: none; }
  .problem-paper { box-shadow: none; transform: none; border: 1px solid #ddd; }
  .detail-grid { display: block; }
  .lecture-ticket { box-shadow: none; transform: none; margin-top: 16px; }
  .knowledge-head h2, .kp-card h3 { color: #111; }
}
