* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif; background: #ededed; color: #333; }
body { overflow: hidden; }

.wx-page { display: flex; flex-direction: column; height: 100vh; max-width: 480px; margin: 0 auto; background: #ededed; }

.wx-header { background: #07c160; color: #fff; padding: 0; flex-shrink: 0; }
.ali-header { background: #1677ff; color: #fff; padding: 0; flex-shrink: 0; }
.ali-page .amount-cursor { background: #1677ff; }
.ali-page .swiper-dot.active { background: #1677ff; }
.ali-page .key.pay-key { background: #1677ff; }
.ali-page .key.pay-key:active { background: #0958d9; }
.ali-page .key.pay-key.disabled { background: #91caff; }
.ali-page .loading-spinner { border-top-color: #1677ff; }
.wx-header-inner { height: 44px; display: flex; align-items: center; justify-content: center; padding-top: env(safe-area-inset-top); }
.wx-title { font-size: 17px; font-weight: 500; }

.wx-main { flex: 1; overflow-y: auto; padding: 16px 16px 8px; -webkit-overflow-scrolling: touch; }

.section-label, .pay-label { font-size: 13px; color: #888; margin-bottom: 10px; text-align: center; }

.merchant-section { margin-bottom: 20px; }

.swiper-wrap { position: relative; }
.swiper { overflow: hidden; border-radius: 12px; }
.swiper-track { display: flex; transition: transform .35s ease; will-change: transform; }

.merchant-card {
  min-width: 100%;
  background: #fff;
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.merchant-avatar {
  width: 64px; height: 64px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: #fff; font-weight: 600;
  margin: 0 auto 12px;
}
.merchant-name { font-size: 18px; font-weight: 600; color: #333; margin-bottom: 6px; }
.merchant-desc { font-size: 13px; color: #999; }

.swiper-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.swiper-dot { width: 6px; height: 6px; border-radius: 50%; background: #ccc; transition: all .3s; }
.swiper-dot.active { width: 18px; border-radius: 3px; background: #07c160; }

.pay-section {
  background: #fff;
  border-radius: 12px;
  padding: 28px 20px 20px;
  margin-bottom: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.amount-box {
  display: flex; align-items: baseline; justify-content: center;
  min-height: 72px; margin: 8px 0 16px;
}
.currency { font-size: 28px; font-weight: 600; color: #333; margin-right: 4px; }
.amount-display { font-size: 48px; font-weight: 700; color: #333; line-height: 1; letter-spacing: -1px; }
.amount-display.empty { color: #ccc; font-size: 40px; }
.amount-cursor {
  display: inline-block; width: 2px; height: 44px;
  background: #07c160; margin-left: 2px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.pay-tip { text-align: center; font-size: 14px; color: #888; }
.pay-tip strong { color: #333; }

.wx-footer { text-align: center; padding: 8px 16px 4px; flex-shrink: 0; }
.wx-footer p { font-size: 12px; color: #bbb; }

.keyboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 26%;
  grid-template-rows: repeat(4, 56px);
  background: #f7f7f7;
  border-top: 1px solid #ddd;
  flex-shrink: 0;
  padding-bottom: env(safe-area-inset-bottom);
}
.key {
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 500; background: #fff;
  border-right: 1px solid #eee; border-bottom: 1px solid #eee;
  user-select: none; cursor: pointer;
}
.key:active { background: #e8e8e8; }
.key.del { font-size: 20px; color: #666; }
.key.wide { grid-column: span 2; }
.key.pay-key {
  grid-column: 4;
  grid-row: 2 / 5;
  background: #07c160;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 3px;
  border-right: none;
}
.key.pay-key:active { background: #06ad56; }
.key.pay-key.disabled {
  background: #95d5a8;
  pointer-events: none;
}

.toast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: rgba(0,0,0,.75); color: #fff; padding: 12px 20px;
  border-radius: 8px; font-size: 14px; z-index: 999;
  opacity: 0; pointer-events: none; transition: opacity .25s;
  max-width: 80%; text-align: center;
}
.toast.show { opacity: 1; }

.loading {
  position: fixed; inset: 0; background: rgba(255,255,255,.6);
  display: none; align-items: center; justify-content: center; z-index: 998;
}
.loading.show { display: flex; }
.loading-spinner {
  width: 36px; height: 36px; border: 3px solid #ddd;
  border-top-color: #07c160; border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-tip {
  text-align: center; padding: 40px 20px; color: #999; font-size: 14px;
}
