:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --border: #2d3a4f;
  --text: #e8edf4;
  --muted: #8b9cb3;
  --accent: #3d8bfd;
  --accent-hover: #5ba3ff;
  --install: #07c160;
  --install-hover: #06ad56;
  --success: #3ecf8e;
  --warn-bg: #3d2a1a;
  --warn-border: #8b5a2b;
  --warn-text: #f0c9a0;
  --radius: 12px;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  background: radial-gradient(ellipse 120% 80% at 50% -20%, #1e3a5f 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.5;
}

.wrap {
  max-width: 440px;
  margin: 0 auto;
  padding: 24px 18px 48px;
}

.hero {
  text-align: center;
  margin-bottom: 22px;
}

.logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  padding: 10px;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.platform-badge {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: var(--muted);
}

.version-line {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

.hero-tagline {
  margin: 10px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
}

.card h2 {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
}

.card-install {
  padding-top: 22px;
}

.btn {
  display: block;
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-install {
  background: var(--install);
  color: #fff;
  font-size: 1.1rem;
  padding: 16px 20px;
  border-radius: 12px;
}

.btn-install:hover {
  background: var(--install-hover);
  color: #fff;
}

.install-status {
  min-height: 1.25em;
  margin: 10px 0 0;
  font-size: 0.88rem;
  color: var(--success);
  text-align: center;
}

.install-lead {
  margin: 14px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
}

.install-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(61, 139, 253, 0.45);
}

.btn-outline:hover {
  background: rgba(61, 139, 253, 0.12);
}

.hint {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.share-hint {
  margin-bottom: 0;
}

.alert {
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px solid var(--warn-border);
  background: var(--warn-bg);
  color: var(--warn-text);
  font-size: 0.9rem;
}

.alert strong {
  display: block;
  margin-bottom: 6px;
  color: #ffd4a8;
}

.meta-list {
  margin: 0;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.meta-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.meta-row:first-child {
  padding-top: 0;
}

.meta-row dt {
  margin: 0;
  color: var(--muted);
  font-weight: normal;
}

.meta-row dd {
  margin: 0;
  text-align: right;
  color: var(--text);
  word-break: break-all;
}

.whats-new {
  white-space: pre-wrap;
  font-size: 0.92rem;
  color: var(--text);
  margin: 0;
}

.qr-lead {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: var(--muted);
}

.qr-block {
  text-align: center;
  padding-top: 8px;
}

.qrcode-box {
  display: inline-block;
  margin: 8px auto 0;
  padding: 10px;
  background: #fff;
  border-radius: 8px;
  line-height: 0;
}

.qrcode-box canvas,
.qrcode-box img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.screenshots-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.screenshots-strip img {
  flex: 0 0 auto;
  width: 120px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.table-wrap {
  overflow-x: auto;
}

.ver-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.ver-table th,
.ver-table td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.ver-table th {
  color: var(--muted);
  font-weight: 600;
}

.ver-table a {
  color: var(--accent);
  white-space: nowrap;
}

.disclaimer {
  margin: 20px 0 0;
  padding: 0 4px;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--muted);
}

.footer {
  text-align: center;
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(80px);
  padding: 10px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s, opacity 0.25s;
  z-index: 10050;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.hidden {
  display: none !important;
}

/* 微信内置浏览器：顶部提示条（参照蒲公英） */
body.wechat-embed {
  padding-top: calc(118px + env(safe-area-inset-top, 0px));
}

@media (max-width: 380px) {
  body.wechat-embed {
    padding-top: calc(128px + env(safe-area-inset-top, 0px));
  }
}

.wechat-top-hint {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 14px;
  background: rgba(42, 44, 48, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.wechat-top-hint-main {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.wechat-top-hint-text {
  flex: 1;
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #e8eaed;
  text-align: left;
}

.wechat-top-hint-text strong {
  color: #fff;
  font-weight: 600;
}

.wechat-top-arrow {
  flex-shrink: 0;
  width: 72px;
  margin-top: -4px;
  opacity: 0.95;
}

.wechat-top-arrow svg {
  display: block;
  width: 72px;
  height: auto;
}

.wechat-top-copy {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background: var(--install);
  color: #fff;
}

.wechat-top-copy:active {
  opacity: 0.92;
}

.wechat-top-url {
  margin: 8px 0 0;
  font-size: 0.68rem;
  line-height: 1.4;
  word-break: break-all;
  color: rgba(255, 255, 255, 0.45);
  text-align: left;
}
