:root {
  --blue: #2a4cdc;
  --blue-soft: #eef4ff;
  --blue-line: #d8e2f4;
  --ink: #17233d;
  --text: #354055;
  --muted: #667189;
  --bg: #f5f7fb;
  --line: #e6ebf2;
  --shadow: 0 10px 28px rgba(23, 35, 61, 0.06);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }

.hero {
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner,
.layout {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
}
.hero-inner {
  padding: 34px 0 28px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.55fr 0.9fr;
  gap: 22px;
  align-items: stretch;
}
.hero-main,
.aside-card,
.toc,
.article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-main {
  padding: 28px 30px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  margin-bottom: 16px;
  border-radius: 4px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}
.hero-main h1 {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 34px;
  line-height: 1.24;
}
.hero-main p,
.article-section p,
.aside-card p {
  color: var(--muted);
  font-size: 15px;
}
.hero-main p { margin-bottom: 18px; }
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.meta span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 4px;
  background: #f4f7fc;
  color: #4a5870;
  font-size: 12px;
  border: 1px solid #e8edf6;
}
.hero-aside {
  display: grid;
  gap: 12px;
}
.aside-card {
  padding: 18px 20px;
}
.aside-card h3 {
  margin-bottom: 10px;
  font-size: 16px;
  color: var(--ink);
}
.aside-card a:not(.btn) {
  display: block;
  margin-top: 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}
.quick-grid {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #edf1f6;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.quick-grid .btn {
  width: 100%;
  min-height: 56px;
  justify-content: flex-start;
  padding-left: 24px;
  gap: 10px;
}
.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.btn svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}
.btn.primary { background: var(--blue); color: #fff; }
.btn.ghost { background: #fff; color: var(--blue); border-color: #d6e0fb; }

.layout {
  padding: 28px 0 52px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.toc {
  position: sticky;
  top: 20px;
  padding: 18px;
}
.toc h3 {
  margin-bottom: 12px;
  font-size: 16px;
  color: var(--ink);
}
.toc a {
  display: block;
  padding: 8px 0;
  color: #465168;
  font-size: 14px;
  border-bottom: 1px solid #f1f4f8;
}
.toc a:last-child { border-bottom: 0; }
.article {
  overflow: hidden;
}
.article-section {
  padding: 30px 32px;
  border-top: 1px solid #edf1f6;
}
.article-section:first-child { border-top: 0; }
.article-section h2 {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.28;
}
.install-head {
  display: block;
  margin-bottom: 18px;
}
.install-head h2 {
  margin-bottom: 10px;
}
.article-section h3 {
  margin: 22px 0 10px;
  color: var(--ink);
  font-size: 18px;
}
.note {
  padding: 14px 16px;
  border-left: 3px solid var(--blue);
  background: #f7faff;
  color: #30405d;
  font-size: 14px;
}
.steps {
  display: grid;
  gap: 14px;
}
.step {
  padding: 16px 18px;
  border: 1px solid #edf1f6;
  border-radius: 6px;
  background: #fafcff;
}
.step strong {
  display: block;
  color: var(--blue);
  margin-bottom: 8px;
}
.install-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.install-method {
  padding: 14px 14px 12px;
  border: 1px solid #e5ebf5;
  border-radius: 6px;
  background: #fff;
}
.method-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  margin-bottom: 10px;
  border-radius: 4px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}
.install-method p {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 14px;
}
.complete-tip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid #dbe6ff;
  border-left: 4px solid var(--blue);
  border-radius: 6px;
  background: linear-gradient(90deg, #f4f8ff 0%, #ffffff 100%);
  color: var(--ink);
}
.complete-tip strong {
  font-size: 16px;
  line-height: 1.5;
}
.complete-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}
.codebox {
  margin: 14px 0 18px;
  padding: 18px 20px;
  border: 1px solid #e4eaf4;
  border-radius: 6px;
  background: #f8fafc;
  color: #23324d;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.gallery {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
.gallery.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery.cols-1 { grid-template-columns: 1fr; }
figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}
figure img {
  width: 100%;
  height: 260px;
  object-fit: contain;
  background: #f7faff;
  cursor: zoom-in;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
figure img:hover {
  transform: translateY(-1px);
}
figure figcaption {
  padding: 10px 12px;
  border-top: 1px solid #edf1f6;
  color: #647089;
  font-size: 12px;
}
.scene {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #edf1f6;
  border-radius: 6px;
  background: #fcfdff;
}
.scene h3 {
  margin-bottom: 8px;
  font-size: 18px;
}
.scene .prompt {
  margin: 12px 0;
  padding: 12px 14px;
  border-left: 3px solid var(--blue);
  background: #f7faff;
  color: #22314b;
  font-size: 14px;
}
.preview-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 20, 33, 0.78);
  z-index: 1000;
}
.preview-overlay.is-open {
  display: flex;
}
.preview-dialog {
  width: min(1120px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 64px rgba(10, 16, 28, 0.34);
}
.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid #edf1f6;
}
.preview-toolbar strong {
  color: var(--ink);
  font-size: 14px;
}
.preview-close {
  min-width: 34px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  background: #f4f7fc;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.preview-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  overflow: auto;
  background: #f7faff;
}
.preview-body img {
  width: auto;
  max-width: 100%;
  max-height: calc(92vh - 90px);
  height: auto;
  object-fit: contain;
  cursor: default;
  transform: none !important;
  box-shadow: none;
}

@media (max-width: 980px) {
  .hero-grid,
  .layout,
  .gallery.cols-3,
  .gallery.cols-2,
  .install-methods {
    grid-template-columns: 1fr;
  }
  .toc {
    position: static;
  }
  figure img {
    height: 220px;
  }
}

@media (max-width: 560px) {
  .hero-inner,
  .layout {
    width: min(100% - 24px, 560px);
  }
  .hero-main h1 {
    font-size: 28px;
  }
  .article-section {
    padding: 22px 18px;
  }
  .preview-overlay {
    padding: 12px;
  }
}
