:root {
  color-scheme: light;
  --bg: #f3f5fa;
  --surface: #fff;
  --subtle: #f6f7fb;
  --sidebar: #fbfbfd;
  --border: #e1e4ed;
  --border-strong: #d5d9e6;
  --text: #172033;
  --muted: #566078;
  --muted-strong: #3c4660;
  --accent: #5445d5;
  --accent-strong: #4838ba;
  --accent-bg: #efedff;
  --focus: #6d5dfc;
  --primary-rgb: 109, 93, 252;
  --panel: linear-gradient(135deg, #6654ef, #5241db);
  --panel-text: #fff;
  --shadow: 0 12px 30px rgb(17 24 39 / 7%);
  --action-shadow: 0 7px 18px rgba(var(--primary-rgb), .23);
  --card-radius: 18px;
  --control-radius: 11px;
  --floating-surface: rgb(255 255 255 / 94%);
  --jade-bg: #e3f5ec; --jade: #176b51;
  --blue-bg: #e8f1ff; --blue: #285da7;
  --violet-bg: #f0eafd; --violet: #6a459c;
  --orange-bg: #fff1e4; --orange: #a15223;
  --rose-bg: #fcebf1; --rose: #9b3a61;
  --cyan-bg: #e0f4f7; --cyan: #176775;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111624;
  --surface: #181d2c;
  --subtle: #202638;
  --sidebar: #141a29;
  --border: #2b344a;
  --border-strong: #414963;
  --text: #eef1fb;
  --muted: #b5bed3;
  --muted-strong: #ccd4e7;
  --accent: #b7aeff;
  --accent-strong: #d8d2ff;
  --accent-bg: #292447;
  --focus: #a99cff;
  --shadow: 0 10px 30px rgb(0 0 0 / 20%);
  --floating-surface: rgb(24 29 44 / 94%);
  --jade-bg: #1e3d33; --jade: #a4ecca;
  --blue-bg: #21374f; --blue: #b1cefd;
  --violet-bg: #352b48; --violet: #d8c4fc;
  --orange-bg: #433125; --orange: #ffd0a6;
  --rose-bg: #442c37; --rose: #ffc1d8;
  --cyan-bg: #213b44; --cyan: #9ee2ed;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 280px; background: var(--bg); }
body { margin: 0; background: radial-gradient(ellipse 50% 340px at 30% 0, rgba(var(--primary-rgb), .09), transparent), var(--bg); color: var(--text); font-size: 14px; line-height: 1.55; }
::selection { background: rgba(var(--primary-rgb), .23); }
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
svg { flex: none; vertical-align: middle; }
img { max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
kbd { padding: 2px 5px; border: 1px solid var(--border); border-radius: 5px; background: var(--subtle); color: var(--muted-strong); font: 600 10px/1.2 "Segoe UI", sans-serif; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip: rect(0, 0, 0, 0); white-space: nowrap; overflow: hidden; }
.skip-link { position: fixed; z-index: 30; top: 8px; left: 8px; padding: 10px 14px; border-radius: 8px; background: var(--panel); color: var(--panel-text); transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }

.site-shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100dvh; min-height: 0; display: flex; flex-direction: column; padding: 0 14px; border-right: 1px solid var(--border); background: var(--sidebar); overflow-y: auto; scrollbar-width: thin; }
.sidebar-brand { padding: 21px 8px 19px; border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: 10px; line-height: 1.2; }
.brand img { width: 42px; height: 42px; flex: none; filter: drop-shadow(0 6px 9px rgba(var(--primary-rgb), .23)); }
.brand span { display: grid; gap: 4px; }
.brand strong { font-size: 17px; font-weight: 750; letter-spacing: -.4px; }
.brand small { color: var(--muted); font-size: 11px; letter-spacing: .09em; }
.sidebar-nav { display: grid; gap: 3px; padding: 12px 0 19px; }
.navigation-dialog .sidebar-nav { padding-inline: 14px; }
.nav-caption { margin: 3px 10px 7px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .065em; }
.nav-topics-caption { margin-top: 23px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 7px 12px; border: 1px solid transparent; border-radius: var(--control-radius); color: var(--muted-strong); transition: background .16s ease; }
.nav-link > svg { color: var(--muted); }
.nav-link > span { min-width: 0; flex: 1; }
.nav-link > small { min-width: 20px; font-size: 11px; text-align: center; color: var(--muted); }
.nav-link:hover { background: var(--subtle); }
.nav-link.current { border-color: rgba(var(--primary-rgb), .14); background: linear-gradient(90deg, rgba(var(--primary-rgb), .08), transparent), var(--accent-bg); color: var(--accent-strong); font-weight: 680; }
.nav-link.current::before { content: ""; position: absolute; left: -1px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: linear-gradient(#6d5dfc, #14b8a6); }
.nav-link.current svg, .nav-link.current small { color: var(--accent); }
.sidebar-support { margin: auto 0 16px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--muted); }
.navigation-dialog .sidebar-support { margin-inline: 14px; }
.sidebar-support > svg { color: var(--accent); margin-right: 6px; }
.sidebar-support strong { color: var(--text); font-size: 13px; }
.sidebar-support p { margin: 6px 0 9px; font-size: 12px; line-height: 1.6; }
.sidebar-support a { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: 12px; font-weight: 680; }

.page-shell { display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; z-index: 5; top: 0; padding-top: env(safe-area-inset-top); border-bottom: 1px solid var(--border); background: var(--floating-surface); backdrop-filter: blur(15px); }
.topbar-inner, .content, .site-footer { width: min(1160px, calc(100% - 62px)); margin-inline: auto; }
.topbar-inner { height: 71px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.breadcrumb { min-width: 0; display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 13px; color: var(--muted); }
.breadcrumb a { flex: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current] { overflow: hidden; text-overflow: ellipsis; color: var(--text); font-weight: 650; }
.breadcrumb svg { color: var(--muted); opacity: .7; }
.topbar-actions { display: flex; align-items: center; gap: 9px; flex: none; margin-left: auto; }
.top-search, .icon-button { border: 1px solid var(--border); color: var(--muted-strong); background: var(--surface); border-radius: var(--control-radius); }
.top-search { height: 38px; display: inline-flex; align-items: center; gap: 8px; padding: 0 10px; font-size: 12px; }
.top-search kbd { margin-left: 5px; }
.icon-button { width: 38px; height: 38px; display: inline-flex; justify-content: center; align-items: center; padding: 0; }
.top-search:hover, .icon-button:hover { background: var(--subtle); border-color: var(--border-strong); }
.theme-button .icon-sun, :root[data-theme="dark"] .theme-button .icon-moon { display: none; }
:root[data-theme="dark"] .theme-button .icon-sun { display: inline-flex; }
.panel-button { display: inline-flex; gap: 7px; align-items: center; justify-content: center; min-height: 38px; padding: 0 13px; border-radius: var(--control-radius); background: var(--panel); color: var(--panel-text); box-shadow: var(--action-shadow); font-size: 12px; font-weight: 700; white-space: nowrap; }
.panel-button:hover:not(:disabled) { filter: brightness(1.08); }
.mobile-nav-button, .mobile-brand, .mobile-dock { display: none; }
.content { padding: 28px 0 42px; flex: 1; }

.hero { position: relative; isolation: isolate; overflow: hidden; border: 1px solid var(--border); border-radius: 24px; background: radial-gradient(ellipse at 86% 0%, rgba(var(--primary-rgb), .17), transparent 57%), radial-gradient(ellipse at 100% 120%, rgb(55 196 180 / 13%), transparent 42%), var(--surface); box-shadow: var(--shadow); }
.hero::before { content: ""; position: absolute; z-index: -1; top: 50%; right: clamp(18px, 5vw, 78px); width: clamp(170px, 20vw, 265px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, transparent 39%, rgba(var(--primary-rgb), .11) 40% 41%, transparent 42% 55%, rgba(var(--primary-rgb), .15) 56% 57%, transparent 58% 68%, rgba(var(--primary-rgb), .17) 69% 70%, transparent 71%); transform: translateY(-50%); pointer-events: none; }
.hero-content { max-width: 680px; padding: 34px 35px 30px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(33px, 4.5vw, 50px); line-height: 1.12; letter-spacing: -.044em; font-weight: 760; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p { color: var(--muted); font-size: clamp(13px, 1.5vw, 16px); line-height: 1.6; }
.hero-search { display: flex; align-items: center; width: min(100%, 560px); height: 49px; padding: 5px 5px 5px 13px; margin: 21px 0 14px; gap: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); border-radius: 14px; }
.hero-search input { width: 100%; min-width: 0; height: 100%; flex: 1; padding: 0; color: var(--text); background: transparent; border: 0; outline: none; font-size: 14px; }
.hero-search input::placeholder { color: var(--muted); opacity: 1; }
.hero-search:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px var(--accent-bg); }
.hero-search button { min-width: 65px; height: 100%; padding: 0 10px; border: 0; border-radius: var(--control-radius); background: var(--panel); color: var(--panel-text); font-size: 13px; font-weight: 750; }
.hero-search button:hover { filter: brightness(1.08); }
.hot-searches { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 11px; }
.hot-searches > span { padding-right: 4px; color: var(--muted); }
.hot-searches button { padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--subtle); color: var(--muted-strong); font-size: 12px; white-space: nowrap; }
.hot-searches button:hover { background: var(--accent-bg); color: var(--accent-strong); }

.quick-start { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 10px; margin: 18px 0 28px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--card-radius); background: var(--surface); box-shadow: var(--shadow); }
.quick-intro { padding: 4px 8px 4px 2px; }
.quick-intro h2 { margin-top: 3px; font-size: 17px; line-height: 1.4; letter-spacing: -.025em; }
.quick-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.quick-steps a { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 7px 8px; border-radius: 8px; }
.quick-steps a:hover { background: var(--subtle); }
.step-number { width: 31px; height: 31px; flex: none; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 8px; color: var(--accent); background: var(--accent-bg); font-weight: 720; font-size: 11px; font-variant-numeric: tabular-nums; }
.quick-steps a > span:nth-child(2) { min-width: 0; flex: 1; display: grid; gap: 1px; }
.quick-steps strong { font-size: 13px; line-height: 1.35; }
.quick-steps small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.quick-steps svg { color: var(--muted); }
.home-section { margin-top: 28px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-heading h2 { font-size: 23px; line-height: 1.25; letter-spacing: -.03em; }
.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.topic-card { display: flex; flex-direction: column; min-width: 0; min-height: 158px; padding: 16px; border: 1px solid var(--border); border-radius: var(--card-radius); background: var(--surface); box-shadow: var(--shadow); transition: border-color .16s ease, transform .16s ease; }
.topic-card:hover { border-color: var(--focus); transform: translateY(-2px); }
.topic-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.topic-icon { width: 39px; height: 39px; display: inline-grid; place-items: center; flex: none; border-radius: 10px; }
.tone-jade { background: var(--jade-bg); color: var(--jade); }
.tone-blue { background: var(--blue-bg); color: var(--blue); }
.tone-violet { background: var(--violet-bg); color: var(--violet); }
.tone-orange { background: var(--orange-bg); color: var(--orange); }
.tone-rose { background: var(--rose-bg); color: var(--rose); }
.tone-cyan { background: var(--cyan-bg); color: var(--cyan); }
.article-count { padding: 2px 7px; border-radius: 6px; background: var(--subtle); color: var(--muted); font-size: 11px; white-space: nowrap; }
.topic-card h3 { margin: 8px 0 3px; font-size: 16px; line-height: 1.35; letter-spacing: -.018em; }
.topic-card p { margin-bottom: 10px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.card-action { display: inline-flex; align-items: center; gap: 5px; margin-top: auto; color: var(--accent); font-size: 12px; font-weight: 680; }
.article-list { display: grid; gap: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--card-radius); background: var(--surface); box-shadow: var(--shadow); }
.article-row { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.article-row:last-child { border-bottom: 0; }
.article-row:hover { background: var(--subtle); }
.article-row:focus-visible { outline-offset: -3px; }
.article-row .topic-icon { width: 35px; height: 35px; border-radius: 8px; }
.article-row-text { min-width: 0; flex: 1; display: grid; gap: 2px; }
.article-row-text strong { line-height: 1.45; font-size: 14px; }
.article-row-text > span { color: var(--muted); line-height: 1.55; font-size: 12px; overflow-wrap: anywhere; }
.article-row > svg { color: var(--muted); }
.popular-list { grid-template-columns: 1fr 1fr; }
.popular-list .article-row:nth-child(odd) { border-right: 1px solid var(--border); }
.popular-list .article-row:nth-last-child(-n+2) { border-bottom: 0; }
.support-band, .guide-support { display: flex; align-items: center; gap: 13px; margin-top: 27px; padding: 16px; border: 1px solid var(--border); border-radius: var(--card-radius); background: var(--subtle); }
.support-band > div, .guide-support > div { min-width: 0; flex: 1; }
.support-band h2 { font-size: 17px; }
.support-band p, .guide-support p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.dns-notice { margin-top: 16px; background: var(--surface); }
.dns-notice p { line-height: 1.65; }
.dns-notice strong { color: var(--muted-strong); }
.outline-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 7px 11px; flex: none; border: 1px solid var(--border-strong); border-radius: var(--control-radius); background: var(--surface); color: var(--accent-strong); font-size: 12px; font-weight: 680; }
.outline-button:hover { background: var(--accent-bg); }
.site-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 17px 0 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.site-footer > span:first-child { color: var(--muted-strong); font-weight: 680; }
.site-footer a { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); margin-left: auto; }

.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 15px; color: var(--accent); font-size: 13px; font-weight: 650; }
.back-link:hover { text-decoration: underline; }
.category-page { max-width: 860px; }
.category-header { padding: 24px 25px 21px; margin-bottom: 16px; border: 1px solid var(--border); border-radius: var(--card-radius); background: linear-gradient(115deg, transparent 52%, rgba(var(--primary-rgb), .08)), var(--surface); box-shadow: var(--shadow); }
.category-heading { display: flex; align-items: center; gap: 10px; }
.category-heading .topic-icon { width: 48px; height: 48px; }
.category-header h1 { margin: 11px 0 4px; font-size: clamp(28px, 4vw, 41px); line-height: 1.2; letter-spacing: -.035em; }
.category-header p { color: var(--muted); font-size: 14px; }
.category-list .article-row { padding: 15px 18px; }
.category-list .article-row-text strong { font-size: 15px; }
.empty-state { padding: 20px; color: var(--muted); }
.content-with-toc { display: grid; grid-template-columns: minmax(0, 1fr) 178px; align-items: start; gap: clamp(16px, 3vw, 35px); }
.guide { min-width: 0; max-width: 850px; }
.guide-header { padding: 22px 24px; border: 1px solid var(--border); border-radius: var(--card-radius); background: linear-gradient(115deg, transparent 52%, rgba(var(--primary-rgb), .08)), var(--surface); box-shadow: var(--shadow); }
.guide-label-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.guide-label, .copy-button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 9px; font-size: 12px; font-weight: 680; }
.copy-button { border: 1px solid var(--border); background: var(--surface); color: var(--muted-strong); }
.copy-button:hover { background: var(--subtle); }
.guide-header h1 { margin: 12px 0 6px; font-size: clamp(26px, 3.2vw, 36px); line-height: 1.22; letter-spacing: -.036em; overflow-wrap: anywhere; }
.guide-lead { color: var(--muted); font-size: 15px; line-height: 1.7; }
.guide-intro { margin: 16px 0; padding: 0 3px; color: var(--muted-strong); font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.guide-section { padding: 19px 22px; margin-top: 14px; border: 1px solid var(--border); border-radius: var(--card-radius); background: var(--surface); box-shadow: var(--shadow); scroll-margin-top: calc(86px + env(safe-area-inset-top)); overflow-wrap: anywhere; }
.guide-section h2, .related h2 { margin-bottom: 9px; font-size: 19px; line-height: 1.4; letter-spacing: -.02em; }
.guide-section p { margin: 6px 0; color: var(--muted-strong); font-size: 14px; line-height: 1.85; }
.steps, .bullet-list { padding-left: 23px; margin: 10px 0; color: var(--muted-strong); font-size: 14px; line-height: 1.82; }
.steps li, .bullet-list li { padding-left: 3px; margin: 5px 0; }
.steps li::marker, .bullet-list li::marker { color: var(--accent); font-weight: 700; }
.note { display: flex; align-items: start; gap: 8px; padding: 11px 12px; margin-top: 12px; border-radius: var(--control-radius); background: var(--accent-bg); }
.note svg { margin-top: 2px; color: var(--accent); }
.note p { margin: 0; color: var(--accent-strong); font-size: 13px; line-height: 1.7; }
.external-links { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 11px 0 0; list-style: none; }
.external-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--control-radius); background: var(--subtle); color: var(--accent-strong); font-size: 12px; font-weight: 640; overflow-wrap: anywhere; }
.external-links a:hover { border-color: var(--focus); background: var(--accent-bg); }
.platform-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.platform-grid .guide-section { display: flex; flex-direction: column; min-width: 0; margin: 0; }
.platform-grid .guide-section h2 { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.platform-grid .guide-section h2::before { content: ""; width: 3px; height: 16px; border-radius: 2px; background: linear-gradient(#6d5dfc, #14b8a6); }
.platform-grid .external-links { margin-top: auto; padding-top: 8px; }
.related { margin-top: 20px; }
.guide-support strong { font-size: 14px; }
.desktop-toc { position: sticky; top: 88px; min-width: 0; padding-top: 38px; }
.desktop-toc > div { padding: 13px 15px 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.desktop-toc strong { font-size: 13px; }
.desktop-toc ol, .mobile-toc ol { margin: 6px 0; padding: 0; list-style: none; }
.desktop-toc li, .mobile-toc li { margin: 6px 0; }
.desktop-toc a, .mobile-toc a { color: var(--muted); font-size: 12px; line-height: 1.65; }
.desktop-toc a:hover, .mobile-toc a:hover { color: var(--accent); text-decoration: underline; }
.mobile-toc { display: none; }

dialog { color: var(--text); }
dialog::backdrop { background: rgb(18 22 42 / 46%); backdrop-filter: blur(4px); }
.search-dialog { position: fixed; inset: 0; width: min(650px, calc(100vw - 24px)); max-width: none; max-height: min(690px, 83dvh); margin: min(11dvh, 88px) auto auto; padding: 0; border: 1px solid var(--border-strong); border-radius: var(--card-radius); background: var(--surface); box-shadow: 0 22px 60px rgb(17 24 39 / 23%); }
.search-dialog[open] { display: flex; flex-direction: column; }
.dialog-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px 10px; }
.dialog-title h2 { font-size: 19px; }
.dialog-input { display: flex; align-items: center; gap: 10px; margin: 0 16px 8px; padding: 0 11px; min-height: 43px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--subtle); color: var(--muted); }
.dialog-input:focus-within { border-color: var(--focus); box-shadow: 0 0 0 2px var(--accent-bg); }
.dialog-input input { width: 100%; min-width: 0; padding: 8px 0; border: 0; background: transparent; color: var(--text); outline: none; }
.dialog-input input::placeholder { color: var(--muted); opacity: 1; }
.dialog-input input:focus-visible { outline: none; }
.search-status { padding: 4px 16px 8px; min-height: 28px; color: var(--muted); font-size: 12px; }
.search-results { list-style: none; margin: 0; padding: 0 12px 10px; overflow-y: auto; min-height: 46px; }
.search-results li { margin: 2px 0; }
.search-result { display: flex; align-items: start; justify-content: space-between; gap: 7px; padding: 9px 10px; border-radius: 8px; }
.search-result:hover, .search-result.active, .search-result:focus-visible { background: var(--accent-bg); }
.search-result > span:first-child { display: grid; gap: 2px; min-width: 0; }
.search-result strong { color: var(--text); font-size: 14px; }
.search-result small { color: var(--muted-strong); font-size: 12px; }
.search-result-category { display: inline-block; padding: 2px 6px; flex: none; max-width: 105px; border-radius: 5px; background: var(--subtle); color: var(--muted-strong); font-size: 10px; }
.search-result mark { padding: 0 1px; border-radius: 2px; color: var(--accent-strong); background: var(--accent-bg); font-weight: 740; }
.dialog-footer { display: flex; justify-content: space-between; padding: 8px 16px; border-top: 1px solid var(--border); color: var(--muted); background: var(--subtle); font-size: 11px; }
.navigation-dialog { position: fixed; inset: 0 auto 0 0; width: min(285px, 90vw); max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; border-right: 1px solid var(--border); background: var(--sidebar); }
.navigation-dialog[open] { display: flex; flex-direction: column; }
.mobile-drawer-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: calc(15px + env(safe-area-inset-top)) 16px 15px; border-bottom: 1px solid var(--border); }

@media (max-width: 1180px) {
  .site-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .topbar-inner, .content, .site-footer { width: calc(100% - 44px); }
  .quick-start { grid-template-columns: 125px minmax(0, 1fr); }
  .quick-steps a { padding-inline: 5px; }
  .quick-steps a > svg { display: none; }
  .content-with-toc { grid-template-columns: minmax(0, 1fr) 152px; }
}
@media (max-width: 970px) {
  .site-shell { display: block; }
  .sidebar { display: none; }
  .mobile-nav-button, .mobile-brand { display: inline-flex; }
  .mobile-brand .brand img { width: 32px; height: 32px; }
  .mobile-brand .brand strong { font-size: 15px; }
  .mobile-brand .brand small { font-size: 9px; }
  .topbar-inner { height: 58px; gap: 9px; }
  .breadcrumb { display: none; }
  .content { padding-top: 19px; }
}
@media (max-width: 700px) {
  html { scroll-padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  .topbar-inner, .content, .site-footer { width: calc(100% - 30px); }
  .mobile-nav-button { display: none; }
  .mobile-dock { position: fixed; z-index: 6; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; width: min(410px, calc(100% - 24px)); inset: auto 0 calc(9px + env(safe-area-inset-bottom)); margin-inline: auto; padding: 5px; border: 1px solid var(--border); border-radius: 18px; background: var(--floating-surface); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
  .mobile-dock :is(a, button) { display: flex; flex-direction: column; gap: 3px; align-items: center; justify-content: center; min-height: 46px; padding: 4px 1px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--muted-strong); font-size: 11px; font-weight: 650; line-height: 1.2; }
  .mobile-dock :is(a, button):hover { background: var(--subtle); }
  .mobile-dock [aria-current] { border-color: rgba(var(--primary-rgb), .14); background: var(--accent-bg); color: var(--accent); }
  .site-footer { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .content-with-toc { display: block; }
  .desktop-toc { display: none; }
  .mobile-toc { display: block; padding: 9px 12px; margin: 12px 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
  .mobile-toc summary { font-size: 13px; font-weight: 680; cursor: pointer; }
  .mobile-toc ol { padding-left: 6px; }
  .hero-content { padding: 27px 23px 22px; }
  .hero::before { right: -55px; opacity: .65; }
  .quick-start { grid-template-columns: 1fr; gap: 2px; }
  .quick-intro { padding-left: 4px; }
  .quick-steps a { gap: 7px; }
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .popular-list { grid-template-columns: 1fr; }
  .popular-list .article-row:nth-child(odd) { border-right: 0; }
  .popular-list .article-row:nth-last-child(2) { border-bottom: 1px solid var(--border); }
  .guide-section { scroll-margin-top: calc(73px + env(safe-area-inset-top)); }
  .platform-grid { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 450px) {
  .topbar-inner, .content, .site-footer { width: calc(100% - 22px); }
  .topbar-actions { gap: 5px; }
  .top-search, .icon-button { width: 36px; height: 36px; justify-content: center; padding: 0; }
  .top-search > span, .top-search kbd { display: none; }
  .panel-button { min-height: 36px; gap: 4px; padding: 0 9px; font-size: 12px; }
  .panel-button svg { width: 12px; height: 12px; }
  .mobile-brand .brand { gap: 6px; }
  .mobile-brand .brand img { width: 29px; height: 29px; }
  .hero { border-radius: 20px; }
  .hero-content { padding: 24px 17px 18px; }
  .hero h1 { font-size: 31px; }
  .hero-search { height: 43px; padding-left: 8px; gap: 7px; margin-top: 15px; }
  .hero-search input { font-size: 12px; }
  .hero-search button { min-width: 47px; }
  .quick-start { padding: 9px; margin-top: 12px; }
  .quick-steps { grid-template-columns: 1fr; gap: 1px; }
  .quick-steps a { padding: 5px 6px; }
  .quick-steps a > span:nth-child(2) { display: flex; align-items: center; flex-wrap: wrap; column-gap: 7px; }
  .quick-steps a > svg { display: inline; }
  .step-number { width: 25px; height: 25px; }
  .topic-grid { gap: 8px; }
  .topic-card { min-height: 142px; padding: 12px; }
  .topic-card h3 { font-size: 14px; }
  .topic-card p { font-size: 11px; }
  .topic-card .topic-icon { width: 34px; height: 34px; border-radius: 8px; }
  .support-band, .guide-support { flex-wrap: wrap; padding: 12px; }
  .support-band .outline-button, .guide-support .outline-button { margin-left: auto; }
  .guide-header, .guide-section, .category-header { padding: 17px 14px; }
  .article-row, .category-list .article-row { padding: 10px; gap: 8px; }
  .article-row .topic-icon { width: 28px; height: 28px; }
  .article-row .topic-icon svg { width: 16px; height: 16px; }
  .site-footer a { margin-left: 0; }
}
@media (max-width: 340px) {
  .mobile-brand .brand span { display: none; }
  .topic-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}

.home-shortcuts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 16px 0; }
.home-shortcuts a { display: flex; gap: 9px; justify-content: center; align-items: center; padding: 11px 6px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); color: var(--text); font-weight: 650; }
.home-shortcuts svg { width: 32px; height: 32px; padding: 7px; border-radius: 9px; background: var(--accent-bg); color: var(--accent); }
.home-shortcuts a:hover { border-color: var(--focus); }
#popular-title { scroll-margin-top: calc(86px + env(safe-area-inset-top)); }
.panel-figure { margin: 18px 0 0; }
.panel-figure img { display: block; border: 1px solid var(--border); border-radius: 10px; }
.panel-figure figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.dns-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dns-columns > div { min-width: 0; }
.dns-columns label { display: block; margin-bottom: 6px; font-weight: 650; }
.dns-columns :is(input,select,textarea) { display: block; width: 100%; border: 1px solid var(--border-strong); border-radius: var(--control-radius); background: var(--surface); color: var(--text); padding: 10px; font: inherit; }
.dns-columns textarea { resize: vertical; font: 13px/1.65 Consolas, monospace; }
.dns-columns :is(select,textarea):focus-visible { outline: 2px solid var(--focus); }
#dns-output { background: var(--subtle); }
.dns-label, .dns-actions { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 13px; }
.dns-label button { color: var(--accent); border: 0; background: none; }
#host-field { margin-top: 12px; }
.dns-actions { align-items: center; justify-content: flex-end; }
.dns-actions .panel-button { border: 0; }
.dns-actions button:disabled { cursor: default; opacity: .5; box-shadow: none; }
.dns-columns small { display: block; margin-top: 6px; color: var(--muted); }
.dns-columns .dns-error { color: var(--rose); font-size: 13px; }
.dns-error:empty, #dns-copy-status:empty { display: none; }
.subscription-workbench .dns-label { margin-top: 0; }
.subscription-workbench #subscription-target { margin-bottom: 12px; }
.subscription-workbench #subscription-input { margin-bottom: 12px; }
.private-dns-field { min-width: 0; margin: 0; padding: 10px; border: 1px solid var(--border-strong); border-radius: var(--control-radius); background: var(--accent-bg); }
.private-dns-field legend { padding: 0 5px; color: var(--accent-strong); font-weight: 700; }
.private-dns-field textarea:disabled { opacity: .55; }
.subscription-workbench .module-download { margin-top: 10px; }
.subscription-workbench .module-download[hidden] { display: none; }
.subscription-workbench #subscription-status { margin: 8px 0 0; color: var(--accent-strong); font-size: 13px; }
.subscription-workbench #subscription-status:empty { display: none; }
@media (max-width: 780px) {
  .dns-columns { grid-template-columns: 1fr; gap: 15px; }
  .home-shortcuts { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
}
@media (max-width: 700px) {
  .dns-columns :is(input, select, textarea:not([readonly])) { font-size: 16px; }
}
