﻿:root {
  --app-primary: #1677ff;
  --app-primary-deep: #0f5fd0;
  --app-primary-soft: #e8f2ff;
  --app-bg: #f5f9ff;
  --app-card: rgba(255, 255, 255, 0.96);
  --app-border: rgba(22, 119, 255, 0.12);
  --app-text: #1f2d3d;
  --app-muted: #6b7a90;
  --app-shadow: 0 16px 40px rgba(22, 119, 255, 0.12);
  --app-radius-xl: 28px;
  --app-radius-lg: 22px;
  --app-radius-md: 18px;
  --app-radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--app-text);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(22, 119, 255, 0.16), transparent 30%),
    linear-gradient(180deg, #f8fbff 0%, #f5f9ff 42%, #f2f7ff 100%);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body,
button,
input,
select,
textarea {
  font-size: 16px;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.wechat-shell {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 18px 16px calc(104px + env(safe-area-inset-bottom));
}

body[data-page="package-detail"] .wechat-shell,
body[data-page="order-create"] .wechat-shell {
  position: relative;
  padding-top: 56px;
}

body[data-page="home"] .hero-card {
  text-align: center;
}

body[data-page="profile"] .hero-card {
  text-align: center;
}

body[data-page="home"] .hero-subtitle {
  margin-left: auto;
  margin-right: auto;
}


.page-stack {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 22px 20px;
  border-radius: var(--app-radius-xl);
  background:
    linear-gradient(135deg, rgba(22, 119, 255, 0.96), rgba(78, 162, 255, 0.9)),
    linear-gradient(180deg, #1677ff, #62abff);
  color: #fff;
  box-shadow: var(--app-shadow);
}

.hero-card::after {
  content: "";
  position: absolute;
  right: -36px;
  top: -44px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.hero-card-compact {
  padding-bottom: 24px;
}

.hero-card-top {
  flex-wrap: wrap;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 13px;
  letter-spacing: 0.2px;
  font-weight: 600;
}

.hero-link {
  color: rgba(255, 255, 255, 0.96);
  font-size: 15px;
  font-weight: 600;
}

.hero-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.28;
}

.hero-subtitle {
  position: relative;
  z-index: 1;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.8;
  font-size: 15px;
}

.hero-search-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}

.hero-search-input {
  flex: 1;
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.18s, background 0.18s;
}

.hero-search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.hero-search-input:focus {
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.26);
}

.hero-search-btn {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--app-primary-deep);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.hero-search-btn:active {
  transform: scale(0.96);
  background: #fff;
}

.btn-pill {
  border-radius: 999px;
}

.btn-primary {
  background: var(--app-primary);
  border-color: var(--app-primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background: var(--app-primary-deep) !important;
  border-color: var(--app-primary-deep) !important;
}

.btn-hero-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.btn-hero-secondary:hover,
.btn-hero-secondary:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
}

.section-card {
  padding: 18px 16px;
  border-radius: var(--app-radius-lg);
  border: 1px solid var(--app-border);
  background: var(--app-card);
  box-shadow: var(--app-shadow);
  backdrop-filter: blur(14px);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head h2,
.section-title,
.section-title-sm {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.section-head p,
.section-desc,
.meta-text,
.muted-text {
  margin: 8px 0 0;
  color: var(--app-muted);
  line-height: 1.75;
  font-size: 14px;
}

.section-link {
  color: var(--app-primary-deep);
  font-size: 14px;
  font-weight: 600;
}

.hero-banner-list,
.card-list,
.menu-list,
.guarantee-grid,
.stats-grid {
  display: grid;
  gap: 14px;
}

.hero-banner {
  padding: 14px 16px;
  border-radius: var(--app-radius-md);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.hero-banner strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.hero-banner span {
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.category-card,
.mini-card,
.menu-card,
.provider-card,
.service-card,
.detail-card,
.pay-card {
  border-radius: var(--app-radius-md);
  border: 1px solid rgba(22, 119, 255, 0.08);
  background: #fff;
  box-shadow: 0 10px 24px rgba(22, 119, 255, 0.06);
}

.category-card {
  position: relative;
  padding: 16px 14px;
  background: linear-gradient(180deg, #f8fbff, #eef5ff);
}

.category-card-link {
  display: block;
  height: 100%;
  color: inherit;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.category-card-link::after {
  content: "›";
  position: absolute;
  top: 14px;
  right: 14px;
  color: var(--app-primary);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.9;
}

.category-card-link:active {
  transform: scale(0.98);
  border-color: rgba(22, 119, 255, 0.2);
  background: linear-gradient(180deg, #f2f8ff, #e3efff);
}

.category-card strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
}

.category-card span {
  display: block;
  margin-top: 10px;
  color: var(--app-muted);
  font-size: 13px;
  line-height: 1.7;
}

.category-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 0;
  border-bottom: 2px solid #e5e7eb;
  scrollbar-width: none;
  min-width: 0;
  width: 100%;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  background: transparent;
  color: var(--app-muted);
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

.tab-btn span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
  transition: background 0.15s, color 0.15s;
}

.tab-btn.active {
  color: var(--app-primary);
  border-bottom-color: var(--app-primary);
  background: transparent;
}

.tab-btn.active span {
  background: var(--app-primary-soft);
  color: var(--app-primary-deep);
}

.service-card {
  overflow: hidden;
}

.service-card img,
.detail-image {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  background: var(--app-primary-soft);
}

.service-card-body,
.detail-body,
.provider-card-body,
.menu-card,
.mini-card,
.pay-card {
  padding: 16px;
}

.service-card-body-home {
  padding-top: 14px;
}

.service-card-title {
  margin: 10px 0 12px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
}

.service-card-inline-image {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  border-radius: 16px;
  background: var(--app-primary-soft);
  margin-bottom: 14px;
}

.provider-card-title {
  margin: 10px 0 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
}

.tag,
.info-chip,
.menu-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--app-primary-soft);
  color: var(--app-primary-deep);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.title-lg {
  margin: 10px 0 8px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

.summary-text {
  margin: 0;
  color: var(--app-muted);
  font-size: 14px;
  line-height: 1.8;
}

.price-row,
.price-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.price-main {
  font-size: 28px;
  font-weight: 700;
  color: var(--app-primary-deep);
  line-height: 1;
}

.price-market {
  margin-top: 6px;
  font-size: 13px;
  color: #8b98ad;
  text-decoration: line-through;
}

.provider-card-body .title-lg {
  margin-top: 12px;
}

.provider-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-shell {
  display: grid;
  gap: 16px;
}

.sticky-cta-bar {
  position: sticky;
  bottom: calc(72px + env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--app-radius-lg);
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--app-border);
  box-shadow: 0 8px 28px rgba(22, 119, 255, 0.16);
  backdrop-filter: blur(16px);
}

.sticky-cta-price {
  line-height: 1;
}

.sticky-cta-price .price-main {
  font-size: 24px;
  margin: 0;
}

.sticky-cta-price .price-market {
  margin-top: 4px;
}

.floating-back-btn {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top));
  left: 16px;
  z-index: 20;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--app-text);
  box-shadow: 0 10px 24px rgba(22, 119, 255, 0.12);
  backdrop-filter: blur(16px);
}

.floating-back-btn span {
  transform: translateX(-1px);
  font-size: 28px;
  line-height: 1;
}

.floating-back-btn:active {
  transform: scale(0.97);
}

.detail-card {
  overflow: hidden;
}

.detail-body {
  display: grid;
  gap: 10px;
}

.pay-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  background: linear-gradient(180deg, #f7fbff, #edf5ff);
}

.pay-card strong {
  display: block;
  font-size: 14px;
}

.pay-card p {
  margin: 8px 0 0;
  color: var(--app-primary-deep);
  font-size: 30px;
  font-weight: 700;
}

.pay-card span {
  max-width: 170px;
  color: var(--app-muted);
  line-height: 1.7;
  font-size: 13px;
  text-align: right;
}

.form-label-wrap {
  display: grid;
  gap: 8px;
}

.form-label-text {
  font-size: 14px;
  font-weight: 600;
  color: #41536d;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f7fbff, #eef5ff);
}

.info-row strong {
  color: var(--app-primary-deep);
  font-size: 16px;
}

.app-input {
  min-height: 50px;
  border-radius: 16px;
  border-color: rgba(22, 119, 255, 0.14);
  padding-inline: 14px;
  box-shadow: none !important;
}

.app-input:focus {
  border-color: rgba(22, 119, 255, 0.42);
}

.profile-user-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(180deg, #dbeafe, #eff6ff);
  border: 3px solid rgba(22, 119, 255, 0.12);
}

.login-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(180deg, #e8f2ff, #dcecff);
  color: var(--app-primary-deep);
  font-size: 26px;
  font-weight: 700;
}

.status-box {
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f7fbff, #eef5ff);
  color: var(--app-text);
  line-height: 1.75;
  font-size: 14px;
}

.status-box:empty {
  display: none;
}

.status-box.is-error {
  background: linear-gradient(180deg, #fff3f3, #ffe8e8);
  color: #b42318;
}

.order-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.summary-link-card,
.order-item {
  color: inherit;
}

.summary-link-card {
  display: grid;
  gap: 8px;
  padding: 18px 16px;
  border-radius: var(--app-radius-md);
  border: 1px solid rgba(22, 119, 255, 0.08);
  background: linear-gradient(180deg, #f8fbff, #eef5ff);
  box-shadow: 0 10px 24px rgba(22, 119, 255, 0.06);
}

.summary-link-card strong {
  font-size: 32px;
  line-height: 1;
  color: var(--app-primary-deep);
}

.summary-label {
  font-size: 15px;
  font-weight: 700;
}

.summary-note {
  color: var(--app-muted);
  font-size: 13px;
  line-height: 1.7;
}

.order-list {
  display: grid;
  gap: 14px;
}

.order-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.order-meta {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.order-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.order-actions .btn {
  min-width: 104px;
}

.order-meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.order-meta-row span {
  color: var(--app-muted);
}

.order-meta-row strong {
  text-align: right;
  font-size: 14px;
  font-weight: 600;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* 待支付 — 橙色 */
.status-chip.is-pending {
  background: #fffbeb;
  color: #b45309;
}

/* 进行中 / 已接单 — 蓝色 */
.status-chip.is-ongoing {
  background: #eff6ff;
  color: #1d4ed8;
}

/* 已完成 — 绿色 */
.status-chip.is-completed {
  background: #ecfdf5;
  color: #059669;
}

/* 已取消 / 中性 — 灰色 */
.status-chip.is-muted {
  background: #f3f4f6;
  color: #6b7280;
}

/* 退款中 — 紫色 */
.status-chip.is-refunding {
  background: #f5f3ff;
  color: #7c3aed;
}

/* 已退款 — 玫红 */
.status-chip.is-refunded {
  background: #fff1f2;
  color: #be123c;
}

.order-empty {
  padding: 10px 0;
  color: var(--app-muted);
  font-size: 14px;
  line-height: 1.8;
}

.stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-card {
  display: grid;
  gap: 8px;
}

.mini-card strong {
  font-size: 17px;
}

.mini-card span {
  color: var(--app-muted);
  font-size: 14px;
  line-height: 1.8;
}

.guarantee-card {
  padding: 16px;
  background: linear-gradient(180deg, #f8fbff, #eef5ff);
}

.mini-card-center {
  text-align: center;
}

.menu-list {
  gap: 12px;
}

.menu-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: inherit;
}

.menu-card strong {
  display: block;
  margin-bottom: 4px;
}

.menu-card span {
  color: var(--app-muted);
  font-size: 13px;
}

.rule-list {
  margin: 0;
  padding-left: 18px;
}

.rule-list li {
  margin-bottom: 10px;
  color: var(--app-muted);
  line-height: 1.75;
}

.empty-text {
  padding: 18px;
  border-radius: var(--app-radius-md);
  background: linear-gradient(180deg, #f8fbff, #edf5ff);
  color: var(--app-muted);
  font-size: 14px;
  line-height: 1.7;
}

.empty-state {
  padding: 24px 16px;
}

.fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  border: 0;
  font-size: 22px;
  line-height: 1;
  color: #c8d5e8;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: color 0.2s, transform 0.15s;
}

.fav-btn:active { transform: scale(0.9); }
.fav-btn.favorited { color: #e74c3c; }

.fav-btn-list {
  width: 36px;
  height: 36px;
  font-size: 18px;
  top: 8px;
  right: 8px;
}

@keyframes fav-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.fav-shake { animation: fav-shake 0.3s ease-in-out 2; }

.portfolio-grid-h5 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.portfolio-thumb-wrap {
  border-radius: 14px;
  overflow: hidden;
  background: var(--app-primary-soft);
}

.portfolio-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.portfolio-thumb-caption {
  margin: 0;
  padding: 7px 10px;
  font-size: 12px;
  color: var(--app-muted);
  line-height: 1.5;
  background: #fff;
}

@keyframes skeleton-shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, #e8eef8 25%, #f4f7fc 50%, #e8eef8 75%);
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.bottom-nav {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 100;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(22, 119, 255, 0.1);
  box-shadow: 0 14px 30px rgba(22, 119, 255, 0.14);
  backdrop-filter: blur(16px);
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 52px;
  border-radius: 14px;
  color: var(--app-muted);
  font-weight: 600;
  transition: color 0.15s, background 0.15s;
}

.bottom-nav a.active {
  color: var(--app-primary-deep);
  background: linear-gradient(180deg, #eef5ff, #e3efff);
}

.nav-icon {
  font-size: 20px;
  line-height: 1;
}

.nav-label {
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

@media (min-width: 768px) {
  .wechat-shell {
    padding-top: 28px;
  }

  .card-list,
  .guarantee-grid,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-banner-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bottom-nav {
    max-width: 520px;
    margin: 0 auto;
  }
}

@media (max-width: 420px) {
  .price-row,
  .price-panel,
  .pay-card,
  .info-row,
  .order-item-head,
  .order-meta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .pay-card span {
    max-width: none;
    text-align: left;
  }

  .order-meta-row strong {
    text-align: left;
  }
}
