:root {
  color-scheme: light;
  --ink: #142234;
  --muted: #647082;
  --weak: #98a1ae;
  --white: #fff;
  --brand: #5b67d3;
  --brand-soft: #eef0ff;
  --brand-gradient: linear-gradient(135deg, #5b67d3 0%, #7284ed 52%, #4eaafa 100%);
  --border: rgba(91, 103, 211, 0.14);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 280px;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: #f8faff;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.overlay-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

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

button {
  font: inherit;
}

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

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

.browser-guide {
  position: fixed;
  z-index: 120;
  inset: 0;
  padding: calc(72px + var(--safe-top)) max(18px, var(--safe-right)) calc(24px + var(--safe-bottom)) max(18px, var(--safe-left));
  background: rgba(6, 27, 49, 0.76);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.browser-guide-arrow {
  position: absolute;
  top: calc(8px + var(--safe-top));
  right: calc(13px + var(--safe-right));
  width: 52px;
  color: #fff;
  animation: guide-nudge 1.2s ease-in-out infinite alternate;
}

.browser-guide-card {
  display: grid;
  width: min(100%, 420px);
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  margin-left: auto;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  background: #fff;
  box-shadow: rgba(30, 44, 79, 0.28) 0 30px 45px -24px;
  color: var(--ink);
}

.browser-guide-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand);
}

.browser-guide-icon svg {
  width: 28px;
}

.browser-guide-card h2 {
  margin: 1px 0 6px;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.2;
}

.browser-guide-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.browser-guide-card p strong {
  color: var(--ink);
  letter-spacing: 0.12em;
}

.browser-guide-card button {
  grid-column: 1 / -1;
  min-height: 48px;
  margin-top: 4px;
  border: 0;
  border-radius: 14px;
  background: var(--brand-gradient);
  color: #fff;
  cursor: pointer;
}

.browser-guide-card button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

@keyframes guide-nudge {
  from { transform: translate(-4px, 4px); }
  to { transform: translate(2px, -2px); }
}

.download-page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--safe-top) + 1px) max(16px, var(--safe-right)) calc(36px + var(--safe-bottom)) max(16px, var(--safe-left));
  overflow: hidden;
  background-color: #f8faff;
  background-image: url("./assets/bj.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% auto;
  text-align: center;
}

.download-card {
  position: relative;
  z-index: 1;
  width: min(100%, 540px);
  min-height: min(100vh, 760px);
  min-height: min(100svh, 760px);
  margin: 0 auto;
  padding-top: clamp(94px, 16vh, 152px);
}

.app-icon-frame {
  width: 96px;
  height: 96px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  background: linear-gradient(180deg, #fff 0%, #f2f2f2 100%);
  box-shadow: 0 4px 10px rgba(72, 88, 167, 0.1), 3px 8px 25px rgba(94, 113, 205, 0.25);
}

.app-icon-frame img {
  width: 100%;
  height: auto;
}

.app-name {
  margin: 9px 0 0;
  color: var(--brand);
  font-size: 18px;
  font-weight: 550;
  line-height: 28px;
}

h1 {
  margin: 30px 0 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: clamp(23px, 7.4vw, 30px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

.recruiting-status {
  margin: 8px 0 0;
  color: var(--brand);
  font-size: 18px;
  font-weight: 550;
  line-height: 28px;
}

.download-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 34px;
}

.download-button {
  display: flex;
  width: min(100%, 246px);
  min-height: 52px;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 13px 24px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 16px;
  background: var(--brand-gradient);
  color: var(--white);
  box-shadow: rgba(68, 89, 187, 0.24) 0 15px 30px -15px;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  text-decoration: none;
  text-decoration-line: none;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.download-button + .download-button {
  margin-top: 16px;
}

.download-button:hover {
  filter: brightness(1.04);
  box-shadow: rgba(68, 89, 187, 0.3) 0 18px 34px -15px;
}

.download-button:active {
  transform: scale(0.98);
}

.download-button:focus-visible,
.tutorial-card:focus-visible,
.usage-guide summary:focus-visible,
.video-close:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 4px;
}

.ios-recruit-note {
  margin: 9px auto 0;
  color: var(--weak);
  font-size: 12px;
  line-height: 20px;
}

.download-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 18px auto 0;
}

.download-qr-frame {
  display: block;
  width: 116px;
  height: 116px;
  padding: 7px;
  border: 1px solid rgba(91, 103, 211, 0.14);
  border-radius: 15px;
  background: #fff;
  box-shadow: rgba(31, 51, 92, 0.12) 0 14px 30px -18px;
}

.download-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.download-qr figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.ios-recruit-note strong {
  color: var(--brand);
  font-weight: 650;
}

.stage-meta {
  margin: 8px auto 0;
  line-height: 22px;
}

.beta-badge {
  display: inline-flex;
  min-width: 58px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border: 1px solid #a8b7ef;
  border-radius: 7px;
  background: rgba(238, 240, 255, 0.85);
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
}

.tutorial-section,
.usage-guide {
  position: relative;
  z-index: 1;
  width: min(100%, 920px);
  margin-right: auto;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: rgba(31, 51, 92, 0.09) 0 24px 70px -36px;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.tutorial-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  padding: clamp(24px, 5vw, 48px);
  text-align: left;
}

.section-header {
  align-self: center;
}

.section-eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: 0.06em;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(26px, 7vw, 38px);
  font-weight: 650;
  line-height: 1.17;
  letter-spacing: -0.045em;
}

