[hidden] { display: none !important; }
:root {
  --bg: #fafafa; --surface: #ffffff; --surface-2: #f4f4f5; --text: #171717; --muted: #71717a; --border: #e4e4e7;
  --brand: #171717; --brand-2: #3f3f46; --brand-soft: #f4f4f5; --on-brand: #fff; --link: #171717;
  --accent: #16a34a;
  --ok: #16a34a; --ok-soft: #ecfdf3; --bad: #dc2626; --bad-soft: #fdecec; --warn: #d97706; --warn-soft: #fdf3e3;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .25);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0a0a0a; --surface: #141414; --surface-2: #1c1c1c; --text: #fafafa; --muted: #a1a1aa; --border: #262626;
    --brand: #fafafa; --brand-2: #d4d4d8; --brand-soft: #1c1c1c; --on-brand: #0a0a0a; --link: #fafafa;
    --accent: #4ade80; --ok: #4ade80; --ok-soft: #0f2a1a; --bad-soft: #2d1414; --warn-soft: #2d2210; --shadow: none; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif; -webkit-font-smoothing: antialiased; }
body.has-nav { padding-bottom: calc(72px + var(--safe-b)); }
a { color: var(--link); text-decoration: none; }
h1, h2, h3 { letter-spacing: -.01em; line-height: 1.3; }
h1 { font-size: 26px; margin: 4px 0 16px; font-weight: 700; }
h2 { font-size: 19px; margin: 0; font-weight: 650; }
h3 { font-size: 16px; margin: 0; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; } .grow { flex: 1; min-width: 0; } .mt { margin-top: 24px; }
.i { flex-shrink: 0; vertical-align: middle; }
.row { display: flex; align-items: center; } .between { justify-content: space-between; } .gap { gap: 10px; }
.inline { display: inline; margin: 0; }

/* 顶栏 */
.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border); padding-top: var(--safe-t); }
.topbar-inner { max-width: 720px; margin: 0 auto; height: 56px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; }
.topbar-inner.wide { max-width: 1040px; }
.brand { display: inline-flex; gap: 10px; align-items: center; font-weight: 700; font-size: 17px; color: var(--text); letter-spacing: -.01em; }
.logo { border-radius: 8px; display: block; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.danger:hover { color: var(--bad); }

/* 底部导航 */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--border); padding-bottom: var(--safe-b); }
.tabbar a { flex: 1; max-width: 160px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 7px; font-size: 11px; font-weight: 500; color: var(--muted); }
.tabbar a.on { color: var(--brand); }
.tabbar a.on .i { stroke-width: 2.1; }

/* 布局 */
.container { max-width: 720px; margin: 0 auto; padding: 20px 16px 32px; }
.container.wide { max-width: 1040px; }
.page-title { margin-top: 8px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin: 12px 0; box-shadow: var(--shadow); }
h3.section { display: flex; align-items: center; gap: 6px; margin: 24px 4px 8px; font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.section-help { color: var(--muted); display: inline-flex; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand); color: var(--on-brand); border: 1px solid transparent;
  border-radius: 999px; padding: 0 20px; height: 48px; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: transform .08s, opacity .15s, background .15s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; }
