:root {
  --bg: #f0f2f5;
  --surface: #ffffff;
  --surface2: #f8fafc;
  --border: #d8dee6;
  --text: #111827;
  --muted: #4b5563;
  --accent: #0e7490;
  --accent-bright: #0891b2;
  --accent-dim: #ecfeff;
  --amber: #b45309;
  --amber-dim: #fffbeb;
  --radius: 10px;
  --font: "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Fira Code", monospace;
  --max: 1040px;
  --doc-sidebar: 200px;
  --prose: 760px;
  --img-ui: 240px;
  --img-ui-height: 480px;
  --img-lg-wide: 510px;
  --img-icon: 140px;
  /* 页面节奏：顶栏下灰底间隔 = 正文至页脚灰底间隔 */
  --page-top: 28px;
  --page-bottom: 12px;
  --footer-gap: 16px;
  --footer-pad-y: 16px;
  --back-link-gap: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  touch-action: pan-x pan-y pinch-zoom;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  touch-action: pan-x pan-y pinch-zoom;
}

a {
  color: var(--accent-bright);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}

a:hover { color: var(--accent); }

.layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.site-header .layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  gap: 16px;
}

.logo {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo span {
  color: var(--accent-bright);
  font-weight: 600;
  margin-left: 6px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-link {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}

.header-link:hover { color: var(--text); }

.header-link.is-active {
  color: var(--accent);
  font-weight: 600;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: var(--footer-pad-y) 0 20px;
  margin-top: var(--footer-gap);
}

.footer-main {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.footer-main strong { color: var(--text); }

.footer-links {
  font-size: 0.8125rem;
  color: var(--muted);
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover { color: var(--accent-bright); }

.footer-icp {
  margin-top: 12px;
  font-size: 0.75rem;
  color: #9ca3af;
}

@media (max-width: 640px) {
  :root {
    --page-top: 16px;
    --page-bottom: 8px;
    --footer-gap: 12px;
    --footer-pad-y: 14px;
    --back-link-gap: 6px;
  }
}

/* Shared typography */
.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-bright);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
}

.back-link {
  display: inline-block;
  margin-top: var(--back-link-gap);
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover { color: var(--accent-bright); }

/* Scene-task entry banner（教程中心顶栏 → /tutorials/scene-tasks.html） */
.scene-task-banner {
  position: sticky;
  top: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 20px;
  background: rgba(14, 116, 144, 0.1);
  border-bottom: 1px solid rgba(14, 116, 144, 0.18);
  box-sizing: border-box;
  text-decoration: none;
  color: inherit;
}

.scene-task-banner:hover {
  background: rgba(14, 116, 144, 0.14);
  color: inherit;
}

.scene-task-banner:active {
  opacity: 0.9;
}

.scene-task-banner__text {
  flex: 1;
  min-width: 0;
  max-width: var(--max);
  margin: 0 auto;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
}

/* Hub page */
.hub-page {
  padding: var(--page-top) 0 calc(var(--page-bottom) + var(--footer-gap));
}

.hub-lead {
  color: var(--muted);
  font-size: 1.0625rem;
  max-width: 560px;
  margin-bottom: 32px;
  line-height: 1.7;
}

.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.tutorial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.15s, border-color 0.15s;
}

.tutorial-card:hover {
  border-color: var(--accent-bright);
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.1);
}

.tutorial-card.is-soon {
  opacity: 0.65;
  pointer-events: none;
}

.tutorial-card h2 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
}

.tutorial-card p {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.65;
  flex: 1;
}

.tutorial-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface2);
}

.tag--live {
  border-color: #0891b2;
  color: #0e7490;
  background: var(--accent-dim);
}

.tutorial-card-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-bright);
  text-decoration: none;
  margin-top: 4px;
}

.tutorial-card-link:hover { color: var(--accent); }

/* Doc page layout */
.doc-page {
  padding: var(--page-top) 0 var(--page-bottom);
}

