:root {
  --page-bg-top: #f8c44d;
  --page-bg-bottom: #f6efe4;
  --panel: #fffdfa;
  --panel-soft: #fff8ed;
  --gold: #d89f2a;
  --gold-deep: #8f5f0f;
  --gold-line: rgba(216, 159, 42, 0.24);
  --accent: #ef4924;
  --text: #2b1807;
  --muted: #8b6a3e;
  --radius-card: 24px;
  --radius-inner: 18px;
  --radius-pill: 999px;
  --shadow: 0 10px 26px rgba(133, 90, 18, 0.09);
  --shadow-soft: 0 8px 18px rgba(133, 90, 18, 0.08);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  background: linear-gradient(180deg, var(--page-bg-top) 0%, #fdf4da 16%, var(--page-bg-bottom) 100%);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--text);
}

body {
  display: flex;
  justify-content: center;
}

.preview-page {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  padding: 10px 12px 18px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.35), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
}

.hero,
.card,
.footer-card,
.business-item {
  background: var(--panel);
  border: 1px solid var(--gold-line);
  box-shadow: var(--shadow);
}

.hero {
  border-radius: var(--radius-card);
  overflow: hidden;
  padding: 16px 0 14px;
  background:
    radial-gradient(circle at 70% 18%, rgba(255,255,255,0.26), transparent 24%),
    linear-gradient(135deg, #d59a2c 0%, #f3cb73 58%, #ca8920 100%);
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  margin-bottom: 8px;
  position: relative;
  z-index: 2;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  flex: 0 0 auto;
}

.hero-status {
  min-width: 0;
  flex: 1 1 auto;
  text-align: right;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(92, 55, 5, 0.3);
}

.hero-status-title {
  font-size: 19px;
  line-height: 1.22;
  font-weight: 800;
  white-space: nowrap;
}

.hero-status-time {
  margin-top: 8px;
  font-size: 17px;
  line-height: 1.18;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
  color: #fff;
  text-shadow: none;
  box-shadow: 0 4px 10px rgba(74, 43, 0, 0.14);
}

.status-open {
  background: linear-gradient(135deg, #2fd168, #16aa4e);
}

.status-closed {
  background: linear-gradient(135deg, #6f6252, #3f362d);
}

.status-custom {
  background: linear-gradient(135deg, #ffb229, #ff8a14);
}

.icon-pill {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: var(--radius-pill);
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.wechat-pill {
  background: linear-gradient(135deg, #31d66d, #18b957);
}

.phone-pill {
  background: linear-gradient(135deg, #ffb229, #ff8a14);
}

.wechat-pill-icon {
  width: 27px;
  height: 27px;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(24, 112, 48, 0.18));
}

.wechat-green-bubble {
  fill: #fff;
}

.wechat-white-bubble {
  fill: rgba(255, 255, 255, 0.78);
}

.phone-pill-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-price-wrap {
  padding: 0 12px;
}

.hero-price-block {
  padding: 16px 14px 14px;
  border-radius: var(--radius-inner);
  background: linear-gradient(180deg, #fffefb 0%, #fff7eb 100%);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,0.86);
  text-align: center;
}

.hero-notice {
  margin: 0 auto 10px;
  width: 100%;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
  color: #9a6812;
  text-align: center;
  word-break: break-word;
}

.hero-price-row {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}

.hero-price {
  font-size: clamp(56px, 16vw, 72px);
  line-height: 0.9;
  font-weight: 900;
  color: var(--accent);
}

.hero-price.loading {
  color: #e3d6c3;
}

.hero-price-unit {
  font-size: 15px;
  line-height: 1.1;
  font-weight: 800;
  color: var(--accent);
  transform: translateY(-8px);
}

.hero-price-meta {
  margin-top: 10px;
  display: none;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  max-width: 100%;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(201, 135, 19, 0.85);
  background: #fffdf8;
  color: #8f6112;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.hero-price-meta.source-chip {
  display: none;
}

.copy-toast {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 172px;
  min-height: 58px;
  padding: 0 18px;
  border-radius: var(--radius-inner);
  background: #ffffff;
  color: #1f2933;
  border: 1px solid rgba(20, 35, 45, 0.08);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -44%) scale(0.98);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.copy-toast-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-pill);
  border: 2px solid #14b8a6;
  color: #14b8a6;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  font-weight: 600;
}

.copy-toast-text {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.hero-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.shortcut-btn {
  min-height: 48px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  color: #fffdf7;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.shortcut-btn-history {
  background: linear-gradient(180deg, #ffc84c 0%, #ff9f1d 58%, #ff9214 100%);
}

.shortcut-btn-calculator {
  background: linear-gradient(180deg, #ff9647 0%, #ff6530 58%, #ff5525 100%);
}

.card {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius-card);
}

.table-card {
  padding: 16px 12px 12px;
  background: linear-gradient(180deg, rgba(255,244,219,0.78), rgba(255,250,241,0.98));
}

.table-card-head {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.table-card-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #d79c2f, #eec96d);
  color: #fffdf7;
  font-size: 16px;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}

.price-table {
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-inner);
  overflow: hidden;
  background: linear-gradient(180deg, #fffdf9, #fffaf0);
}

.price-table-head,
.price-row-item {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  align-items: center;
  gap: 8px;
}

.price-table-head {
  padding: 12px 14px;
  background: #f3ede4;
  color: #856f55;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.price-table-body {
  padding: 2px 0;
}

.price-row-item {
  min-height: 60px;
  padding: 0 14px;
}

.price-row-item + .price-row-item {
  border-top: 1px solid rgba(216, 159, 42, 0.12);
}

.price-name {
  font-size: 15px;
  font-weight: 800;
  color: #221103;
}

.price-value {
  justify-self: center;
  font-size: 18px;
  font-weight: 900;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.price-value.is-empty,
.price-row-item.is-empty {
  color: #c48c63;
}

.business-section {
  margin-top: 14px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.section-heading-title {
  font-size: 18px;
  font-weight: 900;
  color: #6b4305;
}

.business-heading .section-heading-title {
  font-size: 16px;
  white-space: nowrap;
}

.business-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
  gap: 8px;
}

.business-item {
  aspect-ratio: 1 / 0.92;
  border-radius: var(--radius-inner);
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #fffefb 0%, #fff5e3 100%);
  border-color: rgba(216, 159, 42, 0.3);
  box-shadow:
    0 6px 14px rgba(133, 90, 18, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  color: #2b1904;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 900;
  text-align: center;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.business-item::after {
  content: "";
  position: absolute;
  inset: 1px 1px auto;
  height: 42%;
  border-radius: calc(var(--radius-inner) - 2px) calc(var(--radius-inner) - 2px) 50% 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.46), rgba(255,255,255,0));
  pointer-events: none;
}

.business-item:active {
  transform: translateY(1px) scale(0.98);
  border-color: rgba(216, 159, 42, 0.55);
  box-shadow: 0 3px 8px rgba(133, 90, 18, 0.1);
}

.business-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "PingFang SC", sans-serif;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  color: #754706;
  background: linear-gradient(145deg, #fff8e9, #f3d995);
  border: 1px solid rgba(216, 159, 42, 0.3);
  box-shadow:
    0 3px 7px rgba(143, 95, 15, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

.business-item > span:last-child {
  position: relative;
  z-index: 1;
  line-height: 1.15;
}

.footer-card {
  margin-top: 14px;
  border-radius: var(--radius-card);
  padding: 16px 12px 14px;
  background: linear-gradient(180deg, rgba(255,244,219,0.78), rgba(255,250,241,0.98));
}

.footer-brand {
  text-align: center;
  font-size: 18px;
  font-weight: 900;
  color: var(--gold-deep);
}

.footer-copy {
  margin-top: 6px;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: #90744a;
}

.footer-contact {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gold-line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.footer-contact-main {
  flex: 1 1 auto;
  min-width: 0;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.contact-row + .contact-row {
  margin-top: 14px;
}

.contact-badge {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: #f1daad;
  color: var(--gold-deep);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  flex: 0 0 auto;
}

.contact-label {
  font-size: 12px;
  color: #9a7c4d;
}

.contact-value {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 900;
  color: #d46d05;
}

.contact-address {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.5;
}

.qrcode-box {
  flex: 0 0 98px;
  text-align: center;
}

.qrcode-image {
  width: 98px;
  height: 98px;
  border-radius: var(--radius-inner);
  border: 1px solid rgba(216, 159, 42, 0.2);
  background: #fff;
  object-fit: cover;
}

.qrcode-caption {
  margin-top: 8px;
  font-size: 12px;
  color: #9b845a;
}

.warning-box {
  margin-top: 14px;
  padding: 12px 12px 14px;
  border-radius: var(--radius-inner);
  background: #fff8d8;
  border: 1px solid rgba(232, 185, 56, 0.45);
}

.warning-title {
  font-size: 14px;
  font-weight: 900;
  color: #c07b00;
}

.warning-text {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.7;
  color: #7d5d28;
}

.footer-filing {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(216, 159, 42, 0.18);
  text-align: center;
}

.footer-filing-link {
  color: #8c6d41;
  font-size: 12px;
  line-height: 1.6;
  text-decoration: none;
}

@media (max-width: 390px) {
  .preview-page {
    padding: 8px 10px 16px;
  }

  .hero-top {
    padding: 0 12px;
    margin-bottom: 8px;
    gap: 10px;
  }

  .hero-actions {
    gap: 12px;
  }

  .hero-status-title {
    font-size: 17px;
  }

  .hero-status-time {
    margin-top: 7px;
    font-size: 15px;
    gap: 6px;
  }

  .status-badge {
    min-height: 20px;
    padding: 2px 7px;
    font-size: 12px;
  }

  .icon-pill {
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
  }

  .wechat-pill-icon {
    width: 26px;
    height: 26px;
  }

  .phone-pill-icon {
    width: 20px;
    height: 20px;
  }

  .hero-price-wrap {
    padding: 0 10px;
  }

  .hero-price-block {
    padding: 14px 12px 12px;
  }

  .hero-notice {
    font-size: 15px;
  }

  .hero-price {
    font-size: clamp(50px, 15vw, 64px);
  }

  .hero-price-unit {
    font-size: 14px;
    transform: translateY(-7px);
  }

  .source-chip {
    min-height: 32px;
    font-size: 11px;
    padding: 5px 12px;
  }

  .shortcut-btn {
    min-height: 46px;
    font-size: 14px;
    padding: 0 10px;
  }

  .table-card-chip {
    min-height: 34px;
    font-size: 15px;
  }

  .price-table-head {
    font-size: 13px;
  }

  .price-row-item {
    min-height: 58px;
    padding: 0 12px;
  }

  .price-name {
    font-size: 14px;
  }

  .price-value {
    font-size: 17px;
  }

  .business-grid {
    gap: 7px;
  }

  .business-item {
    font-size: 11px;
  }
}

@media (max-width: 360px) {
  .preview-page {
    padding-left: 8px;
    padding-right: 8px;
  }

  .hero-shortcuts {
    gap: 8px;
  }

  .hero-actions {
    gap: 9px;
  }

  .icon-pill {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .wechat-pill-icon {
    width: 25px;
    height: 25px;
  }

  .phone-pill-icon {
    width: 19px;
    height: 19px;
  }

  .hero-status-title {
    font-size: 16px;
  }

  .hero-status-time {
    font-size: 13.5px;
    gap: 5px;
  }

  .status-badge {
    min-height: 19px;
    padding: 2px 6px;
    font-size: 11.5px;
  }

  .shortcut-btn {
    min-height: 44px;
    font-size: 13px;
  }

  .business-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-contact {
    flex-direction: column;
  }

  .qrcode-box {
    align-self: flex-end;
  }
}
