:root {
  --paper: #F7F6F2;
  --surface: #FFFEFB;
  --ink: #2E3A33;
  --ink-soft: #5B6B73;
  --matcha: #8B9B8A;
  --matcha-deep: #5F6F5E;
  --price: #C97A6D;
  --border: #EBEAE4;
  --alipay: #1677FF;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  padding-bottom: 72px;
}
a { color: inherit; text-decoration: none; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 254, 251, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.topbar-brand { font-weight: 700; font-size: 16px; letter-spacing: 0.04em; }
.topbar-link { font-size: 13px; color: var(--matcha-deep); font-weight: 600; }
.domain-tip {
  font-size: 11px;
  color: #A3A39C;
  padding: 6px 16px 0;
  word-break: break-all;
}
.wrap { max-width: 480px; margin: 0 auto; padding: 12px 16px 24px; }
.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 16px;
  margin-bottom: 16px;
}
.hero h1 { margin: 0 0 8px; font-size: 22px; }
.hero p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.section-title {
  margin: 8px 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--matcha-deep);
}
.products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.product {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: block;
}
.product:active { opacity: 0.92; }
.product-cover {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: linear-gradient(145deg, #EEF1ED, #F7F6F2);
}
.product-body { padding: 10px 12px 12px; }
.product-name {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  min-height: 2.6em;
}
.product-price {
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--price);
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}
.card h2 { margin: 0 0 10px; font-size: 16px; }
.muted { color: var(--ink-soft); font-size: 13px; margin: 0; }
.price-lg {
  font-size: 28px;
  font-weight: 800;
  color: var(--price);
  margin: 8px 0;
}
.btn {
  display: block;
  width: 100%;
  text-align: center;
  border: none;
  border-radius: 999px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-alipay {
  background: var(--alipay);
  color: #fff;
}
.btn:active { opacity: 0.9; }
.pay-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
}
.pay-method.active {
  border-color: var(--alipay);
  background: rgba(22, 119, 255, 0.06);
}
.pay-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #ccc;
  flex-shrink: 0;
}
.pay-method.active .pay-radio {
  border-color: var(--alipay);
  box-shadow: inset 0 0 0 4px var(--alipay);
}
.pay-name { font-weight: 700; font-size: 15px; }
.row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin: 8px 0;
  color: var(--ink-soft);
}
.row strong { color: var(--ink); }
.fixed-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border);
  max-width: 480px;
  margin: 0 auto;
}
.toast {
  display: none;
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%);
  background: rgba(46, 58, 51, 0.92);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 20;
  max-width: 86%;
  text-align: center;
}
.toast.show { display: block; }
.foot-note {
  margin-top: 16px;
  font-size: 11px;
  color: #A3A39C;
  text-align: center;
}
.site-footer {
  margin-top: 32px;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: #F2F0E9;
  text-align: center;
  color: #6B6B66;
  font-size: 12px;
  line-height: 1.85;
}
.site-footer p { margin: 0; }
.site-footer .copyright { margin-bottom: 8px; }
.icp {
  margin: 0;
  font-size: 12px;
  color: var(--ink-soft);
  text-align: center;
}
.icp a {
  color: var(--matcha-deep);
  text-decoration: none;
}
.icp a:hover { text-decoration: underline; }
.icp-link {
  display: inline-flex;
  align-items: center;
  color: #5F6F5E;
  text-decoration: none;
}
.icp-link:hover { text-decoration: underline; color: #2E3A33; }
.icp-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 18px;
  padding: 0 6px;
  margin-right: 6px;
  border-radius: 4px;
  background: #5F6F5E;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  vertical-align: -2px;
}
