/* 下载页 — 在 site.css 基础上 */

button { font: inherit; }

.page-main { padding-top: 0; }

.download-hero {
  /* 与首页 / 招聘一致：fixed 透明 nav 叠在橙色顶屏上 */
  padding: calc(var(--nav-h) + clamp(28px, 5vh, 48px)) var(--pad-x) clamp(48px, 8vh, 72px);
  text-align: center;
  min-height: 100vh;
  min-height: 100svh;
}
.download-hero__badge {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; font-weight: 600; margin-bottom: 20px;
}
.download-hero h1 {
  margin: 0;
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
}
.download-hero__sub {
  max-width: 480px; margin: 16px auto 28px;
  font-size: clamp(15px, 1.8vw, 18px); line-height: 1.65; color: var(--ink-72);
}

.shell {
  width: min(var(--max), calc(100% - var(--pad-x) * 2));
  margin: 0 auto;
}

/* step-nav — 轻量锚点条，贴橙色顶屏，避免白底胶囊簇 */
.step-nav {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
  justify-content: center; max-width: 100%; margin: 0 auto 40px;
  padding: 0; border: 0; background: transparent; box-shadow: none;
}
.step-nav a {
  display: inline-flex; align-items: center; gap: 8px;
  min-width: 0; height: 36px; padding: 0 14px; justify-content: center;
  border-radius: 999px; font-size: 13px; font-weight: 600;
  color: var(--ink); background: rgba(10,10,10,0.08);
  white-space: nowrap;
  transition: background 0.15s;
}
.step-nav a:hover { background: rgba(10,10,10,0.14); }
.step-nav a span,
.step-nav .contact-cta__trigger span {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 999px;
  background: var(--ink); color: var(--cream);
  font-size: 12px; font-weight: 700;
}
.step-nav .contact-cta__trigger {
  display: inline-flex; align-items: center; gap: 8px;
  min-width: 0; height: 36px; padding: 0 14px; justify-content: center;
  border-radius: 999px; font-size: 13px; font-weight: 600;
  color: var(--ink); background: rgba(10,10,10,0.08);
  white-space: nowrap;
  transition: background 0.15s;
}
.step-nav .contact-cta__trigger:hover { background: rgba(10,10,10,0.14); }

/* step-nav 内联系内测：二维码在下方弹出 */
.download-hero .contact-cta__pop {
  left: 50%; right: auto; bottom: auto;
  top: calc(100% + 12px);
  transform: translateX(-50%) translateY(-6px);
}
.download-hero .contact-cta__pop::after {
  content: "";
  position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-bottom-color: #fff;
}
.download-hero .contact-cta__pop img {
  width: 180px; height: 180px; max-width: none;
}
.download-hero .contact-cta:hover .contact-cta__pop {
  transform: translateX(-50%) translateY(0);
}

/* 平台卡片 */
.platforms {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px; margin-top: 48px; scroll-margin-top: 92px;
}
.platform-card {
  position: relative; display: flex; min-height: 148px;
  flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  border: 1px solid rgba(10,10,10,0.12); border-radius: 16px;
  background: rgba(253, 248, 242, 0.92); color: var(--ink-72);
  box-shadow: 0 12px 36px rgba(10,10,10,0.08);
  transition: transform 0.18s var(--ease), box-shadow 0.18s, border-color 0.18s;
}
.platform-card:hover, .platform-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(10,10,10,0.18);
  box-shadow: 0 18px 48px rgba(10,10,10,0.1);
  outline: none;
}
.platform-card.is-download { cursor: pointer; border-color: rgba(10,10,10,0.12); }
.platform-card__icon {
  display: grid; place-items: center;
  width: 58px; height: 58px; color: var(--ink);
}
.platform-card__icon svg { width: 54px; height: 54px; display: block; }
.platform-card__icon img { width: 42px; height: 42px; object-fit: contain; }
.platform-card__title { font-size: 14px; font-weight: 600; color: var(--ink-72); }
.platform-card__badge {
  position: absolute; top: 12px; right: 12px;
  padding: 2px 8px; border-radius: 999px;
  background: var(--ink); color: var(--cream);
  font-size: 10px; font-weight: 700;
}
.platform-card__badge.is-soon {
  background: rgba(10, 10, 10, 0.08);
  color: var(--ink-48);
}
.platform-card.is-muted { opacity: 0.72; }

