:root {
  --ink: #17202a;
  --muted: #66717f;
  --line: #e8edf1;
  --paper: #ffffff;
  --mist: #f5f8f7;
  --mint: #15b79e;
  --mint-dark: #087f6f;
  --coral: #ff6b57;
  --gold: #f7b538;
  --graphite: #242933;
  --shadow: 0 18px 45px rgba(24, 34, 45, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #dfe8e6;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(21, 183, 158, 0.18), transparent 28%),
    linear-gradient(135deg, #eef7f2 0%, #edf2f5 52%, #fff1ee 100%);
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.phone-shell {
  position: relative;
  width: min(100vw, 430px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--mist);
  box-shadow: 0 0 0 1px rgba(23, 32, 42, 0.04), var(--shadow);
}

.page {
  display: none;
  min-height: 100vh;
  padding-bottom: 92px;
}

.page.active {
  display: block;
}

.hero {
  position: relative;
  min-height: 468px;
  overflow: hidden;
  color: #fff;
  background: var(--graphite);
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 18, 25, 0.36) 0%, rgba(12, 18, 25, 0.1) 34%, rgba(12, 18, 25, 0.72) 100%),
    linear-gradient(90deg, rgba(4, 58, 51, 0.22), rgba(255, 107, 87, 0.12));
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(16px + env(safe-area-inset-top)) 18px 12px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 18px;
}

.brand-icon,
.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--mint-dark);
  background: #fff;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 900;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  font-size: 22px;
  line-height: 1;
}

.hero-copy {
  position: absolute;
  z-index: 2;
  left: 20px;
  right: 20px;
  bottom: 30px;
}

.eyebrow {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  width: min(310px, 100%);
  margin: 0;
  font-size: 38px;
  line-height: 1.08;
  font-weight: 900;
}

