:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-soft: #eef5f2;
  --ink: #18211f;
  --muted: #5d6a66;
  --line: #dce5df;
  --teal: #0f766e;
  --teal-strong: #0b5f59;
  --blue: #1d4ed8;
  --amber: #b7791f;
  --code-bg: #111827;
  --code-ink: #ecfdf5;
  --shadow: 0 18px 42px rgba(30, 42, 38, 0.1);
  --radius: 8px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans SC",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

a {
  color: var(--teal-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

code,
pre {
  font-family:
    "Cascadia Code",
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  background: #fbfcfa;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 54px 0 34px;
  text-align: center;
}

.eyebrow,
.section-label {
  margin: 0 0 8px;
  color: var(--teal-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 850px;
  margin: 0 auto;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.intro {
  max-width: 780px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.purchase-actions {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.purchase-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 6px;
  background: var(--teal);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.18);
  transition:
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.purchase-button:hover,
.purchase-button:focus-visible {
  background: var(--teal-strong);
  box-shadow: 0 12px 28px rgba(11, 95, 89, 0.22);
  outline: 0;
}

.tabs {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  margin-top: 28px;
  padding: 6px;
  background: #e8eee9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tab-button {
  min-width: 180px;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #33413e;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.tab-button:hover,
.tab-button:focus-visible {
  background: rgba(255, 255, 255, 0.72);
  outline: 0;
}

.tab-button.is-active {
  background: var(--surface);
  color: var(--teal-strong);
  box-shadow: 0 4px 16px rgba(30, 42, 38, 0.1);
}

.page-shell {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 28px 0 46px;
}

.prep-band,
.tutorial-panel,
.deploy-band {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.prep-band {
  display: grid;
  grid-template-columns: minmax(230px, 0.7fr) minmax(0, 1.4fr);
  gap: 24px;
  align-items: start;
  padding: 28px;
}

.prep-band h2,
.section-heading h2,
.panel-head h2,
.quick-card h2,
.deploy-band h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.25;
  letter-spacing: 0;
}

.prep-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.prep-item,
.deploy-item,
.faq-item,
.code-card,
.screenshot-card,
.step-item,
.method-card,
.quick-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.prep-item {
  padding: 18px;
}

.prep-index {
  color: var(--amber);
  font-weight: 900;
}

.prep-item h3,
.deploy-item h3,
.faq-item h3,
.screenshot-card h3,
.code-card h3,
.step-item h3 {
  margin: 6px 0 6px;
  font-size: 1.02rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.prep-item p,
.deploy-item p,
.faq-item p,
.screenshot-card p,
.step-item p,
.panel-head p,
.quick-card li {
  margin: 0;
  color: var(--muted);
}

.tutorial-panel {
  margin-top: 24px;
  padding: 28px;
}

.panel-head {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: start;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.panel-head > div {
  max-width: 780px;
}

.panel-head p:last-child {
  margin-top: 10px;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 6px;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.primary-link:hover,
.primary-link:focus-visible {
  background: var(--teal-strong);
  outline: 0;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.82fr);
  gap: 22px;
  margin-top: 24px;
  align-items: start;
}

.section-heading {
  margin-bottom: 16px;
}

.steps {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: steps;
}

.step-item {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  counter-increment: steps;
}

.step-item::before {
  content: counter(steps, decimal-leading-zero);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--teal-strong);
  font-weight: 900;
}

.step-item ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.quick-card {
  position: sticky;
  top: 18px;
  padding: 20px;
  background: #fbfcfa;
}

.quick-card ul {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}

.quick-card li {
  position: relative;
  padding-left: 24px;
}

.quick-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
}

.section-block,
.deploy-band {
  margin-top: 28px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.method-card {
  padding: 18px;
  background: #fbfcfa;
}

.method-head {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 8px;
  min-width: 0;
}

.method-card h3 {
  min-width: 0;
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.method-tag {
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--teal-strong);
  font-size: 0.78rem;
  font-weight: 900;
}

.method-card p {
  margin: 0;
  color: var(--muted);
}

.method-card ul {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.screenshot-card {
  overflow: hidden;
  background: #fbfcfa;
}

.screenshot-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 190px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(29, 78, 216, 0.06) 1px, transparent 1px),
    #f4f7f5;
  background-size: 20px 20px;
  cursor: zoom-in;
}

.screenshot-preview img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.screenshot-placeholder {
  display: none;
  padding: 24px;
  text-align: center;
}

.placeholder-title {
  display: block;
  color: var(--teal-strong);
  font-weight: 900;
}

.placeholder-path {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.screenshot-card.is-missing .screenshot-preview {
  cursor: default;
}

.screenshot-card.is-missing img {
  display: none;
}

.screenshot-card.is-missing .screenshot-placeholder {
  display: block;
}

.screenshot-body {
  padding: 16px;
}

.screenshot-body p {
  font-size: 0.95rem;
}

.code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.code-card {
  overflow: hidden;
  background: var(--code-bg);
  color: var(--code-ink);
}

.code-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  min-height: 54px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.code-card h3 {
  min-width: 0;
  margin: 0;
  color: #f8fafc;
}

.copy-button,
.lightbox-close {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

.copy-button:hover,
.copy-button:focus-visible,
.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  outline: 0;
}

.copy-button svg,
.lightbox-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.copy-button.is-copied {
  border-color: rgba(52, 211, 153, 0.8);
  color: #a7f3d0;
}

.code-card pre {
  margin: 0;
  padding: 16px;
  max-width: 100%;
  overflow-x: auto;
  font-size: 0.92rem;
  line-height: 1.58;
}

.code-card p {
  margin: 0;
  padding: 0 16px 16px;
  color: #cbd5e1;
  font-size: 0.92rem;
}

.method-code {
  margin-top: 14px;
  border-radius: 6px;
  font-size: 0.88rem;
}

.method-code .code-toolbar {
  min-height: 44px;
  padding: 8px 12px;
}

.method-code pre {
  padding: 12px;
  font-size: 0.86rem;
  line-height: 1.5;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 30;
  transform: translateX(-50%) translateY(12px);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  font-size: 0.9rem;
  letter-spacing: 0;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast[data-kind="error"] {
  background: rgba(190, 18, 60, 0.95);
}

.faq-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.faq-item {
  padding: 18px;
}

.deploy-band,
.support-band {
  padding: 28px;
}

.deploy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.deploy-item {
  padding: 18px;
}

.deploy-item pre {
  margin: 8px 0 0;
  padding: 12px;
  overflow-x: auto;
  border-radius: 6px;
  background: #f3f6f5;
  color: #263330;
  font-size: 0.85rem;
}

.support-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 24px;
  align-items: center;
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.support-copy h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.25;
  letter-spacing: 0;
}

.support-qr {
  margin: 0;
  text-align: center;
}

.support-qr img {
  display: block;
  width: 190px;
  max-width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.support-qr figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 0 0 36px;
  color: var(--muted);
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.82);
}

.lightbox[hidden] {
  display: none;
}

.lightbox figure {
  width: min(100%, 1040px);
  margin: 0;
}

.lightbox img {
  display: block;
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius);
  background: #fff;
}

.lightbox figcaption {
  margin-top: 10px;
  color: #f8fafc;
  text-align: center;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
}

@media (max-width: 980px) {
  .prep-band,
  .content-grid,
  .deploy-grid,
  .support-band {
    grid-template-columns: 1fr;
  }

  .prep-list,
  .screenshot-grid,
  .method-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-card {
    position: static;
  }
}

@media (max-width: 720px) {
  .header-inner {
    width: min(100% - 24px, var(--container));
    padding: 36px 0 24px;
  }

  .page-shell,
  .site-footer {
    width: min(100% - 24px, var(--container));
  }

  .tabs {
    width: 100%;
  }

  .tab-button {
    min-width: 0;
    padding: 0 10px;
    font-size: 0.92rem;
  }

  .prep-band,
  .tutorial-panel,
  .deploy-band,
  .support-band {
    padding: 18px;
  }

  .prep-list,
  .screenshot-grid,
  .method-grid,
  .code-grid,
  .faq-list {
    grid-template-columns: 1fr;
  }

  .panel-head {
    display: block;
  }

  .primary-link {
    width: 100%;
    margin-top: 18px;
  }

  .step-item {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }

  .step-item::before {
    width: 36px;
    height: 36px;
    font-size: 0.82rem;
  }
}