.below-title {
  margin: clamp(48px, 8vh, 72px) auto 0;
  max-width: 640px;
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-align: center;
  color: var(--ink);
}

/* 上手资源 */
.resources {
  padding: clamp(48px, 8vh, 72px) var(--pad-x) clamp(64px, 10vh, 96px);
  scroll-margin-top: 92px;
  background: var(--paper);
}
.resource-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px; margin-top: 28px;
}
.resource-card {
  min-height: 148px; padding: 24px;
  border: 1px solid var(--ink-24); border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(10,10,10,0.05);
  transition: transform 0.18s var(--ease), box-shadow 0.18s, border-color 0.18s;
}
.resource-card:hover {
  transform: translateY(-3px);
  border-color: rgba(10,10,10,0.14);
  box-shadow: 0 18px 48px rgba(10,10,10,0.08);
}
.resource-card__step {
  margin-bottom: 12px;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; color: var(--ink-48);
}
.resource-card h3 { margin-bottom: 8px; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.resource-card p { color: var(--ink-72); font-size: 14px; line-height: 1.6; }

/* 下载模态框 */
.modal {
  position: fixed; inset: 0; z-index: 300;
  display: none; align-items: center; justify-content: center;
  padding: 24px; background: rgba(10, 10, 10, 0.62);
}
.modal.is-open { display: flex; }

.modal__panel {
  position: relative; width: min(790px, 100%);
  max-height: calc(100vh - 48px); overflow: hidden;
  border-radius: 16px; background: #fff;
  box-shadow: 0 30px 90px rgba(10,10,10,0.28);
  animation: dl-pop 160ms var(--ease) both;
}
.modal__content {
  max-height: calc(100vh - 48px);
  overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable;
}

@keyframes dl-pop {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal__close {
  position: absolute; top: 16px; right: 16px;
  display: grid; width: 34px; height: 34px; place-items: center;
  border: 0; border-radius: 999px;
  background: rgba(255,255,255,0.92); color: var(--ink-48);
  cursor: pointer; font-size: 28px; line-height: 1; z-index: 3;
}
.modal__close:hover { background: var(--paper-warm); color: var(--ink); }
.modal__close:focus { outline: none; }
.modal__close:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

.modal__main {
  position: relative; overflow: hidden;
  padding: 52px 40px 32px; text-align: center;
  background:
    radial-gradient(circle at 14% 18%, rgba(245, 168, 48, 0.18), transparent 46%),
    radial-gradient(circle at 88% 82%, rgba(240, 184, 112, 0.16), transparent 42%),
    linear-gradient(180deg, #fff9f0 0%, var(--cream) 100%);
}
.modal__main::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(224, 126, 41, 0.08) 0.6px, transparent 0.6px);
  background-size: 18px 18px;
  pointer-events: none;
}
.modal__invite,
.modal__download-section { position: relative; z-index: 1; }
.modal__invite { margin-bottom: 28px; }
.modal__invite-title {
  margin: 0 0 16px;
  font-size: clamp(22px, 3vw, 30px); font-weight: 800;
  line-height: 1.25; letter-spacing: -0.03em; color: var(--ink);
}
.modal__invite-row {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  max-width: 620px; margin: 0 auto; text-align: left;
}
.modal__download-section {
  padding-top: 24px;
  border-top: 1px solid rgba(224, 126, 41, 0.16);
}
.modal__download-label {
  margin: 0 0 16px;
  font-size: clamp(16px, 2.2vw, 20px); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.35; color: var(--ink-72);
}

.chip-help {
  position: relative; display: inline-block; cursor: help;
  color: var(--ink); text-decoration: none; vertical-align: baseline;
}
.chip-help::after {
  content: ""; position: absolute; left: -5px; right: -5px; bottom: -8px; height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg width='260' height='18' viewBox='0 0 260 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 11 C 38 5 72 13 104 9 S 170 5 202 10 S 238 13 256 8' fill='none' stroke='%23F5A830' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 100% 100%;
  opacity: 0.72; pointer-events: none;
  transition: opacity 0.16s, transform 0.16s;
}
.chip-help:hover, .chip-help:focus-visible {
  outline: 2px solid rgba(var(--brand-rgb), 0.32); outline-offset: 8px; border-radius: 4px;
}
.chip-help:hover::after, .chip-help:focus-visible::after { opacity: 1; transform: translateY(1px); }

.chip-help__popover {
  position: absolute; top: calc(100% + 14px); left: 50%; z-index: 2;
  width: min(520px, 78vw); padding: 10px;
  border: 1px solid var(--ink-24); border-radius: 12px;
  background: #fff; box-shadow: 0 24px 70px rgba(10,10,10,0.14);
  opacity: 0; pointer-events: none;
  transform: translateX(-50%) translateY(6px);
  transition: opacity 0.16s, transform 0.16s;
}
.chip-help:hover .chip-help__popover,
.chip-help:focus-visible .chip-help__popover {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
.chip-help__popover img { display: block; width: 100%; height: auto; border-radius: 8px; }

.modal__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

.modal__download {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 184px; height: 48px; border-radius: 999px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--cream);
  font-size: 14px; font-weight: 600; letter-spacing: 0.02em;
  transition: transform 0.12s, background 0.2s, color 0.2s, box-shadow 0.2s;
}
.modal__download:hover {
  background: #fff; color: var(--ink);
  transform: translateY(-2px); box-shadow: 0 8px 24px rgba(10,10,10,0.18);
}
.modal__download.is-disabled {
  cursor: not-allowed;
  border-color: var(--ink-24);
  background: rgba(10, 10, 10, 0.06);
  color: var(--ink-48);
}
.modal__download.is-disabled:hover,
.modal__download.is-disabled:active {
  background: rgba(10, 10, 10, 0.06);
  color: var(--ink-48);
  transform: none;
}
.modal__download:active { transform: scale(0.98); }

.modal__beta-badge {
  display: inline-block; margin: 0 0 10px; padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(224, 126, 41, 0.22);
  background: rgba(255, 255, 255, 0.72); color: var(--brand-deep);
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
}
.modal__beta-desc {
  margin: 0; flex: 1; min-width: 0;
  color: var(--ink-72); font-size: 14px; line-height: 1.65;
}
.modal__beta-desc strong { color: var(--brand-deep); font-weight: 700; }
.modal__beta-qr-wrap { flex: 0 0 auto; position: relative; z-index: 1; }
.modal__beta-qr {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px; border: 1px solid rgba(224, 126, 41, 0.14); border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(224, 126, 41, 0.1);
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.15s, border-color 0.15s;
}
.modal__beta-qr:hover,
.modal__beta-qr:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(224, 126, 41, 0.28);
  box-shadow: 0 14px 32px rgba(224, 126, 41, 0.14);
  outline: none;
}
.modal__beta-qr:focus-visible {
  outline: 2px solid var(--lime); outline-offset: 3px;
}
.modal__beta-qr img {
  display: block; width: 96px; height: 96px; object-fit: contain; border-radius: 6px;
}
.modal__beta-qr-caption { font-size: 11px; color: rgba(201, 106, 26, 0.72); font-weight: 600; }
.modal__main .contact-cta__pop { display: none; }

