:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #1a2332;
  --muted: #5c6b7f;
  --primary: #1677ff;
  --primary-dark: #0958d9;
  --accent: #13c2c2;
  --border: #e6ebf2;
  --shadow: 0 12px 40px rgba(22, 39, 66, 0.08);
  --radius: 16px;
  --max: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }

.container {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.logo-text { font-size: 1.15rem; }

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover,
.nav a.active { color: var(--primary); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Hero */
.hero {
  padding: 4.5rem 0 3.5rem;
  background:
    radial-gradient(circle at 85% 15%, rgba(19, 194, 194, 0.12), transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(22, 119, 255, 0.1), transparent 45%),
    var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(22, 119, 255, 0.08);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 36rem;
}

.lead strong { color: var(--text); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 24px rgba(22, 119, 255, 0.25);
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.trust-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.stat-card {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-desc {
  color: var(--muted);
  font-size: 0.92rem;
}

.feature-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.mini-item {
  background: var(--bg);
  border-radius: 12px;
  padding: 0.85rem;
}

.mini-item strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}

.mini-item span {
  color: var(--muted);
  font-size: 0.8rem;
}

/* Sections */
.section { padding: 4rem 0; }
.section-muted { background: #eef2f7; }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.section-head h2 {
  font-size: 1.85rem;
  margin-bottom: 0.5rem;
}

.section-head p { color: var(--muted); }

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.card h3 { margin-bottom: 0.6rem; font-size: 1.1rem; }
.card p { color: var(--muted); font-size: 0.95rem; }
.card p strong { color: var(--text); }

.compliance-block {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: start;
}

.compliance-intro { color: var(--muted); margin: 0.75rem 0 1rem; }

.compliance-list {
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.compliance-list li {
  padding-left: 1rem;
  border-left: 3px solid var(--primary);
  color: var(--muted);
  font-size: 0.95rem;
}

.compliance-list strong { color: var(--text); }

.notice-box {
  background: linear-gradient(160deg, #1677ff, #13c2c2);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.notice-box h3 { margin-bottom: 0.75rem; }
.notice-box p { opacity: 0.95; font-size: 0.92rem; margin-bottom: 0.75rem; }

.text-link {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
}

.tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

.tag {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--muted);
}

.cta-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cta-inner p { color: var(--muted); margin-top: 0.35rem; }

/* Inner pages */
.page-hero {
  padding: 3rem 0 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.page-hero p { color: var(--muted); max-width: 720px; }

.content-page { padding: 2.5rem 0 4rem; }

.prose {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.prose h2 {
  font-size: 1.25rem;
  margin: 1.75rem 0 0.75rem;
}

.prose h2:first-child { margin-top: 0; }

.prose p, .prose li {
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.prose ul, .prose ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.prose strong { color: var(--text); }

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.info-item {
  background: var(--bg);
  border-radius: 12px;
  padding: 1rem 1.15rem;
}

.info-item strong {
  display: block;
  margin-bottom: 0.25rem;
}

.info-item span { color: var(--muted); font-size: 0.92rem; }

/* Footer */
.site-footer {
  background: #111827;
  color: #cbd5e1;
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.footer-desc { font-size: 0.92rem; }

.footer-grid h4 {
  color: #fff;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.footer-grid a {
  display: block;
  color: #94a3b8;
  font-size: 0.92rem;
  margin-bottom: 0.4rem;
}

.footer-grid a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #64748b;
}

.icp { color: #94a3b8; }

/* Mobile */
@media (max-width: 900px) {
  .hero-grid,
  .compliance-block,
  .cards-3,
  .footer-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav.open { display: flex; }
  .nav-toggle { display: flex; }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .spend-grid { grid-template-columns: repeat(2, 1fr); }
  .amount-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: 1fr; }
  .flow-steps { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
}

/* ===== App / 会员充值消费 ===== */
.app-body { background: #eef2f7; }
.app-main { padding: 1.5rem 0 3rem; min-height: calc(100vh - 64px); }
.app-container { max-width: 920px; }
.app-container.narrow { max-width: 520px; }

.wallet-card {
  background: linear-gradient(135deg, #1677ff 0%, #13c2c2 100%);
  color: #fff;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.wallet-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.wallet-label { opacity: 0.9; font-size: 0.9rem; }
.wallet-balance { font-size: 2.5rem; font-weight: 800; line-height: 1.1; margin: 0.25rem 0; }
.wallet-sub { opacity: 0.85; font-size: 0.8rem; }

.wallet-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: grid; place-items: center; font-size: 0.85rem; font-weight: 700;
}

.wallet-actions { display: flex; gap: 0.75rem; }
.wallet-btn {
  flex: 1; text-align: center; padding: 0.75rem;
  border-radius: 10px; font-weight: 700; font-size: 0.95rem;
  background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.25);
}
.wallet-btn-primary { background: #fff; color: var(--primary); border-color: #fff; }

.app-section { margin-bottom: 1.5rem; }
.app-section-title { font-size: 1.15rem; margin-bottom: 0.35rem; }
.app-section-desc { color: var(--muted); font-size: 0.92rem; margin-bottom: 1rem; }

.spend-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.spend-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: box-shadow 0.15s, transform 0.15s;
}
.spend-item:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.spend-icon { font-size: 1.5rem; }
.spend-item strong { font-size: 0.95rem; }
.spend-item span:last-child { color: var(--muted); font-size: 0.8rem; }

.record-list {
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.record-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.15rem; border-bottom: 1px solid var(--border); gap: 1rem;
}
.record-list li:last-child { border-bottom: none; }
.record-meta { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 0.15rem; }
.record-amount { font-weight: 700; font-size: 1rem; white-space: nowrap; }
.record-amount.minus { color: #ef4444; }
.record-amount.plus { color: #16a34a; }

.compliance-tip {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 12px;
  padding: 1rem 1.15rem;
  font-size: 0.88rem;
  line-height: 1.55;
}
.compliance-tip a { color: var(--primary); text-decoration: underline; }

.site-footer-compact { padding: 1.25rem 0; }

/* Recharge */
.recharge-header h1 { font-size: 1.5rem; margin: 0.5rem 0 0.35rem; }
.recharge-header p { color: var(--muted); font-size: 0.92rem; }
.back-link { color: var(--muted); font-size: 0.88rem; }
.back-link:hover { color: var(--primary); }

.balance-strip {
  display: flex; align-items: baseline; gap: 0.5rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 1rem 1.15rem; margin: 1rem 0;
}
.balance-strip strong { font-size: 1.5rem; color: var(--primary); }

.recharge-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}
.recharge-panel h2 { font-size: 1rem; margin-bottom: 0.85rem; }

.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.amount-chip {
  padding: 0.85rem 0.5rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  font-size: 0.95rem;
}
.amount-chip.active {
  border-color: var(--primary);
  background: rgba(22, 119, 255, 0.08);
  color: var(--primary);
}

.custom-amount span { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.4rem; }
.custom-input-wrap {
  display: flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--border); border-radius: 10px; padding: 0.65rem 0.85rem;
  background: var(--bg);
}
.custom-input-wrap input {
  border: none; background: none; outline: none; width: 100%;
  font-size: 1.1rem; font-weight: 600;
}

.pay-summary {
  margin: 1.15rem 0;
  padding: 1rem;
  background: var(--bg);
  border-radius: 12px;
}
.pay-row {
  display: flex; justify-content: space-between;
  margin-bottom: 0.5rem; font-size: 0.92rem;
}
.pay-row:last-child { margin-bottom: 0; }
.pay-row.muted { color: var(--muted); font-size: 0.85rem; }

.agree-row {
  display: flex; gap: 0.5rem; align-items: flex-start;
  font-size: 0.82rem; color: var(--muted); margin-bottom: 1rem;
  line-height: 1.45;
}
.agree-row a { color: var(--primary); }

.wechat-pay-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.95rem;
  border: none; border-radius: 12px;
  background: #07c160;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(7, 193, 96, 0.3);
}
.wechat-pay-btn:hover { background: #06ad56; }

.pay-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.95rem;
  border: none; border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(22, 119, 255, 0.25);
}
.pay-btn:hover { background: var(--primary-dark); }

.recharge-usage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.recharge-usage h2 { font-size: 1rem; margin-bottom: 0.75rem; }
.usage-list { padding-left: 1.1rem; color: var(--muted); font-size: 0.92rem; }
.usage-list li { margin-bottom: 0.45rem; }
.text-link-block { display: inline-block; margin-top: 0.75rem; color: var(--primary); font-weight: 600; }

/* Mall */
.mall-topbar {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.mall-topbar h1 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.mall-topbar p { color: var(--muted); font-size: 0.92rem; }
.mall-balance {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 0.75rem 1rem; font-size: 0.9rem; white-space: nowrap;
}
.mall-balance strong { color: var(--primary); font-size: 1.1rem; }
.mall-recharge-link {
  margin-left: 0.5rem; color: var(--primary); font-weight: 600; font-size: 0.85rem;
}

.mall-tabs {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem;
}
.mall-tab {
  padding: 0.45rem 0.85rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 0.88rem; color: var(--muted);
}
.mall-tab.active, .mall-tab:hover { border-color: var(--primary); color: var(--primary); background: rgba(22,119,255,0.06); }

.mall-section { margin-bottom: 2.5rem; scroll-margin-top: 80px; }
.mall-section h2 { font-size: 1.15rem; margin-bottom: 0.35rem; }
.mall-section-desc { color: var(--muted); font-size: 0.88rem; margin-bottom: 1rem; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.product-cover {
  height: 100px;
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 0.95rem;
}
.venue-a { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.venue-b { background: linear-gradient(135deg, #0ea5e9, #06b6d4); }
.venue-c { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.food-a { background: linear-gradient(135deg, #78350f, #92400e); }
.food-b { background: linear-gradient(135deg, #15803d, #22c55e); }
.food-c { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.goods-a { background: linear-gradient(135deg, #be185d, #ec4899); }
.goods-b { background: linear-gradient(135deg, #4338ca, #6366f1); }
.goods-c { background: linear-gradient(135deg, #b45309, #fbbf24); }
.course-a { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.course-b { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.vip-a { background: linear-gradient(135deg, #64748b, #94a3b8); }
.vip-b { background: linear-gradient(135deg, #ca8a04, #eab308); }

.product-card h3 { font-size: 0.95rem; padding: 0.85rem 0.85rem 0.25rem; }
.product-card p { font-size: 0.82rem; color: var(--muted); padding: 0 0.85rem 0.75rem; min-height: 2.5em; }
.product-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.75rem 0.85rem; border-top: 1px solid var(--border);
}
.price { color: var(--primary); font-weight: 800; font-size: 1rem; }
.buy-btn {
  padding: 0.45rem 0.75rem; border-radius: 8px; border: none;
  background: var(--primary); color: #fff; font-weight: 600; font-size: 0.82rem; cursor: pointer;
}
.buy-btn:hover { background: var(--primary-dark); }

/* Activities */
.activity-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.activity-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.25rem; position: relative;
  box-shadow: var(--shadow);
}
.activity-badge {
  position: absolute; top: 1rem; right: 1rem;
  font-size: 0.75rem; font-weight: 700; padding: 0.25rem 0.55rem; border-radius: 6px;
}
.activity-badge.open { background: #dcfce7; color: #166534; }
.activity-badge.hot { background: #fee2e2; color: #991b1b; }
.activity-badge.soon { background: #e0e7ff; color: #3730a3; }
.activity-card h3 { font-size: 1.1rem; padding-right: 4rem; margin-bottom: 0.6rem; }
.activity-meta { list-style: none; color: var(--muted); font-size: 0.88rem; margin-bottom: 0.65rem; }
.activity-meta li { margin-bottom: 0.2rem; }
.activity-desc { font-size: 0.9rem; color: var(--muted); margin-bottom: 1rem; }
.activity-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.price-alt { color: var(--muted); font-size: 0.85rem; margin-left: 0.35rem; }

.flow-diagram {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.5rem;
}
.flow-diagram h2 { font-size: 1rem; margin-bottom: 1rem; text-align: center; }
.flow-steps { display: flex; align-items: center; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }
.flow-step {
  text-align: center; background: var(--bg); border-radius: 12px; padding: 1rem; min-width: 120px;
}
.flow-step span {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 0.85rem; margin-bottom: 0.35rem;
}
.flow-step p { color: var(--muted); font-size: 0.82rem; margin-top: 0.15rem; }
.flow-arrow { color: var(--muted); font-weight: 700; font-size: 1.25rem; }

/* Modal & Toast */
.modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.5);
  display: grid; place-items: center; padding: 1rem;
}
.modal[hidden] { display: none; }
.modal-card {
  background: var(--surface); border-radius: 16px; padding: 2rem;
  text-align: center; max-width: 320px; width: 100%;
}
.modal-success {
  width: 56px; height: 56px; border-radius: 50%;
  background: #dcfce7; color: #16a34a;
  display: grid; place-items: center; font-size: 1.5rem; font-weight: 700;
  margin: 0 auto 1rem;
}
.modal-sub { color: var(--muted); font-size: 0.85rem; margin: 0.5rem 0 1.25rem; }

.dialog-card { text-align: center; max-width: 360px; }
.dialog-icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.35rem; font-weight: 800;
  margin: 0 auto 1rem;
}
.dialog-icon-info {
  background: rgba(22, 119, 255, 0.12);
  color: var(--primary);
}
.dialog-icon-warn {
  background: #fef3c7;
  color: #d97706;
}
.dialog-title {
  font-size: 1.15rem;
  margin-bottom: 0.65rem;
}
.dialog-message {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
  text-align: left;
}
.dialog-actions {
  display: flex;
  gap: 0.65rem;
}
.dialog-btn {
  flex: 1;
  min-height: 44px;
}

.toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%);
  background: rgba(26, 35, 50, 0.92); color: #fff;
  padding: 0.75rem 1.25rem; border-radius: 999px;
  font-size: 0.88rem; z-index: 300; max-width: 90vw; text-align: center;
}
.toast[hidden] { display: none; }

/* Auth */
.header-auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.75rem;
  flex-shrink: 0;
}
.header-user {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-login,
.header-register,
.header-logout {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.header-register,
.header-login {
  color: var(--primary);
  border-color: rgba(22, 119, 255, 0.25);
}
.header-logout {
  color: var(--muted);
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow);
  margin-top: 1rem;
}
.auth-card h1 { font-size: 1.5rem; margin-bottom: 0.35rem; }
.auth-desc { color: var(--muted); font-size: 0.92rem; margin-bottom: 1.25rem; }
.auth-desc a { color: var(--primary); }
.auth-form { display: grid; gap: 1rem; }
.auth-form label span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.auth-form input {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  background: var(--bg);
}
.auth-submit { width: 100%; margin-top: 0.25rem; }
.auth-error {
  color: #dc2626;
  font-size: 0.88rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
}
.auth-switch {
  text-align: center;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.auth-switch a { color: var(--primary); font-weight: 600; }

.section-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.section-head-row .app-section-title { margin-bottom: 0; }

.order-id {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 0.15rem;
  font-family: ui-monospace, monospace;
}
.order-empty {
  padding: 2rem 1rem !important;
  justify-content: center !important;
  color: var(--muted) !important;
  text-align: center;
}

@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; gap: 0.5rem; }
  .header-auth { margin-left: auto; }
  .wallet-actions { flex-wrap: wrap; }
  .wallet-btn { min-width: calc(50% - 0.375rem); }
}

@media (max-width: 600px) {
  .product-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }
  .product-foot .price { font-size: 1.05rem; }
  .buy-btn {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
    min-height: 44px;
  }
  .activity-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }
  .activity-foot .buy-btn { width: 100%; min-height: 44px; }
  .mall-topbar { flex-direction: column; align-items: stretch; }
  .mall-balance {
    width: 100%;
    white-space: normal;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
  }
  .mall-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
  }
  .mall-tab { flex-shrink: 0; }
  .app-main {
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  }
  .toast {
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 2rem);
    max-width: none;
    border-radius: 12px;
  }
  .recharge-panel { padding-bottom: 1.5rem; }
  .pay-btn { min-height: 48px; font-size: 1rem; }
  .nav.open + .header-auth,
  .header-auth { order: 3; width: 100%; justify-content: flex-end; margin-top: 0.25rem; }
}