.doc-layout {
  display: grid;
  grid-template-columns: var(--doc-sidebar) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

@media (max-width: 900px) {
  .doc-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* TOC sidebar */
.doc-toc-wrap {
  position: sticky;
  top: 12px;
}

@media (max-width: 900px) {
  .doc-toc-wrap {
    position: static;
    margin-bottom: 20px;
  }
}

.doc-toc-toggle {
  display: none;
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.doc-toc-toggle::after {
  content: " ▾";
  float: right;
  color: var(--muted);
}

.doc-toc-toggle[aria-expanded="true"]::after {
  content: " ▴";
}

@media (max-width: 900px) {
  .doc-toc-toggle { display: block; }

  .doc-toc {
    display: none;
    margin-top: 8px;
  }

  .doc-toc.is-open { display: block; }
}

.doc-toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 12px 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.doc-toc-title {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  padding: 0 6px;
}

.doc-toc ul { list-style: none; }

.doc-toc li { margin-bottom: 2px; }

.doc-toc a {
  display: block;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  line-height: 1.45;
}

.doc-toc a:hover {
  color: var(--text);
  background: var(--surface2);
}

.doc-toc a.is-active {
  color: var(--accent);
  font-weight: 600;
  border-left-color: var(--accent-bright);
  background: var(--accent-dim);
}

.doc-toc .toc-sub {
  padding-left: 10px;
  margin-top: 2px;
}

.doc-toc .toc-sub a {
  font-size: 0.75rem;
}

/* Doc content column */
.doc-content {
  min-width: 0;
  max-width: calc(var(--prose) + 56px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.doc-title {
  font-size: clamp(1.375rem, 3.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

@media (max-width: 600px) {
  .doc-content {
    padding: 20px 16px 10px;
  }
}

/* Doc sections */
.doc-section {
  margin-bottom: 24px;
  scroll-margin-top: 20px;
  padding-bottom: 5px;
}

.doc-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.doc-section h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 28px 0 10px;
  color: var(--text);
}

.doc-section > p,
.doc-section li {
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 10px;
  line-height: 1.75;
}

.doc-section ul,
.doc-section ol {
  padding-left: 1.35rem;
  margin-bottom: 14px;
}

.doc-section li {
  margin-bottom: 6px;
  color: var(--muted);
}

.doc-section li strong,
.doc-section p strong {
  color: #78350f;
  font-weight: 700;
  background: #fef08a;
  padding: 0.05em 0.35em;
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.doc-section a { word-break: break-word; }

/* Blockquote — MD 引用原样 */
.doc-blockquote {
  margin: 14px 0;
  padding: 0 0 0 14px;
  border-left: 3px solid var(--border);
}

.doc-blockquote p {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.75;
}

/* 特别提醒（质检等教程开头） */
.doc-reminder {
  margin-bottom: 24px;
}

.doc-reminder > p {
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text);
}

.doc-reminder > ul {
  padding-left: 1.35rem;
  margin-bottom: 0;
  list-style: disc;
}

.doc-reminder li {
  margin-bottom: 10px;
  color: var(--text);
  line-height: 1.75;
}

.doc-reminder li .doc-figure {
  margin: 12px 0 0;
  text-align: center;
}

/* 嵌套说明列表 — 保留项目符号 + 等距行距 */
.doc-section ul.doc-nested-list,
.doc-section .doc-nested-list ul {
  list-style-position: outside;
  padding-left: 1.35rem;
  margin: 0;
}

.doc-section ul.doc-nested-list {
  list-style-type: disc;
  margin-bottom: 14px;
}

.doc-section .doc-nested-list ul {
  list-style-type: circle;
}

.doc-section .doc-nested-list ul ul {
  list-style-type: square;
}

.doc-section .doc-nested-list li {
  display: list-item;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: var(--muted);
}

.doc-section .doc-nested-list li + li {
  margin-top: 0.5rem;
}

.doc-section .doc-nested-list li > ul {
  margin-top: 0.5rem;
}

.doc-text-plain {
  color: var(--text);
  font-weight: 400;
  background: none;
}

/* Figures — centered */
.doc-figure {
  margin: 16px auto 20px;
  text-align: center;
}

.doc-figure img {
  display: inline-block;
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  vertical-align: top;
}

.doc-figure img:not(.doc-image-stamp),
.doc-figure--annotated .doc-figure-frame > img:not(.doc-image-stamp) {
  cursor: zoom-in;
}

.doc-figure figcaption {
  margin-top: 6px;
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
}

/* 截图标注：文字叠在图上（如 macOS 权限弹窗） */
.doc-figure--annotated .doc-figure-frame {
  position: relative;
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  line-height: 0;
}

.doc-figure--annotated .doc-figure-frame img {
  display: block;
  width: auto;
  max-width: var(--img-lg-wide);
  height: auto;
}

.doc-image-tag {
  position: absolute;
  z-index: 1;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.35;
  color: #78350f;
  background: #fef08a;
  padding: 6px 12px;
  border: 2px solid #f59e0b;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
  white-space: nowrap;
}

.doc-image-tag--allow {
  left: 70%;
  top: 44%;
  transform: translate(-50%, calc(-50% - 100%));
}

/* WEB 端教程：权限标注排版（仅 tutorial-web-client） */
.tutorial-web-client #register-login .doc-image-tag--allow {
  transform: translate(-50%, calc(-50% + 535%)) scale(1.5);
  transform-origin: center center;
}

.tutorial-web-client #first-login .doc-image-tag--allow {
  transform: translate(-50%, calc(-50% + 290%));
}

@media (max-width: 640px) {
  .tutorial-web-client #register-login .doc-image-tag--allow {
    transform: translate(-50%, calc(-50% + 575%)) scale(1.5);
  }

  .tutorial-web-client #first-login .doc-image-tag--allow {
    transform: translate(-50%, calc(-50% + 490%)) scale(1.5);
    transform-origin: center center;
  }
}

/* 质检 APP 教程：权限标注 — 图 04 内水平居中，垂直对齐「使用应用时允许」上方 */
.tutorial-qc-app #first-login .doc-figure-cell:first-child .doc-image-tag--allow {
  left: 50%;
  top: 67.5%;
  transform: translate(-50%, calc(-50% - 100%));
}

/* 上传工具教程：权限标注（仅 tutorial-upload-tool） */
.tutorial-upload-tool #insert-ssd .doc-image-tag--allow {
  transform: translate(calc(-50% + 25%), calc(-50% - 100%));
}

