﻿:root {
  --bg: #f3f4f6;
  --panel: #ffffff;
  --text: #1f2b44;
  --text-muted: #60708f;
  --muted: var(--text-muted);
  --line: #e1e6f0;
  --accent: #2f5bea;
  --accent-soft: #eaf0ff;
  --hover: #f6f9ff;
  --focus-ring: #7aa7ff;
  --danger: #c62828;
  --success: #2e7d32;

  --font-family-base: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-size-h1: 28px;
  --font-size-h2: 22px;
  --font-size-h3: 18px;
  --font-size-body: 16px;
  --font-size-nav: 14px;
  --font-size-caption: 13px;
  --font-size-small: 12px;
  --font-size-title-pill: 24px;
  --line-height-heading: 1.35;
  --line-height-body: 1.58;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-11: 44px;
  --space-page-x: 26px;

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 6px 18px rgba(16, 24, 40, 0.08);

  --layout-max-width: 1280px;
  --sidebar-width: 280px;
  --video-max-width: 960px;

  --gov-banner-height: 36px;
  --gov-strip-height: 34px;
  --gov-strip-bg: #e9edf2;
  --gov-strip-border: #d9e0ea;
  --gov-strip-text: #4e5d79;
  --gov-link: #2050d6;
  --gov-banner-border: #d3d3d3;
  --gov-banner-bg: #f0f0f0;
  --gov-banner-toggle-text: #3b4658;
  --gov-banner-logo: #df1f26;
  --gov-banner-link: #0a68c2;
  --gov-panel-bg: #ffffff;
  --gov-icon-bg: #eef3ff;
  --gov-icon-text: #1f438f;
  --gov-title-text: #1f2b44;
  --gov-detail-text: #42526b;

  --footer-bg: #252d49;
  --footer-border: #3b4668;
  --footer-text: #f2f5fb;

  --topbar-title-text: #1f438f;
  --topbar-title-bg: #d8e3ff;
  --guide-title-text: #2f446f;
  --heading-h1-text: #143b83;
  --heading-h2-text: #27498d;
  --heading-h3-text: #30486f;
  --content-text: #43526d;
  --doc-title-text: #1e3d80;

  --nav-border: #edf1f8;
  --nav-h1-text: #26407f;
  --nav-h2-text: #4f6087;
  --nav-toggle-border: #ccd6ea;
  --nav-toggle-bg: #f3f7ff;
  --nav-toggle-text: #2d4f94;

  --search-input-bg: #f7f9ff;
  --search-input-border: #d7deee;
  --search-input-text: #22345f;
  --search-input-placeholder: #7a87a5;
  --search-input-focus-ring: #7aa7ff;
  --search-empty-text: #7a87a5;
  --search-highlight-bg: #fff59d;
  --search-highlight-text: #1f2b44;

  --icon-btn-text: #4f5f7e;
  --avatar-btn-bg: #9c6a00;

  --ci-border: #dfe6f4;
  --ci-bg: #fafcff;
  --ci-summary-text: #2a3f70;
  --table-border: #dfe4ef;
  --table-cell-border: #cfd7e6;
  --video-bg: #000000;
}

* { box-sizing: border-box; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.menu-btn:focus-visible,
.nav-toggle:focus-visible,
.nav-h1:focus-visible,
.nav-h2-item > a:focus-visible,
.nav-h3-item a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family-base);
  background: var(--bg);
  color: var(--text);
  box-sizing: border-box;
}

* {
  box-sizing: border-box;
}

body.is-shell {
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.gov-strip {
  height: var(--gov-strip-height);
  display: flex;
  align-items: center;
  gap: calc(var(--space-2) - 2px);
  padding: 0 calc(var(--space-5) - 6px);
  background: var(--gov-strip-bg);
  border-bottom: 1px solid var(--gov-strip-border);
  color: var(--gov-strip-text);
  font-size: var(--font-size-nav);
}

.gov-strip a {
  color: var(--gov-link);
  text-decoration: underline;
}

.sfs-gov-banner {
  border-top: 1px solid var(--gov-banner-border);
  border-bottom: 1px solid var(--gov-banner-border);
  background: var(--gov-banner-bg);
  position: sticky;
  top: 0;
  z-index: 40;
}

.sfs-gov-banner-toggle {
  width: 100%;
  max-width: var(--layout-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--gov-banner-height);
  min-height: var(--gov-banner-height);
  padding: 0 var(--space-4);
  border: 0;
  background: transparent;
  color: var(--gov-banner-toggle-text);
  cursor: pointer;
  text-align: left;
}

.sfs-gov-banner-logo {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gov-banner-logo);
}

