:root {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #17212d;
  background: #fff;
  --blue: #245cff;
  --coral: #ff594a;
  --method-color: #245cff;
}

* { box-sizing: border-box; }
body { margin: 0; }
body[data-method="wechat"] { --method-color: #16a36a; }
body[data-method="jd"] { --method-color: #e94948; }
[hidden] { display: none !important; }

.topbar { border-bottom: 1px solid #edf0f4; background: #fff; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: min(100% - 40px, 960px); min-height: 64px; margin: 0 auto; }
.identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mark { display: grid; width: 30px; height: 30px; flex: none; place-items: center; border-radius: 7px; background: var(--blue); color: #fff; font-size: 16px; font-weight: 750; }
.brand { font-size: 15px; font-weight: 720; white-space: nowrap; }
.connection { display: inline-flex; align-items: center; gap: 7px; color: #667482; font-size: 12px; white-space: nowrap; }
.connection::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #f0a832; }
.connection.online::before { background: #12a66b; }

.page { width: min(100% - 40px, 460px); margin: 0 auto; padding: 43px 0 max(48px, env(safe-area-inset-bottom)); }
.intro { margin-bottom: 37px; }
.eyebrow { color: var(--blue); font-size: 12px; font-weight: 700; }
.method { display: flex; align-items: center; gap: 12px; min-width: 0; margin-top: 11px; }
.method-symbol { display: grid; width: 38px; height: 38px; flex: none; place-items: center; border: 1px solid color-mix(in srgb, var(--method-color) 25%, white); border-radius: 8px; background: color-mix(in srgb, var(--method-color) 8%, white); color: var(--method-color); font-size: 19px; font-weight: 750; }
h1 { min-width: 0; margin: 0; font-size: 27px; font-weight: 760; line-height: 1.25; overflow-wrap: anywhere; }
.scan-hint { margin: 11px 0 0; color: #71808d; font-size: 14px; line-height: 1.55; }

.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid #edf0f4; font-size: 14px; font-weight: 680; }
.qr-note { color: #7b8793; font-size: 12px; font-weight: 450; text-align: right; }
.qr-frame { position: relative; display: grid; width: min(100%, 308px); aspect-ratio: 1; place-items: center; margin: 26px auto 24px; padding: 15px; border: 1px solid #e5eaf0; border-radius: 8px; background: #fff; }
.qr-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.empty { display: grid; justify-items: center; gap: 17px; color: #8995a1; font-size: 13px; }
.empty-mark { display: grid; grid-template-columns: repeat(2, 22px); gap: 7px; }
.empty-mark i { display: block; width: 22px; height: 22px; border: 5px solid #cbd6e4; border-radius: 2px; }
.empty-mark i:last-child { border: 0; background: #cbd6e4; }
.expired-layer { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 8px; background: #fffffff0; color: #dc7136; font-size: 16px; font-weight: 700; }
.timer-block { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; border-top: 1px solid #edf0f4; border-bottom: 1px solid #edf0f4; color: #65727f; font-size: 13px; }
.countdown { color: var(--blue); font-size: 25px; font-weight: 760; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; }

.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.actions:has(.action[hidden]) { grid-template-columns: 1fr; }
.action { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 10px 13px; border: 0; border-radius: 7px; color: #fff; font: inherit; font-size: 14px; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; transition: filter .15s ease, transform .15s ease; }
.action:hover { filter: brightness(.94); }
.action:active { transform: translateY(1px); }
.action:focus-visible { outline: 3px solid #90aaff; outline-offset: 2px; }
.action-primary { background: var(--blue); }
.action-secondary { background: var(--coral); }
.status { display: flex; align-items: flex-start; gap: 9px; margin: 25px 0 0; color: #71808d; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.status::before { content: ""; width: 7px; height: 7px; flex: none; margin-top: 6px; border-radius: 50%; background: #17aa70; }
.status.expired { color: #aa6840; }
.status.expired::before { background: #f0a832; }

@media (max-width: 480px) {
  .topbar-inner { width: calc(100% - 36px); min-height: 58px; }
  .page { width: calc(100% - 36px); padding-top: 34px; }
  .intro { margin-bottom: 29px; }
  h1 { font-size: 25px; }
  .qr-frame { width: min(100%, 290px); margin-block: 22px 20px; }
  .actions { grid-template-columns: 1fr; }
}
