:root {
  color-scheme: light;
  --ink: #15191f;
  --muted: #667085;
  --line: #d9e0e8;
  --surface: #ffffff;
  --surface-soft: #f5f7fa;
  --page: #edf1f5;
  --blue: #2563eb;
  --blue-dark: #174bb6;
  --teal: #0f766e;
  --amber: #f59e0b;
  --shadow: 0 20px 60px rgba(22, 32, 45, 0.1);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--page);
  letter-spacing: 0;
}

button,
a {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.32);
  outline-offset: 3px;
}

.page-surface {
  width: min(1120px, calc(100% - 40px));
  margin: 32px auto;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(214, 222, 232, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.site-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 36px 40px 26px;
  border-bottom: 1px solid var(--line);
}

.brand-logo {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(54, 36, 132, 0.18);
}

.brand-copy {
  min-width: 0;
}

.brand-name,
.eyebrow {
  margin: 0 0 4px;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.brand-copy h1 {
  margin: 0;
  font-size: 40px;
  line-height: 1.12;
}

.brand-copy > p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.system-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 24px 40px 0;
  padding: 14px 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.field-label {
  display: block;
  margin-bottom: 1px;
  color: var(--muted);
  font-size: 12px;
}

.system-bar strong {
  font-size: 18px;
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 196px;
  padding: 3px;
  background: #e6ebf2;
  border-radius: 6px;
}

.segment {
  min-height: 40px;
  padding: 0 14px;
  color: #4b5565;
  font-weight: 750;
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.segment.active {
  color: #ffffff;
  background: var(--ink);
  box-shadow: 0 2px 8px rgba(21, 25, 31, 0.2);
}

.install-tool {
  margin: 18px 40px 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.install-tool h2,
.store-band h2,
.guide-section h2,
.support-section h2 {
  margin: 0;
  font-size: 27px;
  line-height: 1.25;
}

.section-intro {
  max-width: 760px;
  margin: 10px 0 24px;
  color: var(--muted);
  line-height: 1.75;
}

.package-status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 2px;
  color: #5d6776;
  border-top: 1px solid var(--line);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--amber);
  border-radius: 50%;
}

.primary-action,
.secondary-action,
.store-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

.primary-action {
  width: 100%;
  color: #ffffff;
  background: var(--blue);
  border: 1px solid var(--blue);
  cursor: pointer;
}

.primary-action:not(:disabled):hover {
  background: var(--blue-dark);
}

.primary-action:disabled,
.secondary-action:disabled {
  color: #7a8494;
  background: #e7ebf0;
  border-color: #d8dee7;
  cursor: not-allowed;
}

.install-note {
  display: flex;
  gap: 12px;
  margin: 18px 40px 0;
  padding: 16px 18px;
  background: #f3f7ff;
  border: 1px solid #cbd9f2;
  border-radius: 6px;
}

.note-marker {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 6px;
  background: var(--amber);
  border-radius: 50%;
}

.install-note p {
  margin: 6px 0 0;
  color: #526071;
  line-height: 1.55;
}

.store-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 24px;
  padding: 30px 40px;
  color: #ffffff;
  background: #153143;
  border-bottom: 5px solid var(--teal);
}

.store-band .eyebrow {
  color: #7dd3c7;
}

.store-band p:last-child {
  margin: 10px 0 0;
  color: #cbd7df;
}

.store-action {
  flex: 0 0 auto;
  padding: 0 18px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #ffffff;
}

.store-action:hover {
  color: var(--blue-dark);
  background: #f2f7ff;
}

.guide-section,
.support-section {
  padding: 34px 40px;
}

.guide-section {
  border-bottom: 1px solid var(--line);
}

.section-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.secondary-action {
  min-width: 134px;
  padding: 0 15px;
  color: var(--blue-dark);
  background: #ffffff;
  border: 1px solid #b9c8dd;
}

.steps-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.steps-list li {
  min-width: 0;
  min-height: 172px;
  padding: 17px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 27px;
  margin-bottom: 14px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 850;
  background: #dfe9ff;
  border-radius: 4px;
}

.steps-list strong {
  display: block;
  font-size: 17px;
}

.steps-list p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.support-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
  align-items: center;
  gap: 56px;
}

.support-copy > p:not(.eyebrow) {
  max-width: 520px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.wechat-id {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 12px 16px;
  background: var(--surface-soft);
  border-left: 4px solid var(--teal);
}

.wechat-id span {
  color: var(--muted);
  font-size: 13px;
}

.wechat-id strong {
  font-size: 20px;
}

.qr-figure {
  margin: 0;
  padding: 10px 10px 12px;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.qr-button {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border: 0;
  border-radius: 4px;
  cursor: zoom-in;
}

.qr-button img {
  display: block;
  width: 100%;
  height: auto;
}

.qr-figure figcaption {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 40px;
  color: #7b8491;
  font-size: 13px;
  background: #f7f8fa;
  border-top: 1px solid var(--line);
}

.qr-dialog {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 12px;
  overflow: auto;
  background: #ffffff;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.qr-dialog::backdrop {
  background: rgba(15, 23, 32, 0.72);
}

.qr-dialog img {
  display: block;
  width: 100%;
  height: auto;
}

.dialog-close {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 0 -40px auto;
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  background: rgba(21, 25, 31, 0.82);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

@media (max-width: 820px) {
  .page-surface {
    width: min(100% - 24px, 720px);
    margin: 12px auto;
  }

  .site-header,
  .guide-section,
  .support-section {
    padding-right: 24px;
    padding-left: 24px;
  }

  .system-bar,
  .install-tool,
  .install-note {
    margin-right: 24px;
    margin-left: 24px;
  }

  .store-band {
    align-items: flex-start;
    padding-right: 24px;
    padding-left: 24px;
  }

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

  .support-section {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 28px;
  }
}

@media (max-width: 620px) {
  .page-surface {
    width: 100%;
    margin: 0;
    border-width: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .site-header {
    align-items: flex-start;
    gap: 14px;
    padding-top: 24px;
  }

  .brand-logo {
    width: 54px;
    height: 54px;
  }

  .brand-copy h1 {
    font-size: 26px;
  }

  .brand-copy > p:last-child {
    font-size: 14px;
  }

  .system-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control {
    width: 100%;
  }

  .install-tool {
    padding: 22px 18px;
  }

  .install-tool h2,
  .store-band h2,
  .guide-section h2,
  .support-section h2 {
    font-size: 23px;
  }

  .store-band,
  .section-heading-row {
    align-items: stretch;
    flex-direction: column;
  }

  .store-action,
  .secondary-action {
    width: 100%;
  }

  .steps-list {
    grid-template-columns: 1fr;
  }

  .steps-list li {
    min-height: 0;
  }

  .support-section {
    grid-template-columns: 1fr;
  }

  .qr-figure {
    width: min(100%, 360px);
    margin: 0 auto;
  }

  .site-footer {
    flex-direction: column;
    gap: 5px;
    padding-right: 24px;
    padding-left: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