.sfs-gov-banner-logo svg {
  width: 16px;
  height: 16px;
}

.sfs-gov-banner-logo img {
  width: 16px;
  height: 16px;
  display: block;
}

.sfs-gov-banner-text {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-regular);
  letter-spacing: 0;
  line-height: 1.2;
}

.sfs-gov-banner-link {
  color: var(--gov-banner-link);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-semibold);
  text-decoration: underline;
  margin-left: 0;
  white-space: nowrap;
}

.sfs-gov-banner-caret {
  color: var(--gov-banner-link);
  font-size: var(--font-size-small);
  margin-left: -2px;
}

.sfs-gov-banner-panel {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: calc(var(--space-3) - 2px) var(--space-page-x) calc(var(--space-4) - 2px);
  background: var(--gov-panel-bg);
  border-top: 1px solid var(--gov-strip-border);
}

.sfs-hidden {
  display: none;
}

.sfs-gov-item {
  display: flex;
  gap: calc(var(--space-3) - 2px);
  padding: var(--space-2) 0;
}

.sfs-gov-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gov-icon-bg);
  color: var(--gov-icon-text);
  flex: 0 0 auto;
}

.sfs-gov-icon svg {
  width: 14px;
  height: 14px;
}

.sfs-gov-title {
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-1);
  color: var(--gov-title-text);
  font-size: var(--font-size-caption);
}

.sfs-gov-detail {
  color: var(--gov-detail-text);
  line-height: 1.55;
  font-size: var(--font-size-caption);
}

.sfs-gov-detail a {
  color: var(--gov-link);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
}

.sfs-header {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 18;
}

.sfs-header-inner {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  min-height: 84px;
  padding: 0 var(--space-page-x);
  display: flex;
  align-items: center;
  gap: calc(var(--space-6) - 2px);
}

.sfs-header-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.sfs-header-brand-logo {
  display: block;
  height: 54px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.sfs-header-nav {
  display: flex;
  align-items: center;
  gap: calc(var(--space-5) - 2px);
  margin-left: auto;
  flex-wrap: wrap;
}

.sfs-header-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-nav);
}

.sfs-header-nav a:hover,
.sfs-login-link {
  color: var(--accent);
}

.sfs-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
  margin-top: var(--space-5);
}

.sfs-footer-inner {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: var(--space-4) var(--space-page-x);
  color: var(--footer-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.sfs-footer-links {
  display: flex;
  gap: var(--space-11);
  flex-wrap: wrap;
}

.sfs-footer-links a {
  color: var(--footer-text);
  text-decoration: none;
  font-size: var(--font-size-nav);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-heading);
}

.sfs-footer-links a:hover {
  text-decoration: underline;
}

.sfs-footer-right {
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}

.sfs-footer-copy {
  font-size: var(--font-size-nav);
  color: var(--footer-text);
  line-height: 1.25;
}

.sfs-footer-updated {
  margin-top: var(--space-1);
  font-size: var(--font-size-nav);
  color: var(--footer-text);
  line-height: 1.25;
}

.app-shell {
  display: block;
  min-height: calc(100vh - 34px);
}

body.is-shell .app-shell {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sfs-main-layout {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: calc(var(--space-5) - 2px) var(--space-page-x);
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
}

body.is-shell .sfs-main-layout {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
  overflow: hidden;
}

.main-area {
  min-width: 0;
}

body.is-shell .main-area {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.is-shell .topbar {
  position: relative;
  top: auto;
  flex: 0 0 auto;
}

.topbar {
  position: sticky;
  top: var(--gov-banner-height);
  z-index: 20;
  min-height: 74px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: calc(var(--space-4) - 2px);
  width: 100%;
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 0 var(--space-page-x);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: calc(var(--space-4) - 2px);
  flex: 0 0 auto;
}

.sfs-guide-title {
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-bold);
  color: var(--guide-title-text);
  line-height: 1.1;
  white-space: nowrap;
}

.sidebar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  min-width: 0;
  position: sticky;
  top: calc(var(--gov-banner-height) + 86px);
  overflow: hidden;
}

body.is-shell .sidebar {
  position: relative;
  top: auto;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.site-logo {
  display: block;
  width: auto;
  max-width: 180px;
  height: 56px;
  object-fit: contain;
}

.menu-btn { display: none; }

.topbar-title {
  font-size: var(--font-size-title-pill);
  font-weight: var(--font-weight-bold);
  color: var(--topbar-title-text);
  background: var(--topbar-title-bg);
  border-radius: var(--radius-pill);
  padding: var(--space-2) calc(var(--space-5) - 2px);
  line-height: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: calc(var(--space-3) - 2px);
}

.icon-btn,
.avatar-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--icon-btn-text);
  cursor: pointer;
}

