:root {
  color-scheme: light;
  --ink: #151b19;
  --muted: #66736d;
  --line: #dfe6e2;
  --paper: #f7f8f5;
  --panel: #ffffff;
  --green: #0f8a5f;
  --green-dark: #0a5f45;
  --mint: #e5f6ee;
  --blue: #2d6cdf;
  --blue-soft: #e8f0ff;
  --coral: #e35d4f;
  --amber: #f3c34e;
  --shadow: 0 22px 70px rgba(23, 32, 27, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #ffffff 0%, var(--paper) 420px),
    var(--paper);
  color: var(--ink);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 13px clamp(16px, 4vw, 58px);
  border-bottom: 1px solid rgba(21, 27, 25, 0.08);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand .mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--ink), var(--green-dark));
  color: white;
  font-weight: 900;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
}

nav {
  display: flex;
  justify-content: center;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

.nav-cta {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 15px;
  background: var(--ink);
  color: white;
  font-weight: 800;
  font-size: 14px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.93fr) minmax(360px, 1.07fr);
  gap: clamp(28px, 5vw, 72px);
  min-height: calc(100svh - 66px);
  padding: clamp(38px, 6vw, 78px) clamp(16px, 4vw, 58px) 34px;
}

.hero-copy {
  align-self: center;
  max-width: 740px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(42px, 6.2vw, 76px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(26px, 3.6vw, 42px);
  line-height: 1.1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
  letter-spacing: 0;
}

.lead {
  max-width: 650px;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  background: white;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.button.primary {
  border-color: var(--green);
  background: var(--green);
  color: white;
  box-shadow: 0 12px 30px rgba(15, 138, 95, 0.24);
}

.button.pay {
  border-color: var(--coral);
  background: var(--coral);
  color: white;
}

.button.ghost {
  background: transparent;
}

.button.full {
  width: 100%;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.trust-strip span,
.spec-chips a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: white;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.hero-preview {
  position: relative;
  align-self: center;
}

.hero-preview img {
  display: block;
  width: 100%;
  border: 1px solid rgba(21, 27, 25, 0.08);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric-card {
  position: absolute;
  min-width: 144px;
  border: 1px solid rgba(21, 27, 25, 0.08);
  border-radius: 8px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 38px rgba(21, 27, 25, 0.12);
}

.metric-card.top {
  top: 8%;
  left: -4%;
}

.metric-card.bottom {
  right: -3%;
  bottom: 10%;
}

.metric-card span,
.metric-card strong {
  display: block;
}

.metric-card span {
  color: var(--muted);
  font-size: 12px;
}

.metric-card strong {
  font-size: 18px;
}

.popular,
.studio,
.workflow,
.spec-section,
.ops,
.faq {
  margin-inline: clamp(16px, 4vw, 58px);
}

.popular {
  padding: 18px 0 26px;
}

.section-title {
  max-width: 760px;
  margin-bottom: 18px;
}

.section-title.compact {
  max-width: 900px;
}

.spec-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.spec-chips a {
  min-height: 40px;
  color: var(--ink);
}

.spec-chips a:nth-child(3n + 1) {
  background: var(--mint);
  border-color: #bfe8d4;
}

.spec-chips a:nth-child(3n + 2) {
  background: var(--blue-soft);
  border-color: #c9d9fb;
}

.spec-chips a:nth-child(3n + 3) {
  background: #fff4d5;
  border-color: #f4d982;
}

.studio {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 20px;
  padding-block: 28px;
  border-top: 1px solid var(--line);
}

.studio-intro {
  grid-column: 1 / -1;
  max-width: 820px;
}

.studio-intro p:last-child {
  color: var(--muted);
}

.panel,
.workspace,
.feature-grid article,
.ops,
.faq details,
.step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.panel {
  padding: 18px;
}

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

.panel-heading h2 {
  font-size: 24px;
}

.upload-box {
  display: grid;
  gap: 7px;
  min-height: 132px;
  place-items: center;
  border: 1px dashed #9ab7a8;
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(180deg, #ecfbf4, #ffffff);
  text-align: center;
  cursor: pointer;
}

.upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-box span {
  font-weight: 900;
}

small,
.stats span,
.result-bar span,
.upload-box small,
.field label {
  color: var(--muted);
  font-size: 12px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.stats div,
.result-bar div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfa;
}

.stats strong,
.stats span,
.result-bar strong,
.result-bar span {
  display: block;
}

.ai-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcfa;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ai-status.ready {
  border-color: #bfe8d4;
  background: var(--mint);
  color: var(--green-dark);
}

.ai-status.pending {
  border-color: #f4d982;
  background: #fff8df;
  color: #8a6414;
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

select,
input[type="range"] {
  width: 100%;
}

select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: white;
  color: var(--ink);
}

input[type="range"] {
  accent-color: var(--green);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.swatch {
  height: 38px;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.swatch.active {
  border-color: var(--ink);
}

.workspace {
  display: grid;
  gap: 16px;
  min-height: 640px;
  padding: 0;
  overflow: hidden;
  background: #eef2f6;
}

.preview-board {
  display: grid;
  grid-template-columns: minmax(240px, 0.82fr) minmax(360px, 1.45fr);
  min-height: 560px;
}

.single-preview,
.layout-preview {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: clamp(18px, 3vw, 34px);
}

.single-preview {
  background: #ffffff;
}

.layout-preview {
  border-left: 1px solid #d9e0e7;
  background: #eef2f6;
}

.single-preview h3,
.layout-preview h3 {
  margin: 0;
  text-align: center;
  font-size: 22px;
}

.canvas-wrap {
  position: relative;
  display: grid;
  width: min(100%, 360px);
  margin: 0 auto;
  place-items: center;
}

canvas {
  width: min(100%, 330px);
  height: auto;
  border-radius: 8px;
  background: #d7e7f7;
  box-shadow: 0 16px 38px rgba(24, 35, 31, 0.14);
}

.guide {
  display: none;
}

.guide span {
  width: 34%;
  aspect-ratio: 1;
  border: 1px dashed rgba(255, 255, 255, 0.78);
  border-radius: 50%;
}

.guide i {
  position: absolute;
  bottom: 20%;
  width: 52%;
  height: 30%;
  border: 1px dashed rgba(255, 255, 255, 0.72);
  border-radius: 90px 90px 12px 12px;
}

.layout-canvas-wrap {
  display: grid;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: clamp(10px, 2vw, 18px);
  place-items: center;
  background: #ffffff;
}

#layoutCanvas {
  width: 100%;
  max-width: 720px;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.result-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 18px 18px;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding-block: 22px;
}

.step {
  padding: 20px;
}

.step span {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-weight: 900;
}

.step p,
.feature-grid p,
.ops li,
.faq p {
  color: var(--muted);
}

.spec-section,
.ops,
.faq {
  padding-block: 26px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.feature-grid article {
  padding: 18px;
}

.feature-grid article:nth-child(1) {
  border-top: 4px solid var(--green);
}

.feature-grid article:nth-child(2) {
  border-top: 4px solid var(--blue);
}

.feature-grid article:nth-child(3) {
  border-top: 4px solid var(--amber);
}

.feature-grid article:nth-child(4) {
  border-top: 4px solid var(--coral);
}

.ops {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
  padding: 22px;
}

.ops ul {
  margin: 0;
  padding-left: 20px;
}

.faq {
  display: grid;
  gap: 10px;
  padding-bottom: 54px;
}

.faq details {
  padding: 16px 18px;
}

.faq summary {
  cursor: pointer;
  font-weight: 900;
}

.faq p {
  margin: 10px 0 0;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 36px));
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.pay-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(21, 27, 25, 0.44);
}

.pay-modal.hidden {
  display: none;
}

.pay-dialog {
  position: relative;
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: white;
  box-shadow: var(--shadow);
}

.pay-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-size: 22px;
}

.pay-price {
  color: var(--muted);
}

.pay-box {
  display: grid;
  min-height: 140px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fbfcfa;
  text-align: center;
}

.pay-card-result {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.pay-card-result span {
  color: var(--muted);
  font-size: 14px;
}

.pay-qr {
  width: 210px;
  height: 210px;
  border-radius: 8px;
  background: white;
}

.pay-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 16px;
  background: var(--green);
  color: white;
  font-weight: 900;
}

.pay-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.pay-actions button[hidden] {
  display: none;
}

.pay-actions:has(button[hidden]) {
  grid-template-columns: 1fr;
}

.pay-status {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: auto auto;
  }

  nav {
    display: none;
  }

  .hero,
  .studio,
  .ops {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-preview {
    max-width: 760px;
  }

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

  .preview-board {
    grid-template-columns: 1fr;
  }

  .layout-preview {
    border-left: 0;
    border-top: 1px solid #d9e0e7;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding-inline: 12px;
  }

  .brand span {
    display: none;
  }

  .nav-cta {
    min-height: 36px;
    padding-inline: 12px;
  }

  h1 {
    font-size: 42px;
  }

  .hero {
    padding-inline: 12px;
  }

  .metric-card {
    position: static;
    margin-top: 10px;
  }

  .popular,
  .studio,
  .workflow,
  .spec-section,
  .ops,
  .faq {
    margin-inline: 12px;
  }

  .grid-2,
  .stats,
  .result-bar,
  .feature-grid,
  .workflow,
  .pay-actions {
    grid-template-columns: 1fr;
  }

  .single-preview,
  .layout-preview {
    padding: 16px 12px;
  }

  .single-preview h3,
  .layout-preview h3 {
    font-size: 20px;
  }

  .canvas-wrap {
    width: min(100%, 330px);
  }

  .layout-canvas-wrap {
    padding: 8px;
  }

  #createWechatPayBtn {
    display: none;
  }
}
