:root {
  --bg: #f5f6f8;
  --bg-soft: #eef1f5;
  --panel: #ffffff;
  --panel-2: #f0f2f5;
  --border: #e3e6ea;
  --border-strong: #d6dae1;
  --text: #111827;
  --muted: #6b7280;
  --accent: #3b82f6;
  --accent-2: #60a5fa;
  --warn: #b45309;
  --warn-bg: #fef3c7;
  --ok: #0f9d58;
  --ok-bg: #e7f6ee;
  --danger: #dc2626;
  --radius: 14px;
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 6px 18px rgba(16, 24, 40, .05);
  --shadow-hover: 0 8px 28px rgba(16, 24, 40, .10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px; }

/* 顶栏 */
.topbar {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: .3px; }
.brand .dot { width: 24px; height: 24px; border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.brand small { color: var(--muted); font-weight: 600; letter-spacing: 2px; font-size: 11px;
  text-transform: uppercase; }

.nav a { color: var(--muted); margin-left: 20px; font-size: 14px; }
.nav a:hover { color: var(--text); text-decoration: none; }

/* Hero */
.hero { padding: 72px 0 44px; }
.hero h1 { font-size: 42px; margin: 0 0 14px; line-height: 1.12; letter-spacing: -.5px; }
.hero h1 .hl { color: var(--accent); }
.hero p { color: var(--muted); max-width: 620px; font-size: 16.5px; margin: 0; }

/* 网格 / 卡片 */
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--border-strong); }
.card .logo { width: 46px; height: 46px; border-radius: 11px; object-fit: cover;
  border: 1px solid var(--border); background: var(--panel-2); }
.card h3 { margin: 14px 0 6px; font-size: 19px; }
.card .tag { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; min-height: 38px; }
.pill { display: inline-block; font-family: var(--mono); font-size: 11px; padding: 3px 9px;
  border-radius: 999px; border: 1px solid var(--border); color: var(--muted); background: var(--panel-2); }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff; font-weight: 600; border: none; border-radius: 10px;
  padding: 9px 16px; cursor: pointer; font-size: 14px; text-decoration: none;
  box-shadow: 0 1px 2px rgba(59, 130, 246, .25);
  transition: background .15s ease, transform .1s ease;
}
.btn:hover { background: #2563eb; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: #fff; color: var(--text); border: 1px solid var(--border-strong); box-shadow: none; }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.danger { background: #fff; color: var(--danger); border: 1px solid #f0c4c4; box-shadow: none; }
.btn.danger:hover { background: #fef2f2; }
.btn.sm { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }

/* 区块标题 */
.section { padding: 30px 0; }
.section h2 { font-size: 23px; margin: 0 0 4px; letter-spacing: -.3px; }
.section .sub { color: var(--muted); margin: 0 0 18px; font-size: 14px; }

/* 产品页 */
.prod-hero { display: flex; gap: 20px; align-items: center; padding: 40px 0 10px; border-bottom: 1px solid var(--border); }
.prod-hero img { width: 78px; height: 78px; border-radius: 18px; object-fit: cover; border: 1px solid var(--border); }
.prod-hero h1 { margin: 0; font-size: 34px; letter-spacing: -.5px; }
.prod-hero .tag { color: var(--muted); margin: 6px 0 0; font-size: 15px; }

/* 撑满：产品页专用宽容器 */
.wrap-wide { max-width: 1480px; margin: 0 auto; padding: 0 36px; }
@media (max-width: 760px) { .wrap-wide { padding: 0 18px; } }

/* 左右结构：左阅读区 + 右操作区（吸顶） */
.prod-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 44px; align-items: start; margin-top: 30px; }
@media (max-width: 1024px) { .prod-layout { grid-template-columns: 1fr; gap: 30px; } }
.prod-main { min-width: 0; }
.prod-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 26px; }

.psec { margin-bottom: 34px; }
.psec-h { font-size: 21px; margin: 0 0 16px; letter-spacing: -.3px; display: flex; align-items: center; gap: 10px; }
.psec-h::before { content: ""; width: 4px; height: 19px; border-radius: 3px; background: var(--accent); display: inline-block; }
.psec-sub { font-size: 16px; margin: 4px 0 6px; letter-spacing: -.2px; }
.psec .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }

.prose { color: #334155; }
.prose h1, .prose h2, .prose h3 { color: var(--text); letter-spacing: -.2px; }
.prose img { max-width: 100%; border-radius: 10px; border: 1px solid var(--border); margin: 10px 0; }
.prose code { font-family: var(--mono); background: #f1f3f7; padding: 2px 6px; border-radius: 6px;
  border: 1px solid var(--border); font-size: 13px; color: #be123c; }
.prose pre { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; overflow: auto; }
.prose pre code { background: none; border: none; padding: 0; color: #0f172a; }
.prose table { border-collapse: collapse; width: 100%; margin: 12px 0; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.prose blockquote { border-left: 3px solid var(--accent); margin: 12px 0; padding: 4px 14px; color: var(--muted); background: var(--panel-2); border-radius: 0 8px 8px 0; }

/* 淡入动画（内联编辑框等复用） */
@keyframes fade { from { opacity: .4; } to { opacity: 1; } }

/* 状态徽标（浅色底 + 彩色字） */
.badge { font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid transparent; font-weight: 500; }
.badge.planned { color: var(--muted); background: var(--panel-2); border-color: var(--border); }
.badge.progress { color: var(--warn); background: var(--warn-bg); }
.badge.done { color: var(--ok); background: var(--ok-bg); }
.badge.new { color: var(--accent); background: #dbeafe; }
.badge.processing { color: var(--warn); background: var(--warn-bg); }

/* 数据表格（Key 申请记录等） */
.table-wrap { overflow-x: auto; border-radius: 10px; }
.dtab { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); overflow: hidden; }
.dtab th, .dtab td { text-align: left; padding: 12px 14px; font-size: 13.5px; border-bottom: 1px solid #eef0f2; }
.dtab th { background: #f0f2f5; color: var(--muted); font-weight: 600; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; white-space: nowrap; }
.dtab tbody tr:last-child td { border-bottom: none; }
.dtab tbody tr:hover { background: #f7f8fa; }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
input[type=text], input[type=password], input[type=date], textarea, select {
  width: 100%; background: #fff; border: 1px solid var(--border-strong); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px){ .row2{ grid-template-columns: 1fr; } }

/* 反馈 */
.sub-imgs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.sub-imgs img { width: 120px; border-radius: 8px; border: 1px solid var(--border); }

/* 提示条 */
.flash { padding: 12px 16px; border-radius: 10px; margin: 16px 0; font-size: 14px; border: 1px solid; }
.flash.ok { color: var(--ok); border-color: #a7f3d0; background: #ecfdf5; }
.flash.warn { color: var(--warn); border-color: #fde68a; background: #fffbeb; }
.flash.error { color: var(--danger); border-color: #fecaca; background: #fef2f2; }

/* Toast 轻提示：产品页 flashed 消息以 toast 弹出，避免被长页面/锚点跳转遮挡 */
.toast-zone { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; width: max-content; max-width: 92vw; }
.toast { pointer-events: auto; position: relative; padding: 12px 34px 12px 18px; border-radius: 10px; font-size: 14px; line-height: 1.5; border: 1px solid; box-shadow: 0 8px 24px rgba(0,0,0,.14); max-width: 92vw; text-align: center; animation: toast-in .18s ease-out; }
.toast.ok { color: var(--ok); border-color: #a7f3d0; background: #ecfdf5; }
.toast.warn { color: var(--warn); border-color: #fde68a; background: #fffbeb; }
.toast.error { color: #dc2626; border-color: #fecaca; background: #fef2f2; }
.toast .x { position: absolute; top: 6px; right: 10px; cursor: pointer; opacity: .45; font-weight: 700; line-height: 1; }
.toast .x:hover { opacity: 1; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ===================== 后台布局 ===================== */

/* 经典左右结构：左侧固定 Sidebar + 右侧主内容区 */
.admin-shell {
  display: flex;
  min-height: 100vh;
  max-width: none;
}

/* 桌面端：Sidebar 固定在左侧，完整高度 */
.side {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 232px;
  flex: none;
  background: #1f2430;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  z-index: 10;
}

/* 主内容区 */
.admin-main {
  flex: 1;
  margin-left: 232px;
  padding: 0 32px 32px;
}

/* 内容区包装 */
.admin-content {
  width: 100%;
}

/* 移动端汉堡按钮：默认隐藏，窄屏显示 */
.nav-toggle {
  display: none;
}

/* 遮罩：默认隐藏，移动端抽屉打开时显示 */
.nav-backdrop {
  display: none;
}

/* Sidebar 品牌 */
.side-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  color: #fff;
  padding: 0 12px 16px;
  margin-bottom: 8px;
}
.side-brand .dot {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* Sidebar 导航分组 */
.side-grp {
  color: #6b7280;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 18px 12px 8px;
}

/* Sidebar 导航链接 */
.side-nav {
  display: flex;
  flex-direction: column;
}
.side a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #aeb4bf;
  padding: 9px 12px;
  border-radius: 8px;
  margin-bottom: 2px;
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: background .15s ease, border-left-color .15s ease;
}
.side a:hover {
  background: #2a3140;
  color: #fff;
  text-decoration: none;
}
.side a.active {
  background: #2a3140;
  color: #fff;
  font-weight: 500;
  border-left-color: var(--accent);
}

/* 导航图标 */
.nav-icon {
  font-size: 16px;
  flex: none;
  width: 20px;
  text-align: center;
}

/* 产品切换下拉 */
.side select.switch {
  width: 100%;
  font-size: 13px;
  padding: 8px 10px;
  background: #2a3140;
  color: #e5e7eb;
  border: 1px solid #374151;
  border-radius: 8px;
}

/* ============= 移动端：抽屉式 Sidebar ============= */
@media (max-width: 820px) {
  .admin-shell {
    flex-direction: column;
    margin-top: 0;
    min-height: 100vh;
  }

  /* 汉堡按钮在移动端显示 */
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    flex: none;
  }
  .nav-toggle .bar {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 2px;
    background: #fff;
  }
  .nav-toggle .bar::before,
  .nav-toggle .bar::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: #fff;
  }
  .nav-toggle .bar::before { top: -5px; }
  .nav-toggle .bar::after { top: 5px; }

  /* 主内容区移出 Sidebar 位置 */
  .admin-main {
    margin-left: 0;
    padding: 20px 16px;
  }

  /* Sidebar 变为全屏抽屉 */
  .side {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 82%;
    max-width: 300px;
    transform: translateX(-100%);
    transition: transform .22s ease;
    z-index: 40;
    border-radius: 0;
    padding-top: 16px;
    box-shadow: 2px 0 20px rgba(0, 0, 0, .15);
  }
  .admin-shell.nav-open .side {
    transform: translateX(0);
  }

  /* 遮罩：抽屉打开时显示 */
  .nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 18, 25, .45);
    z-index: 35;
  }
  .admin-shell.nav-open .nav-backdrop {
    display: block;
  }
}

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { border-bottom: 1px solid var(--border); padding: 11px 12px; text-align: left; }
table.data th { color: var(--muted); font-weight: 600; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; background: #f0f2f5; }
table.data tbody tr:hover { background: var(--panel-2); }
.mono { font-family: var(--mono); }

footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 13px;
  padding: 28px 0; text-align: center; margin-top: 44px; }
.divider { height: 1px; background: var(--border); margin: 8px 0 20px; }
.muted { color: var(--muted); }
.spacer { height: 8px; }

/* ===================== 后台升级组件 ===================== */

/* ============= 后台顶部标题栏 ============= */
.admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}
.admin-bar .bar-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.3px;
}
.admin-bar .bar-desc {
  color: var(--muted);
  font-size: 13px;
  margin: 2px 0 0;
}
.admin-bar .bar-acts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* 后台 Tab 导航 */
.adtabnav { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin: 4px 0 22px; }
.adtab { padding: 10px 15px; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 6px 6px 0 0; }
.adtab:hover { color: var(--text); background: var(--panel-2); }
.adtab.active { color: var(--accent); border-bottom-color: var(--accent); }
.adpanel { display: none; }
.adpanel.active { display: block; animation: fade .18s ease; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; }
.section-title h2 { font-size: 18px; margin: 0; letter-spacing: -.2px; }
.section-title .hint { color: var(--muted); font-size: 13px; }

/* 统计卡（带图标） */
.stat { display: flex; align-items: center; gap: 14px; }
.stat .ic { width: 46px; height: 46px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.stat .ic.blue { background: #eff6ff; color: #3b82f6; }
.stat .ic.green { background: #e7f6ee; color: #0f9d58; }
.stat .ic.amber { background: #fffbeb; color: #d97706; }
.stat .ic.slate { background: #f1f5f9; color: #475569; }
.stat .num { font-size: 27px; font-weight: 700; line-height: 1.1; }
.stat .lbl { font-size: 13px; color: var(--muted); }

/* 访问统计折线图（服务端渲染 SVG，无外部依赖） */
.chart-box { width: 100%; overflow-x: auto; }
svg.chart { width: 100%; height: auto; display: block; min-width: 520px; }
svg.chart text { font-family: inherit; }

/* 最近动态 feed */
.feed { display: flex; flex-direction: column; }
.frow { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.frow:last-child { border-bottom: none; }
.fdot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--muted); }
.fdot.new { background: var(--accent); }
.fdot.processing { background: var(--warn); }
.fdot.done { background: var(--ok); }
.frow .ft { flex: 1; min-width: 0; }
.frow .ft .t { font-weight: 500; font-size: 14px; }
.frow .ft .m { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* 列表项（预告/修订/下载/Key） */
.ilist { display: flex; flex-direction: column; gap: 10px; }
.irow { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: #fff; }
.irow .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.irow .top .lead { display: flex; align-items: center; gap: 10px; min-width: 0; }
.irow .top .lead .nm { font-weight: 600; font-size: 14.5px; }
.irow .acts { display: flex; gap: 6px; flex: none; }
.irow .meta { color: var(--muted); font-size: 12.5px; margin-top: 5px; display: flex; gap: 12px; flex-wrap: wrap; }
.irow .editbox { display: none; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.irow.open .editbox { display: block; animation: fade .15s ease; }

/* 反馈列表卡片 */
.scard { display: block; text-decoration: none; color: inherit; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.scard:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); text-decoration: none; }
.scard .stop { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.scard .meta { color: var(--muted); font-size: 12.5px; margin-top: 7px; display: flex; gap: 14px; flex-wrap: wrap; }
/* 反馈列表行（卡片 + 删除按钮并排） */
.scard-row { display: flex; align-items: stretch; gap: 10px; margin-bottom: 10px; }
.scard-row .scard { flex: 1; min-width: 0; margin: 0; }
.scard-row form { display: flex; align-items: center; flex: none; }

/* 状态筛选 tabs */
.ftabs { display: flex; gap: 7px; margin: 0 0 16px; flex-wrap: wrap; }
.ftab { padding: 6px 13px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; color: var(--muted); background: #fff; cursor: pointer; transition: .15s; }
.ftab:hover { border-color: var(--border-strong); }
.ftab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
/* 状态筛选现在是 <a>（服务端筛选，翻页后条件不丢），去掉下划线并保持行内尺寸 */
a.ftab { text-decoration: none; display: inline-block; line-height: 1.4; }
a.ftab:visited { color: var(--muted); }
a.ftab.active:visited { color: #fff; }

/* 侧栏：产品切换 */
.side select.switch { width: 100%; font-size: 13px; padding: 8px 10px; background: #2a3140; color: #e5e7eb; border: 1px solid #374151; border-radius: 8px; }

/* Markdown 编辑器 */
.mded { border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; background: #fff; }
.mded .bar { display: flex; gap: 5px; flex-wrap: wrap; padding: 7px 8px; background: var(--panel-2); border-bottom: 1px solid var(--border); }
.mded .bar button { min-width: 32px; height: 30px; padding: 0 8px; border: 1px solid var(--border); background: #fff; border-radius: 7px; cursor: pointer; font-size: 14px; color: #475569; line-height: 1; }
.mded .bar button:hover { border-color: var(--accent); color: var(--accent); }
.mded .body { display: grid; grid-template-columns: 1fr 1fr; }
.mded textarea.mdta { border: none; border-radius: 0; min-height: 280px; resize: vertical; font-family: var(--mono); font-size: 13px; line-height: 1.6; }
.mded .preview { border-left: 1px solid var(--border); padding: 14px 16px; overflow: auto; min-height: 280px; background: #fff; }
.mded .preview:empty::before { content: "预览将在此实时显示…"; color: var(--muted); font-size: 13px; }
.mded textarea.mdta.dragging { background: #eff6ff; outline: 2px dashed var(--accent); outline-offset: -4px; }
@media (max-width: 760px) {
  .mded .body { grid-template-columns: 1fr; }
  .mded .preview { border-left: none; border-top: 1px solid var(--border); }
}

/* 登录页居中 */
.auth-wrap { max-width: 400px; margin: 8vh auto 0; }
.auth-wrap .card { padding: 28px; }
.auth-brand { text-align: center; margin-bottom: 18px; }
.auth-brand .logo { width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 20px; }
.auth-brand h1 { font-size: 20px; margin: 12px 0 2px; }
.auth-brand p { color: var(--muted); font-size: 13px; margin: 0; }

/* ===== macOS 使用说明页（/mac，作用域限定在 .mac-wrap 内） ===== */
.mac-wrap {
  --mac-green:#07c160; --mac-green-dark:#05964b; --mac-ink:#1f2328; --mac-muted:#57606a;
  --mac-line:#e5e7eb; --mac-card:#fff; --mac-warn-bg:#fffbeb;
  --mac-tip-bg:#f0fdf4; --mac-tip-line:#bbf7d0;
  max-width: 820px; margin: 0 auto;
}
.mac-header { text-align: center; margin: 6px 0 32px; }
.mac-logo { font-size: 28px; font-weight: 700; letter-spacing: -.5px; }
.mac-logo span { color: var(--mac-green); }
.mac-sub { color: var(--mac-muted); margin-top: 6px; font-size: 14px; }
.mac-badge { display: inline-block; margin-top: 14px; padding: 4px 12px; border-radius: 999px;
  background: var(--mac-green); color: #fff; font-size: 12px; font-weight: 600; }
.mac-section { background: var(--mac-card); border: 1px solid var(--mac-line); border-radius: 12px;
  padding: 24px 26px; margin-bottom: 18px; }
.mac-section h2 { font-size: 17px; margin: 0 0 14px; display: flex; align-items: center; gap: 9px; }
.mac-section h2 .n { flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--mac-green);
  color: #fff; font-size: 13px; display: grid; place-items: center; font-weight: 700; }
.mac-section h3 { font-size: 15px; margin: 20px 0 8px; }
.mac-section h3:first-of-type { margin-top: 6px; }
.mac-section p { margin: 8px 0; }
.mac-section ol, .mac-section ul { margin: 8px 0; padding-left: 22px; }
.mac-section li { margin: 6px 0; }
.mac-wrap code, .mac-wrap kbd { background: #f3f4f6; border: 1px solid var(--mac-line); border-radius: 5px;
  padding: 1px 6px; font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.mac-wrap pre { background: #0f172a; color: #e2e8f0; border-radius: 9px; padding: 13px 15px; overflow-x: auto;
  font-size: 13px; line-height: 1.6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.mac-wrap pre code { background: none; border: 0; color: inherit; padding: 0; }
.mac-tip { background: var(--mac-tip-bg); border: 1px solid var(--mac-tip-line); border-left: 4px solid var(--mac-green);
  border-radius: 8px; padding: 12px 15px; margin: 14px 0; font-size: 14px; }
.mac-warn { background: var(--mac-warn-bg); border: 1px solid #fde68a; border-left: 4px solid #f59e0b;
  border-radius: 8px; padding: 12px 15px; margin: 14px 0; font-size: 14px; }
.mac-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 16px 0 6px; }
@media (max-width: 720px) { .mac-steps { grid-template-columns: 1fr; } }
.mac-step { position: relative; border: 1px solid var(--mac-line); border-radius: 10px;
  padding: 14px 13px 12px; background: #fcfcfd; }
.mac-step .mac-badge { position: absolute; top: -9px; left: 12px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--mac-green); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 0 0 3px #fff; padding: 0; margin: 0; }
.mac-step svg { display: block; width: 100%; height: auto; margin: 6px 0 10px; }
.mac-step p { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--mac-ink); }
.mac-mini { color: var(--mac-muted); font-size: 14px; }
.mac-pill { display: inline-block; font-size: 11px; padding: 2px 9px; border-radius: 999px; font-weight: 600;
  background: #e8f8ef; color: var(--mac-green-dark); vertical-align: 1px; }
.mac-alt { margin-top: 16px; border: 1px solid var(--mac-line); border-radius: 10px; padding: 14px 16px; background: #fcfcfd; }
.mac-alt summary { font-size: 14.5px; }
.mac-alt summary span { color: var(--mac-green-dark); }
.mac-details { border-top: 1px solid var(--mac-line); padding: 12px 0; }
.mac-details:first-of-type { border-top: 0; padding-top: 2px; }
.mac-details summary { cursor: pointer; font-weight: 600; font-size: 14.5px; list-style: none; }
.mac-details summary::-webkit-details-marker { display: none; }
.mac-details summary::before { content: "Q "; color: var(--mac-green); font-weight: 700; }
.mac-details p { margin: 9px 0 0; color: var(--mac-muted); font-size: 14px; }
.mac-footer-note { text-align: center; color: var(--mac-muted); font-size: 13px; margin-top: 26px; line-height: 2; }
.mac-wrap a { color: var(--mac-green-dark); }
