:root {
  color-scheme: light;
  --canvas: #f4f7fa;
  --paper: #ffffff;
  --ink: #0e172b;
  --muted: #62758e;
  --line: #ced6e0;
  --blue: #004fff;
  --grid: rgb(98 117 142 / 0.068);
  --orbit: rgb(0 79 255 / 0.065);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  font-family:
    "Alibaba PuHuiTi 3.0",
    "Alibaba PuHuiTi",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--canvas);
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

a {
  text-decoration: none;
}

.page-shell {
  min-height: 100svh;
}

.site-header {
  height: 72px;
  background: var(--paper);
}

.header-inner {
  display: flex;
  width: min(100% - 48px, 1200px);
  height: 100%;
  align-items: center;
  justify-content: space-between;
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.brand img {
  display: block;
  width: 32px;
  height: 32px;
}

.header-features {
  display: flex;
  gap: 32px;
  align-items: center;
  margin-left: auto;
  margin-right: 32px;
}

.header-features span,
.header-status {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.header-features span {
  gap: 8px;
}

.header-features i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgb(0 79 255 / 0.07);
}

.header-features span:nth-child(2) i {
  background: #28b987;
  box-shadow: 0 0 0 4px rgb(40 185 135 / 0.08);
}

.header-features span:nth-child(3) i {
  background: #e6ae22;
  box-shadow: 0 0 0 4px rgb(230 174 34 / 0.09);
}

.header-status {
  gap: 9px;
  padding-left: 0;
  font-size: 11px;
}

.header-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e34c5b;
  box-shadow: 0 0 0 4px rgb(227 76 91 / 0.08);
}

.hero {
  position: relative;
  isolation: isolate;
  height: calc(100svh - 72px);
  overflow: hidden;
  background: var(--canvas);
}

.hero::before,
.hero::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.hero::before {
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 17%, #000 82%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 17%, #000 82%, transparent);
  opacity: 0.72;
}

.hero::after {
  top: 50%;
  left: 68%;
  z-index: -1;
  width: min(57vw, 760px);
  aspect-ratio: 1;
  border: 1px solid var(--orbit);
  border-radius: 50%;
  box-shadow:
    0 0 0 112px rgb(0 79 255 / 0.014),
    0 0 0 224px rgb(0 79 255 / 0.009);
  transform: translate(-50%, -50%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100% - 48px, 1200px);
  height: 100%;
  grid-template-columns: 520px 522px;
  align-items: center;
  justify-content: space-between;
  margin-inline: auto;
}

.hero-copy {
  display: flex;
  width: 520px;
  flex-direction: column;
  align-items: flex-start;
  transform: translateY(-32px);
}

h1 {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.045em;
}

h1 strong {
  font-size: 64px;
  font-weight: 700;
  line-height: 1.08;
}

h1 span {
  font-size: 48px;
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.lead {
  width: 500px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
  text-align: justify;
  text-align-last: left;
}

.actions {
  display: flex;
  width: 312px;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
  margin-top: 48px;
}

.primary-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.action {
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition:
    transform 220ms var(--ease),
    border-color 220ms var(--ease),
    box-shadow 220ms var(--ease),
    background-color 220ms var(--ease);
}

.action:hover:not(:disabled) {
  transform: translateY(-3px);
}

.action:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
}

.action:focus-visible {
  outline: 3px solid rgb(0 79 255 / 0.25);
  outline-offset: 4px;
}

.action-primary {
  width: 240px;
  color: var(--paper);
  background: var(--ink);
  box-shadow: 0 14px 28px rgb(14 23 43 / 0.12);
  font-weight: 500;
}

.action-primary:hover:not(:disabled) {
  background: #17233b;
  box-shadow: 0 18px 36px rgb(14 23 43 / 0.16);
}

.action-vote {
  width: 312px;
  border-color: var(--ink);
  background: var(--paper);
}

.action-vote:hover:not(:disabled),
.action-vote.is-voted {
  border-color: var(--blue);
  background: #f9fbff;
}

.action:disabled {
  cursor: wait;
  opacity: 0.64;
}

.action-start,
.vote-meta {
  display: inline-flex;
  align-items: center;
}

.action-start {
  gap: 12px;
  white-space: nowrap;
}

