/* ================================================================
   独立站春哥 · 会员中心样式
   仅用于 /member/app/ 与 /library/ 的服务端渲染页面
   依赖 style.css 中的设计令牌与 .prose / .btn
   ================================================================ */

/* ---------- 1. 整体骨架 ---------- */
body.member-page {
  background: var(--paper);
}

.m-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- 2. 左侧会员导航 ---------- */
.m-side {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--on-dark);
  padding: 26px 20px 22px;
  overflow-y: auto;
}

.m-side .brand {
  padding: 0 6px;
}

.m-side .brand-mark {
  background: var(--orange);
  color: #fff;
}

.m-side .brand-name {
  color: var(--on-dark);
}

.m-side .brand-sub {
  color: var(--on-dark-muted);
}

.m-side-badge {
  margin: 20px 6px 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ff9a74;
}

.m-side-badge::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
}

.m-side-owner {
  margin: 10px 6px 24px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--on-dark-muted);
}

.m-nav {
  display: grid;
  gap: 4px;
}

.m-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 9px;
  border-left: 2px solid transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--on-dark-soft);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.m-nav a small {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--on-dark-muted);
}

.m-nav a:hover {
  background: rgba(245, 242, 234, 0.06);
  color: var(--on-dark);
}

.m-nav a.is-active {
  background: rgba(245, 242, 234, 0.1);
  border-left-color: var(--orange);
  color: #fff;
}

.m-nav a.is-active small {
  color: #ff9a74;
}

.m-side-foot {
  margin-top: auto;
  padding-top: 22px;
}

.m-identity {
  border-top: 1px solid var(--line-dark);
  padding: 18px 6px 0;
}

.m-identity-top {
  display: flex;
  align-items: center;
  gap: 11px;
}

.m-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  background: rgba(245, 242, 234, 0.1);
  border: 1px solid var(--line-dark);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--on-dark);
}

.m-identity-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--on-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m-identity-code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--on-dark-muted);
}

.m-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--on-dark-soft);
}

.m-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5ac394;
  box-shadow: 0 0 0 3px rgba(90, 195, 148, 0.16);
}

.m-side-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.m-linkbtn {
  border: 0;
  background: none;
  padding: 4px 0;
  font-size: 11.5px;
  color: var(--on-dark-muted);
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.m-linkbtn:hover {
  color: #ff9a74;
  border-bottom-color: #ff9a74;
}

.m-side-contact {
  margin-top: 14px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--on-dark-muted);
}

/* ---------- 3. 主区域 ---------- */
.m-main {
  min-width: 0;
  background: var(--paper);
}

.m-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 30;
  align-items: center;
  gap: 12px;
  height: 58px;
  padding: 0 18px;
  background: rgba(247, 244, 237, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.m-burger {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  flex: none;
}

.m-burger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
}

.m-burger span + span {
  margin-top: 4px;
}

.m-topbar-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.m-topbar-code {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.m-overlay {
  display: none;
}

.m-container {
  width: min(100% - 64px, 1040px);
  margin-inline: auto;
}

.m-page {
  padding: 44px 0 96px;
}

/* ---------- 4. 会员首页 Hero ---------- */
.m-hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: var(--ink);
  color: var(--on-dark);
  padding: 42px 44px;
  box-shadow: var(--shadow-md);
}

.m-hero::before {
  content: "";
  position: absolute;
  right: -120px;
  top: -140px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(226, 84, 45, 0.4), transparent 68%);
  pointer-events: none;
}

.m-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(245, 242, 234, 0.05) 1px, transparent 1px);
  background-size: 100% 34px;
  opacity: 0.5;
  pointer-events: none;
}

.m-hero > * {
  position: relative;
  z-index: 1;
}

.m-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ff9a74;
}

.m-eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}

.m-hero h1 {
  margin-top: 18px;
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.03em;
}

.m-hero-lead {
  max-width: 560px;
  margin-top: 14px;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--on-dark-soft);
}

.m-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line-dark);
  font-size: 12.5px;
  color: var(--on-dark-muted);
}

.m-hero-meta b {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--on-dark);
  letter-spacing: 0.04em;
}

.m-hero-meta .m-tag-ok {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(90, 195, 148, 0.14);
  border: 1px solid rgba(90, 195, 148, 0.3);
  color: #9fe3c2;
  font-size: 11.5px;
}

.m-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

/* ---------- 5. 通用区块 ---------- */
.m-section {
  margin-top: 48px;
}

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

.m-section-head h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.m-section-head p {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.m-section-link {
  flex: none;
  font-size: 12.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 3px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.m-section-link:hover {
  color: var(--orange-deep);
  border-color: var(--orange);
}

/* ---------- 6. 入口卡片 ---------- */
.m-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.m-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.m-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.m-card-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--orange-deep);
}