.avatar-btn {
  background: var(--avatar-btn-bg);
  color: var(--panel);
  border-color: var(--avatar-btn-bg);
}

.brand {
  display: none;
}

.sidebar-inner {
  display: block;
  padding: var(--space-3) var(--space-3) calc(var(--space-4) - 2px);
}

body.is-shell .sidebar-inner {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.toc-search {
  display: block;
  width: 100%;
  border: 1px solid var(--search-input-border);
  border-radius: calc(var(--space-5) + var(--space-1));
  background: var(--search-input-bg);
  color: var(--search-input-text);
  padding: calc(var(--space-2) + 1px) var(--space-3);
  margin-bottom: var(--space-3);
  font-size: var(--font-size-nav);
}

.toc-search::placeholder {
  color: var(--search-input-placeholder);
}

.toc-search:focus-visible {
  outline: 2px solid var(--search-input-focus-ring);
  outline-offset: 1px;
}

.toc-search-empty {
  color: var(--search-empty-text);
  font-size: var(--font-size-caption);
  padding: var(--space-2) calc(var(--space-3) - 2px);
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block;
}

.nav-section {
  position: static;
  border-bottom: 1px solid var(--nav-border);
}

.nav-section:last-child {
  border-bottom: 0;
}

.nav-section-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: calc(var(--space-2) - 2px);
  border-radius: var(--radius-sm);
}

.nav-section.is-current .nav-section-row {
  background: var(--hover);
}

.nav-section-row:hover {
  background: var(--hover);
}

.nav-section-row.no-children {
  grid-template-columns: auto;
}

.nav-h1 {
  display: block;
  text-decoration: none;
  color: var(--nav-h1-text);
  font-weight: var(--font-weight-semibold);
  padding: calc(var(--space-3) - 2px) calc(var(--space-3) - 2px);
  border-bottom: 0;
}

.nav-section.is-current .nav-h1,
.nav-h1:hover {
  color: var(--accent);
  background: transparent;
}

.nav-section.is-current .nav-h1 {
  background: transparent;
}

.nav-toggle {
  border: 1px solid var(--nav-toggle-border);
  background: var(--nav-toggle-bg);
  color: var(--nav-toggle-text);
  cursor: pointer;
  width: 22px;
  height: 22px;
  padding: 0;
  margin-top: 0;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-nav);
  font-weight: var(--font-weight-bold);
  line-height: 1;
  transition: transform 0.2s ease;
}

.nav-section.expanded .nav-toggle {
  transform: rotate(180deg);
}

.nav-h2-list {
  list-style: none;
  margin: 0;
  padding: 0 0 var(--space-2) var(--space-3);
  display: none;
  position: static;
  min-width: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  z-index: auto;
}

.nav-h2-item > a {
  display: block;
  text-decoration: none;
  color: var(--nav-h2-text);
  font-size: var(--font-size-caption);
  border-radius: var(--radius-sm);
  padding: var(--space-2) calc(var(--space-3) - 2px);
}

.nav-h2-item > a:hover,
.nav-h2-item.is-current > a,
.nav-h2-item > a.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav-h3-list {
  list-style: none;
  margin: 0;
  padding: 0 0 0 var(--space-3);
}

.nav-h3-item a {
  display: block;
  text-decoration: none;
  color: var(--text-muted);
  font-size: var(--font-size-small);
  border-radius: var(--radius-sm);
  padding: calc(var(--space-2) - 1px) calc(var(--space-3) - 2px);
}

.nav-h3-item a:hover,
.nav-h3-item.is-current a,
.nav-h3-item a.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.content-wrap {
  padding: 0;
  max-width: none;
  margin: 0;
}

body.is-shell .content-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.content {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  max-width: none;
  margin: 0;
  overflow: hidden;
}