.hero-copy p:last-of-type {
  width: min(330px, 100%);
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.primary-action,
.ghost-action,
.support-action {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-action {
  color: #fff;
  background: var(--mint);
  box-shadow: 0 12px 28px rgba(21, 183, 158, 0.28);
}

.ghost-action {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.support-action {
  color: var(--ink);
  background: #fff;
}

.full {
  width: 100%;
}

.quick-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 14px 4px;
}

.quick-chip {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.quick-chip.active {
  color: #fff;
  border-color: var(--mint);
  background: var(--mint);
}

.section-block {
  padding: 18px 16px 0;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title p {
  margin: 0 0 2px;
  color: var(--coral);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.section-title h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.section-title span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.compact {
  align-items: center;
}

.benefit-grid {
  display: grid;
  gap: 10px;
}

.benefit-item,
.merchant-card,
.order-box,
.guide-timeline article,
.profile-actions button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.benefit-item {
  padding: 14px;
}

.benefit-item strong,
.advantage-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

.benefit-item span,
.advantage-item span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.merchant-list {
  display: grid;
  gap: 12px;
}

.merchant-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 15px;
}

.merchant-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.merchant-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.merchant-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.merchant-tags span {
  padding: 5px 8px;
  border-radius: 7px;
  color: var(--mint-dark);
  background: #e8f8f5;
  font-size: 11px;
  font-weight: 800;
}

.merchant-side {
  display: grid;
  align-content: space-between;
  justify-items: end;
  min-width: 78px;
}

.price {
  text-align: right;
}

.price strong {
  display: block;
  color: var(--coral);
  font-size: 20px;
}

.price span {
  color: var(--muted);
  font-size: 11px;
}

.enter-store {
  min-width: 74px;
  min-height: 32px;
  border-radius: 8px;
  color: #fff;
  background: var(--graphite);
  font-size: 12px;
  font-weight: 800;
}

.detail-header,
.plain-header {
  padding: calc(16px + env(safe-area-inset-top)) 16px 16px;
  background: #fff;
}

.detail-header {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.detail-header p,
.plain-header p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.detail-header h2,
.plain-header h1 {
  margin: 0;
  font-size: 20px;
}

.back-button {
  background: #f0f4f5;
}

.store-hero {
  margin: 14px 16px 0;
  padding: 20px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(21, 183, 158, 0.96), rgba(9, 115, 101, 0.94)),
    var(--mint-dark);
}

.store-badge {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 7px;
  color: #13372f;
  background: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 900;
}

.store-hero h1 {
  margin: 14px 0 8px;
  font-size: 25px;
  line-height: 1.22;
}

.store-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  line-height: 1.6;
}

.store-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.store-stats span {
  display: grid;
  gap: 4px;
  padding: 10px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 11px;
}

.store-stats b {
  font-size: 17px;
}

.advantage-list {
  display: grid;
  gap: 10px;
}

.advantage-item {
  padding: 14px;
  border-left: 4px solid var(--mint);
  border-radius: 8px;
  background: #fff;
}

.order-box {
  display: grid;
  grid-template-columns: 124px 1fr;
  gap: 14px;
  margin: 18px 16px 0;
  padding: 14px;
}

.qr-card {
  display: grid;
  gap: 8px;
  justify-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.fake-qr {
  width: 106px;
  aspect-ratio: 1;
  border: 8px solid #fff;
  border-radius: 8px;
  background:
    linear-gradient(90deg, #111 10px, transparent 10px 18px, #111 18px 26px, transparent 26px),
    linear-gradient(#111 10px, transparent 10px 18px, #111 18px 26px, transparent 26px),
    conic-gradient(from 90deg, #111 0 25%, transparent 0 50%, #111 0 75%, transparent 0);
  background-size: 28px 28px, 28px 28px, 16px 16px;
  background-color: #fff;
  box-shadow: inset 0 0 0 1px #111;
}

.order-copy h2 {
  margin: 2px 0 8px;
  font-size: 18px;
}

.order-copy p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.flow-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: flow;
}

.flow-list li {
  position: relative;
  padding: 14px 14px 14px 48px;
  border-radius: 8px;
  background: #fff;
}

.flow-list li::before {
  counter-increment: flow;
  content: counter(flow);
  position: absolute;
  left: 14px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: #fff;
  background: var(--coral);
  font-size: 12px;
  font-weight: 900;
}

.flow-list strong,
.flow-list span {
  display: block;
}

.flow-list span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.notice-band {
  margin: 18px 16px 0;
  padding: 12px 14px;
  border-radius: 8px;
  color: #705018;
  background: #fff5da;
  font-size: 12px;
  line-height: 1.55;
}

.plain-header {
  border-bottom: 1px solid var(--line);
}

.plain-header h1 {
  font-size: 28px;
}

.guide-timeline {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.guide-timeline article {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 3px 12px;
  padding: 15px;
}

.guide-timeline b {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #fff;
  background: var(--mint);
}

.guide-timeline strong {
  font-size: 16px;
}

.guide-timeline span,
.statement-list p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.statement-list {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 8px;
  background: #fff;
}

.statement-list p {
  margin: 0;
}

.profile {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.profile .avatar {
  width: 64px;
  height: 64px;
  color: #fff;
  background: var(--mint);
  font-size: 28px;
}

.profile-actions {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.profile-actions button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 14px;
  font-weight: 800;
  background: #fff;
}

.profile-actions span {
  color: var(--muted);
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(100vw, 430px);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}

.tab-item {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-height: 50px;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.tab-item span {
  font-size: 19px;
  line-height: 1;
}

.tab-item.active {
  color: var(--mint-dark);
  background: #e8f8f5;
}

.support-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.support-modal.active {
  display: flex;
}

.support-mask {
  position: absolute;
  inset: 0;
  background: rgba(16, 22, 30, 0.58);
  backdrop-filter: blur(10px);
}

.support-dialog {
  position: relative;
  z-index: 1;
  width: min(330px, calc(100vw - 44px));
  padding: 22px 20px 20px;
  border-radius: 8px;
  background: #fff;
  text-align: center;
  box-shadow: 0 24px 70px rgba(8, 24, 32, 0.28);
}

.support-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--muted);
  background: #f1f5f5;
  font-size: 22px;
  line-height: 1;
}

.support-dialog p {
  margin: 0 0 4px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
}

.support-dialog h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.support-dialog img {
  display: block;
  width: min(250px, 100%);
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.support-dialog span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 360px) {
  .hero {
    min-height: 440px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .quick-panel,
  .store-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .order-box {
    grid-template-columns: 1fr;
  }

  .qr-card {
    justify-items: start;
  }
}

@media (min-width: 431px) {
  body {
    padding: 24px 0;
  }

  .phone-shell {
    min-height: calc(100vh - 48px);
    border-radius: 22px;
  }
}
