/* Satin 官网新版（设计稿）：首页、文档共用。确认后并进 site.css。
   规矩照旧：动画只动 transform / opacity / filter（代码区展开收起的高度过渡和组件库 Markdown 代码块同一个做法）；
   颜色只表达状态——例外两处：代码高亮（是信息）、macOS 窗口的红黄绿三个按钮（照系统画）。 */
/* ———— 0. 官网通透配色体系（仅作用于官网首页与文档壳层，不动组件库内部 --sn-canvas） ———— */
@layer satin {
body.n-docs, body.n-home {
  --site-bg: #ffffff;
  --site-surface: #f7f8fa;
  --site-surface-2: #eff1f5;
  --site-border: #e5e7ec;
  --site-border-subtle: #eff1f4;
  background: var(--site-bg);
}
[data-theme="dark"] body.n-docs, [data-theme="dark"] body.n-home {
  --site-bg: #09090b;
  --site-surface: #121215;
  --site-surface-2: #1c1c21;
  --site-border: rgba(255, 255, 255, .10);
  --site-border-subtle: rgba(255, 255, 255, .07);
}
.n-docs .s-nav { background: color-mix(in srgb, var(--site-bg) 88%, transparent); box-shadow: inset 0 -1px 0 var(--site-border-subtle); }
.n-docs .s-search { background: var(--site-surface); box-shadow: inset 0 0 0 1px var(--site-border); }
.n-docs .s-search:hover { background: var(--site-surface-2); }
.n-docs .d-side a:hover { background: var(--site-surface); }
.n-docs .d-side a[aria-current] { background: var(--site-surface-2); color: var(--sn-label); font-weight: 500; }
.n-docs .s-fw-side { background: var(--site-bg); box-shadow: inset 0 0 0 1px var(--site-border); }
.n-docs .d-card, .n-docs .d-dodont > div { background: var(--site-bg); box-shadow: inset 0 0 0 1px var(--site-border); }
@media (hover: hover) { .n-docs .d-card:hover { background: var(--site-surface); } }
.n-docs .d-pager a { background: var(--site-surface); box-shadow: inset 0 0 0 1px var(--site-border); }
.n-docs .d-pager a:hover { background: var(--site-surface-2); }
.n-home .n-card { background: var(--site-bg); box-shadow: inset 0 0 0 1px var(--site-border), 0 1px 3px rgba(15, 23, 42, .04); }
.n-home .n-stage { background: var(--site-surface); box-shadow: inset 0 0 0 1px var(--site-border-subtle); }
.n-home .n-fps { background: var(--site-surface); box-shadow: inset 0 0 0 1px var(--site-border); }

/* ———— 1. 代码块 ———— */
.cx, .d-api-code { --cx-fg: #27272a; --cx-ln: #a1a1aa; --cx-pun: #8e8e93; --cx-bg: var(--dx-bg, var(--cx-solo));
  --sn-t-kw: #be185d; --sn-t-str: #0369a1; --sn-t-num: #0369a1; --sn-t-com: #8e8e93; --sn-t-fn: #6d28d9; --sn-t-typ: #6d28d9; --sn-t-prop: #3f3f46; --sn-t-attr: #6d28d9; --sn-t-tag: #be185d;
  --cx-solo: var(--site-surface, #f7f8fa);
  position: relative; color: var(--cx-fg); }
[data-theme="dark"] .cx, [data-theme="dark"] .d-api-code { --cx-fg: #e4e4e7; --cx-ln: #52525b; --cx-pun: #71717a;
  --sn-t-kw: #f38ba8; --sn-t-str: #7cc4ff; --sn-t-num: #7cc4ff; --sn-t-com: #71717a; --sn-t-fn: #c4b5fd; --sn-t-typ: #c4b5fd; --sn-t-prop: #a1a1aa; --sn-t-attr: #c4b5fd; --sn-t-tag: #f38ba8;
  --cx-solo: var(--site-surface, #121215); }
.cx.solo { margin-top: 12px; border-radius: 16px; background: var(--cx-solo); box-shadow: inset 0 0 0 1px var(--site-border, var(--sn-line)); overflow: hidden; --cx-bg: var(--cx-solo); }
.cx.solo .cx-hd { box-shadow: inset 0 -1px 0 var(--site-border-subtle, var(--sn-line)); }
.cx .sn-t-kw, .cx .sn-t-lit, .d-api-code .sn-t-kw, .d-api-code .sn-t-lit { color: var(--sn-t-kw); }
.cx .sn-t-str, .d-api-code .sn-t-str { color: var(--sn-t-str); }
.cx .sn-t-num, .d-api-code .sn-t-num { color: var(--sn-t-num); }
.cx .sn-t-com, .d-api-code .sn-t-com { color: var(--sn-t-com); }
.cx .sn-t-fn, .d-api-code .sn-t-fn { color: var(--sn-t-fn); }
.cx .sn-t-typ, .d-api-code .sn-t-typ { color: var(--sn-t-typ); }
.cx .sn-t-prop, .cx .sn-t-var, .d-api-code .sn-t-prop, .d-api-code .sn-t-var { color: var(--sn-t-prop); }
.cx .sn-t-attr, .cx .sn-t-dec, .cx .sn-t-sel, .d-api-code .sn-t-attr, .d-api-code .sn-t-dec, .d-api-code .sn-t-sel { color: var(--sn-t-attr); }
.cx .sn-t-tag, .d-api-code .sn-t-tag { color: var(--sn-t-tag); }
.cx .sn-t-op, .cx .sn-t-pun, .d-api-code .sn-t-op, .d-api-code .sn-t-pun { color: var(--cx-pun); }
.cx-bd { position: relative; }
.cx pre { margin: 0; padding: 14px 0; overflow-x: auto; outline: none; counter-reset: ln; font: 400 calc(13px * var(--fsx))/calc(22px * var(--fsx)) var(--sn-mono); tab-size: 2; scrollbar-width: thin; scrollbar-color: var(--sn-line-control) transparent; }
.cx pre:focus-visible { box-shadow: inset 0 0 0 2px var(--sn-focus); border-radius: 12px; }
.cx code { font: inherit; }
.cx .sn-l { display: block; padding-right: 48px; white-space: pre; }
/* 行号：横着滚时贴在左边不动（实底，滚过去的字不透出来） */
.cx .sn-l::before { counter-increment: ln; content: counter(ln); position: sticky; left: 0; display: inline-block; box-sizing: content-box; width: var(--sn-gw, 2ch); padding: 0 20px 0 16px; background: var(--cx-bg); color: var(--cx-ln); text-align: right; user-select: none; }
.cx .sn-nonum .sn-l { padding-left: 20px; }
.cx .sn-nonum .sn-l::before { display: none; }
.cx-file[hidden] { display: none; }
/* 复制：右上角，实底 */
.cx-copy { position: absolute; z-index: 2; top: 11px; right: 8px; --sn-bg: var(--cx-bg); } /* 28px 的按钮和第一行代码（上内边距 14 + 半行 11）同一条中线 */
.cx-copy:hover { --sn-bg: color-mix(in srgb, var(--sn-label) 7%, var(--cx-bg)); }
.cx-copy:active { --sn-bg: color-mix(in srgb, var(--sn-label) 11%, var(--cx-bg)); }
.cx.has-hd .cx-copy { position: static; margin-left: auto; }
.cx-hd { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px 0 10px; } /* 文件页签放不下时折成两行，头部跟着长高（一行时和原来一样高） */
.cx-name { padding-left: 6px; font: 500 calc(12px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label3); }
.cx-tabs { display: flex; flex-wrap: wrap; gap: 2px; min-width: 0; padding: 4px 0; } /* 文件多、屏幕窄（390）时折成两行：每个页签整个不断开，不横着滑、不把整页撑宽 */
.cx-tabs button { all: unset; flex: none; white-space: nowrap; height: 28px; padding: 0 10px; border-radius: 8px; font: 500 calc(12px * var(--fsx))/28px var(--sn-mono); color: var(--sn-label3); cursor: pointer; transition: color .12s var(--sn-ease-out), background-color .12s var(--sn-ease-out); }
.cx-tabs button:hover { color: var(--sn-label); }
.cx-tabs button[aria-selected="true"] { color: var(--sn-label); background: var(--sn-raised); box-shadow: 0 1px 2px rgba(0, 0, 0, .06), inset 0 0 0 1px var(--sn-line); }
[data-theme="dark"] .cx-tabs button[aria-selected="true"] { background: var(--sn-fill-active); box-shadow: none; }
.cx-tabs button:focus-visible { outline: 2px solid var(--sn-focus); outline-offset: 1px; }
/* 折叠：只露前几行，底下渐隐，"展开代码"压在渐隐上；展开后按钮留在代码下面 */
.cx.folded .cx-bd { max-height: var(--fold-h); overflow: hidden; }
.cx.sn-open .cx-bd { padding-bottom: 48px; }
.cx-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 88px; background: linear-gradient(to bottom, color-mix(in srgb, var(--cx-bg) 0%, transparent), var(--cx-bg) 78%); opacity: 0; pointer-events: none; transition: opacity .24s var(--sn-ease-out); }
.cx.folded .cx-fade { opacity: 1; }
.cx-more { all: unset; box-sizing: border-box; position: absolute; z-index: 2; left: 50%; bottom: 12px; translate: -50% 0; display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px 0 12px; border-radius: var(--sn-r-full);
  background: var(--sn-raised); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), inset 0 0 0 1px var(--sn-line); font: 500 calc(12px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label2); cursor: pointer; user-select: none;
  transition: color .12s var(--sn-ease-out), background-color .12s var(--sn-ease-out), transform .1s var(--sn-ease-out); }
[data-theme="dark"] .cx-more { background: var(--sn-overlay); }
.cx-more:hover { color: var(--sn-label); background: var(--sn-fill-hover-solid); }
[data-theme="dark"] .cx-more:hover { background: color-mix(in srgb, #fff 8%, var(--sn-overlay)); }
.cx-more:active { transform: scale(.97); }
.cx-more:focus-visible { outline: 2px solid var(--sn-focus); outline-offset: 2px; }
.cx-more[hidden] { display: none; }
.cx-more .sn-ic { width: 14px; height: 14px; transition: transform .26s var(--sn-ease-out-strong); }
.cx-more.sn-up .sn-ic { transform: rotate(180deg); }

/* ———— 2. macOS 窗口 ———— */
.mac { --mac-r: 14px; --mac-bar: color-mix(in srgb, var(--sn-label) 2.5%, var(--sn-raised)); position: relative; border-radius: var(--mac-r); background: var(--sn-raised); overflow: clip; isolation: isolate;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .06), 0 24px 52px -16px rgba(0, 0, 0, .36); }
[data-theme="dark"] .mac { --mac-bar: color-mix(in srgb, #fff 4%, var(--sn-raised)); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .14), 0 0 0 .5px rgba(0, 0, 0, .85), 0 24px 56px -16px rgba(0, 0, 0, .78); }
.mac-bar { position: relative; z-index: 1; height: 38px; display: flex; align-items: center; justify-content: center; padding: 0 84px; border-radius: var(--mac-r) var(--mac-r) 0 0; background: var(--mac-bar); box-shadow: inset 0 -1px 0 var(--sn-line); }
.mac-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 600 calc(13px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label2); }
/* 浏览器窗口地址胶囊与右上角新标签打开按钮 */
.mac-url { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 24px; padding: 0 12px; border-radius: 7px; background: color-mix(in srgb, var(--sn-label) 5.5%, transparent); font: 400 calc(11.5px * var(--fsx))/1 var(--sn-mono); color: var(--sn-label2); }
.mac-url .sn-ic { width: 11px; height: 11px; flex: none; color: var(--sn-label3); }
.mac-url span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mac-open { position: absolute; right: 8px; top: 50%; translate: 0 -50%; width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 6px; color: var(--sn-label3); text-decoration: none; transition: color .15s var(--sn-ease-out), background-color .15s var(--sn-ease-out); }
.n-docs .d-main a.mac-open { text-decoration: none; color: var(--sn-label3); }
@media (hover: hover) { .mac-open:hover, .n-docs .d-main a.mac-open:hover { color: var(--sn-label); background: var(--sn-fill-hover); } }
.mac-open:focus-visible { outline: 2px solid var(--sn-focus); outline-offset: 1px; }
.mac-open .sn-ic { width: 14px; height: 14px; }
/* 红黄绿：12px、间隔 8px；指针移到这一组上时出现符号（和系统一样） */
.mac-lights { position: absolute; left: 14px; top: 50%; translate: 0 -50%; display: flex; gap: 8px; }
.mac-lights i { position: relative; width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .16); }
.mac-lights i:nth-child(2) { background: #febc2e; } .mac-lights i:nth-child(3) { background: #28c840; }
.mac-lights i::after { content: ""; position: absolute; inset: 0; opacity: 0; background: rgba(0, 0, 0, .55); transition: opacity .1s var(--sn-ease-out);
  -webkit-mask: var(--sn-g) center / 8px 8px no-repeat; mask: var(--sn-g) center / 8px 8px no-repeat; }
.mac-lights i:nth-child(1) { --sn-g: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M1.6 1.6l4.8 4.8M6.4 1.6L1.6 6.4' stroke='%23000' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E"); }
.mac-lights i:nth-child(2) { --sn-g: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M1.3 4h5.4' stroke='%23000' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E"); }
.mac-lights i:nth-child(3) { --sn-g: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M2 1.6h3.2a1.2 1.2 0 0 1 1.2 1.2V6zM6 6.4H2.8A1.2 1.2 0 0 1 1.6 5.2V2z' fill='%23000'/%3E%3C/svg%3E"); }
.mac-lights:hover i::after { opacity: 1; }
.mac-body { position: relative; border-radius: 0 0 var(--mac-r) var(--mac-r); overflow: hidden; }

/* ———— 3. 文档：演示框 ———— */
.n-docs .d-demo { display: none; }
.dx { --dx-bg: var(--site-surface, #f7f8fa); margin-top: 16px; padding: 6px; border-radius: 22px; background: var(--dx-bg); box-shadow: inset 0 0 0 1px var(--site-border, var(--sn-line)); }
[data-theme="dark"] .dx { --dx-bg: var(--site-surface, #121215); }
.dx-bar { display: flex; align-items: center; gap: 12px; min-height: 34px; padding: 0 0 6px 6px; } /* 框顶一行：左边设置项，右边"在展示页打开"（不浮在预览上，免得压住演示角落里的东西） */
.dx-bar:not(:has(.dx-ctl > *, .dx-note:not(:empty))) { display: none; } /* 没设置项也没有说明文字时藏掉，预览白盒贴齐外框顶部 */
.dx-ctl { display: flex; align-items: center; gap: 16px; min-width: 0; max-width: 100%; flex-wrap: wrap; row-gap: 8px; } /* 设置项多、屏幕窄时折到下一行，不把整页撑宽 */
.dx-opt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; max-width: 100%; font: 500 calc(12px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label3); }
.dx-opt > span { white-space: nowrap; }
.dx-opt .sn-seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.dx-note { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 400 calc(12px * var(--fsx))/calc(16px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); }
/* 预览台：纯白清透舞台，在冰雾外框内层次鲜明 */
.dx-stage { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 240px; border-radius: 16px; background: var(--site-bg, #ffffff); box-shadow: inset 0 0 0 1px var(--site-border-subtle, var(--sn-line)); overflow: hidden; }
.dx-stage > .d-frame { width: 100%; }
.dx-open { margin-left: auto; flex: none; }
/* 窗口：直接作为 .dx-stage 主体呈现（不再套多余的照片壁纸背景层），16px 圆角与外框 .dx(22px - 6px) 严格同心 */
.dx.is-win .dx-stage { padding: 0; min-height: 0; background: transparent; box-shadow: none; overflow: visible; }
.dx.is-win .mac { width: 100%; --mac-r: 16px; box-shadow: 0 0 0 1px var(--sn-card-line), 0 1px 2px rgba(0, 0, 0, .04); }
[data-theme="dark"] .dx.is-win .mac { box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
.dx-wall { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s var(--sn-ease-out); }
.dx-wall.ld { opacity: 1; }
[data-theme="dark"] .dx-wall { filter: brightness(.62) saturate(.9); }
/* 窗口样式演示的白底画在预览框上，iframe 自己永远透明：看图、弹窗时 iframe 会铺满整个窗口，白底跟着铺满就把整个文档页盖住了——
   遮罩一淡开，满屏白只剩演示内容，等关完才跳回文档页（2026-11-20 用户录屏：对话里看图退出） */
.dx .mac .d-frame { background: var(--sn-raised); }
.dx .mac .d-frame iframe { background: transparent; }
.dx-code { position: relative; }
.dx-code .cx { --cx-bg: var(--dx-bg); }
.dx-code .cx-hd { box-shadow: none; padding: 6px 6px 0 6px; min-height: 40px; }
.dx-code .cx-tabs button[aria-selected="true"] { background: var(--sn-canvas); box-shadow: none; }

/* ———— 4. 文档：标题、小节、表格、翻页 ———— */
.n-docs .d-layout { grid-template-columns: 240px minmax(0, 1fr) 192px; gap: 48px; }
.n-docs .d-page { max-width: 832px; }
.d-head { margin-bottom: 8px; }
.n-docs .d-crumb { display: flex; gap: 8px; align-items: baseline; font: 500 calc(13px * var(--fsx))/calc(18px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); }
.n-docs .d-crumb span { font: 400 calc(12px * var(--fsx))/1 var(--sn-mono); color: var(--sn-label-off); }
.d-title { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.n-docs .d-h1 { margin: 0; font: 600 calc(36px * var(--fsx))/calc(44px * var(--fsx)) var(--sn-sans); letter-spacing: -.02em; }
.d-head-act { margin-left: auto; display: flex; gap: 8px; }
.d-head-act .sn-btn { --sn-h: 36px; --sn-r: var(--sn-r-full); }
.n-docs .d-lead { margin-top: 8px; font-size: calc(17px * var(--fsx)); line-height: calc(28px * var(--fsx)); color: var(--sn-label3); }
.n-docs .d-main h2 { display: flex; align-items: center; gap: 8px; margin: 64px 0 4px; font: 600 calc(22px * var(--fsx))/calc(30px * var(--fsx)) var(--sn-sans); }
.n-docs .d-main .d-head + h2, .n-docs .d-main .d-head + .d-mtoc + h2 { margin-top: 40px; } /* 标题区后面插着窄屏用的"本页目录"条（宽屏藏着），也算紧跟着 */
.d-anchor { order: 2; display: inline-flex; color: var(--sn-label-off); opacity: 0; transition: opacity .15s var(--sn-ease-out), color .15s var(--sn-ease-out); }
.d-anchor .sn-ic { width: 16px; height: 16px; }
.n-docs .d-main h2:hover .d-anchor, .d-anchor:focus-visible { opacity: 1; }
.n-docs .d-main .d-anchor:hover { color: var(--sn-label); }
.n-docs .d-main a.d-anchor { text-decoration: none; }
.n-docs .d-main h2 + p { margin-top: 4px; }
.n-docs .d-main p + .cx.solo, .n-docs .d-main .cx.solo + .cx.solo { margin-top: 12px; }
/* 文档表格全面复用 Satin 表格组件（.sn-tbl-wrap > .sn-tbl-sc > .sn-tbl）：真 border 完整闭合圆角，不再用 inset shadow 防止被表头遮挡 */
.n-docs .d-tablewrap { margin: 16px 0; border-radius: var(--sn-r-lg); border: 1px solid var(--sn-line); box-shadow: none; background: var(--sn-raised); padding: 0; overflow: hidden; }
.n-docs .d-tablewrap > .sn-sa { border-radius: 0; }
.n-docs .d-table { width: 100%; border-collapse: separate; border-spacing: 0; background: transparent; }
.n-docs .d-table th { height: 40px; padding: 0 16px; background: var(--sn-raised); font: 500 calc(12px * var(--fsx))/calc(16px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); box-shadow: inset 0 -1px 0 var(--sn-line); vertical-align: middle; }
.n-docs .d-table td { height: auto; padding: 11px 16px; background-color: var(--sn-raised); font: 400 calc(14px * var(--fsx))/calc(21px * var(--fsx)) var(--sn-sans); color: var(--sn-label2); box-shadow: inset 0 -1px 0 var(--sn-line); vertical-align: top; white-space: normal; }
.n-docs .d-table td:first-child { color: var(--sn-label); font-weight: 500; }
.n-docs .d-table th.sn-r, .n-docs .d-table td.sn-r { text-align: right; }
.n-docs .d-table td.sn-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.n-docs .d-table tbody tr:last-child td { box-shadow: none; }
@media (hover: hover) { .n-docs .d-table tbody tr:hover td { background-color: var(--sn-fill-hover-solid); } }
.n-docs .d-main .d-tablewrap + p { margin-top: 16px; }

/* 评测结果交互式实拍对照台（#/eval） */
.d-eval { margin: 20px 0; display: grid; gap: 16px; }
.d-eval-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.d-eval-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 780px) { .d-eval-cols { grid-template-columns: minmax(0, 1fr); } }
.d-eval-pane { display: flex; flex-direction: column; border-radius: var(--sn-r-lg); border: 1px solid var(--sn-line); background: var(--sn-canvas); overflow: hidden; }
.d-eval-pane.d-eval-good { border-color: var(--sn-line-control); }
.d-eval-hd { flex: none; height: 40px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--sn-raised); border-bottom: 1px solid var(--sn-line); }
.d-eval-hd b { flex: none; white-space: nowrap; font: 500 calc(13px * var(--fsx))/calc(18px * var(--fsx)) var(--sn-sans); color: var(--sn-label); }
.d-eval-stat { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 400 calc(11px * var(--fsx))/calc(16px * var(--fsx)) var(--sn-mono); font-variant-numeric: tabular-nums; color: var(--sn-label3); }
.d-eval-media { padding: 12px; display: grid; grid-template-columns: minmax(0, 2.72fr) minmax(0, 1fr); gap: 8px; align-items: stretch; }
.d-eval-shot { all: unset; box-sizing: border-box; position: relative; display: block; border-radius: var(--sn-r-sm); overflow: hidden; border: 1px solid var(--sn-line); background: var(--sn-raised); cursor: zoom-in; transition: border-color .15s var(--sn-ease-out); }
.d-eval-desk { aspect-ratio: 458 / 378; }
.d-eval-mob { aspect-ratio: 168 / 378; }
.d-eval-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: transform .36s var(--sn-ease-out); }
@media (hover: hover) {
  .d-eval-shot:hover { border-color: var(--sn-line-control); }
  .d-eval-shot:hover img { transform: scale(1.02); }
}
.d-eval-shot:focus-visible { outline: 2px solid var(--sn-focus); outline-offset: 2px; }
.d-eval-cap { position: absolute; left: 6px; bottom: 6px; padding: 2px 6px; border-radius: var(--sn-r-xs); background: rgba(18, 18, 20, .72); color: #f5f5f7; font: 500 10px/14px var(--sn-sans); pointer-events: none; }
.d-main p.d-eval-note { margin: 0; padding: 0 14px 12px; font: 400 calc(12px * var(--fsx))/calc(18px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); }
/* 左边目录：开始、规范两组带图标；侧栏本身已是低饱和灰字，把双色调次笔画调至 .92 防止 16px 图标发虚断线 */
.n-docs .d-side a .sn-ic { width: 16px; height: 16px; margin-right: 10px; color: var(--sn-label3); flex: none; }
.n-docs .d-side a[aria-current] .sn-ic { color: var(--sn-label); }
/* 翻页：两颗胶囊按钮 */
.n-docs .d-pager { display: flex; justify-content: space-between; margin-top: 80px; }
.n-docs .d-pager a { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--sn-r-full); background: var(--sn-fill-subtle); box-shadow: none; font: 500 calc(14px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label); }
.n-docs .d-pager a:hover { background: var(--sn-fill-active); box-shadow: none; }
.n-docs .d-pager a .sn-ic { width: 16px; height: 16px; }
.n-docs .d-pager a.next { margin-left: auto; }
.n-docs .d-pager a .t { font: inherit; color: inherit; } /* 标题包了一层（窄屏省略号用），别吃到旧版文档页 .d-pager span 的 12px 灰字 */
@media (max-width: 1080px) { .n-docs .d-layout { grid-template-columns: 216px minmax(0, 1fr); gap: 40px; } }
@media (max-width: 760px) {
  .n-docs .d-layout { grid-template-columns: minmax(0, 1fr); }
  .n-docs .d-h1 { font-size: calc(28px * var(--fsx)); line-height: calc(36px * var(--fsx)); }
  .d-head-act { display: none; }
  .dx { padding: 4px; border-radius: 18px; } .dx-stage { border-radius: 14px; }
  .dx.is-win .dx-stage { padding: 0; border-radius: 14px; } .dx.is-win .mac { --mac-r: 14px; }
  .dx-bar { flex-wrap: wrap; } .dx-note { flex-basis: 100%; white-space: normal; }
  .cx .sn-l::before { padding: 0 12px 0 10px; }
}

/* ———— 5. 首页：骨架 ———— */
:root { --n-mute: #a1a1a6; }
[data-theme="dark"] { --n-mute: #636366; }
.n-home { --nwrap: 1152px; }
.n-wrap { width: min(100%, calc(var(--nwrap) + 48px)); margin: 0 auto; padding: 0 24px; }
.n-wide { --nwrap: 1248px; }
.n-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* 顶栏：页顶是一整条（不画底）；往下滚，背后长出一颗居中的浮岛，两头的东西往里收 */
.n-nav { position: fixed; z-index: 40; top: 0; left: 0; right: 0; height: 72px; pointer-events: none; }
.n-nav-in { position: relative; height: 100%; width: min(100%, calc(var(--nwrap, 1152px) + 48px)); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; }
.n-nav-in > * { pointer-events: auto; }
.n-logo, .n-end { transition: transform .55s var(--sn-ease-open); }
.n-links { position: absolute; left: 50%; translate: -50% 0; display: flex; gap: 2px; }
.n-links a { padding: 6px 12px; border-radius: var(--sn-r-full); font: 500 calc(14px * var(--fsx))/calc(20px * var(--fsx)) var(--sn-sans); color: var(--sn-label2); text-decoration: none; transition: color .15s var(--sn-ease-out), background-color .15s var(--sn-ease-out); }
.n-links a:hover { color: var(--sn-label); background: var(--sn-fill-hover); }
.n-end { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.n-go { margin-left: 8px; --sn-h: 32px; --sn-px: 14px; }
.n-island { position: absolute; top: 10px; left: 50%; width: var(--iw, 760px); height: 52px; translate: -50% 0; border-radius: var(--sn-r-full); pointer-events: none;
  background: color-mix(in srgb, var(--sn-raised) 74%, transparent); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 0 0 1px var(--sn-line), 0 10px 30px -14px rgba(0, 0, 0, .22); opacity: 0; transform: scale(.97); transition: opacity .3s var(--sn-ease-out), transform .55s var(--sn-ease-open); }
[data-theme="dark"] .n-island { background: color-mix(in srgb, var(--sn-raised) 78%, transparent); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 10px 30px -14px rgba(0, 0, 0, .8); }
.n-island, .n-logo, .n-end { will-change: transform; } /* 先建好合成层：第一次滚下去时不用临时建层 */
.n-nav.island .n-island { opacity: 1; transform: none; }
.n-nav.island .n-logo { transform: translateX(var(--dl, 0)); }
.n-nav.island .n-end { transform: translateX(var(--dr, 0)); }

/* 第一屏：两种灰度的大标题 */
.n-hero { padding-top: 168px; text-align: center; } /* sp-ok: 72 的顶栏 + 96 的留白（刻度最大 80，第一屏特例） */
.n-h1 { display: grid; justify-items: center; font: 600 calc(76px * var(--fsx))/1.14 var(--sn-sans); letter-spacing: -.025em; }
.n-l1 { color: var(--sn-label); } .n-l2 { color: var(--n-mute); }
.n-lead { max-width: 600px; margin: 28px auto 0; font: 400 calc(18px * var(--fsx))/calc(30px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); text-wrap: balance; }
.n-cta { margin-top: 32px; display: flex; justify-content: center; gap: 12px; }
.n-cta .sn-btn, .n-more .sn-btn.sn-lg { --sn-px: 20px; }
.n-cmd { margin: 16px auto 0; display: flex; width: fit-content; align-items: center; gap: 4px; height: 36px; padding: 0 4px 0 14px; border-radius: var(--sn-r-full); background: var(--sn-fill-subtle); }
.n-cmd code { font: 400 calc(13px * var(--fsx))/1 var(--sn-mono); color: var(--sn-label2); }
.n-cmd-note { margin-top: 8px; font: 400 calc(12px * var(--fsx))/calc(18px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); }
.n-cmd-note a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--sn-line-control); }
.n-cmd-note a:hover { color: var(--sn-label); text-decoration-color: currentColor; }

/* 标题里的小组件：一颗圆角方块，里面轮流放一个会自己动的小控件（离开往上淡出，进来从下面升起） */
.n-chip { position: relative; display: inline-block; width: .84em; height: .84em; margin: 0 .16em; vertical-align: -.08em; border-radius: .25em; overflow: hidden;
  background: var(--sn-raised); box-shadow: inset 0 0 0 1px var(--sn-line), 0 1px 2px rgba(0, 0, 0, .05), 0 12px 28px -12px rgba(0, 0, 0, .25); }
[data-theme="dark"] .n-chip { background: var(--sn-overlay); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 12px 28px -12px rgba(0, 0, 0, .9); }
.mc { position: absolute; inset: 0; opacity: 0; transform: translateY(42%) scale(.72); filter: blur(4px);
  transition: opacity .3s var(--sn-ease-out), transform .56s var(--sn-ease-out-strong), filter .3s var(--sn-ease-out); }
.mc.sn-cur { opacity: 1; transform: none; filter: none; }
.mc.sn-out { opacity: 0; transform: translateY(-42%) scale(.72); filter: blur(4px); transition-duration: .22s; transition-timing-function: var(--sn-ease-in); }
.mc i, .mc b, .mc s, .mc u { position: absolute; display: block; }
/* 开关 */
.mc-sw .tr { left: 18%; top: 33%; width: 64%; height: 34%; border-radius: 99px; background: var(--sn-fill-active); overflow: hidden; }
.mc-sw .sn-fi { inset: 0; background: var(--sn-accent); opacity: 0; transition: opacity .2s var(--sn-ease-out); }
.mc-sw .kn { left: 21%; top: 36.5%; width: 27%; height: 27%; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .42s var(--sn-ease-spring); }
.mc-sw.sn-on .sn-fi { opacity: 1; } .mc-sw.sn-on .kn { transform: translateX(118%); }
/* 分段控件 */
.mc-seg .tr { left: 12%; top: 36%; width: 76%; height: 28%; border-radius: 99px; background: var(--sn-fill-active); }
.mc-seg .sn-th { left: 14%; top: 39%; width: 24%; height: 22%; border-radius: 99px; background: var(--sn-raised); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .44s var(--sn-ease-out-strong); }
[data-theme="dark"] .mc-seg .sn-th { background: #636366; }
.mc-seg.sn-on .sn-th { transform: translateX(100%); }
.mc-seg.on2 .sn-th { transform: translateX(200%); }
/* 勾选 */
.mc-ck .bx { left: 29%; top: 29%; width: 42%; height: 42%; border-radius: 24%; box-shadow: inset 0 0 0 .05em var(--sn-line-control-hover); }
.mc-ck .sn-fi { left: 29%; top: 29%; width: 42%; height: 42%; border-radius: 24%; background: var(--sn-accent); opacity: 0; transform: scale(.6); transition: opacity .16s var(--sn-ease-out), transform .36s var(--sn-ease-overshoot); }
.mc-ck svg { position: absolute; left: 35%; top: 35%; width: 30%; height: 30%; color: var(--sn-on-primary); opacity: 0; transform: scale(.4); transition: opacity .14s var(--sn-ease-out) .06s, transform .3s var(--sn-ease-overshoot) .06s; }
.mc-ck.sn-on .sn-fi, .mc-ck.sn-on svg { opacity: 1; transform: none; }
/* 播放 → 暂停 */
.mc-pl .sn-bg { left: 25%; top: 25%; width: 50%; height: 50%; border-radius: 50%; background: var(--sn-accent); transition: transform .3s var(--sn-ease-out-strong); }
.mc-pl svg { position: absolute; left: 38%; top: 38%; width: 24%; height: 24%; color: var(--sn-on-primary); transition: opacity .18s var(--sn-ease-out), transform .3s var(--sn-ease-out-strong); }
.mc-pl .pa { opacity: 0; transform: scale(.5) rotate(-90deg); }
.mc-pl.sn-on .pl { opacity: 0; transform: scale(.5) rotate(90deg); } .mc-pl.sn-on .pa { opacity: 1; transform: none; } .mc-pl.sn-on .sn-bg { transform: scale(.94); }
/* 转圈 → 对勾 */
.mc-sp .sn-ring { left: 32%; top: 32%; width: 36%; height: 36%; border-radius: 50%; border: .045em solid var(--sn-label3); border-right-color: transparent; animation: sn-spin .9s linear infinite; transition: opacity .2s var(--sn-ease-out); }
.mc-sp svg { position: absolute; left: 33%; top: 33%; width: 34%; height: 34%; color: var(--sn-success); opacity: 0; transform: scale(.4); transition: opacity .14s var(--sn-ease-out), transform .34s var(--sn-ease-overshoot); }
.mc-sp.sn-on .sn-ring { opacity: 0; } .mc-sp.sn-on svg { opacity: 1; transform: none; }
/* 滑块 */
.mc-sl .rl { left: 16%; top: 48%; width: 68%; height: 5%; border-radius: 99px; background: var(--sn-fill-active); }
.mc-sl .fl { left: 16%; top: 48%; width: 68%; height: 5%; border-radius: 99px; background: var(--sn-accent); transform-origin: 0 50%; transform: scaleX(.18); transition: transform .7s var(--sn-ease-in-out); }
.mc-sl .kn { left: 16%; top: 38%; width: 25%; height: 25%; margin-left: -12.5%; border-radius: 50%; background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .12), 0 1px 3px rgba(0, 0, 0, .25); transform: translateX(49%); transition: transform .7s var(--sn-ease-in-out); }
.mc-sl.sn-on .fl { transform: scaleX(.78); } .mc-sl.sn-on .kn { transform: translateX(212%); }

/* 第一屏的应用窗口：壁纸上一扇 macOS 窗口，侧栏透出背后的壁纸（毛玻璃） */
.n-show { position: relative; margin-top: 80px; padding: 48px; border-radius: 32px; overflow: hidden; background: #5f6f86; isolation: isolate; text-align: left; }
.n-wall { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s var(--sn-ease-out); }
.n-wall.ld { opacity: 1; }
[data-theme="dark"] .n-wall { filter: brightness(.66) saturate(.95); }
.n-app { display: flex; height: 640px; border-radius: 14px; background: transparent; }
.na-side { width: 224px; flex: none; display: flex; flex-direction: column; padding: 0 10px 10px;
  background: color-mix(in srgb, var(--sn-raised) 70%, transparent); -webkit-backdrop-filter: blur(36px) saturate(1.8); backdrop-filter: blur(36px) saturate(1.8); box-shadow: inset -1px 0 0 var(--sn-line); }
[data-theme="dark"] .na-side { background: color-mix(in srgb, var(--sn-raised) 76%, transparent); }
.na-top { height: 52px; flex: none; display: flex; align-items: center; padding-left: 6px; }
.na-top .mac-lights { position: static; translate: none; }
.na-ws { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border-radius: 10px; cursor: pointer; transition: background-color .15s var(--sn-ease-out); }
.na-ws:hover { background: var(--sn-fill-hover); }
.na-ws img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; flex: none; background: var(--sn-fill-active); }
.na-ws > span:nth-child(2) { flex: 1; min-width: 0; display: grid; }
.na-ws b { font: 600 calc(13px * var(--fsx))/calc(18px * var(--fsx)) var(--sn-sans); }
.na-ws small, .na-me small { font: 400 calc(11px * var(--fsx))/calc(15px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); }
.na-ws .sn-ic { width: 14px; height: 14px; color: var(--sn-label3); }
.na-nav { position: relative; margin-top: 10px; display: grid; gap: 1px; }
.na-nav a { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 8px; border-radius: 8px; font: 400 calc(13px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label2); cursor: pointer; user-select: none; transition: color .15s var(--sn-ease-out), background-color .15s var(--sn-ease-out); }
.na-nav a .sn-ic { width: 16px; height: 16px; color: var(--sn-label3); transition: color .15s var(--sn-ease-out); }
.na-nav a:hover { color: var(--sn-label); }
.na-nav a.sn-on { color: var(--sn-label); }
.na-hl { position: absolute; left: 0; right: 0; top: 0; height: 30px; border-radius: 8px; background: var(--sn-fill-active); pointer-events: none; transition: transform .36s var(--sn-ease-out-strong); } /* 选中底色：从上一个条目滑到这一个 */
.na-nav a { position: relative; }
.na-nav a.sn-on .sn-ic { color: var(--sn-label); }
.na-n { margin-left: auto; font: 400 calc(12px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label3); font-variant-numeric: tabular-nums; }
.na-n.sn-unread { font-weight: 600; color: var(--sn-label); } /* 未读：同一个位置、同一种写法，只把数字变深 */
.na-cap { margin: 16px 8px 2px; font: 600 calc(11px * var(--fsx))/calc(16px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); }
.na-eps { margin-top: 4px; }
.na-eps a i { position: relative; flex: none; width: 16px; height: 16px; } /* 和上面的图标占一样宽，圆点在正中：文字起点、圆点中心都和图标对齐 */
.na-eps a i::after { content: ""; position: absolute; left: 5px; top: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--sn-label-off); }
.na-eps a.sn-on i::after { background: var(--sn-label); }
.na-me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.na-me .sn-btn { margin-right: -6px; } /* 图标按钮自带 6px 留白：往外挪，让齿轮图标的右边和上面的数字对齐 */
.na-me img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; background: var(--sn-fill-active); }
.na-me > span { flex: 1; min-width: 0; display: grid; }
.na-me b { font: 500 calc(13px * var(--fsx))/calc(17px * var(--fsx)) var(--sn-sans); }
.na-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--sn-raised); }
.na-bar { height: 52px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 16px 0 20px; }
.na-title { margin-right: auto; display: grid; min-width: 0; }
.na-title b { font: 600 calc(14px * var(--fsx))/calc(18px * var(--fsx)) var(--sn-sans); white-space: nowrap; }
.na-title small { font: 400 calc(11px * var(--fsx))/calc(15px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); white-space: nowrap; }
.na-search { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; width: 132px; height: 28px; padding: 0 6px 0 10px; border-radius: 8px; background: var(--sn-fill-subtle); font: 400 calc(12px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label3); cursor: pointer; transition: background-color .15s var(--sn-ease-out); }
.na-search:hover { background: var(--sn-fill-active); }
.na-search .sn-ic { width: 14px; height: 14px; }
.na-search kbd { margin-left: auto; padding: 1px 4px; border-radius: 4px; background: var(--sn-raised); box-shadow: inset 0 0 0 1px var(--sn-line); font: 500 calc(10px * var(--fsx))/calc(14px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); }
.na-body { flex: 1; min-height: 0; display: flex; }
.na-shots { flex: 1; min-width: 0; overflow: auto; padding: 16px 20px 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; align-content: start; scrollbar-width: none; }
.na-shot { all: unset; box-sizing: border-box; display: grid; gap: 8px; cursor: pointer; }
.na-th { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--sn-fill-active); transition: box-shadow .16s var(--sn-ease-out); }
.na-th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s var(--sn-ease-out), transform .5s var(--sn-ease-out-strong); }
.na-th img.ld { opacity: 1; }
.na-shot:hover .na-th img { transform: scale(1.03); }
.na-shot.sn-on .na-th { box-shadow: 0 0 0 2px var(--sn-raised), 0 0 0 4px var(--sn-accent); }
.na-shot:focus-visible .na-th { box-shadow: 0 0 0 2px var(--sn-raised), 0 0 0 4px var(--sn-focus); }
.na-sm { display: flex; align-items: center; gap: 6px; min-width: 0; font: 400 calc(12px * var(--fsx))/calc(16px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); }
.na-sm b { font-weight: 500; color: var(--sn-label); white-space: nowrap; }
.na-sm .sn-tag { margin-left: auto; }
.na-insp { width: 272px; flex: none; overflow: auto; padding: 14px 16px 16px; background: color-mix(in srgb, var(--sn-label) 2.5%, var(--sn-raised)); display: flex; flex-direction: column; gap: 12px; scrollbar-width: none; }
.na-ih { display: flex; align-items: center; gap: 8px; }
.na-ih b { margin-right: auto; font: 600 calc(14px * var(--fsx))/calc(20px * var(--fsx)) var(--sn-sans); }
.na-vid { position: relative; flex: none; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #111; }
.na-vid img, .na-vid video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.na-vid img { opacity: 0; transition: opacity .3s var(--sn-ease-out); } .na-vid img.ld { opacity: 1; }
.na-vid video { opacity: 0; transition: opacity .4s var(--sn-ease-out); } .na-vid.sn-vid video.ld { opacity: 1; }
.na-dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 6px; border-radius: 6px; background: rgba(0, 0, 0, .5); color: #fff; font: 500 calc(11px * var(--fsx))/calc(14px * var(--fsx)) var(--sn-sans); }
.na-f { display: grid; gap: 6px; }
.na-lbl { font: 500 calc(12px * var(--fsx))/calc(16px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); }
.na-f .sn-seg { display: flex; } .na-f .sn-seg button { flex: 1; }
.na-row { display: flex; align-items: center; justify-content: space-between; min-height: 24px; font: 400 calc(13px * var(--fsx))/calc(18px * var(--fsx)) var(--sn-sans); color: var(--sn-label2); }
.na-v { color: var(--sn-label3); }
.na-insp .sn-slider { margin-top: -4px; }
.na-np { margin-top: auto; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 8px 10px; padding: 10px 12px; border-radius: 12px; background: var(--sn-fill-subtle); }
.na-np .np-play { --sn-h: 28px; width: 28px; }
.na-np .np-play .sn-ic { width: 14px; height: 14px; }
.na-np .np-meta b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 500 calc(12px * var(--fsx))/calc(16px * var(--fsx)) var(--sn-sans); }
.na-np .np-meta span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 400 calc(11px * var(--fsx))/calc(15px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); }
.na-np .np-wave { grid-column: 1 / -1; height: 26px; gap: 2px; }
.na-np .np-bar { grid-column: 1 / -1; margin-top: -4px; font-size: calc(11px * var(--fsx)); }

/* ———— 6. 首页：分区 ———— */
.n-sec { padding: 128px 0 0; } /* sp-ok: 区块之间的大留白，刻度最大 80，这里是两段区块间距相加 */
.n-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); align-items: last baseline; gap: 48px; margin-bottom: 48px; }
.n-eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font: 500 calc(15px * var(--fsx))/calc(20px * var(--fsx)) var(--sn-sans); color: var(--sn-label); }
.n-eyebrow .sn-ic { width: 18px; height: 18px; color: var(--sn-label2); }
.n-h2 { display: grid; font: 600 calc(48px * var(--fsx))/1.18 var(--sn-sans); letter-spacing: -.02em; color: var(--sn-label); }
.n-h2 span { color: var(--n-mute); }
.n-h2.n-center { justify-items: center; text-align: center; }
.n-p { font: 400 calc(16px * var(--fsx))/calc(26px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); text-wrap: pretty; }
.n-more { margin-top: 40px; display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.n-panel { position: relative; border-radius: 32px; overflow: hidden; isolation: isolate; background: #5c6c78; }

/* 组件：标签 + 一扇窗口轮流放大组件；标签下面的细线是倒计时，指针放在窗口上时暂停 */
.n-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 24px; }
.n-tabs button { all: unset; position: relative; padding: 8px 4px 14px; min-width: 88px; text-align: center; font: 500 calc(14px * var(--fsx))/calc(20px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); cursor: pointer; transition: color .2s var(--sn-ease-out); }
.n-tabs button:hover, .n-tabs button[aria-selected="true"] { color: var(--sn-label); }
.n-tabs button i { position: absolute; left: 4px; right: 4px; bottom: 0; height: 3px; border-radius: 2px; background: var(--sn-fill-active); overflow: hidden; }
.n-tabs button i::after { content: ""; position: absolute; inset: 0; background: var(--sn-label); transform-origin: 0 50%; transform: scaleX(var(--sn-p, 0)); }
.n-tabs button[aria-selected="true"] i::after { transform: scaleX(var(--sn-p, 1)); }
.n-tabs button:focus-visible { outline: 2px solid var(--sn-focus); outline-offset: 2px; border-radius: 8px; }
.n-tabpanel { height: 760px; } /* 实际高度由脚本按最高的那扇窗口算 */
.n-wins { position: absolute; inset: 56px 64px 0; }
.n-win { position: absolute; inset: 0 0 auto; opacity: 0; transform: translateY(12px) scale(.985); pointer-events: none; transition: opacity .32s var(--sn-ease-out), transform .5s var(--sn-ease-out-strong); }
.n-win.warm { opacity: .001; } /* 已经在后台载好的下一个：先画出来（全透明的层浏览器不画），切过去时没有首帧卡顿 */
.n-win.sn-cur { opacity: 1; transform: none; pointer-events: auto; }
.n-win.sn-out { opacity: 0; transform: translateY(-6px) scale(.99); transition-duration: .2s; transition-timing-function: var(--sn-ease-in); }
.n-win .mac-body { background: var(--sn-raised); }
.n-win iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--sn-raised); opacity: 0; transition: opacity .3s var(--sn-ease-out); }
[data-theme="dark"] .n-win iframe { color-scheme: dark; }
.n-win iframe.ld { opacity: 1; }
.n-win .d-load { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--sn-label3); font: 400 calc(13px * var(--fsx))/1 var(--sn-sans); }