.btn.block { display: flex; width: 100%; }
.btn.small { height: 36px; padding: 0 16px; font-size: 14px; }
.btn.lg { height: 52px; padding: 0 26px; font-size: 17px; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn.ghost { background: var(--brand-soft); color: var(--brand); }
.danger-text { color: var(--bad) !important; }
.link { background: none; border: 0; color: var(--brand); font: inherit; cursor: pointer; padding: 4px; }
.link.danger { color: var(--bad); }

/* 表单 */
.form { display: grid; gap: 16px; }
.form label, .field { display: grid; gap: 6px; font-size: 14px; color: var(--muted); font-weight: 500; }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; min-height: 48px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
input.code { font-family: var(--mono); font-size: 30px; letter-spacing: 14px; text-align: center; padding: 14px 0 14px 14px; height: 68px; }
.auth { max-width: 400px; margin: 28px auto 8px; }
.auth h1 { margin-bottom: 8px; }
.auth .form { margin-top: 20px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 15px; margin-bottom: 12px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 20px 0 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
#pk-login { margin-top: 20px; }
.legal-note { margin-top: 20px; font-size: 12px; color: var(--muted); text-align: center; }
.legal-note a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.cf-turnstile { min-height: 0; }

/* 提示 */
.error, .warn, .flash { display: flex; align-items: center; gap: 8px; border-radius: 12px; padding: 12px 14px; margin: 12px 0; font-size: 15px; }
.error { background: var(--bad-soft); color: var(--bad); }
.warn { background: var(--warn-soft); color: var(--warn); }
.flash { background: var(--ok-soft); color: var(--ok); }
.warn-text { color: var(--warn); } .bad-text { color: var(--bad); }

/* 状态与标签 */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface-2); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.ok { color: var(--ok); background: var(--ok-soft); }
.status.ok i { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.status.bad { color: var(--bad); background: var(--bad-soft); }
.tag { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.tag.ok { color: var(--ok); background: var(--ok-soft); } .tag.bad { color: var(--bad); background: var(--bad-soft); } .tag.warn { color: var(--warn); background: var(--warn-soft); }
.pill { font-size: 13px; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }

/* 图标块 */
.tile { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--text); flex-shrink: 0; }
.tile.sm { width: 36px; height: 36px; border-radius: 10px; }
.tile.accent { background: var(--brand-soft); color: var(--brand); }

/* 机器卡片 */
.machine-head { display: flex; align-items: center; gap: 12px; }
.machine-head .tile { background: var(--brand); color: var(--on-brand); }
.cmd { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 12px; padding: 10px 10px 10px 14px; margin: 16px 0 4px; }
.cmd code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13.5px; word-break: break-all; line-height: 1.5; }
.cmd-ico { color: var(--muted); }
.copy { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; flex-shrink: 0; }
.copy .i-check { display: none; }
.copy.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.copy.done .i-copy { display: none; } .copy.done .i-check { display: block; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 0; }
.grid3 div { min-width: 0; }
.grid3 dt { font-size: 12px; color: var(--muted); }
.grid3 dd { margin: 2px 0 0; font-weight: 500; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.machine-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.meta-item { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.meta-item.warn { color: var(--warn); } .meta-item.bad { color: var(--bad); }
.link-row { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 500; }
.promo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 14px 14px 16px; }
.promo .error.full { flex-basis: 100%; margin: 0; }

/* 空状态 */
.empty { text-align: center; padding: 56px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--surface-2); color: var(--text); margin-bottom: 6px; }
.empty .btn { margin-top: 14px; }

/* 列表 */
.list-card { padding: 0; overflow: hidden; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; min-height: 52px; color: var(--text); width: 100%; background: none; border: 0; font: inherit; text-align: left; }
.list-row + .list-row, .list-card > * + .list-row { border-top: 1px solid var(--border); }
a.list-row .i, .list-row .i { color: var(--muted); }
.list-row.action { color: var(--brand); cursor: pointer; } .list-row.action .i { color: var(--brand); }
.profile { display: flex; align-items: center; gap: 14px; margin: 8px 0 4px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 700; color: var(--on-brand); background: var(--brand); flex-shrink: 0; }
.avatar.sm { width: 36px; height: 36px; font-size: 15px; }
.contact { display: flex; align-items: center; gap: 12px; color: var(--text); }
.contact > .i { color: var(--muted); }

.list { list-style: none; padding: 0; margin: 12px 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.list li + li { border-top: 1px solid var(--border); }
.list li > a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--text); }
.list .chev { color: var(--muted); }
.list.flat { border: 0; background: none; box-shadow: none; } .list.flat li { padding: 10px 0; }
.kv { display: grid; grid-template-columns: 88px 1fr; gap: 10px 12px; margin: 0; } .kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-all; }
code { font-family: var(--mono); font-size: 14px; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }

/* 管理 */
.segmented { display: flex; background: var(--surface-2); border-radius: 12px; padding: 4px; margin: 4px 0 8px; }
.segmented a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border-radius: 9px; color: var(--muted); font-weight: 500; }
.segmented a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 12px 0; scrollbar-width: none; }
.chips a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); white-space: nowrap; font-size: 14px; }
.chips a.on { background: var(--text); border-color: var(--text); color: var(--surface); }
details.add summary { display: flex; align-items: center; gap: 8px; color: var(--brand); font-weight: 600; cursor: pointer; list-style: none; }
details.add summary::-webkit-details-marker { display: none; }
details.add[open] summary { margin-bottom: 16px; }

/* 安装横幅 */
.banner { display: flex; align-items: center; gap: 10px; background: var(--brand-soft); color: var(--text); padding: 10px 8px 10px 16px; font-size: 14px; }
.banner #install-text { flex: 1; }
.banner-ico { color: var(--text); display: inline-flex; }