body.is-shell .content {
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

body.is-shell .content-frame,
body.is-shell .content .content-frame {
  height: 100%;
  min-height: 0;
}

.content .content-frame,
.content-frame {
  width: 100%;
  min-height: 78vh;
  border: 0;
  display: block;
  background: var(--panel);
}

.content h1 { margin: 0 0 var(--space-4); color: var(--heading-h1-text); font-size: var(--font-size-h1); line-height: var(--line-height-heading); }
.content h2 { margin-top: calc(var(--space-5) - 2px); color: var(--heading-h2-text); font-size: var(--font-size-h2); line-height: var(--line-height-heading); }
.content h3, .content h4 { color: var(--heading-h3-text); font-size: var(--font-size-h3); line-height: var(--line-height-heading); }
.content p, .content li { color: var(--content-text); font-size: var(--font-size-body); }
.content ul,
.content ol {
  margin: calc(var(--space-2) + 2px) 0 calc(var(--space-3) + 2px);
  padding-left: calc(var(--space-5) + 4px);
}

.content ul { list-style-type: disc; }
.content ul ul { list-style-type: circle; }
.content ul ul ul { list-style-type: square; }

.content ol { list-style-type: decimal; }
.content ol ol { list-style-type: lower-alpha; }
.content ol ol ol { list-style-type: lower-roman; }

.content li > ul,
.content li > ol {
  margin-top: calc(var(--space-1) + 2px);
  margin-bottom: calc(var(--space-1) + 2px);
}

.content p.doc-title { font-size: var(--font-size-h2); font-weight: var(--font-weight-bold); color: var(--doc-title-text); }

.content p.indent-1,
.content li > p.indent-1 { margin-left: 2.5em; }

.content p.indent-2,
.content li > p.indent-2 { margin-left: 4.5em; }

.content p.indent-3,
.content li > p.indent-3 { margin-left: 7.5em; }

.content p.indent-4,
.content li > p.indent-4 { margin-left: 9em; }

.content p.numbered-list-indent-1,
.content li > p.numbered-list-indent-1 { margin-left: 2.5em; text-indent: -1.5em; }

.content p.numbered-list-indent-2,
.content li > p.numbered-list-indent-2 { margin-left: 4.5em; text-indent: -1.5em; }

.content p.numbered-list-indent-3,
.content li > p.numbered-list-indent-3 { margin-left: 7.5em; text-indent: -1.5em; }

.content p.numbered-list-indent-4,
.content li > p.numbered-list-indent-4 { margin-left: 9em; text-indent: -0.75em; }

.content p.substep-1,
.content li > p.substep-1 { margin-left: 4.5em; text-indent: -1.5em; }

.content p.substep-2,
.content li > p.substep-2 { margin-left: 7.5em; text-indent: -1.5em; }

.content [style*="mso-element:comment"],
.content [style*="mso-comment-reference"],
.content .MsoCommentText,
.content .MsoCommentReference,
.content .msocomtxt,
.content .msocomanchor,
.content a[href*="_msocom_"],
.content a[name*="_msocom_"],
.content a[name*="_msoanchor_"] {
  display: none !important;
}

.content mark.doc-search-hit,
mark.doc-search-hit {
  background: var(--search-highlight-bg);
  color: var(--search-highlight-text);
  border-radius: 2px;
}

.content .doc-video-embed {
  position: relative;
  width: 100%;
  max-width: var(--video-max-width);
  margin: calc(var(--space-4) - 2px) 0 calc(var(--space-5) - 2px);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--video-bg);
  aspect-ratio: 16 / 9;
}

.content .doc-video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.content details.ci-fold {
  border: 1px solid var(--ci-border);
  border-radius: var(--radius-md);
  margin: var(--space-3) 0;
  background: var(--ci-bg);
}

.content .ci-summary {
  list-style: none;
  cursor: pointer;
  padding: calc(var(--space-3) - 2px) var(--space-3);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-semibold);
  color: var(--ci-summary-text);
}

.content .ci-summary::-webkit-details-marker { display: none; }
.content .ci-summary::before { content: "▸"; color: var(--accent); margin-right: var(--space-2); }
.content details[open] > .ci-summary::before { content: "▾"; }
.content .ci-content { padding: 0 var(--space-3) var(--space-3); }

