* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  padding: 36px 20px;
  padding-bottom: max(36px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  background: #f3f6fc;
  color: #1f2937;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  -webkit-text-size-adjust: 100%;
}
main {
  width: 100%;
  max-width: 420px;
}
.download-screen {
  background: #fff;
}
.download-status {
  text-align: center;
}
.download-status h1 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: 0;
}
.retry-hint {
  margin: 18px 0 0;
  color: #6b7280;
  font-size: 13px;
}
.retry-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
  color: #2563eb;
  text-decoration: none;
}
.retry-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}
.scan-screen {
  padding: 24px;
  background: #fff;
}
.scan-code {
  display: block;
  width: min(72vmin, 480px);
  max-width: 100%;
}
.scan-code svg {
  display: block;
  width: 100%;
  height: auto;
}
#scan-qr {
  display: block;
}
.intro {
  margin-bottom: 28px;
  text-align: center;
}
.platforms {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.brand span {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 1px;
}
.card {
  padding: 32px;
  border: 1px solid #e5eaf3;
  border-radius: 16px;
  background: #fff;
  text-align: center;
}
.badge {
  margin: 0;
  display: inline-block;
  padding: 5px 10px;
  border-radius: 5px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
}
h1 {
  margin: 16px 0 10px;
  font-size: 28px;
  line-height: 1.4;
  letter-spacing: 1px;
}
.subtitle {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.8;
}
.qr {
  display: block;
  width: 232px;
  max-width: 100%;
  margin: 24px auto 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}
.qr img {
  display: block;
  width: 100%;
  height: auto;
}
.scan-label {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
}
.metadata {
  margin: 6px 0 24px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.8;
}
.download {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px;
  border-radius: 6px;
  background: #2563eb;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  width: 100%;
  font-family: inherit;
  cursor: pointer;
}
.download[aria-disabled='true'] {
  background: #93c5fd;
  cursor: default;
}
.download:hover,
.download:active {
  background: #1d4ed8;
}
a:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 4px;
}
button:focus-visible,
input:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 4px;
}
.wechat-guide {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow-y: auto;
  padding: max(20px, env(safe-area-inset-top)) 24px max(32px, env(safe-area-inset-bottom));
  background: #111827;
  color: #fff;
}
.guide-content {
  max-width: 420px;
  margin: 0 auto;
}
.guide-arrow {
  display: block;
  width: 100px;
  height: 100px;
  margin: 0 0 24px auto;
  color: #93c5fd;
}
.guide-eyebrow {
  color: #93c5fd;
  font-size: 14px;
}
.guide-description,
.guide-fallback p {
  color: #d1d5db;
  font-size: 14px;
  line-height: 1.8;
}
.guide-steps {
  padding-left: 24px;
  margin: 28px 0;
  font-size: 16px;
  line-height: 2;
}
.guide-steps li + li {
  margin-top: 12px;
}
.guide-fallback {
  padding-top: 16px;
  border-top: 1px solid #374151;
}
.guide-fallback label {
  font-size: 12px;
  color: #d1d5db;
}
.page-link {
  display: block;
  width: 100%;
  margin: 8px 0 12px;
  padding: 12px;
  border: 1px solid #4b5563;
  border-radius: 6px;
  background: #1f2937;
  color: #fff;
  font-size: 14px;
}
.copy-feedback {
  min-height: 26px;
}
.tips {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #edf0f5;
  text-align: left;
}
.tips h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
}
.tips p {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.9;
}
footer {
  margin-top: 22px;
  text-align: center;
  color: #6b7280;
  font-size: 12px;
  letter-spacing: 1px;
}
.browser-tip {
  margin: 20px auto 0;
  max-width: 600px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.9;
  text-align: center;
}
@media (max-width: 360px) {
  body {
    padding: 24px 16px;
  }
  .card {
    padding: 24px 20px;
  }
  h1 {
    font-size: 26px;
  }
}
