.download-page {
  --page-accent: var(--pjsk-leoneed);
  --page-accent-hover: var(--pjsk-leoneed-deep);
  background: linear-gradient(rgba(0,160,233,.08), rgba(0,160,233,.045)), var(--paper);
}

.download-page .header-cta {
  background: var(--pjsk-momojan);
  color: #17320c;
  box-shadow: 0 4px 16px rgba(136, 221, 68, .28);
}

.download-page .header-cta:hover { background: var(--pjsk-momojan-deep); color: #fff; }

.desktop-nav .is-current::after {
  transform: translateX(-50%) scale(1);
}

.download-hero {
  min-height: 820px;
  padding: 90px max(28px, calc((100vw - var(--max-width)) / 2)) 100px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  align-items: center;
  gap: 80px;
  overflow: hidden;
  background:
    linear-gradient(112deg, rgba(0, 160, 233, 0.14), transparent 42%),
    linear-gradient(320deg, rgba(136, 221, 68, 0.1), transparent 38%);
  border-bottom: 1px solid var(--line);
}

.download-kicker {
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.download-kicker span {
  width: 34px;
  height: 3px;
  background: var(--pjsk-leoneed);
}

.download-copy h1 {
  max-width: 760px;
  margin: 0;
  font-size: 68px;
  line-height: 1.08;
  letter-spacing: 0;
}

.download-copy > p {
  max-width: 650px;
  margin: 32px 0 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.75;
}

.download-actions {
  margin-top: 38px;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 18px;
}

.download-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.download-actions .android-beta-button {
  margin-top: 0;
}

.testflight-button {
  min-width: 288px;
  min-height: 68px;
  padding: 10px 18px 10px 12px;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  background: var(--pjsk-leoneed);
  color: var(--white);
  box-shadow: var(--shadow-md);
  font-size: 16px;
  font-weight: 760;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.testflight-button:hover {
  background: var(--pjsk-leoneed-deep);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.testflight-button small {
  display: block;
  color: rgba(255, 255, 255, 0.56);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.button-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 27px;
  font-weight: 800;
}

.testflight-button b {
  font-size: 20px;
}

.download-note {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 650;
}

/* 公测结束后的停用态：颜色由 JS 随机分配 L/n 团色/成员色 */
.testflight-button.is-ended,
.android-beta-button.is-ended {
  cursor: default;
  opacity: .55;
}

.testflight-button.is-ended:hover {
  background: var(--pjsk-leoneed);
  transform: none;
  box-shadow: var(--shadow-md);
}

.android-beta-button.is-ended:hover {
  background: var(--pjsk-momojan);
  border-color: var(--pjsk-momojan);
  color: #17320c;
  transform: none;
}

.android-beta-button.is-ended:hover small { color: rgba(23, 50, 12, .68); }

.release-note {
  max-width: 620px;
  margin-top: 22px;
  padding: 14px 18px;
  border-left: 3px solid var(--pjsk-virtual-singer);
  border-radius: 0 8px 8px 0;
  background: rgba(57, 197, 187, .1);
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.7;
}

.huawei-note {
  width: fit-content;
  max-width: 620px;
  margin-top: 14px;
  padding: 12px 18px 12px 12px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  background: var(--pjsk-leoneed);
  color: rgba(255, 255, 255, .88);
  box-shadow: var(--shadow-md);
  font-size: 12px;
  line-height: 1.7;
}

.huawei-note .button-mark { font-size: 22px; }

.huawei-note-body small {
  display: block;
  color: rgba(255, 255, 255, .56);
  font-size: 10px;
  font-weight: 700;
}

.huawei-note a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.beta-contact {
  max-width: 620px;
  margin-top: 28px;
  padding: 22px 0;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.beta-contact-qr {
  width: 112px;
  height: 112px;
  padding: 7px;
  background: var(--white);
  border: 1px solid var(--line);
}

.beta-contact-qr img {
  width: 100%;
  height: 100%;
}

.beta-contact-label {
  margin: 0;
  color: #147e77;
  font-size: 10px;
  font-weight: 850;
}

.beta-contact strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
}

.beta-contact > div > p:not(.beta-contact-label) {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

.beta-contact-link {
  margin-top: 9px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #147e77;
  font-size: 13px;
  font-weight: 800;
}

.beta-contact-link:hover {
  color: var(--ink);
}

.download-visual {
  position: relative;
  min-height: 580px;
  display: grid;
  place-items: center;
}

.download-device {
  width: min(286px, 72%);
  aspect-ratio: 0.49;
  padding: 9px;
  overflow: hidden;
  border: 1px solid rgba(13, 13, 18, 0.2);
  border-radius: 42px;
  background: #15151a;
  box-shadow: 0 42px 90px rgba(13, 13, 18, 0.22);
  transform: rotate(3deg);
}

.download-device img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 34px;
}

.version-ticket {
  position: absolute;
  right: 0;
  bottom: 58px;
  width: 190px;
  padding: 18px;
  display: grid;
  gap: 8px;
  background: var(--yellow);
  border: 1px solid rgba(13, 13, 18, 0.18);
  box-shadow: var(--shadow-md);
  transform: rotate(-5deg);
}

.version-ticket span,
.version-ticket b {
  font-size: 10px;
  letter-spacing: 0;
}

.version-ticket strong {
  font-size: 30px;
  line-height: 0.95;
}

.version-ticket b {
  padding-top: 10px;
  border-top: 1px solid rgba(13, 13, 18, 0.28);
}

.android-beta-entry {
  min-height: 720px;
  padding: 110px max(28px, calc((100vw - var(--max-width)) / 2));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  align-items: center;
  gap: 80px;
  overflow: hidden;
  background: #050607;
  color: #f4f7f9;
}

.android-beta-copy .section-number {
  color: #7a8a96;
}

.android-beta-copy h2 {
  max-width: 780px;
  margin: 22px 0 0;
  font-size: 56px;
  line-height: 1.08;
  letter-spacing: 0;
}

.android-beta-copy > p:not(.section-number) {
  max-width: 680px;
  margin: 28px 0 0;
  color: #9aa8b3;
  font-size: 18px;
  line-height: 1.75;
}

.android-beta-button {
  width: fit-content;
  min-width: 300px;
  min-height: 68px;
  margin-top: 36px;
  padding: 10px 18px 10px 12px;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--pjsk-momojan);
  border-radius: 8px;
  background: var(--pjsk-momojan);
  color: #17320c;
  font-size: 16px;
  font-weight: 780;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.android-beta-button:hover {
  transform: translateY(-3px);
  border-color: var(--pjsk-momojan-deep);
  background: var(--pjsk-momojan-deep);
  color: #fff;
}

.android-beta-button small {
  display: block;
  color: rgba(23, 50, 12, .68);
  font-size: 10px;
  font-weight: 700;
}

.android-beta-button b {
  font-size: 20px;
}

.android-beta-button:hover small { color: rgba(255, 255, 255, .7); }

.apk-note {
  margin: 12px 0 0;
  color: #72808a;
  font-size: 11px;
}

.apk-migrate-note {
  max-width: 680px;
  margin: 20px 0 0;
  padding: 14px 16px;
  border: 1px solid #6b5326;
  border-left: 4px solid #f0b429;
  border-radius: 8px;
  background: #241d0f;
  color: #e7d7ad;
  font-size: 14px;
  line-height: 1.7;
}

.apk-migrate-note strong {
  color: #ffce5c;
}

.android-beta-visual {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
}

.android-beta-device {
  width: min(260px, 68%);
  aspect-ratio: 1080 / 2280;
  padding: 8px;
  overflow: hidden;
  border: 1px solid #303a42;
  border-radius: 34px;
  background: #101418;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.62);
  transform: rotate(2deg);
}

.android-beta-device img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 27px;
}

.android-beta-icon {
  position: absolute;
  z-index: 2;
  top: 26px;
  left: 4%;
  width: 116px;
  height: 116px;
  border: 1px solid #39434a;
  border-radius: 24px;
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.52);
}

.android-beta-visual > span {
  position: absolute;
  right: 0;
  bottom: 54px;
  padding: 11px 14px;
  border: 1px solid #33404a;
  background: #101418;
  color: #a1d1ea;
  font-size: 10px;
  font-weight: 850;
}

.beta-status,
.download-next {
  padding: 120px max(28px, calc((100vw - var(--max-width)) / 2));
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 70px;
}

.beta-status .section-number {
  grid-column: 1 / -1;
  margin-bottom: -42px;
}

.beta-status h2,
.download-next h2 {
  margin: 0;
  font-size: 52px;
  line-height: 1.12;
  letter-spacing: 0;
}

.beta-status-copy {
  align-self: end;
}

.beta-status-copy > p,
.download-next-action > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.75;
}

.platform-state {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.platform-state span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.platform-state b {
  margin-right: 7px;
  color: var(--ink);
}

.download-next {
  background: var(--yellow);
}

.download-next-action {
  align-self: end;
}

.download-next-action .primary-button {
  margin-top: 30px;
  background: var(--pjsk-wxs);
  color: #3d2500;
  box-shadow: 0 8px 24px rgba(255, 153, 0, .24);
}

.download-next-action .primary-button:hover { background: var(--pjsk-wxs-deep); color: #fff; }

.download-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms cubic-bezier(0.2, 0.7, 0.2, 1), transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.download-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .download-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .download-visual {
    min-height: 540px;
  }

  .version-ticket {
    right: 12%;
  }

  .beta-status,
  .download-next {
    grid-template-columns: 1fr;
  }

  .android-beta-entry {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .beta-status .section-number {
    grid-column: 1;
    margin-bottom: -26px;
  }

}

@media (min-width: 721px) and (max-width: 1180px) {
  .download-hero {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
    gap: 48px;
  }

  .download-copy h1 {
    font-size: 56px;
  }

  .beta-status h2,
  .download-next h2 {
    font-size: 44px;
  }
}

@media (max-width: 720px) {
  .download-hero {
    padding: calc(40px + env(safe-area-inset-top)) 20px 70px;
  }

  .android-beta-entry {
    min-height: auto;
    padding: 82px 20px;
  }

  .android-beta-copy h2 {
    font-size: 38px;
  }

  .android-beta-copy > p:not(.section-number) {
    font-size: 16px;
  }

  .android-beta-button {
    width: 100%;
    min-width: 0;
  }

  .android-beta-visual {
    min-height: 430px;
  }

  .android-beta-device {
    width: min(218px, 62vw);
  }

  .android-beta-icon {
    left: 0;
    width: 88px;
    height: 88px;
    border-radius: 20px;
  }

  .android-beta-visual > span {
    bottom: 22px;
  }

  .download-kicker {
    margin-bottom: 18px;
    font-size: 10px;
  }

  .download-copy h1 {
    font-size: 44px;
    letter-spacing: 0;
  }

  .download-copy > p {
    margin-top: 24px;
    font-size: 16px;
  }

  .download-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .download-action {
    width: 100%;
  }

  .download-action .android-beta-button,
  .testflight-button {
    width: 100%;
    min-width: 0;
  }

  .download-visual {
    min-height: 460px;
  }

  .download-device {
    width: min(218px, 62vw);
    border-radius: 34px;
  }

  .download-device img {
    border-radius: 27px;
  }

  .version-ticket {
    right: 2%;
    bottom: 28px;
    width: 150px;
  }

  .version-ticket strong {
    font-size: 24px;
  }

  .beta-status,
  .download-next {
    padding: 82px 20px;
  }

  .beta-status {
    gap: 30px;
  }

  .beta-status .section-number {
    margin-bottom: -10px;
  }

  .beta-status h2,
  .download-next h2 {
    font-size: 38px;
  }

  .beta-status-copy > p,
  .download-next-action > p {
    font-size: 16px;
  }

  .beta-contact {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 16px;
  }

  .beta-contact-qr {
    width: 90px;
    height: 90px;
    padding: 5px;
  }

  .beta-contact strong {
    font-size: 16px;
  }

  .beta-contact > div > p:not(.beta-contact-label) {
    font-size: 12px;
  }

  .download-next {
    gap: 30px;
  }

  .download-next-action .primary-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .download-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* 华为版本选择弹窗 */
.huawei-note { cursor: pointer; border: 0; text-align: left; font-family: inherit; }
.huawei-note:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.huawei-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.huawei-modal[hidden] { display: none; }

.huawei-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 27, 46, .45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.huawei-modal-card {
  position: relative;
  width: min(480px, 100%);
  padding: 28px 26px 24px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(13, 10, 40, .22);
}

.huawei-modal-card h2 { font-size: 22px; line-height: 1.3; }
.huawei-modal-card > p { margin-top: 12px; font-size: 14px; line-height: 1.75; color: var(--ink-soft); }

.huawei-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.huawei-choice {
  display: block;
  padding: 16px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 780;
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease;
}

.huawei-choice small {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
}

.huawei-choice:hover { transform: translateY(-2px); }

.huawei-choice-android {
  background: var(--pjsk-leoneed);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.huawei-choice-android small { color: rgba(255, 255, 255, .62); }
.huawei-choice-android:hover { background: var(--pjsk-leoneed-deep); }

.huawei-choice-hos {
  border: 1px solid var(--pjsk-leoneed);
  color: var(--pjsk-leoneed-deep);
  background: rgba(0, 160, 233, .07);
}
.huawei-choice-hos small { color: var(--pjsk-leoneed); }
.huawei-choice-hos:hover { background: rgba(0, 160, 233, .14); }

.huawei-modal-close {
  margin-top: 18px;
  width: 100%;
  padding: 11px 0;
  border: 1px solid var(--border-b);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.huawei-modal-close:hover { border-color: var(--pjsk-leoneed); color: var(--pjsk-leoneed-deep); }

@media (max-width: 460px) {
  .huawei-modal-actions { grid-template-columns: 1fr; }
}
