:root {
  --bg: #0b1020;
  --bg-elev: #121a2f;
  --bg-card: #161f38;
  --line: rgba(148, 163, 184, .16);
  --text: #cbd5e1;
  --muted: #94a3b8;
  --title: #f8fafc;
  --brand: #38bdf8;
  --brand-2: #818cf8;
  --ok: #34d399;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(56, 189, 248, .18), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(129, 140, 248, .16), transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: min(1100px, calc(100% - 28px)); margin: 0 auto; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 16, 32, .82);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px; padding: 8px 0; gap: 12px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--title); font-weight: 700; font-size: 1.05rem;
  text-decoration: none; flex-shrink: 0;
}
.logo:hover { text-decoration: none; }
.logo img {
  width: 36px; height: 36px; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(56, 189, 248, .35);
  object-fit: cover; flex-shrink: 0;
}
.nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: var(--muted); font-size: .9rem; text-decoration: none; }
.nav a:hover { color: var(--title); }
.nav .pill {
  color: #0b1020; background: linear-gradient(135deg, var(--brand), #67e8f9);
  padding: 8px 12px; border-radius: 999px; font-weight: 700; font-size: .84rem;
  white-space: nowrap;
}
.nav .pill:hover { text-decoration: none; filter: brightness(1.05); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 32px;
  padding: 48px 0 20px;
  align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; color: var(--brand);
  background: rgba(56, 189, 248, .1);
  border: 1px solid rgba(56, 189, 248, .25);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 16px;
}
.eyebrow i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 0 4px rgba(52, 211, 153, .15);
}
h1 {
  font-size: clamp(1.75rem, 5vw, 2.85rem);
  line-height: 1.18; color: var(--title);
  letter-spacing: -.03em; margin-bottom: 14px;
}
h1 span {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead {
  font-size: 1rem; color: var(--muted); max-width: 34rem; margin-bottom: 24px;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.btn {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  padding: 13px 18px; border-radius: 14px; font-weight: 700;
  text-decoration: none; border: 1px solid transparent; transition: .18s ease;
}
.btn small { font-weight: 500; opacity: .8; margin-top: 3px; font-size: .76rem; }
.btn-primary {
  color: #071018;
  background: linear-gradient(135deg, #38bdf8, #67e8f9);
  box-shadow: 0 12px 30px rgba(56, 189, 248, .28);
}
.btn-primary:hover { transform: translateY(-1px); text-decoration: none; filter: brightness(1.04); }
.btn-ghost {
  color: var(--title); background: rgba(255,255,255,.04);
  border-color: var(--line);
}
.btn-ghost:hover { background: rgba(255,255,255,.07); text-decoration: none; }
.fineprint { font-size: .82rem; color: var(--muted); }

.hero-visual {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  min-width: 0;
}
.app-badge {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 14px;
  width: 100%;
  box-shadow: var(--shadow);
  min-width: 0;
}
.app-badge img {
  width: 56px; height: 56px; border-radius: 14px; object-fit: cover; flex-shrink: 0;
}
.app-badge > div { min-width: 0; }
.app-badge h2 {
  color: var(--title); font-size: 1.08rem; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis;
}
.app-badge p {
  color: var(--muted); font-size: .82rem; margin-top: 4px;
  line-height: 1.4;
}

.phone-frame {
  width: min(240px, 72vw);
  background: #05070f;
  border-radius: 26px;
  border: 1px solid rgba(148,163,184,.22);
  padding: 8px;
  box-shadow: var(--shadow);
}
.phone-frame img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  object-fit: contain;
  background: #0a0f1d;
}

/* Sections */
section { padding: 28px 0; }
.section-head { margin-bottom: 16px; }
.section-head h2 {
  color: var(--title); font-size: clamp(1.25rem, 3.5vw, 1.45rem);
  letter-spacing: -.02em; margin-bottom: 6px;
}
.section-head p { color: var(--muted); max-width: 42rem; font-size: .95rem; }

.grid-3 {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  min-width: 0;
}
.card .icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 12px;
  background: rgba(56, 189, 248, .1); color: var(--brand); font-size: 1.1rem;
}
.card h3 { color: var(--title); font-size: 1rem; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: .9rem; }

/* Screenshots: desktop grid, mobile horizontal scroll */
.shot-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.shot {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px;
  overflow: hidden;
  min-width: 0;
}
.shot img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: contain;
  background: #0a0f1d;
}
.shot figcaption {
  text-align: center;
  color: var(--muted);
  font-size: .78rem;
  margin-top: 8px;
  padding: 0 4px 4px;
}