.m-card h3 {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.m-card p {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

.m-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  font-size: 11.5px;
  color: var(--muted-2);
}

.m-card-foot b {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- 7. 列表 / 目录 ---------- */
.m-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  overflow: hidden;
}

.m-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: #fbf8f1;
}

.m-panel-head h2,
.m-panel-head h3 {
  font-size: 15px;
  font-weight: 700;
}

.m-panel-head p {
  font-size: 12.5px;
  color: var(--muted);
}

.m-panel-body {
  padding: 6px 0;
}

.m-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s var(--ease);
}

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

.m-row:hover {
  background: #fdfbf6;
}

.m-row-num {
  flex: none;
  width: 30px;
  padding-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
}

.m-row-main {
  min-width: 0;
  flex: 1;
}

.m-row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.m-row-title:hover {
  color: var(--orange-deep);
}

.m-row-desc {
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

.m-row-meta {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-size: 11px;
  color: var(--muted-2);
  white-space: nowrap;
}

.m-row-arrow {
  flex: none;
  color: var(--muted-2);
  font-size: 13px;
  padding-top: 2px;
}

/* ---------- 8. 标签 ---------- */
.m-tag {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.m-tag.free {
  background: var(--green-soft);
  color: var(--green);
}

.m-tag.member {
  background: var(--orange-soft);
  color: var(--orange-deep);
}

.m-tag.soon {
  background: #ece7db;
  color: #6e6a60;
}

.m-tag.new {
  background: #fff2cc;
  color: #8a6100;
}

/* ---------- 9. 页面标题 ---------- */
.m-page-head {
  margin-bottom: 32px;
}

.m-page-head h1 {
  margin-top: 12px;
  font-size: clamp(1.6rem, 2.6vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.m-page-head p {
  max-width: 620px;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
}

.m-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.m-crumb a:hover {
  color: var(--orange-deep);
}

.m-crumb span {
  color: var(--muted-2);
}

/* ---------- 10. 提示条 ---------- */
.m-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: #fbf8f1;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
}

.m-note b {
  color: var(--ink);
}

.m-note-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--orange-soft);
  color: var(--orange-deep);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ---------- 11. 课程分类 ---------- */
.m-cats {
  display: grid;
  gap: 20px;
}

.m-cat {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  overflow: hidden;
}

.m-cat-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: #fbf8f1;
  border-bottom: 1px solid var(--line);
}

.m-cat-idx {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--on-dark);
  font-family: var(--font-mono);
  font-size: 11px;
}

.m-cat-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.m-cat-desc {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.m-cat-count {
  margin-left: auto;
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
}

.m-empty-row {
  padding: 18px 24px;
  font-size: 12.5px;
  color: var(--muted-2);
}

/* ---------- 12. 文章 ---------- */
.m-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 258px;
  gap: 46px;
  align-items: start;
}

.m-article-head {
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.m-article-head h1 {
  margin-top: 14px;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.03em;
}

.m-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 16px;
  font-size: 11.5px;
  color: var(--muted-2);
}

.m-article-body {
  padding-top: 30px;
}

.m-article-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 52px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
}

.m-article-foot a {
  color: var(--muted);
  transition: color 0.2s var(--ease);
}

.m-article-foot a:hover {
  color: var(--orange-deep);
}

.m-aside {
  position: sticky;
  top: 28px;
  display: grid;
  gap: 16px;
}

.m-aside-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  padding: 18px;
}

.m-aside-card h3 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.m-toc {
  display: grid;
  gap: 2px;
  margin-top: 12px;
}

.m-toc a {
  display: block;
  padding: 6px 0 6px 12px;
  border-left: 2px solid var(--line);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-soft);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.m-toc a.lv3 {
  padding-left: 22px;
  font-size: 12px;
  color: var(--muted);
}

.m-toc a:hover,
.m-toc a.is-active {
  color: var(--orange-deep);
  border-left-color: var(--orange);
}

.m-chapters {
  display: grid;
  gap: 2px;
  margin-top: 10px;
}

.m-chapters a {
  display: flex;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 7px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-soft);
}

.m-chapters a:hover {
  background: #fbf8f1;
  color: var(--orange-deep);
}

.m-chapters a.is-current {
  background: var(--orange-soft);
  color: var(--orange-deep);
  font-weight: 600;
}

.m-chapters i {
  flex: none;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 10.5px;
  color: var(--muted-2);
}

/* ---------- 13. 工具库 ---------- */
.m-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.m-tool {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}

.m-tool-ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--on-dark);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.m-tool h3 {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 700;
}

.m-tool p {
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
}

.m-tool-usage {
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.m-tool-usage b {
  font-weight: 600;
  color: var(--text-soft);
}

.m-tool-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  font-size: 11px;
  color: var(--muted-2);
}