.content table.doc-table {
  width: auto;
  min-width: 0;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.content table.doc-table th,
.content table.doc-table td {
  border: 1px solid var(--table-cell-border);
  padding: var(--space-2) calc(var(--space-3) - 2px);
  text-align: left;
  overflow-wrap: anywhere;
  word-break: normal;
}

.content img,
.content picture,
.content figure img {
  max-width: 100%;
}

.content img {
  height: auto;
  display: block;
}

.content img.inline-icon {
  display: inline-block;
  width: 1em;
  max-width: 1em;
  height: 1em;
  vertical-align: -0.08em;
  margin: 0 0.1em;
}

.content .inline-icon-wrap {
  white-space: nowrap;
}

.content p > img:only-child,
.content li > img:only-child,
.content figure img {
  display: block;
}

@media (max-width: 980px) {
  .sfs-footer {
    max-height: 0;
    overflow: hidden;
    margin-top: 0;
    border-top: 0;
  }

  .sfs-main-layout {
    display: block;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  body.is-shell .sfs-main-layout {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .sfs-gov-banner-toggle {
    height: var(--gov-banner-height);
    min-height: var(--gov-banner-height);
    padding: 0 var(--space-3);
    gap: var(--space-2);
  }

  .sfs-gov-banner-panel {
    padding: calc(var(--space-3) - 2px) var(--space-3) var(--space-3);
  }

  .sfs-footer-inner {
    padding: calc(var(--space-4) - 2px) var(--space-3) calc(var(--space-5) - 2px);
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .sfs-footer-left {
    width: 100%;
  }

  .sfs-footer-links {
    gap: calc(var(--space-4) - 2px) var(--space-5);
  }

  .sfs-footer-right {
    margin-left: 0;
    text-align: left;
    white-space: normal;
  }

  .topbar {
    min-height: 64px;
    padding: 0 var(--space-3);
    gap: var(--space-3);
    max-width: none;
    margin: 0;
  }

  .topbar-title {
    font-size: var(--font-size-h3);
    padding: calc(var(--space-2) - 1px) var(--space-3);
  }

  .sfs-guide-title {
    font-size: var(--font-size-h3);
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
  }

  .topbar-left {
    flex: 1 1 0;
    min-width: 0;
  }

  .site-logo {
    max-width: 130px;
    height: 40px;
  }

  .menu-btn {
    display: inline-block;
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: var(--radius-sm);
    color: var(--icon-btn-text);
    padding: calc(var(--space-2) - 2px) calc(var(--space-3) - 2px);
    cursor: pointer;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 34px;
    width: min(90vw, 360px);
    height: calc(100vh - 34px);
    transform: translateX(-102%);
    transition: transform 180ms ease;
    z-index: 40;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    background: var(--panel);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  /* 覆盖 body.is-shell .sidebar 的更高选择器优先级，确保移动端侧栏脱离文档流。 */
  body.is-shell .sidebar {
    position: fixed;
    left: 0;
    top: 34px;
    width: min(90vw, 360px);
    height: calc(100dvh - 34px);
    transform: translateX(-102%);
    transition: transform 180ms ease;
    z-index: 40;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    background: var(--panel);
  }

  body.is-shell .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-inner {
    height: auto;
    padding: calc(var(--space-4) - 2px);
    display: block;
  }

  .toc-search {
    display: block;
  }

  .toc-list { display: block; }
  .nav-section-row { grid-template-columns: minmax(0, 1fr) 24px; }
  .nav-h2-list { position: static; box-shadow: none; border: 0; padding: 2px 0 6px var(--space-2); }

  body.is-shell .content-wrap {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  body.is-shell .content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    overflow: hidden;
    padding: 0;
  }

  body.is-shell .content-frame,
  body.is-shell .content .content-frame {
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .sfs-footer-inner {
    padding: var(--space-3) calc(var(--space-3) - 2px) var(--space-4);
  }

  .sfs-footer-links {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .sfs-footer-links a,
  .sfs-footer-copy,
  .sfs-footer-updated {
    font-size: var(--font-size-caption);
  }
}

/* Image lightbox */
.content img:not(.inline-icon) {
  cursor: zoom-in;
}

.img-lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.82);
  cursor: zoom-out;
  padding: var(--space-4);
  overflow: hidden;
  box-sizing: border-box;
}

.img-lightbox-overlay.is-open {
  display: block;
}

.img-lightbox-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: auto;
  max-width: calc(100% - (var(--space-4) * 2));
  max-height: calc(100dvh - (var(--space-4) * 2));
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  cursor: default;
  user-select: none;
  display: block;
}

.img-lightbox-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 0;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.img-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.30);
}

@media (max-width: 980px) {
  .img-lightbox-overlay {
    padding: 0;
  }

  .img-lightbox-img {
    max-width: 100%;
    max-height: 100dvh;
    border-radius: 0;
  }
}