.modal__guide {
  border-top: 1px solid var(--ink-24);
  background: #fff;
}
.modal__guide-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 40px; cursor: pointer; list-style: none;
  transition: background 0.15s;
}
.modal__guide-summary::-webkit-details-marker { display: none; }
.modal__guide-summary::marker { content: ''; }
.modal__guide-summary::after {
  content: "";
  flex: 0 0 18px; width: 18px; height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.5 7 9 11.5 13.5 7' fill='none' stroke='%230a0a0a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 18px 18px;
  opacity: 0.48; transition: transform 0.18s var(--ease), opacity 0.15s;
}
.modal__guide[open] .modal__guide-summary::after {
  transform: rotate(180deg); opacity: 0.72;
}
.modal__guide-summary:hover { background: rgba(10, 10, 10, 0.04); }
.modal__guide-summary:focus { outline: none; }
.modal__guide-summary:focus-visible {
  outline: 2px solid var(--lime); outline-offset: -2px;
}
.modal__guide-summary-main {
  display: block; font-size: 14px; font-weight: 700; color: var(--ink);
}
.modal__guide-summary-hint {
  display: block; margin-top: 2px;
  font-size: 13px; line-height: 1.45; color: var(--ink-48);
}
.modal__guide-body {
  padding: 0 40px 32px;
  border-top: 1px solid rgba(10, 10, 10, 0.06);
}
.modal__guide-lead {
  margin: 20px 0 14px; color: var(--ink-72);
  font-size: 14px; line-height: 1.7;
}
.modal__guide-steps {
  margin: 0 0 16px; padding-left: 1.2em;
  color: var(--ink-72); font-size: 14px; line-height: 1.7;
}
.modal__guide-steps li + li { margin-top: 4px; }
.modal__guide-foot {
  margin: 16px 0 0; color: var(--ink-48);
  font-size: 13px; line-height: 1.6;
}
.modal__guide-foot a,
.modal__guide a {
  color: var(--ink); font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
}