.action-start img,
.download-icon {
  display: block;
  width: 24px;
  height: 24px;
}

.vote-meta {
  gap: 12px;
  justify-content: flex-end;
  min-width: 81px;
}

.vote-meta i {
  display: block;
  width: 1px;
  height: 24px;
  background: var(--line);
}

.vote-count {
  min-width: 5ch;
  color: var(--blue);
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.qr-control {
  position: relative;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
}

.qr-trigger {
  display: grid;
  width: 56px;
  height: 56px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 12px;
  cursor: pointer;
  background: var(--paper);
  box-shadow: 0 10px 24px rgb(14 23 43 / 0.045);
  transition:
    transform 220ms var(--ease),
    border-color 220ms var(--ease),
    box-shadow 220ms var(--ease),
    background-color 220ms var(--ease);
}

.qr-trigger img {
  display: block;
  width: 32px;
  height: 32px;
}

.qr-trigger:hover:not(:disabled),
.qr-control.is-open .qr-trigger {
  border-color: var(--blue);
  background: #f9fbff;
  box-shadow: 0 14px 28px rgb(14 23 43 / 0.08);
  transform: translateY(-3px);
}

.qr-trigger:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
}

.qr-trigger:focus-visible {
  outline: 3px solid rgb(0 79 255 / 0.25);
  outline-offset: 4px;
}

.qr-trigger:disabled {
  cursor: wait;
  opacity: 0.5;
}

.download-qr {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  z-index: 12;
  display: flex;
  width: 180px;
  height: 200px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 9px;
  border: 1px solid rgb(222 227 234 / 0.9);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 44px rgb(14 23 43 / 0.13);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.98);
  transform-origin: bottom right;
  visibility: hidden;
  transition:
    opacity 180ms ease,
    transform 220ms var(--ease),
    visibility 180ms ease;
}

.download-qr::before {
  content: none;
}

.download-qr[hidden] {
  display: none;
}

.qr-control:hover .download-qr,
.qr-trigger:focus-visible + .download-qr,
.qr-control.is-open .download-qr {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.qr-frame {
  display: grid;
  width: 150px;
  height: 150px;
  flex: 0 0 150px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
}

.qr-frame img {
  display: block;
  width: 150px;
  height: 150px;
  image-rendering: pixelated;
}

.qr-copy {
  display: block;
  color: var(--muted);
  line-height: 1.4;
  text-align: center;
}

.qr-copy strong {
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
}

.product-visual {
  position: relative;
  width: 522px;
  height: min(600px, calc(100svh - 104px));
  margin: 0;
  filter: drop-shadow(0 4px 2px rgb(0 0 0 / 0.18));
}

.product-visual > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  z-index: 20;
  max-width: calc(100% - 32px);
  padding: 11px 16px;
  border-radius: 999px;
  color: var(--paper);
  background: var(--ink);
  box-shadow: 0 14px 34px rgb(14 23 43 / 0.18);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity 220ms ease,
    transform 220ms var(--ease);
}

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

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * {
    opacity: 0;
    animation: copy-in 720ms var(--ease) forwards;
  }

  .hero-copy > :nth-child(2) {
    animation-delay: 90ms;
  }

  .hero-copy > :nth-child(3) {
    animation-delay: 180ms;
  }

  .product-visual {
    animation: phones-in 920ms 100ms var(--ease) both;
  }

  .heart-pop {
    animation: heart-pop 520ms var(--ease);
  }

  @keyframes copy-in {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes phones-in {
    from {
      opacity: 0;
      transform: translate3d(28px, 34px, 0) scale(0.98);
    }
    to {
      opacity: 1;
      transform: translate3d(0, 0, 0) scale(1);
    }
  }

  @keyframes heart-pop {
    0%,
    100% {
      transform: scale(1);
    }
    45% {
      transform: scale(1.45) rotate(-8deg);
    }
  }
}