@media (max-width: 600px) {
  .doc-image-tag {
    font-size: 0.75rem;
    padding: 5px 10px;
  }
}

/* 手机截屏分栏（WEB 端教程） */
.doc-figure-grid {
  display: grid;
  gap: 12px 16px;
  margin: 16px auto 20px;
  width: 100%;
}

.doc-figure-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.doc-figure-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.doc-figure-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.doc-figure--lg-wide-75 img,
.doc-figure--lg-wide-75.doc-figure--annotated .doc-figure-frame {
  max-width: calc(var(--img-lg-wide) * 0.75);
}

.doc-figure--lg-wide-75.doc-figure--annotated .doc-figure-frame img {
  max-width: 100%;
}

.doc-figure-cell {
  min-width: 0;
  text-align: center;
}

.doc-figure-cell .doc-figure {
  margin: 0 0 8px;
}

.doc-figure-cell > p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.doc-figure-grid .doc-figure img,
.doc-figure-grid .doc-figure--annotated .doc-figure-frame {
  width: 100%;
  max-width: 100%;
}

.doc-figure-grid .doc-figure--annotated .doc-figure-frame {
  display: block;
  line-height: 0;
}

.doc-figure-grid .doc-figure--annotated .doc-figure-frame img {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 640px) {
  .doc-figure-grid--2,
  .doc-figure-grid--3,
  .doc-figure-grid--4 {
    grid-template-columns: 1fr;
  }
}

/* 注册：桌面双栏等高，手机单列 */
.doc-figure-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px auto 20px;
  max-width: calc(var(--img-ui) * 2 + 16px);
  align-items: stretch;
}

.doc-figure-row .doc-figure {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--img-ui-height);
}