.m-tool-go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line-strong);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--orange-deep);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.m-tool-go:hover {
  color: var(--orange);
  border-color: var(--orange);
}

/* 课程附件下载条 */
.m-attach {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.m-attach b {
  display: block;
  font-size: 14px;
  color: var(--ink);
}

.m-attach span {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .m-attach {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- 14. 资料库 ---------- */
.m-res-list {
  display: grid;
  gap: 16px;
}

.m-res {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}

.m-file {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 52px;
  border-radius: 8px;
  background: #fbf8f1;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--orange-deep);
  text-transform: uppercase;
}

.m-res-main {
  min-width: 0;
  flex: 1;
}

.m-res-main h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
}

.m-res-main p {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

.m-res-meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted-2);
}

.m-res .btn {
  flex: none;
}

/* ---------- 15. 更新内容 ---------- */
.m-updates {
  position: relative;
  display: grid;
  gap: 0;
  padding-left: 6px;
}

.m-update {
  position: relative;
  display: flex;
  gap: 20px;
  padding: 18px 0 18px 26px;
  border-left: 1px solid var(--line);
}

.m-update::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 24px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--orange);
}

.m-update:last-child {
  padding-bottom: 0;
}

.m-update-date {
  flex: none;
  width: 82px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
  padding-top: 2px;
}

.m-update-main {
  min-width: 0;
  flex: 1;
}

.m-update-title {
  font-size: 14.5px;
  font-weight: 600;
}

.m-update-title:hover {
  color: var(--orange-deep);
}

.m-update-desc {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- 16. 状态页 ---------- */
.m-state-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 40px 24px;
  background: var(--paper);
}

.m-state-card {
  width: min(100%, 520px);
  padding: 40px 36px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.m-state-ico {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--orange-soft);
  color: var(--orange-deep);
}

.m-state-card h1 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.m-state-card p {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--muted);
}

.m-state-card .btn {
  margin-top: 22px;
}

.m-state-code {
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #fbf8f1;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- 17. 富文本补充 ---------- */
.prose table {
  width: 100%;
  margin: 6px 0;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.7;
}

.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: #fbf8f1;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

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

.prose pre {
  padding: 18px 20px;
  border-radius: 12px;
  background: #111820;
  color: #e9e4d8;
  font-size: 12.5px;
  line-height: 1.7;
  overflow-x: auto;
}

.prose pre code {
  padding: 0;
  background: none;
  color: inherit;
}

.prose code {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(14, 19, 24, 0.07);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.prose img {
  border-radius: 12px;
  border: 1px solid var(--line);
}

.prose figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

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

/* ---------- 18. 响应式 ---------- */
@media (max-width: 1180px) {
  .m-container {
    width: min(100% - 48px, 1040px);
  }

  .m-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .m-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1020px) {
  .m-article-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .m-aside {
    position: static;
    order: 2;
  }
}

@media (max-width: 900px) {
  .m-shell {
    grid-template-columns: 1fr;
  }

  .m-side {
    position: fixed;
    inset: 0 auto 0 0;
    width: 278px;
    height: 100%;
    transform: translateX(-102%);
    transition: transform 0.32s var(--ease);
    box-shadow: 0 24px 60px rgba(14, 19, 24, 0.3);
  }

  body.m-nav-open .m-side {
    transform: none;
  }

  .m-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(14, 19, 24, 0.44);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
  }

  body.m-nav-open .m-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  body.m-nav-open {
    overflow: hidden;
  }

  .m-topbar {
    display: flex;
  }

  .m-page {
    padding: 30px 0 72px;
  }

  .m-container {
    width: min(100% - 36px, 1040px);
  }

  .m-hero {
    padding: 32px 26px;
    border-radius: 18px;
  }

  .m-section {
    margin-top: 36px;
  }

  .m-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 640px) {
  .m-cards,
  .m-tools {
    grid-template-columns: minmax(0, 1fr);
  }

  .m-page-head {
    margin-bottom: 24px;
  }

  .m-row {
    padding: 14px 18px;
  }

  .m-row-meta {
    display: none;
  }

  .m-cat-head {
    padding: 16px 18px;
  }

  .m-cat-count {
    display: none;
  }

  .m-res {
    flex-wrap: wrap;
    padding: 16px 18px;
  }

  .m-res .btn {
    width: 100%;
  }

  .m-res-meta {
    order: 3;
  }

  .m-update {
    gap: 12px;
    padding-left: 18px;
  }

  .m-update-date {
    width: 62px;
  }

  .m-article-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .prose h2 {
    font-size: 21px;
  }

  .m-hero h1 {
    font-size: 1.6rem;
  }
}
