:root {
  color-scheme: light;
  --brand: #d72f53;
  --brand-dark: #ae203f;
  --blue: #2563eb;
  --green: #0f8f7a;
  --amber: #b7791f;
  --ink: #172033;
  --muted: #667085;
  --line: #e5e7eb;
  --soft: #f7f8fb;
  --panel: #ffffff;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--soft);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

button {
  font: inherit;
}

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

img {
  display: block;
  max-width: 100%;
}

.download-page {
  width: min(1120px, calc(100% - 24px));
  margin: 0 auto;
  padding: 14px 0 56px;
}

.download-hero,
.channel-section,
.promo-section,
.qr-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.download-hero {
  min-height: 470px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 26px;
  align-items: center;
  padding: 38px;
  overflow: hidden;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.92) 48%, rgba(255,255,255,0.68) 100%),
    url("../assets/promo/compressed_image_2.jpg");
  background-size: cover, 360px auto;
  background-position: center, right 38px center;
  background-repeat: no-repeat;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 28px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-radius: 8px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 800;
}

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

.hero-copy h1 {
  margin-bottom: 12px;
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: 0;
}

.lead {
  max-width: 540px;
  color: #334155;
  font-size: 19px;
}

.top-download-qr {
  width: min(460px, 100%);
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 22px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.1);
}

.top-download-qr img {
  width: 132px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.top-download-qr span,
.top-download-qr strong,
.top-download-qr p {
  display: block;
}

.top-download-qr span {
  width: fit-content;
  margin-bottom: 6px;
  padding: 3px 8px;
  color: var(--brand);
  background: #fff0f4;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.top-download-qr strong {
  color: var(--ink);
  font-size: 19px;
  line-height: 1.28;
}

.top-download-qr p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.matched-line strong,
.market-button,
.qr-card,
.carousel-btn,
.promo-dots button {
  border-radius: 8px;
}

.primary-action svg,
.secondary-action svg,
.link-button svg,
.market-button svg,
.carousel-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.download-card {
  position: relative;
  z-index: 1;
  padding: 26px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.1);
}

.matched-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.matched-line strong {
  color: var(--brand);
  background: #fff0f4;
  padding: 5px 9px;
}

.target-message {
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: background 0.18s ease, border-color 0.18s ease, padding 0.18s ease;
}

.target-message.attention {
  padding: 12px 14px;
  background: #fff7e6;
  border-color: #ffe0a3;
}

.target-message.attention h2,
.target-message.attention p {
  color: #8a4b00;
}

.download-card h2 {
  margin-bottom: 10px;
  font-size: 26px;
  line-height: 1.25;
}

.download-card p {
  color: var(--muted);
}

.wechat-tip {
  margin: 16px 0 0;
  padding: 12px 14px;
  color: #8a4b00;
  background: #fff7e6;
  border: 1px solid #ffe0a3;
  border-radius: 8px;
}

.action-stack {
  display: grid;
  grid-template-columns: 1fr 132px;
  gap: 12px;
  margin-top: 20px;
}

.action-stack.three-actions {
  grid-template-columns: 1fr;
  gap: 10px;
}

.primary-action,
.secondary-action,
.link-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.primary-action {
  color: #fff;
  background: var(--brand);
  border: 0;
  box-shadow: 0 14px 28px rgba(215, 47, 83, 0.22);
}

.secondary-action,
.link-button {
  color: var(--brand);
  background: #fff0f4;
  border: 1px solid #ffd4de;
}

.primary-action:hover,
.secondary-action:hover,
.link-button:hover,
.carousel-btn:hover {
  transform: translateY(-1px);
}

.auto-text {
  margin: 12px 0 0;
  font-size: 13px;
}

.channel-section,
.promo-section,
.qr-section {
  margin-top: 14px;
  padding: 24px;
}

.section-title {
  margin-bottom: 14px;
}

.section-title h2,
.qr-section h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
}

.section-note {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.market-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.market-button {
  min-height: 74px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 14px;
  color: var(--ink);
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
}

.market-button svg {
  color: var(--brand);
}

.market-button strong,
.market-button span {
  display: block;
}

.market-button strong {
  font-size: 15px;
}

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

.market-button.recommended {
  border-color: var(--brand);
  background: #fff8fa;
  box-shadow: 0 12px 24px rgba(215, 47, 83, 0.1);
}

.promo-carousel {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  gap: 12px;
  align-items: center;
}

.promo-frame {
  overflow: hidden;
}

.promo-track {
  display: flex;
  gap: 14px;
  transition: transform 0.38s ease;
}

.promo-track img {
  flex: 0 0 calc((100% - 28px) / 3);
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.carousel-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
}

.promo-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.promo-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  background: #d1d5db;
  cursor: pointer;
}

.promo-dots button.active {
  width: 26px;
  background: var(--brand);
}

.qr-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 24px;
  align-items: center;
}

#pageUrl {
  color: var(--muted);
  word-break: break-all;
}

.qr-card {
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  text-align: center;
}

.qr-card img {
  width: 180px;
  margin: 0 auto 12px;
}

.link-button {
  width: 100%;
  min-height: 42px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 980px) {
  .download-page {
    width: min(100% - 18px, 1120px);
    padding-top: 8px;
  }

  .download-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 16px;
    padding: 20px;
    background-image:
      linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.92) 62%, rgba(255,255,255,0.66) 100%),
      url("../assets/promo/compressed_image_2.jpg");
    background-size: cover, min(280px, 70vw) auto;
    background-position: center, right -48px bottom -10px;
  }

  .brand {
    margin-bottom: 24px;
  }

  .hero-copy h1 {
    font-size: 36px;
  }

  .lead {
    font-size: 18px;
  }

  .top-download-qr {
    grid-template-columns: 118px minmax(0, 1fr);
    width: 100%;
  }

  .top-download-qr img {
    width: 118px;
  }

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

  .promo-track img {
    flex-basis: calc((100% - 14px) / 2);
  }
}

@media (max-width: 640px) {
  .download-page {
    width: min(100% - 16px, 1120px);
    padding-bottom: 38px;
  }

  .download-hero,
  .channel-section,
  .promo-section,
  .qr-section {
    padding: 16px;
  }

  .brand {
    margin-bottom: 18px;
    font-size: 18px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .hero-copy h1 {
    font-size: 31px;
  }

  .lead {
    font-size: 15px;
  }

  .top-download-qr {
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 10px;
    margin-top: 14px;
    padding: 10px;
  }

  .top-download-qr img {
    width: 108px;
    padding: 6px;
  }

  .top-download-qr span {
    margin-bottom: 4px;
    font-size: 11px;
  }

  .top-download-qr strong {
    font-size: 16px;
  }

  .top-download-qr p {
    margin-top: 4px;
    font-size: 12px;
  }

  .download-card {
    padding: 16px;
  }

  .download-card h2,
  .section-title h2,
  .qr-section h2 {
    font-size: 22px;
  }

  .action-stack,
  .market-list,
  .qr-section {
    grid-template-columns: 1fr;
  }

  .wechat-tip {
    margin-top: 12px;
    padding: 10px 12px;
    font-size: 14px;
  }

  .target-message.attention {
    padding: 10px 12px;
  }

  .primary-action,
  .secondary-action,
  .link-button {
    min-height: 46px;
  }

  .promo-carousel {
    grid-template-columns: 1fr;
  }

  .carousel-btn {
    display: none;
  }

  .promo-frame {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }

  .promo-track {
    transform: none !important;
  }

  .promo-track img {
    flex: 0 0 76%;
    scroll-snap-align: center;
  }

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