.doc-figure-row .doc-figure img {
  max-width: var(--img-ui);
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

@media (max-width: 640px) {
  .doc-figure-row {
    grid-template-columns: 1fr;
    max-width: var(--img-ui);
  }

  .doc-figure-row .doc-figure {
    display: block;
    height: auto;
  }

  .doc-figure-row .doc-figure img {
    max-width: var(--img-ui);
    max-height: none;
  }
}

.doc-figure--icon img {
  max-width: var(--img-icon);
}

.doc-figure--ui img {
  max-width: var(--img-ui);
}

.doc-figure--lg-wide > img {
  max-width: var(--img-lg-wide);
  width: var(--img-lg-wide);
}

/* Go Ultra 录制教程：分栏内等高（各栏独立尺寸，不影响其他教程） */
.tutorial-go-ultra-recording .doc-figure-grid {
  align-items: start;
}

.tutorial-go-ultra-recording .doc-figure-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tutorial-go-ultra-recording .doc-figure-cell .doc-figure {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tutorial-go-ultra-recording .doc-figure-grid--2 .doc-figure-cell .doc-figure {
  aspect-ratio: 5 / 4;
}

.tutorial-go-ultra-recording .doc-figure-grid--3 .doc-figure-cell .doc-figure {
  aspect-ratio: 4 / 3;
}

.tutorial-go-ultra-recording .doc-figure-grid--4 .doc-figure-cell .doc-figure {
  aspect-ratio: 3 / 2;
}

.tutorial-go-ultra-recording .doc-figure-grid .doc-figure--lg-wide > img,
.tutorial-go-ultra-recording .doc-figure-grid .doc-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

@media (max-width: 640px) {
  .tutorial-go-ultra-recording .doc-figure-cell .doc-figure {
    aspect-ratio: auto;
    height: auto;
  }

  .tutorial-go-ultra-recording .doc-figure-grid .doc-figure--lg-wide > img,
  .tutorial-go-ultra-recording .doc-figure-grid .doc-figure img {
    height: auto;
    max-height: none;
  }
}

/* Go Ultra 采集教程：不等宽分栏（仅本页，对齐 PDF 版式） */
.tutorial-go-ultra-collection .doc-figure-aside {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 12px 20px;
  align-items: start;
  margin: 16px auto 20px;
}

.tutorial-go-ultra-collection .doc-figure-aside .doc-figure {
  margin: 0;
}

.tutorial-go-ultra-collection .doc-figure-aside__body p {
  margin: 0 0 6px;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.tutorial-go-ultra-collection .doc-figure-grid {
  align-items: start;
}

.tutorial-go-ultra-collection .doc-figure-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tutorial-go-ultra-collection .doc-figure-cell .doc-figure {
  margin: 0 0 8px;
  width: 100%;
}

.tutorial-go-ultra-collection .doc-figure-grid--2-1 {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}

.tutorial-go-ultra-collection .doc-figure-grid--3-2 {
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

.tutorial-go-ultra-collection .doc-figure-grid--power {
  grid-template-columns: minmax(0, 0.954fr) minmax(0, 1.006fr);
}

.tutorial-go-ultra-collection .doc-figure-grid--power .doc-figure-cell {
  align-items: flex-start;
  text-align: left;
  width: 100%;
}

.tutorial-go-ultra-collection .doc-figure-grid--power .doc-figure-cell .doc-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 8px;
}

.tutorial-go-ultra-collection .doc-figure-grid--power .doc-figure-cell:first-child .doc-figure {
  aspect-ratio: 496 / 520;
}

.tutorial-go-ultra-collection .doc-figure-grid--power .doc-figure-cell:last-child .doc-figure {
  aspect-ratio: 998 / 992;
}

.tutorial-go-ultra-collection .doc-figure-grid--power .doc-figure-cell__text {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  width: 100%;
  text-align: left;
}

.tutorial-go-ultra-collection .doc-figure-grid--power .doc-figure-cell__text > p,
.tutorial-go-ultra-collection .doc-figure-grid--power .doc-figure-cell__text > ul {
  margin: 0;
}

.tutorial-go-ultra-collection .doc-figure-grid--power .doc-figure-cell > p,
.tutorial-go-ultra-collection .doc-figure-grid--power .doc-figure-cell ul {
  width: 100%;
  text-align: left;
}

.tutorial-go-ultra-collection .doc-figure-grid--power .doc-figure-cell ul {
  margin: 0;
  padding-left: 1.25em;
}

.tutorial-go-ultra-collection .doc-figure-grid--power .doc-figure-cell__text ul {
  padding-left: 1.25em;
}

.tutorial-go-ultra-collection .doc-figure-grid--remove-cam {
  grid-template-columns: minmax(0, 1.152fr) minmax(0, 1.208fr);
}

.tutorial-go-ultra-collection .doc-figure-grid--remove-cam .doc-figure-cell {
  align-items: flex-start;
  width: 100%;
}

.tutorial-go-ultra-collection .doc-figure-grid--remove-cam .doc-figure-cell .doc-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
}

.tutorial-go-ultra-collection .doc-figure-grid--remove-cam .doc-figure-cell:first-child .doc-figure {
  aspect-ratio: 862 / 748;
}

.tutorial-go-ultra-collection .doc-figure-grid--remove-cam .doc-figure-cell:last-child .doc-figure {
  aspect-ratio: 1024 / 848;
}

.tutorial-go-ultra-collection .doc-figure-grid--remove-cam .doc-figure-cell .doc-figure img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

.tutorial-go-ultra-collection .doc-figure-grid--magnetic {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tutorial-go-ultra-collection .doc-figure-grid--magnetic .doc-figure-cell {
  align-items: center;
  width: 100%;
}

.tutorial-go-ultra-collection .doc-figure-grid--magnetic .doc-figure-cell .doc-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin-bottom: 8px;
}

.tutorial-go-ultra-collection .doc-figure-aside .doc-figure--lg-wide > img,
.tutorial-go-ultra-collection .doc-figure-grid .doc-figure--lg-wide > img,
.tutorial-go-ultra-collection .doc-figure-grid .doc-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.tutorial-go-ultra-collection .doc-figure-grid--power .doc-figure-cell .doc-figure img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

.tutorial-go-ultra-collection .doc-figure-grid--magnetic .doc-figure-cell .doc-figure img:not(.doc-image-stamp) {
  display: block;
  height: 100%;
  width: auto;
  max-width: none;
}

/* 采集教程：对/错角标（仅 tutorial-go-ultra-collection） */
.tutorial-go-ultra-collection .doc-figure--annotated .doc-figure-frame {
  position: relative;
  line-height: 0;
}

.tutorial-go-ultra-collection .doc-figure-grid--magnetic .doc-figure--annotated .doc-figure-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.tutorial-go-ultra-collection .doc-figure-grid--magnetic .doc-figure--annotated .doc-figure-frame img:not(.doc-image-stamp) {
  display: block;
  height: 100%;
  width: auto;
  max-width: none;
}

.tutorial-go-ultra-collection .doc-figure--annotated .doc-figure-frame > img:not(.doc-image-stamp) {
  width: 100%;
  max-width: 100%;
  height: auto;
}

.tutorial-go-ultra-collection .doc-figure--annotated .doc-figure-frame .doc-image-stamp {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 1;
  width: 72px;
  max-width: 72px;
  height: auto;
  max-height: none;
  object-fit: contain;
  pointer-events: none;
  border: none;
  background: transparent;
  box-shadow: none;
}

.tutorial-go-ultra-collection #install-clamp + .doc-figure-grid .doc-figure--annotated .doc-figure-frame .doc-image-stamp {
  width: 144px;
  max-width: 144px;
}

@media (max-width: 640px) {
  .tutorial-go-ultra-collection .doc-figure--annotated .doc-figure-frame .doc-image-stamp {
    width: 56px;
    max-width: 56px;
    right: 6px;
    bottom: 6px;
  }

  .tutorial-go-ultra-collection #install-clamp + .doc-figure-grid .doc-figure--annotated .doc-figure-frame .doc-image-stamp {
    width: 112px;
    max-width: 112px;
  }

  .tutorial-go-ultra-collection .doc-figure-grid--magnetic .doc-figure--annotated .doc-figure-frame .doc-image-stamp {
    width: 112px;
    max-width: 112px;
  }
}