/* 细节：六张卡片，上面是能直接操作的组件，下面一行名字和说明 */
.n-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.n-card { display: flex; flex-direction: column; border-radius: 24px; background: var(--sn-raised); box-shadow: inset 0 0 0 1px var(--sn-card-line), var(--sn-card-shadow); overflow: hidden; }
.n-stage { position: relative; height: 232px; margin: 8px 8px 0; border-radius: 18px; background: var(--sn-canvas); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 20px; }
.n-card-ft { display: flex; align-items: flex-start; gap: 12px; padding: 16px 14px 20px 20px; }
.n-card-ft .sn-btn { margin-top: -3px; } /* sp-ok: 28px 的按钮和 22px 的标题行中线对齐 */
.n-card-ft > div { flex: 1; display: grid; gap: 4px; }
.n-card-ft b { font: 600 calc(15px * var(--fsx))/calc(22px * var(--fsx)) var(--sn-sans); }
.n-card-ft span { font: 400 calc(13px * var(--fsx))/calc(20px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); text-wrap: pretty; }
.n-stage.ar { justify-content: flex-start; align-items: stretch; padding: 8px; }
.n-stage .bz-note { font: 400 calc(12px * var(--fsx))/calc(16px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); }
/* 命令面板的小样：高亮条跟着指针在行间滑 */
.ck-box { width: 100%; max-width: 300px; border-radius: 14px; background: var(--sn-raised); box-shadow: var(--sn-e1); overflow: hidden; }
.ck-in { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 12px; font: 400 calc(13px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label); }
.ck-in .sn-ic { width: 15px; height: 15px; color: var(--sn-label3); }
.ck-q::after { content: ""; display: inline-block; width: 1.5px; height: 15px; margin-left: 1px; vertical-align: -3px; background: var(--sn-label); animation: ck-caret 1.1s steps(1) infinite; }
@keyframes ck-caret { 50% { opacity: 0; } }
.ck-in kbd { margin-left: auto; padding: 1px 4px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--sn-line); font: 500 calc(10px * var(--fsx))/calc(14px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); }
.ck-list { position: relative; padding: 6px; display: grid; }
.ck-hl { position: absolute; left: 6px; right: 6px; top: 6px; height: 34px; border-radius: 8px; background: var(--sn-fill-active); transition: transform .26s var(--sn-ease-out-strong); }
.ck-list a { position: relative; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; font: 400 calc(13px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label); cursor: pointer; }
.ck-list a .sn-ic { width: 15px; height: 15px; color: var(--sn-label3); }
.ck-list small { margin-left: auto; font: 400 calc(12px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label3); }
.sn-nf-big { font: 600 calc(52px * var(--fsx))/1 var(--sn-sans); letter-spacing: -.02em; }
.sw-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px; }

