:root {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  color: #172033;
  background: #e9eef6;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  cursor: pointer;
}

.preview-stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  padding: 28px;
}

.phone {
  width: 390px;
  height: min(844px, calc(100vh - 56px));
  min-height: 650px;
  background: #f4f7fb;
  border: 8px solid #172033;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(18, 44, 82, .24);
  display: flex;
  flex-direction: column;
}

.mini-header {
  height: 52px;
  flex: 0 0 52px;
  background: #0b4da2;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 15px;
}

.mini-header > span:first-child {
  font-size: 28px;
}

.capsule {
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, .35);
  padding: 6px 10px;
  border-radius: 16px;
}

.viewport {
  flex: 1;
  overflow: auto;
}

.screen {
  display: none;
  padding: 12px 12px 28px;
}

.screen.active {
  display: block;
}

.hero {
  padding: 24px 18px;
  background: linear-gradient(145deg, #083c82, #0f64cf);
  color: #fff;
  border-radius: 16px;
}

.eyebrow,
.page-head span {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .14);
  font-size: 12px;
}

.hero h1 {
  font-size: 25px;
  line-height: 1.28;
  margin: 15px 0 10px;
}

.hero p {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255, 255, 255, .8);
  margin: 0;
}

.hero-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.hero-actions button,
.calc-card button,
.lead-form button {
  flex: 1;
  border: 0;
  border-radius: 9px;
  background: #ffb11b;
  color: #11335c;
  font-weight: 800;
  padding: 11px 8px;
}

.hero-actions .outline {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .4);
}

.recommend-entry {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 15px 16px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #ffd24a, #ffb11b);
  color: #493100;
  text-align: left;
  box-shadow: 0 9px 20px rgba(255, 177, 27, .28);
}

.recommend-entry strong,
.recommend-entry small {
  display: block;
}

.recommend-entry strong {
  font-size: 16px;
}

.recommend-entry small {
  margin-top: 4px;
  color: #75520d;
  font-size: 11px;
}

.recommend-entry b {
  white-space: nowrap;
}

.referral-screen {
  padding-bottom: 36px;
}

.referral-hero {
  padding: 22px 18px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, #083c82, #0f64cf);
}

.referral-hero span {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  color: #7a5100;
  background: #ffd24a;
  font-size: 12px;
  font-weight: 800;
}

.referral-hero h1 {
  margin: 14px 0 8px;
  font-size: 24px;
  line-height: 1.3;
}

.referral-hero p,
.referral-rules p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
}

.referral-tiers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.referral-tiers article,
.referral-rules,
.referral-form,
.referral-result {
  border: 1px solid #e1e7f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(17, 63, 118, .06);
}

.referral-tiers article {
  padding: 15px 10px;
  text-align: center;
}

.referral-tiers b {
  display: grid;
  width: 38px;
  height: 38px;
  margin: 0 auto 9px;
  place-items: center;
  border-radius: 12px;
  color: #8a5a00;
  background: #fff2bd;
}

.referral-tiers strong,
.referral-tiers small {
  display: block;
}