/* 两图整行撑满；列宽按原图宽高比分配，故自然等高且不裁切（15: 709×1024，16: 896×1024） */
.tutorial-go-ultra-collection .doc-figure-grid--hat-adjust {
  grid-template-columns: minmax(0, 709fr) minmax(0, 896fr);
  width: 100%;
  justify-content: stretch;
  align-items: start;
}

.tutorial-go-ultra-collection .doc-figure-grid--hat-adjust .doc-figure-cell {
  align-items: stretch;
  width: 100%;
}

.tutorial-go-ultra-collection .doc-figure-grid--hat-adjust .doc-figure-cell .doc-figure {
  display: block;
  width: 100%;
  margin: 0;
  aspect-ratio: auto;
}

.tutorial-go-ultra-collection .doc-figure-grid--hat-adjust .doc-figure-cell .doc-figure img {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.tutorial-go-ultra-collection .doc-figure-grid--frame-check {
  grid-template-columns: minmax(0, 1.608fr) minmax(0, 1.335fr);
}

.tutorial-go-ultra-collection .doc-figure-grid--frame-check .doc-figure-cell {
  align-items: flex-start;
  width: 100%;
}

.tutorial-go-ultra-collection .doc-figure-grid--frame-check .doc-figure-cell .doc-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 8px;
}