/* Guide images — keep natural ratio, no forced crop */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.guide-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  min-width: 0;
}
.guide-item .img-wrap {
  background: #0a0f1d;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}
.guide-item img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  margin: 0 auto;
}
.guide-item.landscape .img-wrap { padding: 0; }
.guide-item.landscape img { max-height: none; }
.guide-item p {
  padding: 12px 14px;
  color: var(--muted);
  font-size: .86rem;
}

/* Download */
.download-box {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.meta-table { width: 100%; border-collapse: collapse; font-size: .88rem; table-layout: fixed; }
.meta-table th, .meta-table td {
  text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--line);
  vertical-align: top; word-break: break-word;
}
.meta-table th {
  width: 28%; color: var(--title); font-weight: 600;
  white-space: normal;
}
.meta-table td code, .hash {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .76rem; color: #e2e8f0; word-break: break-all;
}
.notice {
  background: rgba(251, 191, 36, .08);
  border: 1px solid rgba(251, 191, 36, .28);
  color: #fde68a;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: .86rem;
  margin-top: 14px;
}
.notice strong { display: block; color: #fef3c7; margin-bottom: 4px; }

/* Changelog */
.timeline { display: grid; gap: 10px; }
.ver {
  display: grid; grid-template-columns: 110px 1fr; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px 16px;
  min-width: 0;
}
.ver-id { color: var(--title); font-weight: 700; }
.ver-date { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.ver ul { padding-left: 1.1rem; color: var(--muted); font-size: .9rem; }
.ver li { margin: 4px 0; }
.ver .latest {
  display: inline-block; margin-left: 6px; font-size: .7rem; font-weight: 700;
  color: #083344; background: var(--brand); padding: 1px 7px; border-radius: 999px;
  vertical-align: middle;
}

/* Steps */
.steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.step {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px;
  min-width: 0;
}
.step .n {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(129, 140, 248, .15); color: #c7d2fe;
  display: grid; place-items: center; font-weight: 700; font-size: .85rem;
  margin-bottom: 10px;
}
.step h3 { color: var(--title); font-size: .95rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .84rem; }

/* Footer */
footer {
  margin-top: 32px;
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: .86rem;
}
.footer-nav {
  display: flex; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 12px;
}
.footer-nav a { color: var(--muted); }
.footer-nav a:hover { color: var(--title); }
.copy { color: #64748b; font-size: .8rem; margin-top: 10px; }

/* Legal pages */
.legal-main {
  width: min(760px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 56px;
}
.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 20px;
  box-shadow: var(--shadow);
}
.legal-card h1 {
  font-size: clamp(1.4rem, 4vw, 1.7rem);
  margin-bottom: 8px;
}
.legal-card h2 {
  color: var(--title);
  font-size: 1.05rem;
  margin: 26px 0 10px;
}
.legal-card p, .legal-card li {
  font-size: .94rem;
  color: var(--text);
}
.legal-card ul { padding-left: 1.2rem; margin: 8px 0; }
.legal-card li { margin: 6px 0; }
.legal-card strong { color: #e2e8f0; }
.legal-card .meta { color: var(--muted); font-size: .86rem; margin-bottom: 18px; }
.legal-card .back {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 16px; color: var(--brand); font-size: .92rem;
}

/* Mobile */
@media (max-width: 900px) {
  .hero, .download-box { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .guide-grid { grid-template-columns: 1fr 1fr; }
  .ver { grid-template-columns: 1fr; }
  .nav a:not(.pill) { display: none; }
  .hero { padding-top: 28px; gap: 22px; }
  .phone-frame { order: -1; }

  /* 截图横滑，避免挤扁 */
  .shot-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
    margin: 0 -6px;
    padding-left: 6px;
    padding-right: 6px;
  }
  .shot {
    flex: 0 0 min(46vw, 170px);
    scroll-snap-align: start;
  }
  .shot img { width: 100%; height: auto; }

  .meta-table th, .meta-table td { display: block; width: 100%; }
  .meta-table th {
    padding-bottom: 2px; border-bottom: 0; color: var(--muted); font-size: .8rem;
  }
  .meta-table td { padding-top: 2px; }
  .meta-table tr { border-bottom: 1px solid var(--line); }
  .meta-table th, .meta-table td { border-bottom: 0; }

  .cta-row .btn { flex: 1 1 100%; align-items: center; text-align: center; }
}

@media (max-width: 520px) {
  .wrap, .legal-main { width: calc(100% - 20px); }
  .guide-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .download-box { padding: 14px; border-radius: 16px; }
  .legal-card { padding: 18px 14px; }
  .shot { flex-basis: min(58vw, 200px); }
  .app-badge p { font-size: .78rem; }
}
