* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* 保证 hidden 属性不被 display:flex 等规则覆盖 */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f2f3f5;
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased;
}

.wechat-tip {
  background: #fff7e6;
  color: #d48806;
  font-size: 12px;
  line-height: 1.5;
  padding: 8px 14px;
  text-align: center;
}

.page { padding: 14px 14px 100px; }

.card {
  background: #fff;
  border-radius: 14px;
  padding: 22px 18px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.card + .card { margin-top: 12px; }

/* 商户行 */
.merchant { display: flex; align-items: center; gap: 10px; }

.merchant-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #07c160;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.merchant-name { font-size: 15px; font-weight: 600; }

/* 金额 */
.amount-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin: 26px 0 8px;
  color: #1a1a1a;
}

.amount-symbol { font-size: 22px; font-weight: 600; margin-right: 2px; }
.amount { font-size: 42px; font-weight: 600; letter-spacing: -0.5px; }

.goods {
  text-align: center;
  font-size: 13px;
  color: #595959;
  margin-bottom: 22px;
}

/* 订单信息 */
.meta-list { border-top: 1px solid #f0f0f0; padding-top: 14px; }

.meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #8c8c8c;
  line-height: 2;
}

.meta-row span:last-child {
  max-width: 70%;
  word-break: break-all;
  text-align: right;
  color: #595959;
}

/* 说明卡片 */
.notice-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #8c8c8c;
  margin-bottom: 8px;
}

.demo-badge {
  background: #ffe58f;
  color: #874d00;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  flex: none;
}

.notice-list { list-style: none; }

.notice-list li {
  font-size: 12px;
  color: #8c8c8c;
  line-height: 1.9;
  padding-left: 12px;
  position: relative;
}

.notice-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #bfbfbf;
}

/* 支付按钮 */
.pay-btn {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  height: 48px;
  border: none;
  border-radius: 999px;
  background: #07c160;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.pay-btn:active { background: #06ad56; }

.pay-btn:disabled {
  background: #b7ebc6;
  cursor: not-allowed;
}

/* 备案信息页脚 */
.beian-footer {
  padding: 0 16px calc(80px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 11px;
  color: #b2b2b2;
}

.beian-footer a { color: #b2b2b2; text-decoration: none; }
.beian-footer a + a { margin-left: 12px; }

/* 弹层 */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.sheet {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  width: 76%;
  max-width: 320px;
  text-align: center;
}

.st-block { display: flex; flex-direction: column; align-items: center; }
.st-title { font-size: 17px; font-weight: 600; margin-top: 14px; }
.st-sub { font-size: 12px; color: #8c8c8c; margin-top: 8px; word-break: break-all; }

/* 加载动画 */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e8e8e8;
  border-top-color: #07c160;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* 成功打勾动画 */
.result-circle {
  stroke-dasharray: 183;
  stroke-dashoffset: 183;
  animation: draw 0.5s ease forwards;
}

.result-check {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 0.35s 0.4s ease forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }

/* 弹层按钮 */
.sheet-btn {
  margin-top: 18px;
  width: 100%;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: #07c160;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.sheet-btn:active { background: #06ad56; }

.sheet-btn-plain {
  margin-top: 10px;
  background: #f5f5f5;
  color: #595959;
  font-weight: 400;
}

.sheet-btn-plain:active { background: #e8e8e8; }

#stFail .sheet-btn:first-of-type { margin-top: 20px; }