.tutorial-go-ultra-collection .doc-figure-grid--frame-check .doc-figure-cell:first-child .doc-figure {
  aspect-ratio: 1254 / 780;
}

.tutorial-go-ultra-collection .doc-figure-grid--frame-check .doc-figure-cell:last-child .doc-figure {
  aspect-ratio: 1024 / 767;
}

.tutorial-go-ultra-collection .doc-figure-grid--frame-check .doc-figure-cell .doc-figure img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

.tutorial-go-ultra-collection .doc-figure-grid--delete-video {
  grid-template-columns: minmax(0, 1.479fr) minmax(0, 1.754fr);
}

.tutorial-go-ultra-collection .doc-figure-grid--delete-video .doc-figure-cell {
  align-items: flex-start;
  width: 100%;
}

.tutorial-go-ultra-collection .doc-figure-grid--delete-video .doc-figure-cell .doc-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 8px;
}

.tutorial-go-ultra-collection .doc-figure-grid--delete-video .doc-figure-cell:first-child .doc-figure {
  aspect-ratio: 1390 / 940;
}

.tutorial-go-ultra-collection .doc-figure-grid--delete-video .doc-figure-cell:last-child .doc-figure {
  aspect-ratio: 1242 / 708;
}

.tutorial-go-ultra-collection .doc-figure-grid--delete-video .doc-figure-cell .doc-figure img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

.tutorial-go-ultra-collection .doc-charge-times {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  margin: 12px 0 16px;
}

.tutorial-go-ultra-collection .doc-charge-times p {
  margin: 0 0 4px;
}

@media (max-width: 640px) {
  .tutorial-go-ultra-collection .doc-figure-aside,
  .tutorial-go-ultra-collection .doc-figure-grid--2-1,
  .tutorial-go-ultra-collection .doc-figure-grid--3-2,
  .tutorial-go-ultra-collection .doc-charge-times {
    grid-template-columns: 1fr;
  }

  .tutorial-go-ultra-collection .doc-figure-grid--power,
  .tutorial-go-ultra-collection .doc-figure-grid--magnetic,
  .tutorial-go-ultra-collection .doc-figure-grid--frame-check {
    grid-template-columns: 1fr;
  }

  .tutorial-go-ultra-collection .doc-figure-grid--power .doc-figure-cell .doc-figure {
    aspect-ratio: auto;
    height: auto;
    display: block;
  }

  .tutorial-go-ultra-collection .doc-figure-grid--power .doc-figure-cell .doc-figure img {
    width: 100%;
    height: auto;
    max-width: 100%;
  }

  .tutorial-go-ultra-collection .doc-figure-grid--remove-cam .doc-figure-cell .doc-figure {
    aspect-ratio: auto;
    height: auto;
  }

  .tutorial-go-ultra-collection .doc-figure-grid--remove-cam .doc-figure-cell .doc-figure img {
    width: 100%;
    height: auto;
  }

  .tutorial-go-ultra-collection .doc-figure-grid--magnetic .doc-figure-cell .doc-figure {
    height: auto;
    overflow: visible;
    display: block;
  }

  .tutorial-go-ultra-collection .doc-figure-grid--magnetic .doc-figure--annotated .doc-figure-frame {
    display: block;
    height: auto;
    overflow: visible;
  }

  .tutorial-go-ultra-collection .doc-figure-grid--magnetic .doc-figure-cell .doc-figure img:not(.doc-image-stamp),
  .tutorial-go-ultra-collection .doc-figure-grid--magnetic .doc-figure--annotated .doc-figure-frame img:not(.doc-image-stamp) {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
  }

  .tutorial-go-ultra-collection .doc-figure-grid--hat-adjust {
    grid-template-columns: 1fr;
  }

  .tutorial-go-ultra-collection .doc-figure-grid--hat-adjust .doc-figure-cell .doc-figure {
    aspect-ratio: auto;
    height: auto;
    width: 100%;
  }

  .tutorial-go-ultra-collection .doc-figure-grid--hat-adjust .doc-figure-cell .doc-figure img {
    height: auto;
    width: 100%;
    max-width: 100%;
  }

  .tutorial-go-ultra-collection .doc-figure-grid--frame-check .doc-figure-cell .doc-figure {
    aspect-ratio: auto;
    height: auto;
    display: block;
  }

  .tutorial-go-ultra-collection .doc-figure-grid--frame-check .doc-figure-cell .doc-figure img {
    width: 100%;
    height: auto;
    max-width: 100%;
  }

  .tutorial-go-ultra-collection .doc-figure-grid--delete-video .doc-figure-cell .doc-figure {
    aspect-ratio: auto;
    height: auto;
  }

  .tutorial-go-ultra-collection .doc-figure-grid--delete-video .doc-figure-cell .doc-figure img {
    width: 100%;
    height: auto;
  }
}

/* Steps list */
.doc-steps {
  list-style: none;
  padding-left: 0;
  counter-reset: step;
}

.doc-steps li {
  position: relative;
  padding-left: 36px;
  margin-bottom: 10px;
  counter-increment: step;
  color: var(--muted);
}

.doc-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid #a5f3fc;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Table */
.doc-table-wrap {
  overflow-x: auto;
  margin: 14px 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.doc-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.doc-table-wrap th,
.doc-table-wrap td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
}

.doc-table-wrap th {
  background: var(--surface2);
  color: var(--text);
  font-weight: 700;
}

.doc-table-wrap td { color: var(--muted); }

.doc-table-wrap tr:last-child td { border-bottom: none; }

.doc-table-wrap--rates th,
.doc-table-wrap--rates td {
  padding: 0;
  height: 1px;
  vertical-align: middle;
}

.doc-table-wrap--rates .doc-table-cell-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  min-height: 100%;
  padding: 12px 14px;
  box-sizing: border-box;
  line-height: 1.6;
  text-align: left;
}

.doc-table-wrap--rates th .doc-table-cell-inner {
  font-weight: 700;
  color: var(--text);
}

.doc-table-wrap--rates th:first-child,
.doc-table-wrap--rates td:first-child {
  width: 16%;
  white-space: nowrap;
}

.doc-table-wrap--rates td:first-child .doc-table-cell-inner {
  font-weight: 600;
  color: var(--text);
}

.doc-table-wrap--rates th:nth-child(2),
.doc-table-wrap--rates td:nth-child(2) {
  width: 28%;
}

.doc-table-wrap--rates td:nth-child(2) .doc-table-cell-inner {
  color: var(--text);
}

.doc-table-wrap--rates td:nth-child(3) .doc-table-cell-inner {
  color: var(--muted);
}

@media (max-width: 600px) {
  :root {
    --img-ui: min(240px, 100%);
    --img-lg-wide: min(510px, 100%);
    --img-icon: min(140px, 50vw);
  }

  .doc-figure-row {
    max-width: 100%;
  }

  .doc-figure--lg-wide > img {
    width: 100%;
  }
}

/* 截图 lightbox — z-index 高于水印 9998 */
.doc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 48px 16px 16px;
  background: rgba(15, 23, 42, 0.88);
  touch-action: pan-x pan-y pinch-zoom;
}

.doc-lightbox[hidden] {
  display: none;
}

.doc-lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.doc-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.doc-lightbox__stage {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  touch-action: pan-x pan-y pinch-zoom;
}

.doc-lightbox__img {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}

body.doc-lightbox-open {
  overflow: hidden;
}

/* 全屏对角重复水印 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='340' height='160'%3E%3Ctext x='50%25' y='45%25' font-family='PingFang SC%2Csystem-ui%2Csans-serif' font-size='13' fill='%23000' fill-opacity='0.10' text-anchor='middle' dominant-baseline='middle' transform='rotate(-30 170 80)'%3EEgocentric %C2%B7 Video%3C%2Ftext%3E%3Ctext x='50%25' y='68%25' font-family='PingFang SC%2Csystem-ui%2Csans-serif' font-size='13' fill='%23000' fill-opacity='0.10' text-anchor='middle' dominant-baseline='middle' transform='rotate(-30 170 80)'%3E%E5%AE%87%E8%A1%8C%E6%98%9F%E7%9E%B3%20%C2%B7%20%E8%A7%86%E8%A7%86%E7%9C%8B%3C%2Ftext%3E%3C%2Fsvg%3E");
  background-repeat: repeat;
  background-size: 340px 160px;
}

/*
 * 公开采集任务清单（/tutorials/scene-tasks.html）
 * 视觉对齐 mass-web /contrib/scene-tasks（token：白底、#34c759/#ff453a badge、大圆角卡片）；
 * 桌面端居中 phone-width shell（430px），两侧浅底。
 */
.scene-tasks-body {
  --st-bg: #ffffff;
  --st-text: #000000;
  --st-text-secondary: #8e8e93;
  --st-border: #e0e0e0;
  --st-success: #34c759;
  --st-danger: #ff453a;
  --st-space-xs: 4px;
  --st-space-sm: 8px;
  --st-space-md: 16px;
  --st-radius-sm: 16px;
  --st-shell: 430px;
  --st-font: system-ui, -apple-system, "PingFang SC", "Helvetica Neue", sans-serif;
  margin: 0;
  background: #f5f5f5;
  color: var(--st-text);
  font-family: var(--st-font);
  line-height: 1.4;
  min-height: 100vh;
}

.scene-tasks-shell {
  width: 100%;
  max-width: var(--st-shell);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--st-bg);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.06);
}

@media (max-width: 480px) {
  .scene-tasks-body {
    background: var(--st-bg);
  }

  .scene-tasks-shell {
    box-shadow: none;
    max-width: none;
  }
}

.scene-tasks-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 var(--st-space-md);
  background: var(--st-bg);
  border-bottom: 1px solid var(--st-border);
  box-sizing: border-box;
}

.scene-tasks-nav__title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--st-text);
  line-height: 1.3;
}

.scene-tasks-page {
  padding: var(--st-space-md);
  box-sizing: border-box;
}

.scene-tasks__disclaimer {
  margin: 0 0 var(--st-space-md);
  font-size: 13px;
  color: var(--st-text-secondary);
  line-height: 1.4;
}

.scene-tasks__status {
  margin: 0 0 var(--st-space-md);
  font-size: 14px;
  color: var(--st-text-secondary);
}

.scene-tasks__back {
  display: inline-block;
  margin-top: var(--st-space-md);
  font-size: 14px;
  color: #007aff;
  text-decoration: none;
}

.scene-tasks__back:hover {
  color: #007aff;
  opacity: 0.85;
}

.scene-tasks {
  display: block;
}

.saturation-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 var(--st-space-xs);
  border-radius: var(--st-space-xs);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  box-sizing: border-box;
}

.saturation-badge--need {
  color: var(--st-success);
  background: rgba(52, 199, 89, 0.12);
}

.saturation-badge--full {
  color: var(--st-danger);
  background: rgba(255, 69, 58, 0.12);
}

.category-block {
  margin-bottom: var(--st-space-md);
}

.category-block__header {
  display: flex;
  align-items: center;
  gap: var(--st-space-sm);
  margin-bottom: var(--st-space-md);
  cursor: pointer;
  user-select: none;
}

.category-block__title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--st-text);
  line-height: 1.4;
}

.category-block__title--muted {
  color: var(--st-text-secondary);
}

.category-block__chevron,
.subgroup-card__chevron {
  flex-shrink: 0;
  font-size: 14px;
  color: var(--st-text-secondary);
  transform: rotate(90deg);
  transition: transform 0.15s ease;
}

.category-block__chevron.is-collapsed,
.subgroup-card__chevron.is-collapsed {
  transform: rotate(0deg);
}

.category-block__subgroups {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.subgroup-card {
  width: 100%;
  background: var(--st-bg);
  border: 1px solid var(--st-border);
  border-radius: var(--st-radius-sm);
  padding: var(--st-space-md);
  margin-bottom: var(--st-space-sm);
  box-sizing: border-box;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.subgroup-card__header {
  display: block;
  cursor: pointer;
  user-select: none;
}

.subgroup-card__title-row {
  display: flex;
  align-items: center;
  gap: var(--st-space-sm);
}

.subgroup-card__title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--st-text);
  line-height: 1.4;
}

.subgroup-card__title--muted {
  color: var(--st-text-secondary);
}

.subgroup-card__hint {
  display: block;
  margin-top: var(--st-space-xs);
  font-size: 12px;
  color: var(--st-text-secondary);
  line-height: 1.4;
}

.subgroup-card__tasks {
  margin-top: var(--st-space-md);
}

.task-row {
  display: flex;
  align-items: center;
  gap: var(--st-space-sm);
  padding: 12px 0;
  border-bottom: 1px solid var(--st-border);
}

.task-row--last {
  border-bottom: none;
  padding-bottom: 0;
}

.task-row:first-child {
  padding-top: 0;
}

.task-row__title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--st-text);
  line-height: 1.4;
}

.task-row__title--muted {
  color: var(--st-text-secondary);
}
