/* 主题变量：默认深色；浅色由 <head> 内联脚本写入 data-theme="light" 触发 */
:root {
  --bg: #0e1522;
  --bg-band: #0b111c;
  --surface: #172133;
  --text: #e7ecf3;
  --muted: #a0acc0;
  --faint: #7e8a9f;
  --line: rgba(231, 236, 243, 0.1);
  --line-strong: rgba(231, 236, 243, 0.22);
  --accent: #45d6a6;
  --accent-hover: #6fe1bb;
  --accent-text: #5fdcb2;
  --on-accent: #08111c;
  --header-bg: rgba(14, 21, 34, 0.86);
  --frame-bg: #141d2d;
  --paper-frame: #e6ecf3;
  --shadow: rgba(0, 0, 0, 0.6);
  --term-bg: #090e17;
  --term-text: #e7ecf3;
  --term-muted: #a0acc0;
  --term-accent: #5fdcb2;
  --term-line: rgba(231, 236, 243, 0.1);
  --radius: 18px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --display-weight: 650;
  --display-tracking: -0.03em;
  --brand-weight: 600;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f8fa;
  --bg-band: #edf1f5;
  --surface: #ffffff;
  --text: #0d1420;
  --muted: #4c586b;
  --faint: #66728a;
  --line: rgba(13, 20, 32, 0.1);
  --line-strong: rgba(13, 20, 32, 0.22);
  --accent: #45d6a6;
  --accent-hover: #34c493;
  --accent-text: #0a7354;
  --header-bg: rgba(246, 248, 250, 0.88);
  --frame-bg: #ffffff;
  --paper-frame: #edf1f5;
  --shadow: rgba(13, 20, 32, 0.2);
  color-scheme: light;
}

/* 版式：左对齐分栏、细线网格、粘性导航；颜色与标题字体全部来自上方主题变量。
   字号下限：正文 16px、说明 15px、标签与辅助信息 12.5–14px。 */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, video { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--on-accent); }

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 10px 16px; border-radius: 8px;
  background: var(--accent); color: var(--on-accent); font-size: 14px;
  transform: translateY(-180%); transition: transform 0.16s;
}
.skip-link:focus { transform: none; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }

/* 导航 */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; font-family: var(--display); font-weight: var(--brand-weight); font-size: 19px; }
.brand img { border-radius: 7px; }
.site-nav { display: flex; gap: clamp(18px, 2.4vw, 32px); }
.site-nav a { color: var(--muted); font-size: 15px; transition: color 0.16s; }
.site-nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 10px; justify-self: end; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 36px; height: 36px; padding: 0 10px;
  background: transparent; border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--muted); font: 500 13px/1 var(--mono); cursor: pointer;
}
.icon-btn.theme { padding: 0; }
.icon-btn:hover { color: var(--text); border-color: var(--text); }
/* 图标表示点击后将切换到的模式：深色下显示太阳，浅色下显示月亮 */
.ico-moon { display: none !important; }
:root[data-theme="light"] .ico-sun { display: none !important; }
:root[data-theme="light"] .ico-moon { display: block !important; }

/* 按钮 */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 0 24px;
  border: 1px solid transparent; border-radius: 999px;
  font: 600 15px/1.2 var(--sans); white-space: nowrap; cursor: pointer;
  transition: background-color 0.16s, border-color 0.16s, color 0.16s;
}
.button-small { min-height: 38px; padding: 0 16px; font-size: 14px; }
.button-primary { background: var(--accent); color: var(--on-accent); }
.button-primary:hover { background: var(--accent-hover); }
.button-ghost { border-color: var(--line-strong); color: var(--text); }
.button-ghost:hover { border-color: var(--text); }
.text-link { color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.text-link:hover { color: var(--accent-text); text-decoration-color: currentColor; }

/* 排版 */
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--accent-text); font: 500 13px/1.5 var(--mono); letter-spacing: 0.04em; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.display, .section-title, .trio dd, .install-steps h3 {
  font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking);
}
.display { margin: 22px 0 22px; font-size: clamp(44px, 5.4vw, 76px); line-height: 1.06; text-wrap: balance; }
.accent { color: var(--accent-text); }
.section-title { margin-top: 16px; font-size: clamp(32px, 3.8vw, 52px); line-height: 1.14; text-wrap: balance; }
.section-lede { color: var(--muted); font-size: 17px; line-height: 1.8; text-wrap: pretty; }

/* 首屏 */
.hero { padding: clamp(32px, 4vw, 56px) 0 clamp(40px, 5vw, 64px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.meta-line { color: var(--faint); font: 500 13px/1.5 var(--mono); letter-spacing: 0.02em; }
.hero-lede { max-width: 30em; margin-bottom: 32px; color: var(--muted); font-size: 18px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-visual { justify-self: end; width: 100%; max-width: 470px; }
.hero-visual figcaption { margin-top: 12px; color: var(--faint); font: 500 13px/1.5 var(--mono); }

/* 画框：截图、视频统一的承托 */
.frame { padding: clamp(8px, 1.2vw, 14px); background: var(--frame-bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 30px 70px -30px var(--shadow); }
.frame img, .frame video { width: 100%; border-radius: calc(var(--radius) - 8px); }
.frame-paper { background: var(--paper-frame); }
.frame-wide { display: flex; justify-content: center; padding: clamp(16px, 4vw, 48px); }
.frame-wide img { max-width: 780px; }

/* 分区 */
.section { padding: clamp(64px, 7vw, 96px) 0; }
.band { background: var(--bg-band); border-block: 1px solid var(--line); }
.section-head { margin-bottom: clamp(36px, 4.5vw, 56px); }
.section-head.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 72px); align-items: end; }
.section-head.split .section-lede { max-width: 32em; padding-bottom: 6px; }
.section-foot { margin-top: 28px; }

/* 功能：3×3 细线卡片，点击卡片在所在行下方展开示意图面板 */
.feature-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border-block: 1px solid var(--line);
}
.feature { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 26px 28px 30px; background: var(--bg); transition: background-color 0.16s; }
.feature:hover { background: color-mix(in srgb, var(--surface) 50%, var(--bg)); }
.feature.is-open { background: var(--bg-band); }
.feature-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.feature-index { color: var(--accent-text); font: 500 13px/1 var(--mono); letter-spacing: 0.04em; }
.feature-icon {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted);
  transition: background-color 0.16s, border-color 0.16s, color 0.16s, transform 0.2s;
}
.feature-icon svg { width: 20px; height: 20px; }
.feature:hover .feature-icon, .feature.is-open .feature-icon { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.feature h3 { font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-size: 24px; line-height: 1.25; }
/* 整张卡片可点：按钮的伪元素铺满卡片 */
.feature-toggle { padding: 0; background: none; border: 0; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; }
.feature-toggle::after { content: ""; position: absolute; inset: 0; }
.feature-toggle:focus-visible { outline: none; }
.feature:has(.feature-toggle:focus-visible) { outline: 2px solid var(--accent-text); outline-offset: -2px; }
.feature p { flex: 1; color: var(--muted); font-size: 15px; line-height: 1.75; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tags li { padding: 2px 10px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font: 500 12.5px/1.6 var(--mono); }
.extras { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 24px 0 clamp(40px, 5vw, 64px); color: var(--muted); font-size: 14px; }
.extras li::before { content: "+ "; color: var(--accent-text); font-weight: 700; }

.feature-panel {
  position: relative; grid-column: 1 / -1;
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.75fr); gap: clamp(28px, 4vw, 56px); align-items: center;
  padding: clamp(28px, 4vw, 56px); background: var(--bg-band);
  animation: panel-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.feature-panel[hidden] { display: none; }
/* 指向被点开卡片的小三角，位置由脚本写入 --caret-x */
.feature-panel::before {
  content: ""; position: absolute; top: -7px; left: var(--caret-x, 50%);
  width: 14px; height: 14px; background: var(--bg-band); transform: translateX(-50%) rotate(45deg);
}
.panel-side .eyebrow span:first-child { color: var(--muted); }
.panel-steps { display: grid; gap: 16px; margin-top: 20px; }
.panel-steps li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start; color: var(--muted); font-size: 15px; line-height: 1.7; }
.panel-steps .step-n { margin-top: 1px; }
.panel-close { position: absolute; top: 16px; right: 16px; }
@keyframes panel-in { from { opacity: 0; transform: translateY(-6px); } }
.step-n { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: 1px solid var(--accent-text); border-radius: 50%; color: var(--accent-text); font: 600 13px/1 var(--mono); }

/* 本地与开源 */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.trio div { padding-top: 18px; border-top: 1px solid var(--line-strong); }
.trio dt { color: var(--faint); font: 500 13px/1.5 var(--mono); }
.trio dd { margin-top: 6px; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.2; }

/* 安装 */
.install-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(36px, 6vw, 80px); align-items: start; }
.install-steps li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 24px 0; border-top: 1px solid var(--line); }
.install-steps li:first-child { padding-top: 0; border-top: 0; }
.install-steps .step-n { margin-top: 2px; }
.install-steps h3 { margin-bottom: 6px; font-size: 21px; line-height: 1.35; }
.install-steps p { color: var(--muted); font-size: 15px; line-height: 1.8; }
.install-steps .text-link { display: inline-block; margin-top: 10px; font-size: 15px; }
/* 终端卡片在两种主题下都保持深色 */
.term { overflow: hidden; background: var(--term-bg); color: var(--term-text); border: 1px solid var(--term-line); border-radius: var(--radius); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid var(--term-line); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--term-line); }
.term-bar span { margin-left: auto; color: var(--term-muted); font: 500 12.5px/1 var(--mono); }
.term-body { padding: 24px; }
.term-comment { color: var(--term-muted); font-size: 14px; line-height: 1.7; }
/* 每条命令一行：代码在左、复制按钮在右，复制结果提示在下方 */
.cmd + .cmd { margin-top: 22px; }
.cmd-line { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 8px 8px 8px 16px; background: rgba(0, 0, 0, 0.32); border-radius: 10px; }
.cmd-line code { flex: 1; min-width: 0; color: var(--term-accent); font: 500 13.5px/1.6 var(--mono); word-break: break-all; }
.copy-button { flex: none; min-height: 32px; padding: 0 14px; background: transparent; color: var(--term-text); border: 1px solid var(--term-line); border-radius: 999px; font: 600 13px/1 var(--sans); cursor: pointer; }
.copy-button:hover { background: var(--term-accent); border-color: var(--term-accent); color: var(--on-accent); }
.copy-status { display: block; min-height: 1.5em; margin-top: 6px; color: var(--term-muted); font-size: 13px; }
.term :focus-visible { outline-color: #fff; }

/* 常见问题 */
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(36px, 6vw, 80px); align-items: start; }
.faq-head { position: sticky; top: 100px; }
.qa { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; font-size: 17px; font-weight: 600; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary:hover { color: var(--accent-text); }
.plus { color: var(--accent-text); transition: transform 0.2s; }
details[open] .plus { transform: rotate(45deg); }
details p { padding-bottom: 22px; color: var(--muted); font-size: 15px; line-height: 1.8; }

/* 页脚 */
.site-footer { padding: clamp(80px, 9vw, 120px) 0 36px; }
.footer-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; padding-bottom: clamp(48px, 6vw, 72px); }
.footer-cta .section-title { margin-top: 0; }
.footer-cta .section-lede { max-width: 34em; margin-top: 16px; font-size: 16px; }
.footer-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer-row .brand { font-size: 16px; }
.footer-note { justify-self: center; }
.footer-nav { display: flex; gap: 22px; }
.footer-nav a:hover { color: var(--text); }