.referral-tiers strong { font-size: 14px; }
.referral-tiers small { margin-top: 5px; color: #a06d00; }

.referral-rules,
.referral-result {
  margin-top: 12px;
  padding: 14px;
}

.referral-rules p { margin-top: 5px; color: #667085; }

.referral-privacy,
.referral-warning {
  margin: 12px 0;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.6;
}

.referral-privacy { color: #5f4a12; background: #fff7dc; }
.referral-warning { color: #8a301f; background: #fff0ed; }

.referral-form {
  padding: 15px;
}

.referral-form label {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
}

.referral-form input {
  width: 100%;
  margin-top: 7px;
  padding: 11px 12px;
  border: 1px solid #d7dfeb;
  border-radius: 9px;
  font: inherit;
  background: #fbfcff;
}

.referral-form button,
.referral-share,
.referral-consult {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #0b56b5;
  font-weight: 800;
}

.referral-share,
.referral-consult { margin-top: 12px; }
.referral-result { color: #344054; font-size: 13px; line-height: 1.65; }

h2 {
  font-size: 18px;
  margin: 20px 0 11px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.category-grid button,
.tool-card,
.product-card,
.calc-card,
.result-card,
.contact-card,
.lead-form,
.detail-card {
  border: 1px solid #e1e7f0;
  background: #fff;
  border-radius: 13px;
  box-shadow: 0 6px 16px rgba(17, 63, 118, .05);
}

.category-grid button {
  padding: 13px 5px;
  color: #172033;
}

.category-grid b {
  display: block;
  width: 38px;
  height: 38px;
  line-height: 38px;
  margin: 0 auto 7px;
  border-radius: 11px;
  background: #eaf2ff;
  color: #0b4da2;
  font-size: 20px;
}

.category-grid strong,
.category-grid small {
  display: block;
}

.category-grid strong {
  font-size: 14px;
}

.category-grid small {
  font-size: 10px;
  color: #7a8494;
  margin-top: 5px;
}

.tool-card {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  margin-top: 14px;
  text-align: left;
  color: #172033;
}

.tool-card strong,
.tool-card small {
  display: block;
}

.tool-card strong {
  font-size: 16px;
}

.tool-card small {
  font-size: 12px;
  color: #667085;
  margin-top: 4px;
}

.tool-card > b {
  color: #0b4da2;
}

.points-entry {
  min-height: 54px;
  border-color: #cfe0fa;
  background: linear-gradient(135deg, #fff, #eef5ff);
}

.points-screen {
  padding-bottom: 18px;
}

.points-search,
.points-state,
.points-bank-list,
.points-bank-head,
.points-section {
  border: 1px solid #e1e7f0;
  background: #fff;
  border-radius: 13px;
  box-shadow: 0 6px 16px rgba(17, 63, 118, .05);
}

.points-search {
  display: block;
  padding: 13px;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.points-search input {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #d7dfeb;
  border-radius: 9px;
  background: #fbfcff;
  font: inherit;
}

.points-state,
.points-copy {
  margin-top: 12px;
  padding: 13px;
  color: #667085;
  font-size: 12px;
  line-height: 1.6;
}

.points-bank-list {
  min-height: 48px;
  margin-top: 12px;
}

.points-bank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px;
}

.points-bank-row + .points-bank-row {
  border-top: 1px solid #e1e7f0;
}

.points-list-icon {
  display: block;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: contain;
}

.points-list-fallback {
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #eaf2ff;
  color: #0b4da2;
  font-size: 16px;
  font-weight: 800;
}

.points-bank-info {
  flex: 1;
  min-width: 0;
}

.points-bank-info strong,
.points-bank-aliases {
  display: block;
}

.points-bank-aliases {
  margin-top: 4px;
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.points-bank-row button {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: #eaf2ff;
  color: #0b4da2;
  font: inherit;
  font-weight: 800;
}

.points-back {
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: #eaf2ff;
  color: #0b4da2;
  font-weight: 800;
}

.points-bank-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 12px;
  padding: 16px;
}

.points-bank-icon {
  display: grid;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 14px;
  background: #eaf2ff;
  color: #0b4da2;
  font-size: 18px;
  font-weight: 800;
}

.points-detail-icon {
  display: block;
  width: 56px;
  height: 56px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.points-bank-head span,
.points-bank-head p {
  color: #667085;
  font-size: 12px;
}

.points-bank-head h1 {
  margin: 4px 0;
  font-size: 22px;
}

.points-bank-head p {
  margin: 0;
}

.points-section {
  margin-top: 12px;
  padding: 15px;
}

.points-section h2 {
  margin: 0 0 11px;
  font-size: 16px;
}

.points-channel-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.points-channel-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 10px;
  border-radius: 9px;
  background: #f4f7fb;
  font-size: 13px;
}

.points-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.points-status.earned { background: #e7f7ec; color: #23723c; }
.points-status.excluded { background: #ffebeb; color: #b42318; }
.points-status.campaign { background: #fff4d6; color: #8a5710; }
.points-status.issuer { background: #eaf0f8; color: #52647d; }

.featured {
  display: flex;
  gap: 10px;
  overflow: auto;
}

.featured article {
  min-width: 220px;
  overflow: hidden;
  border-radius: 13px;
  background: #fff;
  border: 1px solid #e1e7f0;
  cursor: pointer;
}

.featured article:focus-visible,
.product-card:focus-visible {
  outline: 3px solid rgba(11, 77, 162, .3);
  outline-offset: 2px;
}

.featured img {
  width: 100%;
  height: 118px;
  object-fit: cover;
}

.featured div {
  padding: 10px;
}

.featured strong,
.featured small {
  display: block;
}

.featured small {
  color: #667085;
  margin-top: 5px;
  line-height: 1.4;
}

.notice {
  background: #fff8e8;
  color: #8a5710;
  padding: 11px;
  border-radius: 9px;
  font-size: 11px;
  line-height: 1.55;
}

.page-head {
  background: linear-gradient(145deg, #083c82, #0f64cf);
  margin: -12px -12px 14px;
  padding: 25px 18px;
  color: #fff;
}

.page-head h1 {
  font-size: 24px;
  margin: 12px 0 7px;
}

.page-head p {
  font-size: 12px;
  color: rgba(255, 255, 255, .78);
  margin: 0;
}

.filters {
  display: flex;
  gap: 7px;
  overflow: auto;
  margin-bottom: 12px;
}

.filters button {
  border: 0;
  background: #e7edf6;
  color: #5f6b7b;
  padding: 7px 13px;
  border-radius: 16px;
  white-space: nowrap;
}

.filters button.active {
  background: #0b4da2;
  color: #fff;
}

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

.product-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  overflow: hidden;
  cursor: pointer;
}

.product-media {
  min-height: 156px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.product-card img {
  width: 112px;
  height: 112px;
  object-fit: contain;
}

.product-body {
  padding: 12px;
}

.product-card span {
  font-size: 10px;
  color: #0b4da2;
}

.product-card strong {
  display: block;
  margin: 5px 0;
  font-size: 15px;
}

.product-card p {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: #667085;
}

.share-button,
.consult-button {
  border: 0;
  border-radius: 9px;
  padding: 10px 12px;
  font-weight: 800;
}

.product-card .share-button {
  margin-top: 10px;
  padding: 7px 11px;
  background: #fff3cf;
  color: #7a5200;
  font-size: 11px;
}

.detail-screen {
  padding-bottom: 18px;
}

.detail-gallery {
  width: calc(100% + 24px);
  margin: -12px -12px 12px;
  background: #fff;
}

.detail-image {
  display: block;
  width: 100%;
  height: 235px;
  object-fit: contain;
  background: #fff;
}

.detail-images {
  display: flex;
  gap: 8px;
  padding: 8px 12px 12px;
  overflow-x: auto;
}

.detail-thumbnail {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  padding: 2px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #f3f7fd;
}

.detail-thumbnail.active {
  border-color: #0b4da2;
}

.detail-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 7px;
  object-fit: contain;
}

.detail-card {
  padding: 16px;
  margin-bottom: 12px;
}

.detail-brand {
  color: #0b4da2;
  font-size: 12px;
  font-weight: 800;
}

.detail-card h1 {
  margin: 8px 0;
  font-size: 24px;
}

.detail-card > p {
  margin: 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.7;
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-chip {
  padding: 7px 10px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #0b4da2;
  font-size: 12px;
}

.detail-chip::before {
  content: "✓ ";
}

.detail-scenes {
  display: grid;
  gap: 8px;
}

.detail-scene {
  padding: 10px;
  border-radius: 9px;
  background: #f4f7fb;
  color: #475467;
  font-size: 12px;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.detail-actions .share-button {
  background: #ffb11b;
  color: #493100;
}

.detail-actions .consult-button {
  background: #0b4da2;
  color: #fff;
}

.calc-card,
.lead-form {
  padding: 16px;
}

.calc-card label,
.lead-form label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 13px;
}

.calc-card input,
.lead-form input,
.lead-form select {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1px solid #d7dfeb;
  border-radius: 9px;
  padding: 11px;
  background: #fbfcff;
  font: inherit;
}

.calc-card button,
.lead-form button {
  width: 100%;
  background: #0b4da2;
  color: #fff;
}

.result-card {
  padding: 18px;
  margin: 12px 0;
}

.result-card span,
.result-card strong,
.result-card small {
  display: block;
}

.result-card span,
.result-card small {
  color: #667085;
  font-size: 12px;
}

.result-card strong {
  font-size: 24px;
  color: #0b4da2;
  margin: 8px 0;
}

.contact-section-title {
  margin: 18px 0 9px;
  font-size: 16px;
}

.contact-card {
  padding: 16px;
}

.wechat-card {
  text-align: center;
}

.direct-title {
  display: block;
  color: #172033;
  font-size: 17px;
}

.direct-contact {
  margin: 7px 0 0;
  color: #667085;
  font-size: 13px;
}

.direct-contact span {
  color: #172033;
  font-weight: 800;
}

.wechat-qr {
  display: block;
  width: 190px;
  height: 190px;
  max-width: 100%;
  margin: 16px auto 12px;
  border-radius: 10px;
  object-fit: cover;
  background: #f4f7fb;
  cursor: pointer;
}

.wechat-tip {
  margin: 4px 0;
  color: #667085;
  font-size: 11px;
  line-height: 1.6;
}

.contact-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.contact-actions button,
.contact-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 46px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}

.contact-actions button {
  border: 0;
  background: #0b4da2;
  color: #fff;
}

.contact-actions a {
  background: #eaf2ff;
  color: #0b4da2;
}

.address-text {
  margin: 0;
  color: #172033;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.65;
}

.address-tip {
  margin: 9px 0 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.65;
}

.navigate-action {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  margin-top: 14px;
  border-radius: 10px;
  background: #0b4da2;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.lead-form {
  margin-top: 12px;
}

.suggestion-form {
  padding: 16px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(30, 64, 110, .08);
}

.suggestion-form textarea {
  display: block;
  width: 100%;
  min-height: 96px;
  padding: 11px;
  border: 1px solid #d7dfeb;
  border-radius: 10px;
  background: #fbfcff;
  box-sizing: border-box;
  resize: vertical;
  font: inherit;
}

.suggestion-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: #7b8494;
  font-size: 10px;
  line-height: 1.55;
}

.suggestion-meta span:first-child { flex: 1; }
.suggestion-meta span:last-child { flex: none; }

.suggestion-form button {
  width: 100%;
  height: 46px;
  margin-top: 13px;
  border: 0;
  border-radius: 10px;
  background: #0b4da2;
  color: #fff;
  font-weight: 800;
}

.suggestion-form button:disabled { opacity: .7; }
.featured-suggestions { margin-top: 12px; }
.featured-suggestion + .featured-suggestion { margin-top: 13px; padding-top: 13px; border-top: 1px solid #e4e9f0; }
.featured-suggestion strong { color: #0b4da2; font-size: 12px; }
.featured-suggestion p { margin: 6px 0 0; color: #344054; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }

.lead-success {
  margin: 12px 0 0;
  padding: 11px;
  border-radius: 9px;
  background: #eaf9ef;
  color: #24713d;
  font-size: 12px;
  line-height: 1.6;
}

.tabbar {
  height: 68px;
  flex: 0 0 68px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border-top: 1px solid #e1e7f0;
  padding-bottom: 4px;
}

.tabbar button {
  border: 0;
  background: none;
  color: #667085;
  font-size: 10px;
}

.tabbar b,
.tabbar span {
  display: block;
}

.tabbar b {
  font-size: 19px;
  margin-bottom: 3px;
}

.tabbar button.active {
  color: #0b4da2;
}

.preview-note {
  width: 360px;
}

.preview-note span {
  color: #0b4da2;
  font-weight: 800;
}

.preview-note h2 {
  font-size: 32px;
  line-height: 1.25;
  margin: 14px 0;
}

.preview-note p {
  color: #667085;
  line-height: 1.8;
}

.toast {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  background: #172033;
  color: #fff;
  padding: 10px 16px;
  border-radius: 22px;
  transition: .2s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%);
}

@media (max-width: 760px) {
  .preview-stage {
    padding: 0;
  }

  .phone {
    width: 100%;
    height: 100vh;
    min-height: 0;
    border: 0;
    border-radius: 0;
  }

  .preview-note {
    display: none;
  }

}