@media (max-width: 1120px) {
  .header-features {
    gap: 22px;
    margin-right: 22px;
  }

  .hero-inner {
    grid-template-columns: minmax(420px, 520px) minmax(400px, 480px);
    gap: 28px;
  }

  .hero-copy {
    width: 100%;
  }

  h1 strong {
    font-size: 56px;
  }

  h1 span {
    font-size: 40px;
  }

  .lead {
    width: min(100%, 500px);
  }

  .actions {
    width: 312px;
  }

  .product-visual {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .site-header {
    height: 62px;
  }

  .header-inner,
  .hero-inner {
    width: calc(100% - 32px);
  }

  .header-features {
    display: none;
  }

  .header-status {
    padding-left: 0;
    border-left: 0;
  }

  .hero {
    height: calc(100svh - 62px);
  }

  .hero::before {
    background-size: 40px 40px;
    opacity: 0.48;
  }

  .hero::after {
    top: 70%;
    left: 68%;
    width: 130vw;
    box-shadow:
      0 0 0 72px rgb(0 79 255 / 0.022),
      0 0 0 144px rgb(0 79 255 / 0.016);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    gap: 0;
    align-items: start;
  }

  .hero-copy {
    width: 100%;
    padding-top: clamp(24px, 4svh, 38px);
    transform: none;
  }

  h1 {
    gap: 5px;
  }

  h1 strong {
    font-size: clamp(39px, 11vw, 48px);
  }

  h1 span {
    font-size: clamp(23px, 6.5vw, 30px);
    white-space: normal;
  }

  .lead {
    width: 100%;
    margin-top: 15px;
    font-size: 12px;
    line-height: 1.6;
  }

  .actions {
    gap: 8px;
    margin-top: 19px;
  }

  .primary-actions {
    gap: 8px;
  }

  .action {
    min-height: 50px;
    padding: 12px;
    font-size: 12px;
  }

  .action-primary {
    width: 240px;
  }

  .action-vote {
    width: 312px;
  }

  .qr-control,
  .qr-trigger {
    width: 50px;
    height: 50px;
  }

  .qr-control {
    flex-basis: 50px;
  }

  .download-qr {
    top: auto;
    right: 0;
    bottom: calc(100% + 10px);
    left: auto;
    width: 180px;
    transform: translateY(8px) scale(0.98);
  }

  .download-qr::before {
    content: none;
  }

  .qr-control:hover .download-qr,
  .qr-trigger:focus-visible + .download-qr,
  .qr-control.is-open .download-qr {
    transform: translateY(0) scale(1);
  }

  .action-start {
    gap: 7px;
  }

  .action-start img,
  .download-icon {
    width: 20px;
    height: 20px;
  }

  .download-icon {
    display: none;
  }

  .vote-meta {
    min-width: auto;
    gap: 8px;
  }

  .vote-meta i {
    height: 20px;
  }

  .vote-count {
    min-width: 2ch;
    font-size: 12px;
  }

  .product-visual {
    align-self: start;
    justify-self: center;
    width: min(92vw, 440px);
    height: auto;
    aspect-ratio: 522 / 600;
    margin-top: clamp(22px, 5svh, 42px);
  }
}

@media (max-width: 390px), (max-height: 650px) {
  .site-header {
    height: 56px;
  }

  .header-inner,
  .hero-inner {
    width: calc(100% - 24px);
  }

  .brand {
    gap: 9px;
    font-size: 14px;
  }

  .brand img {
    width: 28px;
    height: 28px;
  }

  .header-status {
    display: none;
  }

  .hero {
    height: calc(100svh - 56px);
  }

  .hero-copy {
    padding-top: 18px;
  }

  h1 strong {
    font-size: clamp(34px, 10.5vw, 41px);
  }

  h1 span {
    font-size: clamp(20px, 6vw, 23px);
  }

  .lead {
    margin-top: 11px;
    font-size: 10.5px;
    line-height: 1.5;
  }

  .actions {
    width: 100%;
    margin-top: 13px;
  }

  .primary-actions {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 46px;
  }

  .action {
    min-height: 46px;
    padding: 10px;
    font-size: 10.5px;
  }

  .action-primary,
  .action-vote {
    width: 100%;
  }

  .qr-control,
  .qr-trigger {
    width: 46px;
    height: 46px;
  }

  .qr-control {
    flex-basis: 46px;
  }

  .action-start img {
    width: 18px;
    height: 18px;
  }

  .product-visual {
    width: min(92vw, 360px);
    margin-top: 18px;
  }
}

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