/* 主题：壁纸上一扇"新建项目"窗口；下面一条工具栏，改了窗口里马上跟着变 */
.n-themepanel { padding: 48px 0 64px; display: flex; justify-content: center; }
.n-twin { width: min(100% - 48px, 720px); }
.n-form { display: grid; gap: 16px; padding: 24px; }
.n-form-head { display: flex; align-items: flex-start; gap: 12px; }
.n-form-head > div { flex: 1; display: grid; gap: 2px; }
.n-form-head b { font: 600 calc(17px * var(--fsx))/calc(24px * var(--fsx)) var(--sn-sans); }
.n-form-head span:not(.sn-tag) { font: 400 calc(13px * var(--fsx))/calc(18px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); }
.n-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: end; }
.n-form .sn-aside { margin-left: auto; color: var(--sn-label3); font-weight: 400; }
.n-form .sn-lbl { display: flex; }
.n-form-act { justify-content: flex-end; }
.n-tbar { position: relative; z-index: 1; margin: -32px auto 0; width: fit-content; max-width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; padding: 8px 8px 8px 10px; border-radius: 28px;
  background: var(--sn-raised); box-shadow: inset 0 0 0 1px var(--sn-card-line), 0 18px 40px -20px rgba(0, 0, 0, .3); }
[data-theme="dark"] .n-tbar { background: var(--sn-overlay); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 18px 40px -20px rgba(0, 0, 0, .9); }
.n-tbar .sn-th-sec { display: flex; align-items: center; gap: 8px; padding-left: 16px; }
.n-tb-rest { display: contents; }
.n-tbar .sn-th-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } /* 一条工具栏里不写小标题，读屏照样读得到 */
.n-tbar .sn-th-foot { display: none; }
.n-tbar .sn-th-st { display: flex; gap: 6px; }
.n-tbar .sn-th-pick { font-size: 0; gap: 0; padding: 3px; margin: 0; border-radius: 50%; }
.n-tb-mode button .sn-ic { width: 14px; height: 14px; }
.n-tbar [data-copy-vars] { margin-left: 4px; }
.n-stage .bz-note { flex-basis: auto; }
.na-prompt { padding: 8px 10px; border-radius: 8px; background: var(--sn-fill-subtle); font: 400 calc(12px * var(--fsx))/calc(18px * var(--fsx)) var(--sn-sans); color: var(--sn-label2); }