/* 帮助 FAQ */
.faq { padding: 4px 18px; }
.faq details { border-top: 1px solid var(--border); padding: 14px 0; }
.faq details:first-of-type { border-top: 0; }
.faq summary { font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; flex-shrink: 0; margin-right: 4px; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq .answer { padding-top: 10px; color: var(--text); font-size: 15px; }
.faq .answer p { margin: 8px 0; }
.faq .cmd { margin: 8px 0; }

/* 首页 */
.hero { text-align: center; padding: 40px 0 8px; position: relative; }
.hero::before { content: ''; position: absolute; inset: -60px -40px auto; height: 420px; z-index: -1;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 12%, transparent) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(60% 60% at 50% 35%, #000, transparent 75%); mask-image: radial-gradient(60% 60% at 50% 35%, #000, transparent 75%); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text); background: var(--surface); border: 1px solid var(--border); padding: 5px 12px; border-radius: 999px; }
.eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.hero h1 { font-size: clamp(34px, 9vw, 60px); line-height: 1.08; margin: 20px 0 14px; font-weight: 700; letter-spacing: -.035em; }
.lead { font-size: 17px; color: var(--muted); }
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 28px 0 8px; }
.hero-visual { margin: 32px auto 0; max-width: 560px; text-align: left; }
.term { background: #0a0a0a; border: 1px solid #262626; border-radius: 16px; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.06) inset; overflow: hidden; }
.term-bar { display: flex; gap: 6px; padding: 12px 14px; background: #141414; border-bottom: 1px solid #262626; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; } .term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term pre { margin: 0; padding: 16px 18px 20px; color: #e5e7eb; font-family: var(--mono); font-size: 13px; line-height: 1.8; white-space: pre-wrap; word-break: break-all; }
.c-mute { color: #6b7280; } .c-ok { color: #4ade80; }
.caret { display: inline-block; width: 8px; height: 15px; background: #e5e7eb; vertical-align: -2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.features { display: grid; gap: 12px; margin: 48px 0 0; }
@media (min-width: 720px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.feature .tile { background: var(--surface-2); color: var(--text); margin-bottom: 14px; }
.feature h3 { margin-bottom: 4px; }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 16px 0 0; padding: 24px; border-radius: var(--radius);
  background: #0a0a0a; color: #fafafa; border: 1px solid #262626; }
.cta .muted { color: #a1a1aa; }
.cta .btn { background: #fafafa; color: #0a0a0a; }

/* 页脚 */
.footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 40px; }
.footer-inner { max-width: 1040px; margin: 0 auto; padding: 28px 16px calc(28px + var(--safe-b)); display: grid; gap: 18px; }
.footer-brand .brand { margin-bottom: 4px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14px; }
.footer-links a { color: var(--muted); }
.footer-legal { font-size: 12px; color: var(--muted); }
@media (min-width: 720px) { .footer-inner { grid-template-columns: 1fr auto; align-items: center; } .footer-legal { grid-column: 1 / -1; } }

/* 法律文档 */
.doc { max-width: 680px; margin: 0 auto; }
.doc h1 { margin-bottom: 4px; }
.doc h2 { font-size: 17px; margin: 28px 0 8px; }
.doc p { margin: 8px 0; line-height: 1.75; }
.doc ul { padding-left: 20px; margin: 8px 0; line-height: 1.75; }
.doc li { margin: 4px 0; }
.grid3 .span2 { grid-column: 1 / -1; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1; width: 100%; }
.doc-meta { font-size: 13px; color: var(--muted); margin: 4px 0 18px; }
.doc-intro { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 15px; }
.toc { margin: 18px 0 8px; padding: 14px 16px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: 14px; }
.toc ol { margin: 8px 0 0; padding-left: 22px; columns: 2; column-gap: 20px; }
.toc li { margin: 3px 0; break-inside: avoid; }
.toc a { color: var(--text); }
.doc section { scroll-margin-top: 72px; }
.doc h2 { font-size: 17px; margin: 32px 0 10px; padding-top: 4px; }
.doc-table { width: 100%; border-collapse: collapse; margin: 10px 0 14px; font-size: 14px; display: block; overflow-x: auto; }
.doc-table th, .doc-table td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; line-height: 1.6; }
.doc-table th { background: var(--surface-2); font-weight: 600; white-space: nowrap; }
.doc-table td:first-child { white-space: nowrap; }
.doc ol.alpha { list-style: lower-alpha; padding-left: 26px; line-height: 1.75; }
.doc .caps { font-weight: 600; }
.contact-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; line-height: 1.9 !important; }
@media (max-width: 420px) { .toc ol { columns: 1; } }

/* 语言切换 */
.lang-btn { gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 10px; height: 32px; display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; }
.lang-btn:hover { color: var(--text); }
.gap-sm { gap: 4px; }
.tabbar a.on { color: var(--text); }
input:focus, select:focus, textarea:focus { border-color: var(--text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--text) 10%, transparent); }
.list-row.action, .list-row.action .i, details.add summary, .link { color: var(--text); }
.feature h3 { letter-spacing: -.01em; }
.feature .num { font-family: var(--mono); font-size: 12px; color: var(--muted); float: right; }
.hero h1, .page-title, .doc h1 { letter-spacing: -.03em; }
.doc-note { font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 14px; margin: 0 0 12px; }