@media (max-width: 1000px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-panel { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .site-nav { display: none; }
  .hero-grid, .section-head.split, .install-grid, .faq-grid, .footer-cta { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { justify-self: start; max-width: 420px; }
  .faq-head { position: static; }
  .trio { grid-template-columns: minmax(0, 1fr); }
  .footer-row { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .footer-note { justify-self: start; }
}

@media (max-width: 620px) {
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .feature { padding: 22px 20px 24px; }
  .feature-top { margin-bottom: 14px; }
  .feature-panel { padding: 24px 16px; }
      .hero-lede, .section-lede { font-size: 16px; }
  .header-actions { gap: 6px; }
  .brand span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* 产品示意图组件：用 HTML/CSS 画 macOS 界面，随站点主题切换深浅色、随语言切换文案。
   所有尺寸用 em，画布字号按容器宽度换算（1em = 容器宽 / 36），整张图等比缩放、不会重排。 */
.mock {
  container-type: inline-size; width: 100%;
  --m-accent: var(--highlight, var(--accent));
  --m-accent-text: var(--highlight-text, var(--accent-text));
  --m-on-accent: var(--on-highlight, var(--on-accent));
}
.mock-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ar, 36 / 30);
  font-family: var(--sans);
  font-size: calc(100cqi / 36);
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--m-text);
  user-select: none;
}
.mock svg { display: block; flex: none; }

/* macOS 中性色；选中高亮与侧栏图标借用站点强调色 */
:root {
  --m-window: #1f2022;
  --m-sidebar: #26272a;
  --m-toolbar: #232427;
  --m-card: #28292c;
  --m-field: #313235;
  --m-field-border: rgba(255, 255, 255, 0.1);
  --m-line: rgba(255, 255, 255, 0.07);
  --m-line-strong: rgba(255, 255, 255, 0.12);
  --m-border: rgba(255, 255, 255, 0.13);
  --m-text: #e9e9e7;
  --m-muted: #a3a39f;
  --m-faint: #77777a;
  --m-hover: rgba(255, 255, 255, 0.07);
  --m-menu: rgba(44, 45, 48, 0.86);
  --m-menu-border: rgba(255, 255, 255, 0.14);
  --m-sel-bg: rgba(255, 255, 255, 0.09);
  --m-folder: #4a9fe0;
  --m-shadow: rgba(0, 0, 0, 0.6);
}
:root[data-theme="light"] {
  --m-window: #ffffff;
  --m-sidebar: #f1f1ef;
  --m-toolbar: #f8f8f6;
  --m-card: #ffffff;
  --m-field: #ffffff;
  --m-field-border: rgba(0, 0, 0, 0.14);
  --m-line: rgba(0, 0, 0, 0.07);
  --m-line-strong: rgba(0, 0, 0, 0.1);
  --m-border: rgba(0, 0, 0, 0.12);
  --m-text: #1d1d1f;
  --m-muted: #6b6b70;
  --m-faint: #9b9ba0;
  --m-hover: rgba(0, 0, 0, 0.055);
  --m-menu: rgba(246, 246, 245, 0.88);
  --m-menu-border: rgba(0, 0, 0, 0.1);
  --m-sel-bg: rgba(0, 0, 0, 0.06);
  --m-folder: #56aef0;
  --m-shadow: rgba(40, 35, 25, 0.28);
}

/* 菜单图标配色：取自应用 MenuTint 的「彩色线条」值，浅色 / 深色各一套 */
.t-blue { --tint: #0a84ff; } .t-indigo { --tint: #7d7aff; } .t-teal { --tint: #40c8e0; }
.t-cyan { --tint: #64d2ff; } .t-graphite { --tint: #aeaeb2; } .t-purple { --tint: #bf5af2; }
.t-orange { --tint: #ff9f0a; } .t-green { --tint: #30d158; } .t-brown { --tint: #ac8e68; }
.t-pink { --tint: #ff375f; } .t-red { --tint: #ff453a; } .t-gray { --tint: #98989d; } .t-yellow { --tint: #ffd60a; }
:root[data-theme="light"] .t-blue { --tint: #007aff; }
:root[data-theme="light"] .t-indigo { --tint: #5856d6; }
:root[data-theme="light"] .t-teal { --tint: #1a9cb3; }
:root[data-theme="light"] .t-cyan { --tint: #1e9bd7; }
:root[data-theme="light"] .t-graphite { --tint: #48484a; }
:root[data-theme="light"] .t-purple { --tint: #a447d6; }
:root[data-theme="light"] .t-orange { --tint: #f08a00; }
:root[data-theme="light"] .t-green { --tint: #28a745; }
:root[data-theme="light"] .t-brown { --tint: #8f714b; }
:root[data-theme="light"] .t-pink { --tint: #f0244b; }
:root[data-theme="light"] .t-red { --tint: #e5332a; }
:root[data-theme="light"] .t-gray { --tint: #7c7c80; }
:root[data-theme="light"] .t-yellow { --tint: #d4a000; }

/* 窗口 */
.m-window {
  position: absolute;
  display: grid;
  grid-template-columns: 8.4em minmax(0, 1fr);
  overflow: hidden;
  background: var(--m-window);
  border: 1px solid var(--m-border);
  border-radius: 0.9em;
  box-shadow: 0 1.8em 3.6em -1.2em var(--m-shadow), 0 0.2em 0.6em rgba(0, 0, 0, 0.12);
}
.m-window.is-back { filter: saturate(0.9); }
.m-traffic { position: absolute; top: 1.05em; left: 1em; display: flex; gap: 0.48em; z-index: 1; }
.m-traffic i { width: 0.78em; height: 0.78em; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.15); }
.m-traffic i:nth-child(2) { background: #febc2e; }
.m-traffic i:nth-child(3) { background: #28c840; }
.m-sidebar { display: flex; flex-direction: column; gap: 0.08em; padding: 2.9em 0.55em 0.8em; background: var(--m-sidebar); border-right: 1px solid var(--m-line); }
.m-side-head { padding: 0.7em 0.55em 0.25em; color: var(--m-faint); font-size: 0.7em; font-weight: 600; }
.m-side-item { display: flex; align-items: center; gap: 0.5em; padding: 0.34em 0.5em; border-radius: 0.45em; font-size: 0.82em; white-space: nowrap; }
.m-side-item svg { width: 1.25em; height: 1.25em; color: var(--m-accent-text); }
.m-side-item.is-current { background: var(--m-hover); }
.m-main { display: flex; flex-direction: column; min-width: 0; }
.m-toolbar { display: flex; align-items: center; gap: 0.7em; height: 3.3em; padding: 0 1.1em; background: var(--m-toolbar); border-bottom: 1px solid var(--m-line); color: var(--m-muted); }
.m-toolbar svg { width: 1.15em; height: 1.15em; }
.m-toolbar b { margin-left: 0.3em; color: var(--m-text); font-size: 0.92em; font-weight: 650; }
.m-toolbar .m-tools { display: flex; gap: 0.9em; margin-left: auto; }

/* 图标视图 */
.m-icons { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 1em 0.4em; padding: 1.3em 1em; align-content: start; }
.m-file { display: flex; flex-direction: column; align-items: center; gap: 0.35em; min-width: 0; }
.m-thumb { position: relative; display: grid; place-items: center; width: 4.7em; height: 4.7em; border-radius: 0.55em; }
.m-file.is-selected .m-thumb { background: var(--m-sel-bg); }
.m-name { max-width: 100%; padding: 0.1em 0.45em; overflow: hidden; border-radius: 0.35em; font-size: 0.76em; text-overflow: ellipsis; white-space: nowrap; }
.m-file.is-selected .m-name { background: var(--m-accent); color: var(--m-on-accent); font-weight: 600; }
.m-doc {
  position: relative; width: 3.1em; height: 3.9em;
  background: #fff; border-radius: 0.25em;
  box-shadow: 0 0.12em 0.35em rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.m-doc::before { content: ""; position: absolute; inset: 0.6em 0.45em 1.35em; background: repeating-linear-gradient(#d2d2d2 0 0.08em, transparent 0.08em 0.36em); }
.m-doc b { position: absolute; bottom: 0.38em; left: 0; right: 0; color: var(--doc-tag, #8a8a8e); font-size: 0.5em; font-weight: 800; letter-spacing: 0.06em; text-align: center; }
.m-image {
  width: 4em; height: 3em; border: 0.18em solid #fff; border-radius: 0.2em;
  background: linear-gradient(160deg, #f3d39a 0%, #e09a6c 45%, #7a5fa3 100%);
  box-shadow: 0 0.12em 0.35em rgba(0, 0, 0, 0.28);
}
.m-folder { width: 4.3em; height: 3.5em; color: var(--m-folder); filter: drop-shadow(0 0.1em 0.18em rgba(0, 0, 0, 0.2)); }
.m-zip { position: relative; }
.m-zip::after { content: ""; position: absolute; top: 0.25em; bottom: 1.4em; left: 50%; width: 0.32em; transform: translateX(-50%); background: repeating-linear-gradient(#9a9aa0 0 0.18em, transparent 0.18em 0.36em); }
/* 剪切角标：与应用一致的深色圆底白剪刀 */
.m-badge {
  position: absolute; right: 0.15em; bottom: 0.15em;
  display: grid; place-items: center; width: 1.55em; height: 1.55em;
  background: #3a3a3c; color: #fff; border-radius: 50%;
  box-shadow: 0 0 0 0.14em var(--m-window), 0 0.1em 0.3em rgba(0, 0, 0, 0.35);
}
.m-badge svg { width: 0.95em; height: 0.95em; }

/* 右键菜单 */
.m-menu {
  position: absolute; z-index: 3;
  display: flex; flex-direction: column;
  min-width: 13.5em; padding: 0.35em;
  background: var(--m-menu);
  border: 1px solid var(--m-menu-border); border-radius: 0.65em;
  box-shadow: 0 1.2em 2.8em -0.6em var(--m-shadow), 0 0 0 0.5px rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6);
}
.m-item { display: flex; align-items: center; gap: 0.55em; height: 1.78em; padding: 0 0.6em; border-radius: 0.38em; font-size: 0.88em; white-space: nowrap; }
.m-item svg { width: 1.18em; height: 1.18em; color: var(--tint, currentColor); }
.m-item .m-chev { width: 0.8em; height: 0.8em; margin-left: auto; padding-left: 1em; box-sizing: content-box; color: var(--m-muted); }
.m-item.is-active { background: var(--m-accent); color: var(--m-on-accent); }
.m-item.is-active svg, .m-item.is-active .m-chev { color: currentColor; }
.m-item.is-disabled { color: var(--m-faint); }
.m-item.is-disabled svg { opacity: 0.55; }
.m-sep { height: 1px; margin: 0.3em 0.6em; background: var(--m-line-strong); }
.m-cursor { position: absolute; z-index: 5; width: 1.15em; height: 1.6em; filter: drop-shadow(0 0.08em 0.15em rgba(0, 0, 0, 0.4)); }

/* 设置窗口 */
.m-settings { grid-template-columns: 10.4em minmax(0, 1fr); }
.m-app { display: flex; align-items: center; gap: 0.55em; margin: 0.4em 0.45em 1.1em; font-size: 0.98em; font-weight: 700; }
.m-app img { width: 1.9em; height: 1.9em; border-radius: 0.45em; }
.m-settings .m-side-item { gap: 0.6em; padding: 0.34em 0.6em; font-size: 0.86em; }
.m-settings .m-side-item svg { color: var(--m-muted); }
.m-settings .m-side-item.is-current { background: color-mix(in srgb, var(--m-accent) 22%, transparent); }
.m-settings .m-side-item.is-current svg { color: var(--m-accent-text); }
.m-version { margin-top: auto; padding: 0 0.6em; color: var(--m-faint); font: 500 0.72em/1 var(--mono); }
.m-content { display: flex; flex-direction: column; gap: 0.9em; min-width: 0; padding: 1.5em 1.6em; }
.m-h { font-size: 1.12em; font-weight: 700; }
.m-group { overflow: hidden; background: var(--m-card); border: 1px solid var(--m-line-strong); border-radius: 0.7em; }
.m-row { display: grid; grid-template-columns: 2.05em minmax(0, 1fr) 6.6em 1.05em; align-items: center; gap: 0.75em; padding: 0.55em 0.9em; }
.m-row + .m-row { border-top: 1px solid var(--m-line); }
.m-tile { display: grid; place-items: center; width: 2.05em; height: 2.05em; background: color-mix(in srgb, var(--m-accent) 16%, transparent); color: var(--m-accent-text); border-radius: 0.5em; }
.m-tile svg { width: 1.2em; height: 1.2em; }
.m-label { min-width: 0; }
.m-label b { display: block; font-size: 0.86em; font-weight: 600; }
.m-label small { display: block; overflow: hidden; color: var(--m-muted); font-size: 0.68em; text-overflow: ellipsis; white-space: nowrap; }
.m-key {
  display: grid; place-items: center; height: 1.8em;
  background: var(--m-field); border: 1px solid var(--m-field-border); border-radius: 0.42em;
  font-size: 0.8em; font-weight: 650; white-space: nowrap;
}
.m-key.is-empty { color: var(--m-muted); font-weight: 500; }
.m-key.is-recording { background: color-mix(in srgb, var(--m-accent) 14%, var(--m-field)); border-color: var(--m-accent-text); color: var(--m-accent-text); font-weight: 600; }
.m-clear { width: 1.05em; height: 1.05em; color: var(--m-faint); }
.m-note { color: var(--m-muted); font-size: 0.7em; line-height: 1.6; }

/* 无侧栏的小窗口：红绿灯放进工具栏 */
.m-window.is-compact { grid-template-columns: minmax(0, 1fr); }
.m-window.is-compact .m-toolbar { padding-left: 5em; }
.m-side-item > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* 页面里的承托：给示意图留出阴影空间 */
.stage { padding: clamp(18px, 4vw, 48px); background: var(--frame-bg); border: 1px solid var(--line); border-radius: var(--radius); }
.hero-visual.is-mock { max-width: 560px; }
.hero-visual.is-mock figcaption { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 18px; }
.hero-visual.is-mock .text-link { font-family: var(--sans); font-weight: 500; }
/* 英文文案更长：快捷键框随内容变宽，标签允许换行 */
.m-row { grid-template-columns: 2.05em minmax(0, 1fr) minmax(6.6em, max-content) 1.05em; }
.m-key { padding: 0 0.8em; }

/* 列表视图：隐藏文件、常用的单列文件列表 */
.m-list { display: flex; flex-direction: column; padding: 0.5em 0.7em; }
.m-list-head, .m-list-row { display: grid; grid-template-columns: minmax(0, 1fr) 6.5em 4.2em; align-items: center; gap: 0.8em; padding: 0 0.6em; }
.m-list-head { height: 1.9em; color: var(--m-muted); font-size: 0.72em; font-weight: 600; border-bottom: 1px solid var(--m-line); }
.m-list-row { height: 2.05em; border-radius: 0.35em; font-size: 0.8em; }
.m-list-row:nth-child(odd of .m-list-row) { background: var(--m-hover); }
.m-list-row > span:first-child { display: flex; align-items: center; gap: 0.55em; min-width: 0; white-space: nowrap; }
.m-list-row > span:not(:first-child) { color: var(--m-muted); white-space: nowrap; }
.m-list-row svg { width: 1.25em; height: 1.25em; }
.m-list-row .m-ico-folder { color: var(--m-folder); }
.m-list-row .m-ico-doc { color: var(--m-muted); }
.m-list-row.is-selected { background: var(--m-accent); color: var(--m-on-accent); }
.m-list-row.is-selected > span, .m-list-row.is-selected svg { color: currentColor; }
/* 访达显示隐藏文件时，隐藏项半透明 */
.m-list-row.is-hidden { opacity: 0.45; }
.m-indent { display: inline-block; width: calc(var(--depth, 0) * 1.3em); }
.m-tri { width: 0.75em !important; height: 0.75em !important; color: var(--m-muted); }
.m-tri.is-open { transform: rotate(90deg); }
.m-tri.is-none { visibility: hidden; }

/* 「已复制到剪贴板」提示：与应用一致的圆角浮层 + 对勾 */
.m-toast {
  position: absolute; z-index: 4;
  display: flex; align-items: center; gap: 0.55em;
  height: 2.65em; padding: 0 1.1em;
  background: var(--m-menu); border: 1px solid var(--m-menu-border); border-radius: 0.9em;
  box-shadow: 0 0.8em 2em -0.6em var(--m-shadow);
  -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6);
  font-size: 0.88em; font-weight: 500; white-space: nowrap;
}
.m-toast svg { width: 1em; height: 1em; color: var(--m-accent-text); }

/* 按键提示：浮在窗口上的大号键帽 */
.m-keys { position: absolute; z-index: 4; display: flex; gap: 0.35em; }
.m-keys kbd {
  display: grid; place-items: center; min-width: 2.3em; height: 2.3em; padding: 0 0.55em;
  background: var(--m-card); border: 1px solid var(--m-field-border); border-bottom-width: 0.18em; border-radius: 0.5em;
  color: var(--m-text); font: 600 0.95em/1 var(--sans); box-shadow: 0 0.5em 1.2em -0.5em var(--m-shadow);
}

/* 设置页：开关、拖动手柄、标签 */
.m-switch { position: relative; width: 2.2em; height: 1.3em; background: var(--m-line-strong); border-radius: 999px; }
.m-switch::after { content: ""; position: absolute; top: 0.15em; left: 0.15em; width: 1em; height: 1em; background: #fff; border-radius: 50%; box-shadow: 0 0.05em 0.15em rgba(0, 0, 0, 0.3); }
.m-switch.is-on { background: var(--m-accent); }
.m-switch.is-on::after { left: auto; right: 0.15em; }
.m-row.is-template { grid-template-columns: 1em 1.5em minmax(0, 1fr) 2.2em; }
.m-row.is-template .m-handle { width: 1em; height: 1em; color: var(--m-faint); }
.m-row.is-template .m-glyph { width: 1.3em; height: 1.3em; color: var(--tint); }
.m-row.is-off .m-label, .m-row.is-off .m-glyph { opacity: 0.45; }
.m-row.is-dragging { background: var(--m-card); box-shadow: 0 0.6em 1.4em -0.4em var(--m-shadow); transform: translateX(0.6em) rotate(-0.6deg); border-radius: 0.5em; position: relative; z-index: 1; }
.m-chip { display: inline-block; margin-left: 0.5em; padding: 0.05em 0.5em; border: 1px solid var(--m-field-border); border-radius: 999px; color: var(--m-muted); font-size: 0.78em; font-weight: 500; vertical-align: 0.08em; }
.m-head-row { display: flex; align-items: center; gap: 0.6em; }
.m-head-row .m-sub { color: var(--m-muted); font-size: 0.72em; }
.m-btn { display: inline-flex; align-items: center; gap: 0.35em; margin-left: auto; height: 1.8em; padding: 0 0.75em; background: var(--m-field); border: 1px solid var(--m-field-border); border-radius: 0.42em; font-size: 0.74em; font-weight: 600; white-space: nowrap; }
.m-btn svg { width: 0.9em; height: 0.9em; }

/* 快速查看窗口：大纲列表 + 底部状态 */
.m-ql { grid-template-columns: minmax(0, 1fr); }
.m-ql-title { display: flex; align-items: center; justify-content: center; height: 2.8em; border-bottom: 1px solid var(--m-line); background: var(--m-toolbar); font-size: 0.86em; font-weight: 650; }
.m-ql .m-list-head, .m-ql .m-list-row { grid-template-columns: minmax(0, 1fr) 7.2em 4.6em 5.2em; }
.m-ql-foot { margin-top: auto; padding: 0.55em 1.3em 0.7em; color: var(--m-muted); font-size: 0.72em; }
.m-ql .m-main { height: 100%; }
