* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: #f4f5f7;
  color: #1a1a1a;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.phone {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background: #fff;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* 顶部商户头 */
.header {
  background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
  color: #fff;
  padding: 22px 20px 26px;
}
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 10px;
  background: rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
}
.brand-name { font-size: 18px; font-weight: 600; }
.brand-sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.merchant-select {
  margin-top: 12px; width: 100%;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff; border-radius: 8px;
  padding: 9px 10px; font-size: 13px; outline: none;
  appearance: none;
}
.merchant-select option { color: #333; }

/* 金额区 */
.amount-wrap { padding: 26px 20px 10px; text-align: center; }
.amount-label { font-size: 13px; color: #999; margin-bottom: 10px; }
.amount-display {
  font-size: 44px; font-weight: 600; color: #1a1a1a;
  letter-spacing: 1px; min-height: 60px; line-height: 60px;
}
.amount-display .yen { font-size: 30px; color: #1a1a1a; margin-right: 4px; vertical-align: top; line-height: 60px; }
.amount-display .amt { color: #1a1a1a; }
.amount-display.empty .amt { color: #ccc; font-size: 30px; }

/* 渠道选择 */
.channel-row { display: flex; gap: 10px; padding: 6px 20px 14px; }
.ch-pill {
  flex: 1; text-align: center; padding: 10px 0;
  border-radius: 10px; border: 1px solid #e5e5e5;
  font-size: 14px; color: #555; background: #fafafa;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.ch-pill.active { border-color: #07c160; color: #07c160; background: #f0faf3; font-weight: 600; }
.ch-pill .dot { width: 16px; height: 16px; border-radius: 4px; display: inline-block; }
.ch-pill .dot.wx { background: #07c160; }
.ch-pill .dot.ali { background: #1677ff; }
.ch-pill .dot.agg { background: linear-gradient(135deg,#07c160,#1677ff); }
.ch-pill .dot.dcep { background: #c8102e; }

/* 键盘 */
.keypad { padding: 4px 12px 16px; }
.keypad-row { display: flex; gap: 8px; margin-bottom: 8px; }
.key {
  flex: 1; height: 56px; border-radius: 10px;
  background: #f7f8fa; font-size: 22px; color: #1a1a1a;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; transition: background .12s;
}
.key:active { background: #e9ebee; }
.key.fn { background: #eef0f2; color: #666; font-size: 20px; }

/* 主按钮 */
.action { padding: 4px 16px 24px; }
.btn-pay {
  width: 100%; height: 50px; border: none; border-radius: 25px;
  background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
  color: #fff; font-size: 17px; font-weight: 600;
  box-shadow: 0 6px 14px rgba(7,193,96,.28);
}
.btn-pay:disabled { background: #c7e9d4; box-shadow: none; }

/* 二维码弹层 */
.mask {
  position: absolute; inset: 0; background: rgba(0,0,0,.5);
  display: none; align-items: center; justify-content: center; z-index: 20;
  padding: 24px;
}
.mask.show { display: flex; }
.qr-card {
  width: 100%; max-width: 340px; background: #fff; border-radius: 16px;
  padding: 22px 20px 24px; text-align: center;
}
.qr-merchant { font-size: 16px; font-weight: 600; }
.qr-amt { font-size: 30px; font-weight: 700; color: #07c160; margin: 8px 0 4px; }
.qr-amt .yen { font-size: 18px; }
.qr-tip { font-size: 12px; color: #999; margin-bottom: 14px; }
.qr-img {
  width: 220px; height: 220px; margin: 0 auto 14px; border-radius: 10px;
  background: #f4f5f7; display: flex; align-items: center; justify-content: center;
}
.qr-img img { width: 220px; height: 220px; border-radius: 8px; }
.qr-status { font-size: 13px; color: #666; margin-bottom: 14px; min-height: 18px; }
.qr-status.pay { color: #07c160; font-weight: 600; }
.qr-actions { display: flex; gap: 10px; }
.qr-actions button { flex: 1; height: 40px; border-radius: 20px; border: 1px solid #ddd; background: #fff; font-size: 14px; color: #555; }
.qr-actions .refresh { border: none; background: #f2f3f5; }

/* 成功页 */
.success {
  position: absolute; inset: 0; background: #fff; z-index: 30;
  display: none; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; text-align: center;
}
.success.show { display: flex; }
.success-icon {
  width: 76px; height: 76px; border-radius: 50%; background: #07c160;
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
  font-size: 40px; color: #fff;
}
.success-title { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.success-amt { font-size: 34px; font-weight: 700; color: #07c160; margin: 6px 0 22px; }
.success-amt .yen { font-size: 20px; }
.success-meta { font-size: 13px; color: #999; line-height: 1.8; margin-bottom: 28px; }
.btn-again {
  width: 80%; max-width: 260px; height: 46px; border: none; border-radius: 23px;
  background: linear-gradient(135deg, #07c160 0%, #06ad56 100%); color: #fff;
  font-size: 16px; font-weight: 600;
}
.loading-dot { display: inline-block; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }
