:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-soft: #fff6f8;
  --line: #e7ebf0;
  --ink: #1f2937;
  --muted: #6b7280;
  --primary: #ff5c75;
  --primary-deep: #ef3e68;
  --primary-soft: #fff0f3;
  --accent: #ff9f43;
  --green: #20b26b;
  --shadow: 0 14px 36px rgba(18, 32, 56, 0.08);
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body {
  padding: env(safe-area-inset-top) 0 calc(114px + env(safe-area-inset-bottom));
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.app {
  width: min(100%, 480px);
  margin: 0 auto;
  min-height: 100vh;
  background: linear-gradient(180deg, #ff647b 0 220px, var(--bg) 220px 100%);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px 16px 12px;
  background: linear-gradient(180deg, rgba(255, 92, 117, 0.96), rgba(255, 92, 117, 0.9));
  backdrop-filter: blur(10px);
  color: #fff;
}

.header-row,
.title-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.city-pill,
.header-btn,
.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 0;
  font-size: 12px;
  font-weight: 700;
}

.brand-box,
.page-title-box {
  text-align: center;
  min-width: 0;
}

.brand-box h1,
.page-title-box h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
}

.brand-box p,
.page-title-box p {
  margin: 2px 0 0;
  font-size: 11px;
  opacity: 0.92;
}

.content {
  padding: 0 14px 18px;
}

.hero-card,
.panel,
.detail-card,
.summary-card {
  margin-top: 14px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 18px;
  color: #fff;
  background:
    radial-gradient(circle at right top, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(135deg, #ff7991 0%, #ff5e77 45%, #ff7e58 100%);
  box-shadow: 0 18px 42px rgba(239, 63, 104, 0.28);
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -18px;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 12px;
  font-weight: 700;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.65);
  animation: dotPulse 1.8s infinite;
}

.hero-card h2 {
  margin: 14px 0 0;
  font-size: 28px;
  line-height: 1.2;
}

.hero-card p {
  margin: 10px 0 0;
  max-width: 280px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.92);
}

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

.hero-stat {
  padding: 12px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
}

.hero-stat strong {
  display: block;
  font-size: 18px;
}

.hero-stat span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
}

.panel,
.detail-card,
.summary-card {
  padding: 16px;
}

.panel-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.panel-head h2,
.detail-section-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.panel-meta {
  font-size: 12px;
  color: var(--muted);
}

.location-state {
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff5e9;
  color: #9a5b0b;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}

.location-state[data-tone="success"] {
  background: #ecfbf4;
  color: #168d53;
}

.location-state[data-tone="error"] {
  background: #fff1f2;
  color: #c93556;
}

.coords {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
}

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

.panel-filter-strip {
  padding: 8px 10px;
}

.tech-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
  width: 100%;
}

.filter-group {
  min-width: 0;
  display: block;
}

.filter-group-sort {
  width: auto;
}

.filter-group-area {
  width: auto;
}

.filter-group-age {
  width: auto;
}

.filter-select {
  min-height: 32px;
  width: 100%;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #ece3e7;
  background: #fff;
  color: #21283a;
  font-size: 11px;
  font-weight: 700;
  box-shadow: none;
}

.service-item {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 12px 8px;
  border-radius: 18px;
  background: #fafbfc;
  border: 1px solid var(--line);
  color: var(--ink);
}

.service-item.active {
  background: var(--primary-soft);
  border-color: rgba(255, 92, 117, 0.2);
  color: var(--primary-deep);
}

.service-icon {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: linear-gradient(180deg, #fff6f7, #ffe4ea);
}

.service-name {
  font-size: 12px;
  font-weight: 700;
}

.service-sub {
  font-size: 10px;
  color: var(--muted);
}

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

.quick-card {
  padding: 14px 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.quick-card strong {
  display: block;
  font-size: 20px;
  color: var(--primary-deep);
}

.quick-card span {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

.therapist-list,
.order-list,
.review-list,
.menu-list {
  display: grid;
  gap: 12px;
}

.therapist-card,
.order-card,
.review-item,
.menu-item,
.empty-card {
  border-radius: 20px;
  background: #fff;
  border: 1px solid #edf1f5;
  box-shadow: 0 10px 22px rgba(18, 32, 56, 0.05);
}

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

.empty-card {
  padding: 18px;
}

.empty-card strong {
  display: block;
  margin: 0;
  font-size: 14px;
  color: #21283a;
}

.empty-card p {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.therapist-card.active {
  border-color: rgba(255, 92, 117, 0.22);
  box-shadow: 0 16px 26px rgba(255, 92, 117, 0.12);
}

.therapist-avatar,
.detail-avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #ff8799, #ff5d73);
  box-shadow: 0 12px 24px rgba(255, 92, 117, 0.22);
}

.therapist-head,
.therapist-name-row,
.therapist-actions,
.action-row,
.detail-head,
.review-head,
.order-head,
.order-actions,
.profile-stats {
  display: flex;
  align-items: center;
}

.therapist-head,
.therapist-actions,
.order-head,
.order-actions,
.profile-stats {
  justify-content: space-between;
}

.therapist-name-row {
  gap: 8px;
}

.therapist-name-row h3,
.detail-name-row h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.badge,
.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-size: 10px;
  font-weight: 800;
}

.price {
  font-size: 13px;
  color: #fb7a00;
}

.therapist-meta,
.detail-note,
.summary-line,
.order-card p,
.menu-item p {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.detail-gallery-item {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 92, 117, 0.12);
  background: #fff6f8;
  box-shadow: 0 12px 24px rgba(18, 32, 56, 0.08);
}

.detail-gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.profile-sheet {
  display: grid;
  gap: 10px;
}

.profile-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 18px;
  background: #f7f9fc;
  border: 1px solid #edf1f5;
}

.profile-item span {
  font-size: 12px;
  color: var(--muted);
}

.profile-item strong {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  text-align: right;
  color: #21283a;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f5f7fb;
  color: #596273;
  font-size: 10px;
  font-weight: 700;
}

.chip-highlight {
  background: var(--primary-soft);
  color: var(--primary-deep);
}

.therapist-actions {
  gap: 12px;
  margin-top: 12px;
}

.arrive-text {
  flex: 1;
  font-size: 12px;
  color: var(--green);
}

.action-row {
  gap: 8px;
}

.solid-btn,
.book-btn,
.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 12px 22px rgba(255, 92, 117, 0.22);
}

.solid-link {
  min-height: 38px;
}

.ghost-link,
.slot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f5f7fb;
  color: #5c6777;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--line);
}

.sticky-bar {
  position: fixed;
  left: 50%;
  bottom: 62px;
  z-index: 25;
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 456px);
  padding: 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 36px rgba(18, 32, 56, 0.14);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.sticky-label {
  font-size: 11px;
  color: var(--muted);
}

.sticky-title {
  margin-top: 5px;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-btn,
.submit-btn {
  position: relative;
  overflow: hidden;
  min-height: 48px;
  padding: 0 20px;
  font-size: 14px;
  animation: btnPulse 2.2s infinite;
}

.book-btn::after,
.submit-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-120%);
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: sweep 2.4s infinite;
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 22;
  transform: translateX(-50%);
  width: min(100%, 480px);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid rgba(231, 235, 240, 0.92);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.tab-item {
  display: grid;
  justify-items: center;
  color: #96a0af;
  font-size: 11px;
  font-weight: 600;
}

.tab-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.tab-item.active {
  color: var(--primary-deep);
}

.detail-head {
  gap: 14px;
}

.detail-summary {
  flex: 1;
}

.detail-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.stat-box,
.summary-line,
.menu-item {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.stat-box {
  padding: 14px 12px;
}

.stat-box strong {
  display: block;
  font-size: 18px;
  color: var(--primary-deep);
}

.stat-box span {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
}

.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 14px;
  margin-top: 10px;
  font-size: 13px;
}

.summary-line strong {
  color: var(--ink);
}

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

.slot-btn.active {
  background: var(--primary-soft);
  color: var(--primary-deep);
  border-color: rgba(255, 92, 117, 0.2);
}

.submit-wrap {
  margin-top: 16px;
}

.submit-btn {
  width: 100%;
  border-radius: 18px;
}

.order-card,
.review-item,
.menu-item {
  padding: 14px;
}

.review-head span,
.order-card p,
.menu-item p {
  color: var(--muted);
}

.menu-item strong {
  display: block;
  font-size: 15px;
}

.profile-card {
  margin-top: 14px;
  padding: 18px;
  border-radius: 22px;
  background:
    radial-gradient(circle at right top, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(135deg, #ff7991 0%, #ff5e77 45%, #ff7e58 100%);
  color: #fff;
  box-shadow: 0 18px 42px rgba(239, 63, 104, 0.28);
}

.profile-card h2 {
  margin: 0;
  font-size: 24px;
}

.profile-card p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.7;
}

.profile-stats {
  gap: 10px;
  margin-top: 16px;
}

.profile-stat {
  flex: 1;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
}

.profile-stat strong {
  display: block;
  font-size: 18px;
}

.profile-stat span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
}

.empty-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px dashed #dce3ec;
  background: #fafbfc;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.toast {
  position: fixed;
  left: 50%;
  top: 18px;
  z-index: 40;
  transform: translate(-50%, -14px);
  min-width: 220px;
  max-width: calc(100% - 28px);
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(18, 24, 38, 0.92);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: 0 18px 30px rgba(18, 24, 38, 0.22);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes dotPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.65); }
  70% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

@keyframes btnPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

@keyframes sweep {
  0% { transform: translateX(-120%); }
  56% { transform: translateX(120%); }
  100% { transform: translateX(120%); }
}

@media (max-width: 719px) {
  .tech-filter-grid {
    gap: 6px;
  }

  .filter-group-sort {
    width: auto;
  }

  .filter-group-area {
    width: auto;
  }

  .filter-group-age {
    width: auto;
  }

  .detail-gallery {
    grid-template-columns: 1fr;
  }

  .profile-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-item strong {
    text-align: left;
  }
}

@media (min-width: 720px) {
  .app {
    width: min(100%, 960px);
    background: linear-gradient(180deg, #ff647b 0 240px, var(--bg) 240px 100%);
  }

  .content.grid-2 {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 14px;
    align-items: start;
  }

  .content.grid-2 > .hero-card,
  .content.grid-2 > .panel.full,
  .content.grid-2 > .detail-card.full,
  .content.grid-2 > .summary-card.full {
    grid-column: 1 / -1;
  }

  .sticky-bar {
    width: min(100%, 520px);
  }

  .tabbar {
    width: min(100%, 960px);
  }
}
