:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1d1f24;
  --muted: #6b7280;
  --line: #e7e9ee;
  --brand: #e8505b;
  --brand-2: #d63a5c;
  --code-bg: #f1f3f6;
  --hm: #c7000b;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 16px rgba(16,24,40,.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317; --card: #1b1e24; --text: #eceef2; --muted: #9aa1ad;
    --line: #2a2e36; --code-bg: #242830; --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans",
        "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
.wrap {
  max-width: 560px; margin: 0 auto;
  padding: 24px 16px calc(32px + env(safe-area-inset-bottom));
}
.hero { text-align: center; padding: 20px 0 18px; }
.app-icon { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 8px 24px rgba(214,58,92,.28); }
.hero h1 { margin: 14px 0 2px; font-size: 28px; letter-spacing: 2px; }
.tagline { margin: 0; color: var(--muted); font-size: 14px; }

.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 18px; margin-bottom: 14px;
}
.card h2 { font-size: 17px; margin: 0 0 12px; }
.block { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.block h3 { font-size: 14px; margin: 0 0 8px; color: var(--muted); font-weight: 600; }

.loading { text-align: center; color: var(--muted); padding: 24px 0; }
.ver-line { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 14px; }
.badge {
  font-size: 12px; color: var(--brand); background: rgba(232,80,91,.1);
  padding: 2px 8px; border-radius: 99px; font-weight: 600;
}
.ver { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }

.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 54px; border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-size: 18px; font-weight: 600; letter-spacing: 1px;
  box-shadow: 0 6px 18px rgba(214,58,92,.32);
  transition: transform .08s ease, box-shadow .2s ease;
}
.btn-primary:active { transform: scale(.98); box-shadow: 0 2px 8px rgba(214,58,92,.3); }
.btn-primary svg { width: 24px; height: 24px; fill: currentColor; }
.meta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px;
  margin-top: 12px; color: var(--muted); font-size: 13px;
}
.req { margin: 6px 0 0; text-align: center; color: var(--muted); font-size: 12px; }

.notes { white-space: pre-wrap; word-break: break-word; font-size: 14px; }
.notes.empty-notes { color: var(--muted); }

.hash-row { display: flex; align-items: stretch; gap: 8px; }
.hash {
  flex: 1; min-width: 0; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, "Roboto Mono", monospace;
  background: var(--code-bg); border-radius: 8px; padding: 8px 10px; word-break: break-all;
  user-select: all; -webkit-user-select: all;
}
.btn-copy, .btn-ghost {
  flex: none; border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 8px; padding: 0 12px; font-size: 13px; cursor: pointer; min-height: 34px;
}
.btn-copy:active, .btn-ghost:active { background: var(--code-bg); }

.tips summary {
  font-weight: 600; cursor: pointer; font-size: 16px; list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.tips summary::-webkit-details-marker { display: none; }
.tips summary::after { content: "收起"; font-size: 13px; font-weight: 400; color: var(--muted); }
.tips:not([open]) summary::after { content: "展开"; }
.tips ol { margin: 10px 0 0; padding-left: 20px; color: var(--text); font-size: 14px; }
.tips li { margin: 6px 0; }
.tips li::marker { color: var(--brand); font-weight: 600; }

.harmony h2 { display: flex; align-items: center; gap: 8px; }
.hm-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--hm); flex: none; }
.harmony p { margin: 0; color: var(--muted); font-size: 14px; white-space: pre-wrap; }

.history { list-style: none; margin: 0; padding: 0; }
.history li { padding: 14px 0; border-top: 1px solid var(--line); }
.history li:first-child { border-top: 0; padding-top: 2px; }
.h-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.h-ver { font-weight: 700; font-size: 16px; }
.h-tag { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 0 7px; margin-left: 6px; font-weight: 400; vertical-align: 2px; }
.h-dl { flex: none; font-size: 14px; font-weight: 600; padding: 4px 12px; border-radius: 99px; background: rgba(232,80,91,.1); }
.h-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.h-notes { font-size: 13px; margin-top: 6px; white-space: pre-wrap; word-break: break-word; }
.h-sha { margin-top: 8px; }
.h-sha .hash { font-size: 11px; padding: 6px 8px; }
.h-sha .btn-copy { min-height: 28px; font-size: 12px; padding: 0 10px; }

.empty { text-align: center; padding: 18px 0 6px; }
.empty-icon { font-size: 40px; }
.empty p { margin: 6px 0 0; font-weight: 600; }
.empty .sub { font-weight: 400; color: var(--muted); font-size: 13px; }

.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 10px 0; }

.toast {
  position: fixed; left: 50%; bottom: calc(40px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: rgba(20,20,24,.88); color: #fff; padding: 8px 16px; border-radius: 99px; font-size: 14px;
  z-index: 50; pointer-events: none;
}

.wx-mask {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.82); color: #fff;
  text-align: center; padding: 90px 28px 0; font-size: 16px;
}
.wx-mask p { margin: 8px 0; }
.wx-mask .btn-ghost { margin-top: 24px; background: transparent; color: #fff; border-color: rgba(255,255,255,.5); padding: 0 22px; min-height: 38px; }
.wx-arrow { position: absolute; top: 8px; right: 22px; font-size: 54px; line-height: 1; }
[hidden] { display: none !important; }