.guide-image {
  width: 100%; overflow: hidden; border-radius: 10px;
  border: 1px solid var(--ink-24); background: #fff;
}
.guide-image img { width: 100%; height: auto; display: block; }
.guide-image-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.guide-steps { display: grid; gap: 12px; }

.guide-step {
  overflow: hidden; border: 1px solid var(--ink-24);
  border-radius: 12px; background: #fff;
}
.guide-step__label {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px 0; color: var(--ink);
  font-size: 13px; font-weight: 700;
}
.guide-step__label span {
  display: inline-grid; width: 20px; height: 20px; place-items: center;
  border-radius: 999px; background: var(--ink); color: var(--cream);
  font-size: 12px; line-height: 1;
}
.guide-step__image {
  display: flex; min-height: 180px; max-height: 260px;
  align-items: center; justify-content: center; padding: 12px;
}

.guide-image-zoom {
  display: flex; align-items: center; justify-content: center;
  border: 0; background: transparent; cursor: zoom-in; padding: 0;
}
.guide-image .guide-image-zoom { width: 100%; }
.guide-image .guide-image-zoom img { width: 100%; max-height: none; }
.guide-step__image .guide-image-zoom { max-width: 100%; max-height: 236px; }
.guide-image-zoom:focus-visible {
  outline: 2px solid var(--lime); outline-offset: 4px; border-radius: 10px;
}
.guide-step__image img, .guide-image-zoom img {
  display: block; width: auto; max-width: 100%; max-height: 236px; border-radius: 8px;
}

/* 图片预览 */
.image-viewer {
  position: fixed; inset: 0; z-index: 400;
  display: none; align-items: center; justify-content: center;
  padding: 32px; background: rgba(10,10,10,0.78);
  backdrop-filter: blur(8px);
}
.image-viewer.is-open { display: flex; }
.image-viewer__panel { position: relative; max-width: min(1040px, 100%); max-height: 100%; }
.image-viewer__panel img {
  display: block; max-width: 100%; max-height: calc(100vh - 96px);
  border-radius: 12px; background: #fff;
  box-shadow: 0 28px 90px rgba(10,10,10,0.42);
}
.image-viewer__close {
  position: absolute; top: -14px; right: -14px;
  display: grid; width: 34px; height: 34px; place-items: center;
  border: 0; border-radius: 999px; background: #fff; color: var(--ink);
  cursor: pointer; font-size: 24px; line-height: 1;
  box-shadow: 0 10px 28px rgba(10,10,10,0.18);
}
.image-viewer__close:hover { background: var(--paper-warm); }

@media (max-width: 900px) {
  .step-nav { width: 100%; justify-content: flex-start; overflow-x: auto; }
  .platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resource-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 28px, var(--max)); }
  .platforms { grid-template-columns: 1fr; gap: 14px; }
  .platform-card { min-height: 132px; }
  .modal__main { padding: 44px 22px 24px; }
  .modal__invite-row {
    flex-direction: column; align-items: center; text-align: center;
  }
  .modal__beta-desc { font-size: 13px; }
  .modal__download-section { padding-top: 20px; }
  .modal__guide-summary { padding: 14px 22px; }
  .modal__guide-body { padding: 0 22px 24px; }
  .modal__download { width: 100%; }
  .guide-image-grid { grid-template-columns: 1fr; }
  .chip-help__popover { width: calc(100vw - 56px); }
}