/* 规范：四列，每条一个图标方块 + 标题 + 两行说明 */
.n-feats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 32px; }
.n-feat { display: grid; align-content: start; gap: 8px; text-decoration: none; }
.n-feat .n-ico { width: 40px; height: 40px; margin-bottom: 12px; display: grid; place-items: center; border-radius: 12px; background: var(--sn-fill-subtle); color: var(--sn-label); transition: background-color .15s var(--sn-ease-out); }
.n-feat .n-ico .sn-ic { width: 18px; height: 18px; }
.n-feat b { font: 600 calc(16px * var(--fsx))/calc(22px * var(--fsx)) var(--sn-sans); }
.n-feat span { font: 400 calc(14px * var(--fsx))/calc(22px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); text-wrap: pretty; }
.n-feat:hover .n-ico { background: var(--sn-fill-active); }
.n-feat:hover b { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--sn-line-control); }

/* 性能：三个数字，中间用竖线隔开 */
.n-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.n-stats a { display: grid; align-content: start; gap: 6px; padding: 0 40px; text-decoration: none; }
.n-stats a:first-child { padding-left: 0; box-shadow: none; }
.n-stats b { font: 600 calc(56px * var(--fsx))/1.1 var(--sn-sans); letter-spacing: -.03em; }
.n-stats em { margin-top: 8px; font: 500 calc(15px * var(--fsx))/calc(22px * var(--fsx)) var(--sn-sans); font-style: normal; color: var(--sn-label); }
.n-sub { font: 400 calc(14px * var(--fsx))/calc(22px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); text-wrap: pretty; }
.n-stats a:hover em { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--sn-line-control); }
/* 实测帧间隔：整条铺满，左边写读数，指针移上去出读数 */
.n-fps { position: relative; margin-top: 80px; height: 300px; border-radius: 28px; background: var(--sn-raised); box-shadow: inset 0 0 0 1px var(--sn-card-line); overflow: hidden; }
.n-fps-t { position: absolute; z-index: 1; left: 32px; top: 28px; display: grid; gap: 4px; pointer-events: none; }
.n-fps-t b { font: 600 calc(16px * var(--fsx))/calc(22px * var(--fsx)) var(--sn-sans); }
.n-fps-t span { font: 400 calc(13px * var(--fsx))/calc(20px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); }
.n-fps-t strong { margin-top: 20px; font: 600 calc(44px * var(--fsx))/1 var(--sn-sans); letter-spacing: -.02em; }
.n-fps-t small { font: 400 calc(12px * var(--fsx))/calc(16px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); }
.n-fps-svg { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 220px; }
.n-fps-area { fill: color-mix(in srgb, var(--sn-label) 6%, transparent); }
.n-fps-line { fill: none; stroke: var(--sn-label2); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.n-fps-ref { fill: none; stroke: var(--sn-line-control); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.n-fps-tip { position: absolute; z-index: 2; padding: 8px 10px; border-radius: 10px; background: var(--sn-overlay); box-shadow: var(--sn-e1); font: 400 calc(12px * var(--fsx))/calc(16px * var(--fsx)) var(--sn-sans); color: var(--sn-label2); white-space: nowrap; pointer-events: none; }
.n-fps-tip b { color: var(--sn-label); font-weight: 600; font-variant-numeric: tabular-nums; }

/* 收尾、页脚 */
.n-end-sec { padding-bottom: 128px; } /* sp-ok: 页尾留白，同区块间距 */
.n-foot { padding: 64px 0 48px; }
.n-foot-grid { display: grid; grid-template-columns: 1.4fr repeat(5, 1fr); gap: 32px; }
.n-foot-grid .s-logo { display: flex; width: fit-content; } /* 块级：不被正文行高撑成 28px */
.n-foot-grid p { margin-top: 14px; max-width: 260px; font: 400 calc(13px * var(--fsx))/calc(18px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); } /* 第一行和右边各列第一个链接同一条中线 */
.n-foot h4 { margin-bottom: 10px; font: 600 calc(13px * var(--fsx))/22px var(--sn-sans); } /* 行高和左边 logo 一样 22px：几列标题和 logo 一条中线 */
.n-foot li { list-style: none; margin-top: 8px; }
.n-foot li a { color: var(--sn-label3); text-decoration: none; font: 400 calc(13px * var(--fsx))/calc(18px * var(--fsx)) var(--sn-sans); transition: color .15s var(--sn-ease-out); }
.n-foot li a:hover { color: var(--sn-label); }
.n-foot-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.n-foot-mode { margin-top: 0; }
.n-foot-mode button .sn-ic { width: 14px; height: 14px; }
.n-foot-gh { color: var(--sn-label2); }
.n-credits { margin-top: 48px; padding-top: 24px; }

/* ———— 7. 首页：窄屏 ———— */
@media (max-width: 1200px) { .n-tbar { gap: 10px 12px; } .n-tbar .sn-th-sec { padding-left: 12px; } .n-tb-txt { display: none; } .n-tbar [data-copy-vars] { --sn-px: 0; width: 28px; } } /* 主题条在 1100 左右还排得下一行：复制按钮只留图标 */
@media (max-width: 1120px) {
  .na-insp { display: none; }
  .n-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .n-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .n-links { display: none; }
  .n-head { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .na-side { display: none; }
  .n-wins { inset: 40px 24px 0; }
  .n-foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .n-hero { padding-top: 120px; } /* sp-ok: 72 的顶栏 + 48 */
  .n-h1 { font-size: calc(clamp(28px, 9.4vw, 40px) * var(--fsx)); white-space: nowrap; } /* 两行各自不折：窄屏按屏宽缩字号 */
  .n-lead { font-size: calc(16px * var(--fsx)); line-height: calc(26px * var(--fsx)); }
  .n-h2 { font-size: calc(32px * var(--fsx)); }
  .n-sec { padding-top: 80px; }
  .n-show { margin-top: 48px; padding: 24px 12px; border-radius: 24px; }
  .n-app { height: 560px; }
  .na-bar .sn-seg, .na-search { display: none; }
  .na-bar { padding: 0 12px; } /* 和下面网格的左右边距一样 */
  .na-sm .sn-num { display: none; } /* 两列时一行放不下时长和"生成中 84%"：时长在检查器里看 */
  .na-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }
  .n-tabs { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: 0 -24px 16px; padding: 0 24px; }
  .n-tabs button { min-width: auto; flex: none; padding: 8px 6px 14px; }
  .n-tabpanel { border-radius: 24px; }
  .n-wins { inset: 24px 12px 0; }
  .n-cards, .n-feats, .n-stats { grid-template-columns: minmax(0, 1fr); }
  .n-stats { gap: 32px; } .n-stats a { padding: 0; box-shadow: none; }
  .n-grid2 { grid-template-columns: minmax(0, 1fr); }
  .n-themepanel { padding: 24px 0; }
  .n-twin { width: calc(100% - 24px); }
  .n-tbar { margin-top: 16px; justify-content: flex-start; border-radius: 20px; }
  .n-fps { height: 260px; }
  .n-foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .n-foot-grid > div:first-child { grid-column: 1 / -1; }
}
.na-sm .sn-tag { height: 20px; padding: 0 8px; gap: 6px; font-size: calc(11px * var(--fsx)); }

/* 演示画布：预览框按 --h 占位，iframe 叠在上面；浮层弹出时 iframe 临时伸出预览框，盖在下面的代码上（.ext），层级高于正文、低于顶栏 */
.dx .d-frame { position: relative; height: var(--sn-h, 120px); }
.dx .d-frame iframe { position: absolute; left: 0; top: 0; width: 100%; height: var(--sn-h, 120px); }
.dx .d-frame.ext { z-index: 20; }
.dx:not(.is-win) .dx-stage { overflow: visible; min-height: 200px; }

/* 全局浮层打开时：演示画布铺满整个窗口，层级盖过顶栏；挡住整页的浮层打开时页面不滚 */
/* 宽高按窗口里能放东西的区域（不含常显的滚动条）：用 100vw 会伸到滚动条底下，靠右的轻提示被滚动条挡住一截 */
.dx .d-frame iframe.global { position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 1000; }
/* 深色主题下演示文档是 color-scheme: dark，原版（site.css）在 iframe 元素上写的是 normal：两边不一致，浏览器给 iframe 垫一层不透明的 Canvas 底（#121212）——
   预览框比内容高时，框里中间一条深灰、上下露出预览框的黑底；铺满窗口时这层底还会把整个文档页盖成一片黑（2026-11-20 看图边界测试深色抓到，当时只给铺满的情况绕开）。
   2026-11-21 主会话看图确认是毛病：深色下 iframe 元素也写 dark，两边一致就没有这层底，框里整块是预览框的底色，铺满窗口时也透明，原来那条补色规则不要了。
   浅色下 iframe 还是 normal，和原来一像素不差 */
[data-theme="dark"] .dx .d-frame iframe { color-scheme: dark; }
.mac:has(iframe.global) { overflow: visible; isolation: auto; } /* 窗口样式的演示铺满窗口时：放开裁剪与层叠上下文，防止全屏浮层被压在页头下面 */
.mac:has(iframe.global) .mac-body { overflow: visible; }
/* 弹窗、看图时锁住整页：常显的滚动条收起，同时在右边补上滚动条那么宽的内边距（--sbw，锁之前量好），页面一像素都不挪、演示不重新排版。
   不用 scrollbar-gutter: stable 留着滚动条的位置：留着的那一条遮罩盖不到，看图时窗口右边一直亮着一条（2026-11-20 看图边界测试逐帧抓到） */
html.dx-lock { overflow: hidden; padding-right: var(--sbw, 0px); }
/* 演示进全屏时 Chrome 收起了整页滚动条：右边补上同样宽的内边距（--fs-sbw，进全屏前量好），全屏前后页面不挪（next-docs.js 的 fullscreenchange） */
html.dx-fs { padding-right: var(--fs-sbw, 0px); }

/* 组件页：第一个演示的小标题后面跟一句这一块是什么（比如"变体 × 尺寸"） */
.d-h2-sub { margin-left: 10px; font: 400 calc(14px * var(--sn-font-scale, 1))/1 var(--sn-sans); color: var(--sn-label3); }

/* 首页应用窗口：镜头墙、属性栏包了滚动区域，外面那一层占原来的位置 */
.na-body > .sn-sa:has(> .na-shots) { flex: 1; min-width: 0; display: grid; grid-template-rows: minmax(0, 1fr); }
.na-body > .sn-sa:has(> .na-insp) { flex: none; display: grid; grid-template-rows: minmax(0, 1fr); }
.na-body > .sn-sa > .na-shots, .na-body > .sn-sa > .na-insp { min-height: 0; height: 100%; }
@media (max-width: 1120px) { .na-body > .sn-sa:has(> .na-insp) { display: none; } } /* 和 .na-insp 自己藏起来的断点一致 */

/* 参数表的小标题 */
.d-h3 { margin: 28px 0 0; font: 600 calc(15px * var(--sn-font-scale, 1))/calc(22px * var(--sn-font-scale, 1)) var(--sn-sans); color: var(--sn-label); }
}

/* ———— 8. 窄屏（≤ 860px）的顶栏和导航抽屉：首页、文档页同一套（mnav.js） ————
   顶栏：左边 logo，右边两颗一样大的圆形浅底按钮（搜索、菜单），点得到的范围 44×44；
   静止时和页面同色（没有色带、阴影），往下滚才出一层轻微半透明的底和一条细线（只动 opacity）。
   抽屉：盖住顶栏、占满整个屏幕高度，从右边滑进来；只有一种表面色；背后轻轻压暗、轻微虚化。 */
.s-mb { display: none; }
.sn-btn.s-mbtn { --sn-h: 40px; --sn-icon: 18px; --sn-r: var(--sn-r-full); --sn-bg: var(--sn-fill-subtle); --sn-fg: var(--sn-label); }
@media (hover: hover) { .sn-btn.s-mbtn:hover { --sn-bg: var(--sn-fill-active); } }
.sn-btn.s-mbtn:active, .sn-btn.s-mbtn[aria-expanded="true"] { --sn-bg: var(--sn-fill-active); }
@media (max-width: 860px) {
  :root { --nav-h: 56px; }
  .s-mb { display: inline-flex; align-items: center; gap: 8px; }
  /* 文档页顶栏 */
  .s-nav { height: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); background: none; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
  .s-nav .s-wrap { position: relative; gap: 12px; padding: 0 max(12px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
  .s-nav .s-links, .s-nav .s-search, .s-nav [data-repo], .s-nav [data-custom-btn], .s-nav .s-mode { display: none; }
  /* 首页顶栏：不长浮岛 */
  .n-nav { height: calc(56px + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); }
  .n-nav-in { padding: 0 max(12px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
  .n-island { display: none; }
  .n-nav.island .n-logo, .n-nav.island .n-end { transform: none; }
  .n-end > :not(.s-mb) { display: none; }
  /* 滚下去以后：轻微半透明的底 + 一条细线 */
  .s-nav::before, .n-nav::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s var(--sn-ease-out);
    background: color-mix(in srgb, var(--site-bg, var(--sn-canvas)) 88%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px); box-shadow: inset 0 -1px 0 var(--site-border-subtle, var(--sn-line)); }
  .s-nav.scrolled::before, .n-nav.island::before { opacity: 1; }
  /* 文档页：左边目录收进抽屉，正文一栏 */
  .n-docs .d-side { display: none; }
  .n-docs .d-layout { grid-template-columns: minmax(0, 1fr); }
  /* 翻页：两颗胶囊各占一半以内，标题太长就省略 */
  .n-docs .d-pager { gap: 12px; margin-top: 56px; }
  .n-docs .d-pager a { height: 44px; min-width: 0; max-width: calc(50% - 6px); }
  .n-docs .d-pager a .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* 抽屉本身（只在窄屏打开） */
.s-mdrawer.sn-drawer { top: 0; right: 0; bottom: 0; width: min(360px, calc(100vw - 40px)); padding-top: env(safe-area-inset-top, 0px); border-radius: var(--sn-r-xl) 0 0 var(--sn-r-xl); overflow: hidden; translate: 100% 0; }
.s-mdrawer.sn-drawer.sn-open { translate: 0; }
.s-mscrim.sn-drawer-scrim { background: rgba(0, 0, 0, .16); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); touch-action: none; }
[data-theme="dark"] .s-mscrim.sn-drawer-scrim { background: rgba(0, 0, 0, .44); }
html.s-lock, html.s-lock body { overflow: hidden; overscroll-behavior: none; }
.s-md-hd { flex: none; position: relative; display: flex; align-items: center; height: 56px; padding: 0 max(12px, env(safe-area-inset-right, 0px)) 0 16px; }
.s-md-hd .s-logo, .s-md-back, .s-md-title { transition: opacity .2s var(--sn-ease-out); }
.s-md-back { position: absolute; left: 8px; top: 8px; opacity: 0; pointer-events: none; }
.s-md-title { position: absolute; left: 56px; top: 0; font: 600 calc(15px * var(--fsx))/56px var(--sn-sans); color: var(--sn-label); opacity: 0; pointer-events: none; }
.s-md-x { margin-left: auto; }
.s-md-th-on .s-md-hd .s-logo { opacity: 0; pointer-events: none; }
.s-md-th-on .s-md-back, .s-md-th-on .s-md-title { opacity: 1; pointer-events: auto; }
/* 两屏：导航、主题调整，左右平移 */
.s-md-panes { flex: 1; min-height: 0; display: grid; grid-template-columns: 100% 100%; grid-template-rows: minmax(0, 1fr); overflow: hidden; }
.s-md-pane { position: relative; min-width: 0; min-height: 0; transition: transform .32s var(--sn-ease-in-out); }
.s-md-th-on .s-md-pane { transform: translateX(-100%); }
.s-md-nav > .sn-sa-vp { position: absolute; inset: 0; touch-action: pan-y; }
.s-md-theme { overflow: auto; overscroll-behavior: contain; touch-action: pan-y; }
.s-md-th { display: grid; gap: 16px; padding: 4px 16px 20px; }
/* 导航列表 */
.s-mn { padding: 4px 12px 16px; }
.s-mn a { display: flex; align-items: center; height: 44px; padding: 0 12px; border-radius: var(--sn-r-md); font: 400 calc(15px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label2); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.s-mn a .sn-ic { width: 18px; height: 18px; margin-right: 12px; color: var(--sn-label3); flex: none; }
.s-mn a[aria-current] { background: var(--sn-fill-active); color: var(--sn-label); font-weight: 500; }
.s-mn a[aria-current] .sn-ic { color: var(--sn-label); }
@media (hover: hover) { .s-mn a:hover, .s-mn-h:hover { background: var(--sn-fill-hover); color: var(--sn-label); } }
.s-mn a:active, .s-mn-h:active { background: var(--sn-fill-active); }
.s-mn a:focus-visible, .s-mn-h:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--sn-focus); }
.s-mn-top { padding-bottom: 8px; margin-bottom: 8px; box-shadow: inset 0 -1px 0 var(--sn-line); }
.s-mn-sec { position: relative; padding-top: 8px; background: var(--sn-overlay); } /* 不透明：类别展开、收起时后面的分区从下面盖过来 */
.s-mn-t { margin: 8px 12px 4px; font: 500 calc(12px * var(--fsx))/calc(16px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); }
.s-mn-g { position: relative; background: var(--sn-overlay); } /* 不透明：展开、收起时后面的组从下面盖过来 */
.s-mn-h { all: unset; box-sizing: border-box; display: flex; align-items: center; width: 100%; height: 44px; padding: 0 12px 0 42px; border-radius: var(--sn-r-md); font: 400 calc(15px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label2); cursor: pointer; -webkit-tap-highlight-color: transparent; } /* 组件的类别：文字和上面带图标的各页对齐，比分区标题低一级 */
.s-mn-h .sn-ic { margin-left: auto; width: 16px; height: 16px; transition: rotate .24s var(--sn-ease-out-strong); }
.s-mn-g.sn-open > .s-mn-h { color: var(--sn-label); }
.s-mn-g.sn-open > .s-mn-h .sn-ic { rotate: 90deg; }
.s-mn-l { position: relative; margin-left: 42px; padding: 0 0 6px 8px; box-shadow: inset 1px 0 0 var(--sn-line); } /* 类别下面的组件：再缩进一级，左边一条细线 */
.s-mn-l.s-leaving { position: absolute; left: 0; right: 0; top: 44px; pointer-events: none; }
.n-docs .d-side p.d-cat { margin: 12px 10px 2px 20px; font-size: calc(12px * var(--fsx)); color: var(--sn-label-off); }
.n-docs .d-side p.d-cat + a, .n-docs .d-side p.d-cat ~ a:not(:has(.sn-ic)) { padding-left: 20px; }
/* 底部：外观 + 主题调整 */
.s-md-ft { flex: none; display: flex; align-items: center; gap: 8px; padding: 12px max(12px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) 16px; box-shadow: inset 0 1px 0 var(--sn-line); }
.s-md-mode { height: 40px; }
.s-md-mode button { padding: 0 14px; }
.s-md-mode .sn-ic { width: 18px; height: 18px; }
.sn-btn.s-md-thbtn { margin-left: auto; --sn-h: 40px; --sn-px: 14px; --sn-fs: 14px; --sn-r: var(--sn-r-full); --sn-bg: var(--sn-fill-subtle); }
.sn-btn.s-md-thbtn[aria-expanded="true"] { --sn-bg: var(--sn-fill-active); }
@media (prefers-reduced-motion: reduce) { .s-md-pane { transition: none; } }

/* 文档页：右边的本页目录藏起来时（≤ 1080px），标题下面一条"本页目录" */
.d-mtoc { display: none; }
@media (max-width: 1080px) {
  .d-mtoc { display: block; margin-top: 20px; }
  .d-mtoc-btn { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 14px; border-radius: var(--sn-r-full); background: var(--sn-fill-subtle); font: 500 calc(14px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label2); cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .d-mtoc-btn .sn-ic { width: 16px; height: 16px; }
  .d-mtoc-btn > .sn-ic:last-child { color: var(--sn-label3); } /* 右边的箭头（空 span 会被直接换成图标，没有包裹层） */
  .d-mtoc-btn[aria-expanded="true"] { background: var(--sn-fill-active); color: var(--sn-label); }
  .d-mtoc-btn:focus-visible { box-shadow: 0 0 0 2px var(--sn-focus); }
  .d-mtoc-menu { max-width: min(340px, calc(100vw - 32px)); }
}

/* 文档页里的图（评测截图） */
.d-fig { margin: 20px 0 0; }
.d-fig img { display: block; width: 100%; height: auto; border-radius: 12px; background: var(--sn-sunken); }
.d-fig figcaption { margin-top: 8px; font: 400 calc(13px * var(--fsx))/calc(20px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); }

/* ———— 9. 组件总览、配方总览、单个配方 ———— */
.d-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; margin-top: 16px; }
/* 列数由 next-docs.js 的 balanceCards 按宽度和张数定：网格切成 --l 条细列，每张卡占 --sp 条——最后一行不只剩 1 张（3 列 4 张排成 2 + 2） */
.d-cards[style*="--l"] { grid-template-columns: repeat(var(--l), minmax(0, 1fr)); }
.d-cards[style*="--l"] > * { grid-column: span var(--sp, 1); }
.d-card { display: grid; align-content: start; gap: 4px; padding: 14px 16px 16px; border-radius: 12px; background: var(--sn-raised); box-shadow: inset 0 0 0 1px var(--sn-card-line); text-decoration: none; color: var(--sn-label); transition: background-color .15s var(--sn-ease-out); }
.n-docs .d-main a.d-card, .n-docs .d-main a.sn-card { text-decoration: none; color: var(--sn-label); }
.n-docs .d-main .sn-e404-head p { font-size: calc(14px * var(--fsx)); line-height: calc(22px * var(--fsx)); color: var(--sn-label3); }
@media (hover: hover) { .d-card:hover { background: color-mix(in srgb, var(--sn-label) 3%, var(--sn-raised)); } }
.d-card:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--sn-card-line), 0 0 0 2px var(--sn-focus); }
.d-card b { font: 600 calc(15px * var(--fsx))/calc(22px * var(--fsx)) var(--sn-sans); }
.d-card small { font: 400 calc(12px * var(--fsx))/calc(16px * var(--fsx)) var(--sn-mono); color: var(--sn-label3); }
.d-card > span { margin-top: 4px; font: 400 calc(13px * var(--fsx))/calc(20px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.d-rcards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 272px), 1fr)); gap: 16px; }
.d-rcard { padding: 8px 8px 14px; border-radius: 18px; }
.d-rcard b, .d-rcard > span:last-child { padding: 0 8px; }
/* 配方总览缩略卡片：干净浅底（10px 圆角与外卡片 18px - 8px 严格同心）+ 迷你 macOS 窗口 / 迷你手机框 */
.d-rprev { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; margin-bottom: 10px; padding: 12px 12px 0; overflow: hidden; border-radius: 10px; background: var(--sn-fill-subtle); }
[data-theme="dark"] .d-rprev { background: color-mix(in srgb, var(--sn-label) 6%, var(--sn-canvas)); }
.d-rprev.d-rprev-m { padding: 10px 12px 0; }
.d-rprev-win { width: 100%; height: 100%; display: flex; flex-direction: column; border-radius: 8px 8px 0 0; overflow: hidden; background: var(--sn-raised); box-shadow: 0 0 0 1px var(--sn-card-line), 0 6px 16px -6px rgba(0, 0, 0, .12); }
[data-theme="dark"] .d-rprev-win { box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 8px 20px -6px rgba(0, 0, 0, .55); }
.d-rprev-bar { flex: none; height: 15px; padding: 0 7px; display: flex; align-items: center; gap: 3.5px; background: color-mix(in srgb, var(--sn-label) 3%, var(--sn-raised)); border-bottom: .5px solid var(--sn-line); }
.d-rprev-bar i { width: 4.5px; height: 4.5px; border-radius: 50%; background: #ff5f57; }
.d-rprev-bar i:nth-child(2) { background: #febc2e; }
.d-rprev-bar i:nth-child(3) { background: #28c840; }
.d-rprev-body { position: relative; flex: 1 1 0; min-height: 0; overflow: hidden; background: var(--sn-canvas); }
.d-rprev-body iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 800px; border: 0; transform-origin: 0 0; transform: scale(var(--k, .2)); pointer-events: none; }
.d-rprev-phone { width: 92px; height: 100%; display: flex; flex-direction: column; border-radius: 14px 14px 0 0; padding: 5px 5px 0; background: #1c1c1e; box-shadow: 0 0 0 .5px rgba(255, 255, 255, .16), 0 8px 18px -6px rgba(0, 0, 0, .28); }
.d-rprev-phone .d-rprev-body { border-radius: 9px 9px 0 0; }
.d-rprev-phone .d-rprev-body iframe { width: 390px; height: 844px; }
/* 配方详情页舞台：直接满宽呈现干净的 macOS 浏览器窗口，无多余外层背景与照片壁纸 */
.n-docs .d-page.d-rpage { max-width: 1000px; }
.d-rstage { margin-top: 12px; }
.d-rstage .mac { width: 100%; --mac-r: 16px; box-shadow: 0 0 0 1px var(--sn-card-line), 0 12px 32px -12px rgba(0, 0, 0, .09), 0 2px 6px rgba(0, 0, 0, .04); }
[data-theme="dark"] .d-rstage .mac { box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 18px 40px -14px rgba(0, 0, 0, .65); }
.d-rstage-mobile { display: flex; justify-content: center; padding: 8px 0 16px; }
.d-rstage-mobile .s-devbox { margin: 0; }
.d-rframe { height: 640px; overflow: hidden; background: var(--sn-canvas); }
.d-rframe iframe { display: block; width: 100%; height: 100%; border: 0; }
/* 内容页配方：高度上限 680px（不超过时精准贴合内容，超过时窗内平滑滚动）；app 式配方固定 640px */
.d-rframe[data-fit="content"] { height: auto; max-height: 680px; }
.d-rframe[data-fit="content"] iframe { height: 640px; max-height: 680px; }
/* 配方独立代码展示区：清晰独立的圆角卡片容器 + 顶部分割线，彻底与页面背景拉开层次 */
.d-rcode { margin-top: 14px; border-radius: 16px; background: var(--site-surface, #f7f8fa); box-shadow: inset 0 0 0 1px var(--site-border, var(--sn-line)); overflow: hidden; --dx-bg: var(--site-surface, #f7f8fa); }
.d-rcode .cx { --cx-bg: var(--site-surface, #f7f8fa); }
.d-rcode .cx-hd { min-height: 44px; padding: 6px 10px 6px 12px; box-shadow: inset 0 -1px 0 var(--site-border-subtle, var(--sn-line)); background: color-mix(in srgb, var(--site-bg, #ffffff) 48%, transparent); }
.d-rcode .cx-tabs button[aria-selected="true"] { background: var(--site-bg, #ffffff); box-shadow: inset 0 0 0 1px var(--site-border, var(--sn-line)); }
.d-err { color: var(--sn-danger); }
/* 顶栏的外观分段控件（跟随系统 / 浅色 / 深色） */
.s-mode-seg .sn-ic { width: 15px; height: 15px; }
.s-mode-seg button { padding: 0 8px; }
@media (max-width: 860px) { .s-nav .s-mode-seg { display: none; } .d-rframe { height: 560px; } .d-rstage .mac { --mac-r: 14px; } .mac-bar { padding: 0 64px; } }

/* 演示框的代码区：写法切换（HTML / React / Vue / 自定义元素）在代码上面一行 */
.dx-vars { display: flex; align-items: center; gap: 8px; padding: 10px 10px 2px; overflow-x: auto; scrollbar-width: none; }
.dx-vars::-webkit-scrollbar { display: none; }
.dx-vars .sn-seg button { padding: 0 12px; }

/* ———— 10. 框架选择器（fwpref.js）：文档侧栏顶上、代码块头部、手机目录条；抽屉里是两列标志网格 ————
   触发按钮：16px 标志 + 名字（14px / 500）+ 12px 箭头，高 32；菜单宽 220、内边距 6，一行 36：18px 标志、名字、版本（12px 三级灰）、选中的勾。
   标志是各框架的官方标志（Simple Icons，CC0），用品牌色；不加"框架："字样，说明放在 Tooltip（"切换框架：React"） */
.s-fw-btn { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px 0 8px; border-radius: var(--sn-r-md);
  font: 500 calc(14px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label); white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color .12s var(--sn-ease-out); }
.s-fw-btn:hover, .s-fw-btn.sn-is-open { background: var(--sn-fill-hover); }
.s-fw-btn:focus-visible { outline: 2px solid var(--sn-focus); outline-offset: 2px; }
.s-fw-btn .s-fw-logo { display: inline-flex; width: 16px; height: 16px; flex: none; }
.s-fw-btn .s-fwlogo { width: 16px; height: 16px; }
.s-fw-btn .s-fw-caret { width: 12px; height: 12px; flex: none; color: var(--sn-label3); transition: rotate .2s var(--sn-ease-out-strong); }
.s-fw-btn.sn-is-open .s-fw-caret { rotate: 180deg; }
.s-fw-side { width: 100%; padding: 0 10px; box-shadow: inset 0 0 0 1px var(--sn-line); }
.s-fw-side .s-fw-caret { margin-left: auto; }
.s-fw-icon { width: 32px; padding: 0; justify-content: center; border-radius: var(--sn-r-full); }
.s-fw-code { height: 28px; padding: 0 8px 0 6px; gap: 6px; font-size: calc(13px * var(--fsx)); } /* 代码块头一行的高度（文件页签、复制按钮都是 28） */
.sn-menu.s-fw-menu { width: 220px; min-width: 220px; max-width: 220px; padding: 6px; }
.s-fw-menu .sn-item.s-fw-item { height: 36px; padding: 0 10px; gap: 10px; font: 500 calc(14px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label); }
.s-fw-item .s-fwlogo { width: 18px; height: 18px; flex: none; }
.s-fw-item .s-fw-n { flex: 1; min-width: 0; }
.s-fw-item .s-fw-v { font: 400 calc(12px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label3); font-variant-numeric: tabular-nums; }
.s-fw-item .s-fw-ck { display: inline-flex; width: 16px; height: 16px; flex: none; opacity: 0; }
.s-fw-item .s-fw-ck .sn-ic { width: 16px; height: 16px; color: var(--sn-label); }
.s-fw-item.sn-sel .s-fw-ck { opacity: 1; }
/* 侧栏：框架选择器钉在最上面，下面的目录自己滚（侧栏定高，目录占剩下的高度） */
@media (min-width: 861px) { .n-docs .d-side { display: flex; flex-direction: column; height: calc(100vh - var(--nav-h)); max-height: none; padding: 16px 8px 0 0; } } /* 窄屏侧栏收进抽屉（上面 860 以下的 display: none） */
.d-side-fw { flex: none; padding: 0 0 12px; }
.d-side-list { flex: 1 1 0; min-height: 0; max-height: 100%; padding: 8px 0 40px; }
.cx-fw { display: inline-flex; align-items: center; margin-right: 4px; }
.cx-note { margin-right: 8px; font: 400 calc(12px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label3); white-space: nowrap; }
.d-fw-miss { padding: 10px 14px; border-radius: 10px; background: var(--sn-fill-subtle); color: var(--sn-label2); }
/* 抽屉里：和侧栏一样的一行选择器，点开在下面展开列表（一行 44 高，手指好点） */
.s-md-fw { flex: none; padding: 12px max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px)); box-shadow: inset 0 1px 0 var(--sn-line); }
.s-md-fw + .s-md-ft { box-shadow: none; padding-top: 10px; }
.s-md-fw .s-fw-side { height: 44px; padding: 0 12px; font-size: calc(15px * var(--fsx)); }
.s-fw-list { display: grid; gap: 2px; margin-top: 6px; }
.s-fw-list[hidden] { display: none; }
.s-fw-row { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; border-radius: var(--sn-r-md);
  font: 500 calc(15px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color .12s var(--sn-ease-out); }
.s-fw-row:active, .s-fw-row:hover { background: var(--sn-fill-hover); }
.s-fw-row:focus-visible { outline: 2px solid var(--sn-focus); outline-offset: -2px; }
.s-fw-row .s-fwlogo { width: 18px; height: 18px; flex: none; }
.s-fw-row .s-fw-n { flex: 1; min-width: 0; }
.s-fw-row .s-fw-v { font: 400 calc(12px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label3); }
.s-fw-row .s-fw-ck { display: inline-flex; width: 16px; height: 16px; flex: none; opacity: 0; }
.s-fw-row .s-fw-ck .sn-ic { width: 16px; height: 16px; color: var(--sn-label); }
.s-fw-row.sn-sel .s-fw-ck { opacity: 1; }
/* 快速上手、框架接入页：React / Vue 写法上面的"Vite | Next.js""Vite | Nuxt"页签 */
.d-envtabs { display: inline-flex; gap: 2px; padding: 2px; margin: 4px 0 12px; border-radius: var(--sn-r-md); background: var(--sn-fill-subtle); }
.d-envtabs button { all: unset; box-sizing: border-box; height: 28px; padding: 0 12px; border-radius: calc(var(--sn-r-md) - 2px); font: 500 calc(13px * var(--fsx))/28px var(--sn-sans); color: var(--sn-label2); cursor: pointer; transition: color .12s var(--sn-ease-out); }
.d-envtabs button:hover { color: var(--sn-label); }
.d-envtabs button[aria-selected="true"] { background: var(--sn-raised); color: var(--sn-label); box-shadow: 0 0 0 1px var(--sn-line); }
.d-envtabs button:focus-visible { outline: 2px solid var(--sn-focus); outline-offset: 2px; }
.d-mtoc { gap: 8px; }
@media (max-width: 1080px) { .d-mtoc { display: flex; flex-wrap: wrap; align-items: center; } }
@media (min-width: 861px) { .d-mtoc-fw { display: none; } .d-mtoc:not(:has(> .d-mtoc-btn)) { display: none; } }
/* 框架标志的颜色：品牌色，深色主题下太深的换一档（黑色标志用正文色） */
.s-fwlogo[data-fw-logo="html"] { color: #E34F26; }
.s-fwlogo[data-fw-logo="react"] { color: #149ECA; }
.s-fwlogo[data-fw-logo="vue"] { color: #42B883; }
.s-fwlogo[data-fw-logo="svelte"] { color: #FF3E00; }
.s-fwlogo[data-fw-logo="angular"] { color: #0F0F11; }
.s-fwlogo[data-fw-logo="solid"] { color: #2C4F7C; }
.s-fwlogo[data-fw-logo="preact"] { color: #673AB8; }
.s-fwlogo[data-fw-logo="next"] { color: #000000; }
.s-fwlogo[data-fw-logo="nuxt"] { color: #00DC82; }
[data-theme="dark"] .s-fwlogo[data-fw-logo="html"] { color: #F06A3A; }
[data-theme="dark"] .s-fwlogo[data-fw-logo="react"] { color: #61DAFB; }
[data-theme="dark"] .s-fwlogo[data-fw-logo="vue"] { color: #42D392; }
[data-theme="dark"] .s-fwlogo[data-fw-logo="svelte"] { color: #FF5A26; }
[data-theme="dark"] .s-fwlogo[data-fw-logo="angular"] { color: var(--sn-label); }
[data-theme="dark"] .s-fwlogo[data-fw-logo="solid"] { color: #6C9BD2; }
[data-theme="dark"] .s-fwlogo[data-fw-logo="preact"] { color: #9C7BE0; }
[data-theme="dark"] .s-fwlogo[data-fw-logo="next"] { color: var(--sn-label); }
[data-theme="dark"] .s-fwlogo[data-fw-logo="nuxt"] { color: #00DC82; }

/* ———— 11. 窄屏顶栏（首页、文档页同一套）：搜索、菜单只有线条图标，不加圆底（点击区仍是 44）。桌面顶栏和基线一样 ———— */
@media (max-width: 860px) {
  .s-nav .sn-btn.s-mbtn, .n-nav .sn-btn.s-mbtn { --sn-bg: transparent; --sn-fg: var(--sn-label); }
  .s-nav .sn-btn.s-mbtn:active, .s-nav .sn-btn.s-mbtn[aria-expanded="true"], .n-nav .sn-btn.s-mbtn:active, .n-nav .sn-btn.s-mbtn[aria-expanded="true"] { --sn-bg: var(--sn-fill-hover); }
}

/* 组件页"设计规范"里的推荐做法 / 避免做法：一条一行 */
.d-dodont.d-dodont-one { grid-template-columns: 1fr; } /* 只有一侧时：一张卡占整行 */
.d-dodont ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; font: 400 calc(14px * var(--fsx))/calc(22px * var(--fsx)) var(--sn-sans); color: var(--sn-label2); }
.d-dodont .d-rule-ref { display: inline-flex; align-items: center; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--sn-fill-subtle); box-shadow: inset 0 0 0 1px var(--sn-line); font: 400 calc(11.5px * var(--fsx))/calc(17px * var(--fsx)) var(--sn-sans); color: var(--sn-label2); text-decoration: none; vertical-align: 1px; transition: background-color .14s var(--sn-ease-out), color .14s var(--sn-ease-out), box-shadow .14s var(--sn-ease-out); }
@media (hover: hover) { .d-dodont .d-rule-ref:hover { background: var(--sn-fill-hover); color: var(--sn-label); box-shadow: inset 0 0 0 1px var(--sn-line-control); text-decoration: none; } }

/* 组件页 API 表（全面复用 Satin createTable）：排序、列宽拖拽、实时搜索筛选、复杂类型摘要与平滑行详情展开 */
.n-docs .d-table th { white-space: nowrap; }
.n-docs .d-nb { white-space: nowrap; } /* 短词不断行，超长串已由 nbWord 拆分并由外层 code overflow-wrap: anywhere 兜底不溢出 */
.n-docs .d-table td code { max-width: 100%; overflow-wrap: anywhere; word-break: break-word; box-sizing: border-box; }
.n-docs .d-api-sec { margin: 14px 0 22px; min-width: 0; }
.n-docs .d-api-sec .d-api-wrap { margin: 0; }
.n-docs .d-api-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 10px; }
.n-docs .d-api-search { position: relative; display: inline-flex; align-items: center; gap: 6px; width: min(260px, 100%); height: 32px; padding: 0 28px 0 10px; border-radius: var(--sn-r-md); background: var(--site-surface, var(--sn-raised)); box-shadow: inset 0 0 0 1px var(--site-border, var(--sn-line)); color: var(--sn-label3); transition: box-shadow .14s var(--sn-ease-out), background-color .14s var(--sn-ease-out); }
.n-docs .d-api-search:focus-within { background: var(--sn-raised); box-shadow: inset 0 0 0 1.5px var(--sn-accent); color: var(--sn-label); }
.n-docs .d-api-sic { flex: none; display: inline-flex; width: 14px; height: 14px; }
.n-docs .d-api-sic .sn-ic { width: 14px; height: 14px; }
.n-docs .d-api-q { all: unset; box-sizing: border-box; flex: 1; min-width: 0; font: 400 calc(13px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label); }
.n-docs .d-api-q::placeholder { color: var(--sn-label3); }
.n-docs .d-api-q::-webkit-search-cancel-button { display: none; }
.n-docs .d-api-qx { all: unset; box-sizing: border-box; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: var(--sn-r-sm); display: grid; place-items: center; color: var(--sn-label3); cursor: pointer; }
.n-docs .d-api-qx[hidden] { display: none; }
.n-docs .d-api-qx .sn-ic { width: 13px; height: 13px; }
@media (hover: hover) { .n-docs .d-api-qx:hover { background: var(--sn-fill-hover); color: var(--sn-label); } }
.n-docs .d-api-bar-r { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.n-docs .d-api-cnt { font: 400 calc(12px * var(--fsx))/1 var(--sn-sans); font-variant-numeric: tabular-nums; color: var(--sn-label3); white-space: nowrap; }
.n-docs .d-api-expall { --sn-h: 28px; --sn-px: 10px; gap: 4px; font-size: calc(12px * var(--fsx)); color: var(--sn-label2); }
.n-docs .d-api-expall-i { display: inline-flex; transition: rotate .22s var(--sn-ease-open); }
.n-docs .d-api-expall-i .sn-ic { width: 13px; height: 13px; }
.n-docs .d-api-expall.sn-on .d-api-expall-i { rotate: 180deg; }
/* API 表格主体：精准复用 Satin createTable 能力（排序、拖拽改宽、展开箭头与原生行详情），支持多行自然排版零溢出 */
.n-docs .d-api-tbl { table-layout: fixed; }
.n-docs .d-api-tbl th { padding: 0 14px; }
.n-docs .d-api-tbl tbody tr[data-id] > td { height: auto; padding: 11px 14px; vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
.n-docs .d-api-tbl tbody tr[data-id] > td.d-k-n .sn-name { align-items: flex-start; gap: 6px; }
.n-docs .d-api-tbl tbody tr[data-id] > td.d-k-n .sn-exp,
.n-docs .d-api-tbl tbody tr[data-id] > td.d-k-n .sn-leaf { margin-top: 2px; }
.n-docs .d-api-name-cell { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; min-width: 0; max-width: 100%; }
.n-docs .d-api-name-cell > code { display: inline-block; max-width: 100%; line-height: 1.45; }
.n-docs .d-api-req { display: inline-flex; align-items: center; height: 17px; padding: 0 5px; border-radius: 4px; font: 500 calc(10.5px * var(--fsx))/1 var(--sn-sans); color: var(--sn-danger); background: color-mix(in srgb, var(--sn-danger) 10%, transparent); white-space: nowrap; }
.n-docs .d-api-tok { display: inline-flex; align-items: center; height: 17px; padding: 0 5px; border-radius: 4px; font: 400 calc(10.5px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label3); background: var(--sn-fill-subtle); white-space: nowrap; }
.n-docs .d-api-sub { flex-basis: 100%; font: 400 calc(11.5px * var(--fsx))/calc(16px * var(--fsx)) var(--sn-mono); color: var(--sn-label3); }
.n-docs .d-api-t { display: inline-block; max-width: 100%; line-height: 1.45; }
.n-docs .d-api-nil { color: var(--sn-label-off); }
.n-docs .d-api-desc { min-width: 0; }
.n-docs .d-api-desc > p:first-child { margin-top: 0; }
.n-docs .d-api-desc > p:last-child { margin-bottom: 0; }
.n-docs .d-k-note { font: 400 calc(12px * var(--fsx))/calc(18px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); }
/* 复杂类型收起态交互胶囊（点击丝滑展开完整格式化高亮类型） */
.n-docs .d-type-pill { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-height: 24px; padding: 2px 7px; border-radius: 6px;
  background: var(--sn-fill-subtle); box-shadow: inset 0 0 0 1px var(--sn-line); color: var(--sn-label); cursor: pointer;
  transition: background-color .12s var(--sn-ease-out), box-shadow .12s var(--sn-ease-out); }
@media (hover: hover) { .n-docs .d-type-pill:hover { background: var(--sn-fill-hover); box-shadow: inset 0 0 0 1px var(--sn-line-control); } }
.n-docs .d-type-pill.sn-on { background: color-mix(in srgb, var(--sn-accent) 7%, var(--sn-raised)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sn-accent) 28%, var(--sn-line)); }
.n-docs .d-type-pill:focus-visible { outline: 2px solid var(--sn-focus); outline-offset: 2px; }
.n-docs .d-type-txt { all: unset; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 calc(12px * var(--fsx))/1.4 var(--sn-mono); color: var(--sn-label); }
.n-docs .d-type-cnt { flex: none; padding: 0 4px; border-radius: 4px; background: color-mix(in srgb, var(--sn-label) 7%, transparent); font: 500 calc(10.5px * var(--fsx))/calc(16px * var(--fsx)) var(--sn-mono); font-variant-numeric: tabular-nums; color: var(--sn-label3); white-space: nowrap; }
.n-docs .d-type-ic { flex: none; display: inline-flex; color: var(--sn-label3); transition: rotate .22s var(--sn-ease-open), color .14s; }
.n-docs .d-type-ic .sn-ic { width: 12px; height: 12px; }
.n-docs .d-type-pill.sn-on .d-type-ic { rotate: 180deg; color: var(--sn-label); }
.n-docs .d-api-exbtn { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 2px; margin-left: 4px; padding: 0 6px; height: 20px; border-radius: 5px; background: var(--sn-fill-subtle); font: 500 calc(11.5px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label2); cursor: pointer; vertical-align: baseline; transition: background-color .12s, color .12s; }
.n-docs .d-api-exbtn .sn-ic { width: 11px; height: 11px; transition: rotate .2s var(--sn-ease-open); }
.n-docs .d-api-exbtn.sn-on .sn-ic { rotate: 180deg; }
@media (hover: hover) { .n-docs .d-api-exbtn:hover { background: var(--sn-fill-hover); color: var(--sn-label); } }
/* 展开后的全宽行详情面板（Pretty-Print TS 高亮 + 可选值枚举 + 一键复制） */
.n-docs .d-api-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; max-width: 100%; }
.n-docs .d-api-code { border-radius: 10px; border: 1px solid var(--sn-line); background: var(--site-surface, var(--sn-canvas)); overflow: hidden; min-width: 0; max-width: 100%; }
.n-docs .d-api-code-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 32px; padding: 0 6px 0 12px; border-bottom: 1px solid var(--sn-line); background: color-mix(in srgb, var(--sn-label) 2%, transparent); }
.n-docs .d-api-code-t { font: 500 calc(11.5px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label3); }
.n-docs .d-api-code-r { display: inline-flex; align-items: center; gap: 4px; }
.n-docs .d-api-code-lang { padding: 1px 6px; border-radius: 4px; background: color-mix(in srgb, var(--sn-label) 6%, transparent); font: 500 calc(10px * var(--fsx))/calc(16px * var(--fsx)) var(--sn-mono); color: var(--sn-label3); letter-spacing: .02em; }
.n-docs .d-api-copy { --sn-h: 24px; width: 24px; height: 24px; color: var(--sn-label3); }
.n-docs .d-api-copy .sn-ic { width: 13px; height: 13px; }
.n-docs .d-api-code pre { margin: 0; padding: 10px 14px; overflow-x: auto; font: 400 calc(12.5px * var(--fsx))/calc(20px * var(--fsx)) var(--sn-mono); tab-size: 2; color: var(--cx-fg); outline: none; }
.n-docs .d-api-code code { font: inherit; background: none; padding: 0; border-radius: 0; box-shadow: none; display: block; max-width: none; overflow-wrap: normal; word-break: normal; }
.n-docs .d-api-cl { display: block; white-space: pre; }
.n-docs .d-api-enums { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.n-docs .d-api-el { font: 500 calc(11.5px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label3); white-space: nowrap; }
.n-docs .d-api-ev { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.n-docs .d-api-enum { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 5px; background: var(--sn-raised); box-shadow: inset 0 0 0 1px var(--sn-line); font: 400 calc(12px * var(--fsx))/1.35 var(--sn-mono); color: var(--sn-label2); }
.n-docs .d-api-enum.is-def { color: var(--sn-label); box-shadow: inset 0 0 0 1px var(--sn-line-control); }
.n-docs .d-api-edef { padding: 0 4px; border-radius: 3px; background: var(--sn-fill-subtle); font: 500 calc(10px * var(--fsx))/calc(15px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); }
/* "给 AI 用"页的规则表：查法一列按内容定宽、不折行；规则 id、怎么改里的令牌名 / 类名 / 路径是整体不断开的代码，只在" / "、逗号这些地方换行 */
.d-nw { white-space: nowrap; }
.n-docs table.d-rules td:nth-child(2), .n-docs table.d-rules th:nth-child(2) { width: 1%; white-space: nowrap; }
.n-docs table.d-rules td:first-child { white-space: normal; }
.n-docs .d-table td:first-child { white-space: normal; }
.n-docs .d-table td.d-nw { white-space: nowrap; }
.n-docs .d-roots td:first-child, .n-docs .d-roots th:first-child { width: 1%; white-space: nowrap; }
.n-docs table.d-rules code { display: inline-block; max-width: 100%; overflow-wrap: anywhere; line-height: 1.45; }
@media (max-width: 639px) {
  .n-docs .d-api-bar { gap: 8px; }
  .n-docs .d-api-search { width: 100%; }
  .n-docs .d-api-tbl { display: block; width: 100%; min-width: 0 !important; }
  .n-docs .d-api-tbl colgroup, .n-docs .d-api-tbl thead { display: none; }
  .n-docs .d-api-tbl tbody { display: block; width: 100%; }
  .n-docs .d-api-tbl tbody tr[data-id] { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding: 12px 14px; background: var(--sn-raised); box-shadow: inset 0 -1px 0 var(--sn-line); transition: background-color .12s var(--sn-ease-out); }
  .n-docs .d-api-tbl tbody tr[data-id].sn-detail-open { box-shadow: none; }
  .n-docs .d-api-tbl tbody tr[data-id]:last-child { box-shadow: none; }
  .n-docs .d-api-tbl tbody tr[data-id] > td { display: block; padding: 0; background: transparent !important; box-shadow: none; min-width: 0; }
  @media (hover: hover) { .n-docs .d-api-tbl tbody tr[data-id]:hover { background: var(--sn-fill-hover-solid); } }
  .n-docs .d-api-tbl .sn-leaf.sn-leaf-empty { display: none; }
  .n-docs .d-api-tbl tbody tr[data-id] > td.d-k-n { order: 0; flex: 1 1 auto; max-width: 100%; }
  .n-docs .d-api-tbl tbody tr[data-id] > td.d-k-m { order: 1; flex: 0 1 auto; max-width: 100%; }
  .n-docs .d-api-tbl tbody tr[data-id] > td.d-k-def { order: 2; flex: 0 1 auto; font-size: calc(12px * var(--fsx)); color: var(--sn-label3); }
  .n-docs .d-api-tbl tbody tr[data-id] > td.d-k-def::before { content: "默认 "; color: var(--sn-label3); }
  .n-docs .d-api-tbl tbody tr[data-id] > td.d-k-def:has(.d-api-nil) { display: none; }
  .n-docs .d-api-tbl tbody tr[data-id] > td.d-k-d { order: 3; flex-basis: 100%; color: var(--sn-label2); }
  .n-docs .d-api-tbl tbody tr.sn-tbl-detail { display: block; width: 100%; }
  .n-docs .d-api-tbl tbody tr.sn-tbl-detail[hidden] { display: none; }
  .n-docs .d-api-tbl tbody tr.sn-tbl-detail > td { display: block; width: 100%; }
  .n-docs .d-api-tbl tbody tr.sn-tbl-detail .sn-tbl-detail-in { padding-left: 14px; padding-right: 14px; }
  /* 别的文档表格（快速上手、令牌、动效、浏览器支持、规则表……）也是一行一块 */
  .n-docs .d-table:not(.d-api-tbl), .n-docs .d-table:not(.d-api-tbl) tbody, .n-docs .d-table:not(.d-api-tbl) tr, .n-docs .d-table:not(.d-api-tbl) td { display: block; width: auto; }
  .n-docs .d-table:not(.d-api-tbl) thead { display: none; }
  .n-docs .d-table:not(.d-api-tbl) tr { padding: var(--sn-sp-12) var(--sn-sp-16); box-shadow: inset 0 -1px 0 var(--sn-line); }
  .n-docs .d-table:not(.d-api-tbl) tr:last-child { box-shadow: none; }
  .n-docs .d-table:not(.d-api-tbl) td { padding: 0; box-shadow: none; }
  .n-docs .d-table:not(.d-api-tbl) td + td { margin-top: var(--sn-sp-4); }
  .n-docs .d-table:not(.d-api-tbl) td:first-child { color: var(--sn-label); font-weight: 500; }
  .n-docs .d-table:not(.d-api-tbl) td + td[data-l]:not([data-l=""])::before { content: attr(data-l); display: block; font: 400 calc(12px * var(--fsx))/calc(18px * var(--fsx)) var(--sn-sans); color: var(--sn-label3); }
  .n-docs table.d-rules td:nth-child(n), .n-docs table.d-roots td:nth-child(n) { width: auto; }
}

/* ———— 11. 手机设备框（device.js）：iframe 里跑真实页面，按屏幕的 CSS 尺寸；整体按可用宽高缩放（只动 transform），换机型 / 横竖屏淡出淡入（只动 opacity）
   外观克制：中性深色细边框、阴影只用令牌层级；iPhone 灵动岛 + 底部横条、iPhone SE 听筒 + Home 键、安卓打孔屏，比例照真机，不画厂商渲染图那种高光 ———— */
.s-devbox { display: grid; justify-items: center; gap: var(--sn-sp-16); }
.s-devbar { display: flex; align-items: center; justify-content: center; gap: var(--sn-sp-8); flex-wrap: wrap; }
.s-dev-btn { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: var(--sn-sp-6); height: 28px; padding: 0 var(--sn-sp-8) 0 var(--sn-sp-12); border-radius: var(--sn-r-md); box-shadow: inset 0 0 0 1px var(--sn-line);
  font: 500 calc(13px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label); white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color .12s var(--sn-ease-out); }
.s-dev-btn:hover, .s-dev-btn.sn-is-open { background: var(--sn-fill-hover); }
.s-dev-btn:focus-visible { outline: 2px solid var(--sn-focus); outline-offset: 2px; }
.s-dev-caret { width: 12px; height: 12px; flex: none; color: var(--sn-label3); transition: rotate .2s var(--sn-ease-out-strong); }
.s-dev-btn.sn-is-open .s-dev-caret { rotate: 180deg; }
.sn-menu.s-dev-menu { width: 248px; min-width: 248px; max-width: 248px; padding: var(--sn-sp-6); }
.s-dev-menu .sn-item.s-dev-item { height: 36px; padding: 0 var(--sn-sp-10); gap: var(--sn-sp-10); font: 500 calc(14px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label); }
.s-dev-item .s-dev-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-dev-item .s-dev-v { font: 400 calc(12px * var(--fsx))/1 var(--sn-sans); color: var(--sn-label3); font-variant-numeric: tabular-nums; }
.s-dev-item .s-dev-ck { display: inline-flex; width: 16px; height: 16px; flex: none; opacity: 0; }
.s-dev-item .s-dev-ck .sn-ic { width: 16px; height: 16px; color: var(--sn-label); }
.s-dev-item.sn-sel .s-dev-ck { opacity: 1; }
.s-devfit { position: relative; }
/* 现代全面屏采用纯净无粗黑框的屏幕浮雕（柔和扩散影 + 1px 细腻硬件边缘）；仅 iPhone SE 保留经典机身边框 */
.s-dev { position: absolute; left: 0; top: 0; transform-origin: 0 0; width: calc(var(--dw) + var(--bl) + var(--br)); height: calc(var(--dh) + var(--bt) + var(--bb));
  border-radius: calc(var(--dr) + var(--bt)); background: transparent;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .07), 0 2px 6px rgba(0, 0, 0, .04), 0 24px 60px -16px rgba(0, 0, 0, .14);
  transition: opacity .14s var(--sn-ease-out); }
[data-theme="dark"] .s-dev { box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 28px 64px -16px rgba(0, 0, 0, .72); }
.s-dev[data-kind="home"] { background: #1c1c1e; }
.s-dev.s-dev-out { opacity: 0; }
/* 屏幕：iframe 放在安全区以内，让出来的那一圈是页面自己的底色（--s-page，device.js 从页面里读） */
.s-dev-screen { position: absolute; left: var(--bl); top: var(--bt); width: var(--dw); height: var(--dh); border-radius: var(--dr); overflow: hidden; background: var(--s-page, var(--sn-canvas)); }
/* 安全区上下两条：页面在上 / 下边上实际画出来的颜色（--s-band-t / -b，device.js 沿着边撒点取，贴边的是固定栏就是栏的颜色）；取不到时是页面底色 */
.s-dev-screen::before, .s-dev-screen::after { content: ""; position: absolute; left: var(--sa-l, 0px); right: var(--sa-r, 0px); pointer-events: none; }
.s-dev-screen::before { top: 0; height: var(--sa-t, 0px); background: var(--s-band-t, var(--s-page, var(--sn-canvas))); }
.s-dev-screen::after { bottom: 0; height: var(--sa-b, 0px); background: var(--s-band-b, var(--s-page, var(--sn-canvas))); }
/* 横屏时左右两侧让出来的那两条：页面左 / 右边上实际画出来的颜色（--s-band-l / -r），整条竖着铺满（上下两角也归它） */
.s-dev-band-l, .s-dev-band-r { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.s-dev-band-l { left: 0; width: var(--sa-l, 0px); background: var(--s-band-l, var(--s-page, var(--sn-canvas))); }
.s-dev-band-r { right: 0; width: var(--sa-r, 0px); background: var(--s-band-r, var(--s-page, var(--sn-canvas))); }
.s-dev-screen iframe { position: absolute; display: block; left: var(--sa-l, 0px); top: var(--fr-t, var(--sa-t, 0px)); width: calc(100% - var(--sa-l, 0px) - var(--sa-r, 0px)); height: calc(100% - var(--fr-t, var(--sa-t, 0px)) - var(--sa-b, 0px)); border: 0; background: var(--s-page, var(--sn-canvas)); }
/* 内容页（.s-under，device.js 按调用方的 under 加）：iframe 顶到屏幕最上沿（页面里让出了状态栏那么高），状态栏那一条压在页面上面——
   页面底色、略透一点，带模糊（像 iOS 的状态栏）：往上滚的内容滑进去是糊开的一片，不跟时间、信号叠成两层字。只在竖屏、有状态栏的机型上 */
.s-dev.s-under .s-dev-screen::before { z-index: 1; background: color-mix(in srgb, var(--s-band-t, var(--s-page, var(--sn-canvas))) 82%, transparent); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
/* 状态栏（竖屏）：时间、信号、Wi-Fi、电量，正文色，不加底；字号与灵动岛比例精准对齐 */
.s-dev-sb { position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: var(--sb-h); display: none; align-items: center; color: var(--sn-label); pointer-events: none; user-select: none; font-variant-numeric: tabular-nums; }
.s-dev.s-has-sb .s-dev-sb { display: grid; }
.s-dev-sb svg { display: block; flex: none; }
.s-sb-ic { display: flex; align-items: center; gap: 5.5px; }
.s-dev[data-kind="island"] .s-dev-sb { top: 12px; height: 31px; grid-template-columns: minmax(0, 1fr) 114px minmax(0, 1fr); justify-items: center; font: 600 15.5px/1 var(--sn-sans); letter-spacing: -.015em; }
.s-dev[data-kind="island"] .s-sb-ic { grid-column: 3; }
.s-dev[data-kind="home"] .s-dev-sb { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); padding: 0 8px; font: 600 12px/1 var(--sn-sans); }
.s-dev[data-kind="home"] .s-sb-ic { gap: 5px; }
.s-dev[data-kind="home"] .s-sb-r { justify-self: end; }
.s-dev[data-kind="punch"] .s-dev-sb { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 2px 22px 0; font: 500 14px/1 var(--sn-sans); }
.s-dev[data-kind="punch"] .s-sb-ic { justify-self: end; gap: 6px; }
/* 灵动岛、打孔、横条指示、Home 键压在一切上面（z-index 3） */
.s-dev > i { position: absolute; z-index: 3; display: none; pointer-events: none; }
/* iPhone：修长克制的灵动岛（112 × 31，离顶 12）、底部横条（130 × 4.5，离底 9） */
.s-dev[data-kind="island"] .s-dev-cut { display: block; left: 50%; top: calc(var(--bt) + 12px); width: 112px; height: 31px; margin-left: -56px; border-radius: 16px; background: #0a0a0c; }
.s-dev[data-kind="island"].s-land .s-dev-cut { left: calc(var(--bl) + 12px); top: 50%; width: 31px; height: 112px; margin: -56px 0 0; }
.s-dev[data-kind="island"] .s-dev-ind { display: block; left: 50%; bottom: calc(var(--bb) + 9px); width: 130px; height: 4.5px; margin-left: -65px; border-radius: 3px; background: rgba(0, 0, 0, .82); }
.s-dev[data-kind="island"].s-land .s-dev-ind { width: 210px; margin-left: -105px; }
[data-theme="dark"] .s-dev[data-kind="island"] .s-dev-ind { background: rgba(255, 255, 255, .78); }
/* 安卓打孔屏：前摄一个小圆孔（横屏时在左边）；底部一条手势条（比 iPhone 的横条短、细） */
.s-dev[data-kind="punch"] .s-dev-cut { display: block; left: 50%; top: calc(var(--bt) + 12px); width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #000; }
.s-dev[data-kind="punch"].s-land .s-dev-cut { left: calc(var(--bl) + 12px); top: 50%; margin: -6px 0 0; }
.s-dev[data-kind="punch"] .s-dev-ind { display: block; left: 50%; bottom: calc(var(--bb) + 6px); width: 108px; height: 4px; margin-left: -54px; border-radius: 2px; background: rgba(0, 0, 0, .8); }
[data-theme="dark"] .s-dev[data-kind="punch"] .s-dev-ind { background: rgba(255, 255, 255, .75); }
/* iPhone SE：屏幕直角，上面听筒 + 前摄，下面 Home 键（细圈）；横屏时 Home 键在右边 */
.s-dev[data-kind="home"] { border-radius: 44px; }
.s-dev[data-kind="home"] .s-dev-spk { display: block; left: 50%; top: 34px; width: 52px; height: 5px; margin-left: -26px; border-radius: 3px; background: rgba(255, 255, 255, .14); }
.s-dev[data-kind="home"] .s-dev-cut { display: block; left: calc(50% - 52px); top: 32px; width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.s-dev[data-kind="home"] .s-dev-home { display: block; left: 50%; bottom: 13px; width: 46px; height: 46px; margin-left: -23px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .16); }
.s-dev[data-kind="home"].s-land .s-dev-spk { left: 34px; top: 50%; width: 5px; height: 52px; margin: -26px 0 0; }
.s-dev[data-kind="home"].s-land .s-dev-cut { left: 32px; top: calc(50% - 52px); }
.s-dev[data-kind="home"].s-land .s-dev-home { left: auto; right: 13px; bottom: auto; top: 50%; margin: -23px 0 0; }
@media (prefers-reduced-motion: reduce) { .s-dev { transition: none; } }

/* "移动端与 H5"页：≥ 1081 左边标题和讲解、右边钉设备框（从标题那一行起，这一页不要本页目录那一列）；861–1080 设备框放在标题下面；手机上不放 */
.d-devpage .d-devside { display: none; }
.n-docs .d-main .d-devpage .d-devmain > h2:first-child { margin-top: 40px; } /* 标题区和正文分在两格里，第一个小节标题照样紧跟标题区 */
@media (min-width: 861px) {
  .d-devpage .d-devgrid { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "side" "main"; }
  .d-devpage .d-devhead { grid-area: head; min-width: 0; }
  .d-devpage .d-devmain { grid-area: main; min-width: 0; }
  .d-devpage .d-devside { display: block; grid-area: side; margin: var(--sn-sp-24) 0 var(--sn-sp-8); }
}
@media (min-width: 1081px) {
  .n-docs .d-layout:has(.d-devpage) { grid-template-columns: 240px minmax(0, 1fr); }
  .n-docs .d-layout:has(.d-devpage) .d-toc { display: none; }
  .n-docs .d-page.d-devpage { max-width: 1120px; }
  .d-devpage .d-devgrid { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr; grid-template-areas: "head side" "main side"; column-gap: var(--sn-sp-48); }
  .d-devpage .d-devside { align-self: start; margin: 0; position: sticky; top: calc(var(--nav-h) + var(--sn-sp-24)); }
  /* 右边放下设备框以后左栏不够 560（横屏、或者窄一点的桌面）：设备框挪到标题下面整行放，正文、设备框都不超过平常正文的宽度 */
  .d-devpage .d-devgrid:has(.s-devbox[data-place="below"]) { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "head" "side" "main"; }
  .d-devpage .d-devgrid:has(.s-devbox[data-place="below"]) .d-devside { position: static; margin: var(--sn-sp-24) 0 var(--sn-sp-8); }
  .d-devpage .d-devgrid:has(.s-devbox[data-place="below"]) > * { max-width: 832px; }
}
/* 配方里的手机页面：桌面放设备框，原来的整宽预览只在手机上显示（还在页面里，示例生成器读它） */
.d-rdev { margin-top: var(--sn-sp-16); }
.d-rframe.d-rframe-m { display: none; }
@media (max-width: 860px) { .d-rdev { display: none; } .d-rframe.d-rframe-m { display: block; } }
/* 契约示例的"在手机上看"：开着时演示换成设备框 */
.dx:not(.dx-phone) .dx-stage > .s-devbox { display: none; }
.dx.dx-phone .dx-stage > .d-frame { display: none; }
.dx.dx-phone .dx-stage > .s-devbox { padding: var(--sn-sp-24) 0; }
.dx-phone-btn[aria-pressed="true"] { --sn-bg: var(--sn-fill-active); --sn-fg: var(--sn-label); }
@media (max-width: 860px) { .dx-phone-btn { display: none; } .dx.dx-phone .dx-stage > .d-frame { display: block; } .dx.dx-phone .dx-stage > .s-devbox { display: none; } }
.d-devpage .d-table td:first-child { white-space: normal; } /* 这一页正文那栏让出了设备框的位置，表格第一列也要能折行，不然"处理"那列被挤到要横滑 */
/* 桌面配方的"在手机上看"：开关在预览上面一行；开着时自然壁纸桌面窗口藏起来（还在页面里），换成设备框；手机上不出开关 */
.d-rbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: var(--sn-sp-12); }
.d-rwrap:not(.d-rphone) > .s-devbox { display: none; }
.d-rwrap.d-rphone > .d-rstage { display: none; }
.d-rwrap.d-rphone > .s-devbox { margin-top: var(--sn-sp-12); }
@media (max-width: 860px) { .d-rbar { display: none; } .d-rwrap.d-rphone > .d-rstage { display: block; } .d-rwrap.d-rphone > .s-devbox { display: none; } }

/* ———— 12. 内容加载与过渡体系（实装于官网文档页切换与演示框加载） ———— */
/* 文档页正文原子提交后的柔和显影：只动 opacity 与微小位移（5px），拒绝白屏硬砸 */
.d-page-enter { animation: d-pg-in 240ms var(--sn-ease-out-strong) both; }
.d-page-enter > .d-head { animation: d-pg-in 200ms var(--sn-ease-out-strong) both; }
.d-toc-enter { animation: d-toc-in 200ms var(--sn-ease-out) both; }
@keyframes d-pg-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes d-toc-in { from { opacity: 0; } to { opacity: 1; } }

/* 慢网回退（>180ms）时的结构同构骨架：行数、圆角与真实章节对齐，杜绝塌陷跳动 */
.d-skel-page { margin-top: 32px; display: grid; gap: 14px; animation: d-toc-in 180ms var(--sn-ease-out) both; }
.d-skel-h { width: 32%; height: 24px; border-radius: 8px; }
.d-skel-p { width: 88%; height: 16px; border-radius: 6px; }
.d-skel-p2 { width: 64%; height: 16px; border-radius: 6px; }
.d-skel-stage { height: 220px; margin-top: 8px; border-radius: 18px; }
.d-skel-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.d-skel-row > i { height: 84px; border-radius: 12px; }
.d-skel-page .sn-skel { display: block; background: var(--sn-fill-subtle); position: relative; overflow: hidden; }
.d-skel-page .sn-skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--sn-label) 5%, transparent), transparent); transform: translateX(-100%); animation: d-shimmer 1.3s var(--sn-ease-in-out) infinite; }
@keyframes d-shimmer { to { transform: translateX(100%); } }

/* 演示框柔和占位与交叉显影：300ms 内就绪完全隐藏占位；就绪后平滑 scale(.994 → 1) + opacity 显影 */
.n-docs .d-frame iframe { transform: scale(.994); transition: opacity .24s var(--sn-ease-out-strong), transform .28s var(--sn-ease-out-strong); }
.n-docs .d-frame.sn-sized iframe { transition: opacity .24s var(--sn-ease-out-strong), transform .28s var(--sn-ease-out-strong), height .32s var(--sn-ease-out-strong); }
.n-docs .d-frame.sn-ready iframe { opacity: 1; transform: none; }
.n-docs .d-frame.sn-instant iframe { transform: none; transition: none; }
.n-docs .d-load { flex-direction: column; gap: 10px; padding: 20px; pointer-events: none; }
.d-load-bars { display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(260px, 68%); }
.d-load-bars i { display: block; height: 10px; border-radius: 99px; background: var(--sn-fill-subtle); position: relative; overflow: hidden; }
.d-load-bars i:first-child { width: 58%; height: 12px; }
.d-load-bars i:last-child { width: 100%; }
.d-load-bars i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--sn-label) 6%, transparent), transparent); transform: translateX(-100%); animation: d-shimmer 1.3s var(--sn-ease-in-out) infinite; }

/* 配方深度案例文档块（blockquote 提示卡等） */
.d-rcase-quote { margin: 16px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--sn-fill-subtle); color: var(--sn-label2); font: 400 calc(14px * var(--fsx))/calc(22px * var(--fsx)) var(--sn-sans); }
.d-rcase-quote b { color: var(--sn-label); }
@media (prefers-reduced-motion: reduce) {
  .d-page-enter, .d-page-enter > .d-head, .d-toc-enter, .d-skel-page { animation: none !important; }
  .d-skel-page .sn-skel::after, .d-load-bars i::after { animation: none !important; }
  .n-docs .d-frame iframe { transform: none !important; transition: opacity .12s linear !important; }
}