.section-header > p:last-child {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.tutorial-card {
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(91, 103, 211, 0.16);
  border-radius: 18px;
  background: #fff;
  box-shadow: rgba(31, 51, 92, 0.09) 0 18px 42px -28px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.tutorial-card:hover {
  transform: translateY(-2px);
  box-shadow: rgba(31, 51, 92, 0.16) 0 22px 48px -28px;
}

.tutorial-card:active {
  transform: scale(0.99);
}

.tutorial-preview {
  position: relative;
  display: flex;
  width: 100%;
  aspect-ratio: 16 / 9;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #edf1ff 0%, #f8faff 55%, #e9fbff 100%);
}

.tutorial-preview::before,
.tutorial-preview::after {
  position: absolute;
  border-radius: 50%;
  background: rgba(91, 103, 211, 0.09);
  content: "";
}

.tutorial-preview::before {
  top: -40%;
  left: -10%;
  width: 60%;
  aspect-ratio: 1;
}

.tutorial-preview::after {
  right: -12%;
  bottom: -55%;
  width: 72%;
  aspect-ratio: 1;
  background: rgba(78, 170, 250, 0.1);
}

.tutorial-preview img {
  position: relative;
  z-index: 1;
  width: auto;
  height: 100%;
  object-fit: contain;
  box-shadow: rgba(31, 51, 92, 0.14) 0 10px 30px -18px;
}

.play-button {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  background: rgba(20, 34, 52, 0.8);
  box-shadow: rgba(20, 34, 52, 0.28) 0 10px 24px -10px;
  color: #fff;
  transform: translate(-50%, -50%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.play-button svg {
  width: 30px;
  height: 30px;
}

.tutorial-copy {
  display: block;
  padding: 18px 20px 20px;
}

.tutorial-copy strong,
.tutorial-copy > span {
  display: block;
}

.tutorial-copy strong {
  font-size: 17px;
  font-weight: 650;
  line-height: 1.4;
}

.tutorial-copy > span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.usage-guide {
  margin-top: 20px;
  overflow: hidden;
  text-align: left;
}

.usage-guide summary {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px clamp(20px, 5vw, 38px);
  cursor: pointer;
  list-style: none;
}

.usage-guide summary::-webkit-details-marker {
  display: none;
}

.usage-guide summary small,
.usage-guide summary strong {
  display: block;
}

.usage-guide summary small {
  margin-bottom: 3px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 650;
  line-height: 18px;
}

.usage-guide summary strong {
  font-size: clamp(18px, 5vw, 23px);
  font-weight: 650;
  line-height: 1.35;
}

.summary-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand);
  transition: transform 180ms ease;
}

.summary-icon svg {
  width: 22px;
}

.usage-guide[open] .summary-icon {
  transform: rotate(180deg);
}

.guide-content {
  padding: 0 clamp(20px, 5vw, 38px) clamp(28px, 6vw, 44px);
  border-top: 1px solid var(--border);
}

.guide-intro {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.guide-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.guide-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid rgba(91, 103, 211, 0.11);
  border-radius: 17px;
  background: rgba(248, 250, 255, 0.82);
}

.guide-card-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.guide-number {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  border-radius: 10px;
  background: #e9ecff;
  color: var(--brand);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
}

.guide-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.35;
}

.guide-card ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.guide-card li {
  position: relative;
  margin-top: 9px;
  padding-left: 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.guide-card li:first-child {
  margin-top: 0;
}

.guide-card li::before {
  position: absolute;
  top: 0.7em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
  content: "";
}

.guide-card > p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.guide-card .guide-warning {
  padding: 11px 12px;
  border-radius: 10px;
  background: #eef1fb;
  color: #46506a;
  font-size: 13px;
}

.guide-card .feedback-items {
  margin-top: 10px;
  color: var(--brand);
  font-weight: 650;
}

.guide-footer {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(20, 34, 52, 0.1);
}

.guide-footer strong {
  font-size: 16px;
  font-weight: 650;
}

.guide-footer span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.site-footer {
  position: relative;
  z-index: 1;
  width: min(100%, 920px);
  margin: 28px auto 0;
  color: #87909d;
  font-size: 12px;
  line-height: 20px;
}

.site-footer span {
  margin-left: 8px;
  padding-left: 10px;
  border-left: 1px solid rgba(100, 112, 130, 0.28);
}

.video-modal {
  position: fixed;
  z-index: 110;
  inset: 0;
  display: grid;
  place-items: center;
  padding: calc(18px + var(--safe-top)) max(16px, var(--safe-right)) calc(18px + var(--safe-bottom)) max(16px, var(--safe-left));
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(9, 20, 36, 0.78);
  cursor: pointer;
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}

.video-modal-panel {
  position: relative;
  display: flex;
  width: min(100%, 520px);
  max-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 22px;
  background: #fff;
  box-shadow: rgba(0, 0, 0, 0.35) 0 30px 80px -22px;
}

.video-modal-header {
  display: flex;
  min-height: 72px;
  flex: none;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px 13px 20px;
  text-align: left;
}

.video-modal-header p {
  margin: 0;
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
}

.video-modal-header h2 {
  margin: 1px 0 0;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.35;
}

.video-close {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: #f0f3f8;
  color: var(--ink);
  cursor: pointer;
}

.video-close svg {
  width: 22px;
}

.video-stage {
  display: grid;
  min-height: 0;
  flex: 1;
  place-items: center;
  overflow: hidden;
  background: #080e16;
}

.video-stage video {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 190px);
  max-height: calc(100svh - 190px);
  background: #080e16;
}

.video-tip {
  flex: none;
  margin: 0;
  padding: 12px 18px 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

@media (min-width: 700px) {
  .download-card {
    min-height: 760px;
  }

  h1 {
    font-size: 32px;
  }

  .tutorial-section {
    grid-template-columns: minmax(0, 0.8fr) minmax(360px, 1.2fr);
    align-items: center;
  }

  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .guide-footer {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
  }
}

@media (min-width: 1100px) {
  .download-page {
    padding-bottom: 56px;
    background-position: center center;
    background-size: cover;
  }

  .download-card {
    padding-top: 122px;
  }

  .tutorial-section {
    padding: 48px 52px;
  }

  .usage-guide summary {
    padding-right: 44px;
    padding-left: 44px;
  }

  .guide-content {
    padding-right: 44px;
    padding-left: 44px;
  }
}

@media (max-width: 420px) {
  .download-card {
    min-height: 690px;
    padding-top: clamp(72px, 11.5vh, 94px);
  }

  .app-icon-frame {
    width: 88px;
    height: 88px;
    border-radius: 22px;
  }

  .app-name {
    font-size: 17px;
  }

  h1 {
    margin-top: 25px;
  }

  .download-actions {
    margin-top: 30px;
  }

  .tutorial-section {
    border-radius: 20px;
  }

  .tutorial-copy {
    padding: 15px 16px 17px;
  }

  .usage-guide {
    border-radius: 20px;
  }

  .usage-guide summary {
    min-height: 82px;
  }

  .guide-card {
    padding: 19px;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  .download-card {
    min-height: 590px;
    padding-top: 54px;
  }

  .app-icon-frame {
    width: 78px;
    height: 78px;
    border-radius: 20px;
  }

  h1 {
    margin-top: 18px;
  }

  .download-actions {
    margin-top: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@supports not (gap: 1rem) {
  .download-actions > * + * {
    margin-top: 16px;
  }

  .guide-card-heading > * + * {
    margin-left: 10px;
  }

  .guide-footer > * + * {
    margin-top: 5px;
  }
}
