:root {
  --ink: #17203b;
  --muted: #707995;
  --muted-2: #9aa3bd;
  --line: #e9ebf5;
  --panel: #ffffff;
  --page: #f7f8ff;
  --violet: #c4a3f7;
  --violet-deep: #a37de4;
  --blue: #7ee8ee;
  --blue-deep: #5bc0de;
  --pink: #f0a8e8;
  --cyan: #8deaf0;
  --success: #4ecdc4;
  --warning: #ffb547;
  --danger: #ff5d78;
  --gradient: linear-gradient(110deg, #d4a7f7 0%, #b5b2f0 43%, #8deaf6 100%);
  --gradient-soft: linear-gradient(135deg, #f8edff 0%, #f0f8ff 52%, #e8fffa 100%);
  --shadow-sm: 0 10px 30px rgba(83, 78, 151, 0.08);
  --shadow: 0 24px 70px rgba(83, 78, 151, 0.14);
  --radius-sm: 14px;
  --radius: 22px;
  --radius-lg: 32px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: "Manrope", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

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

button {
  color: inherit;
}

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

img {
  display: block;
  max-width: 100%;
}

p,
h1,
h2,
h3,
h4 {
  margin-top: 0;
}

.container {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.app-shell {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at -8% 24%, rgba(111, 149, 255, 0.12), transparent 27%),
    radial-gradient(circle at 104% 44%, rgba(180, 118, 255, 0.1), transparent 24%),
    #fff;
}

.site-header {
  position: fixed;
  z-index: 80;
  top: 0;
  right: 0;
  left: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 30px rgba(48, 45, 96, 0.08);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  height: 74px;
  gap: 28px;
}

.logo {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  width: 126px;
  height: 58px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
}

.nav-link {
  position: relative;
  padding: 11px 12px;
  border-radius: 12px;
  color: #515a72;
  font-size: 14px;
  font-weight: 600;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--violet-deep);
  background: rgba(125, 96, 244, 0.08);
}

.nav-link.active::after {
  position: absolute;
  right: 15px;
  bottom: 5px;
  left: 15px;
  height: 2px;
  border-radius: 2px;
  content: "";
  background: var(--gradient);
}

.mobile-quick-nav { display: none; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.search-box-wrap {
  position: relative;
}

.search-trigger {
  display: flex;
  align-items: center;
  width: 190px;
  height: 40px;
  padding: 0 13px;
  border: 1px solid rgba(127, 116, 199, 0.2);
  border-radius: 13px;
  color: #9aa2b8;
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  gap: 9px;
  font-size: 12px;
  text-align: left;
}

.search-trigger[aria-expanded="true"] {
  border-color: rgba(119, 91, 234, 0.5);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(117, 91, 232, 0.08);
}

.search-trigger svg {
  width: 17px;
  height: 17px;
  color: var(--violet-deep);
}

.search-dropdown {
  position: absolute;
  z-index: 100;
  top: calc(100% + 13px);
  right: 0;
  width: 480px;
  overflow: hidden;
  border: 1px solid rgba(224, 222, 241, 0.95);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 70px rgba(48, 44, 99, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-9px) scale(0.985);
  transform-origin: top right;
  transition: opacity 0.22s ease, transform 0.22s ease;
  backdrop-filter: blur(20px);
}

.search-dropdown.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.dropdown-search {
  display: flex;
  align-items: center;
  height: 52px;
  margin: 16px 16px 5px;
  padding: 0 14px;
  border: 1.5px solid #a58af1;
  border-radius: 14px;
  background: #faf9ff;
  gap: 10px;
}

.dropdown-search svg {
  flex: 0 0 auto;
  width: 19px;
  color: var(--violet-deep);
}

.dropdown-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
}

.dropdown-search input::placeholder {
  color: #a0a5b6;
}

.search-dropdown-content {
  max-height: min(560px, calc(100vh - 150px));
  overflow-y: auto;
  padding: 4px 16px 16px;
}

/* ===== Region / address picker ===== */
.region-picker-wrap {
  position: relative;
}

.region-trigger {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(127, 116, 199, 0.2);
  border-radius: 13px;
  color: #9aa2b8;
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  gap: 7px;
  font-size: 12.5px;
  white-space: nowrap;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.region-trigger svg {
  width: 16px;
  height: 16px;
  color: var(--violet-deep);
  flex: 0 0 auto;
}

.region-trigger .region-label {
  color: var(--ink);
  font-weight: 600;
}

.region-trigger.has-region {
  border-color: rgba(119, 91, 234, 0.45);
  background: rgba(244, 238, 255, 0.9);
  color: var(--violet-deep);
}

.region-trigger.has-region .region-label {
  color: var(--violet-deep);
}

.region-trigger[aria-expanded="true"] {
  border-color: rgba(119, 91, 234, 0.5);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(117, 91, 232, 0.08);
}

.region-dropdown {
  position: absolute;
  z-index: 100;
  top: calc(100% + 13px);
  right: 0;
  width: 520px;
  max-width: calc(100vw - 28px);
  overflow: hidden;
  border: 1px solid rgba(224, 222, 241, 0.95);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 70px rgba(48, 44, 99, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-9px) scale(0.985);
  transform-origin: top right;
  transition: opacity 0.22s ease, transform 0.22s ease;
  backdrop-filter: blur(20px);
}

.region-dropdown.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.region-panel {
  padding: 16px 16px 14px;
}

.region-tabs {
  display: flex;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.region-tab {
  font-size: 13px;
  font-weight: 600;
  color: var(--violet-deep);
  padding: 5px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(212, 167, 247, 0.18), rgba(141, 234, 246, 0.18));
}

.region-cols {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1.1fr;
  gap: 10px;
  margin-top: 12px;
  max-height: 268px;
}

.region-col {
  list-style: none;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  background: #faf9ff;
  border: 1px solid rgba(224, 222, 241, 0.7);
  border-radius: 12px;
}

.region-col li {
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 12.5px;
  color: #4a5168;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.region-col li:hover {
  background: rgba(196, 163, 247, 0.18);
  color: var(--ink);
}

.region-col li.active {
  background: var(--gradient);
  color: #fff;
  font-weight: 600;
}

.region-col li.region-empty {
  color: #aab0c0;
  cursor: default;
  text-align: center;
  padding-top: 22px;
}

.region-col li.region-empty:hover {
  background: transparent;
  color: #aab0c0;
}

.region-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.region-reset {
  border: 1px solid rgba(127, 116, 199, 0.25);
  background: #fff;
  color: #6a7290;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 11px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.region-reset:hover {
  border-color: rgba(119, 91, 234, 0.5);
  color: var(--violet-deep);
}

.region-confirm {
  padding: 8px 22px;
  font-size: 13px;
}

.search-recommend-group {
  padding-top: 14px;
}

.search-recommend-group + .search-recommend-group {
  margin-top: 13px;
  border-top: 1px solid var(--line);
}

.search-recommend-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}

.search-recommend-title > span,
.search-recommend-title a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.search-recommend-title > span {
  font-size: 12px;
  font-weight: 800;
}

.search-recommend-title > span svg {
  width: 16px;
  color: var(--violet-deep);
}

.search-recommend-title a {
  color: var(--violet-deep);
  font-size: 10px;
  font-weight: 700;
}

.search-recommend-title a svg {
  width: 12px;
}

.hot-service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hot-service-item,
.hot-hospital-item {
  display: flex;
  align-items: center;
  border-radius: 12px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hot-service-item {
  min-width: 0;
  padding: 9px;
  background: #f8f8fe;
  gap: 9px;
}

.hot-service-item:hover,
.hot-hospital-item:hover {
  background: #f2efff;
  transform: translateX(2px);
}

.hot-service-icon {
  display: block;
  flex: 0 0 auto;
  width: 35px;
  height: 35px;
  border-radius: 11px;
  background: #eef2f7;
  object-fit: cover;
}

.hot-service-icon svg {
  width: 18px;
}

.hot-service-item strong,
.hot-hospital-item strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-service-item small,
.hot-hospital-item small {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #949bad;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-hospital-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 8px;
}

.hot-hospital-item {
  min-width: 0;
  padding: 8px;
  gap: 9px;
}

.hot-hospital-item > span:nth-child(2) {
  min-width: 0;
}

.hot-hospital-logo {
  display: block;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #eef2f7;
  object-fit: cover;
}

.hot-arrow {
  display: grid;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-left: auto;
  color: #a5a9b9;
  place-items: center;
}

.hot-arrow svg {
  width: 13px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 10px 22px rgba(105, 89, 230, 0.24);
}

.btn-primary:hover {
  box-shadow: 0 14px 28px rgba(105, 89, 230, 0.32);
}

.btn-secondary {
  color: var(--violet-deep);
  background: #f1efff;
}

.btn-ghost {
  border: 1px solid var(--line);
  color: #646d85;
  background: #fff;
}

.btn-white {
  color: var(--violet-deep);
  background: #fff;
  box-shadow: 0 12px 28px rgba(58, 55, 121, 0.16);
}

.btn svg {
  width: 17px;
  height: 17px;
}

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
}

.main-content {
  min-height: 70vh;
}

.home-page {
  padding-top: 86px;
}

.hero-shell {
  position: relative;
  width: min(calc(100% - 40px), 1240px);
  margin: 0 auto;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2.325 / 1;
  border-radius: 28px;
  background: #edf4ff;
  box-shadow: 0 24px 65px rgba(94, 98, 174, 0.18);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, transform 1.1s ease;
  transform: scale(1.035);
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.hero-slide.tinted::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(240, 227, 255, 0.96) 0%, rgba(233, 243, 255, 0.77) 42%, rgba(255, 255, 255, 0.03) 72%);
}

.slide-copy {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 7%;
  max-width: 440px;
  transform: translateY(-50%);
}

.slide-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--violet-deep);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 6px 20px rgba(99, 84, 180, 0.1);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.slide-copy h1 {
  margin-bottom: 14px;
  font-size: clamp(30px, 3.4vw, 54px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.13;
}

.gradient-text {
  color: transparent;
  background: var(--gradient);
  background-clip: text;
  -webkit-background-clip: text;
}

.slide-copy p {
  margin-bottom: 24px;
  color: #5d6680;
  font-size: 15px;
  line-height: 1.8;
}

.hero-dots {
  position: absolute;
  z-index: 5;
  right: 28px;
  bottom: 24px;
  display: flex;
  align-items: center;
  padding: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  gap: 7px;
}

.hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(91, 75, 187, 0.28);
  cursor: pointer;
  transition: 0.3s ease;
}

.hero-dot.active {
  width: 27px;
  background: var(--gradient);
}

.hero-arrow {
  position: absolute;
  z-index: 6;
  top: 50%;
  display: grid;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: #6560a8;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 8px 24px rgba(71, 66, 139, 0.12);
  cursor: pointer;
  opacity: 0;
  place-items: center;
  transform: translateY(-50%);
  transition: 0.25s ease;
  backdrop-filter: blur(10px);
}

.hero-shell:hover .hero-arrow {
  opacity: 1;
}

.hero-arrow.prev { left: 18px; }
.hero-arrow.next { right: 18px; }
.hero-arrow:hover { color: #fff; background: var(--violet-deep); }
.hero-arrow svg { width: 20px; }

.hero-contact-bar {
  position: absolute;
  z-index: 10;
  left: 60px;
  bottom: 24px;
  transform: none;
  display: flex;
  align-items: center;
  gap: 18px;
  pointer-events: none;
}

.hero-contact-item {
  display: inline-flex;
  align-items: center;
  pointer-events: auto;
}

.hero-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 10px 20px;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.78), rgba(124, 58, 237, 0.78));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(79, 40, 160, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hero-contact-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(124, 58, 237, 0.9));
  box-shadow: 0 12px 32px rgba(79, 40, 160, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hero-contact-btn:active {
  transform: translateY(0) scale(0.98);
}

.hero-contact-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: currentColor;
}

.hero-contact-btn .btn-text {
  white-space: nowrap;
}

.copy-hint {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  user-select: none;
  text-shadow: 0 1px 2px rgba(79, 40, 160, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

@media (max-width: 768px) {
  .hero-shell {
    display: flex;
    flex-direction: column;
    width: calc(100% - 24px);
  }
  .hero-carousel {
    aspect-ratio: 2.325 / 1;
    border-radius: 20px;
  }
  .hero-image {
    object-fit: contain;
    object-position: center;
  }
  .hero-dots {
    right: 16px;
    bottom: 16px;
  }
  .hero-arrow {
    display: none;
  }
  .hero-contact-bar {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    margin-top: 14px;
    gap: 10px;
  }
  .copy-hint {
    padding: 3px 8px;
    font-size: 11px;
    margin-left: 4px;
  }
  .hero-contact-btn {
    padding: 10px 14px 10px 16px;
    font-size: 13px;
    gap: 6px;
  }
  .hero-contact-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* 原本这里还有一个 @media (max-width: 480px)，已挪到文件末尾的断点区。
   它写在 820 / 560 两块之前，比它们都窄却排在前面，同特异性下会被后面的宽断点反噬。 */

.trust-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 24px 10px 0;
  gap: 20px;
}
.section-divider {
  border: none;
  height: 1px;
  margin: 0;
  background: linear-gradient(90deg, transparent, rgba(200,206,224,.55), transparent);
}
.section-divider + .section { padding-top: 22px; }

.trust-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
}

.trust-icon {
  display: grid;
  width: 43px;
  height: 43px;
  border-radius: 15px;
  color: var(--violet-deep);
  background: #f2efff;
  place-items: center;
}

.trust-icon svg { width: 20px; }
.trust-item strong { display: block; color: #7570ee; font-size: 24px; line-height: 1.1; }
.trust-item span { color: #9ba2b7; font-size: 11px; }

.section {
  position: relative;
  padding: 92px 0;
}

.section-tint {
  background: linear-gradient(180deg, rgba(246, 246, 255, 0.45), rgba(240, 247, 255, 0.75));
}

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

.section-title h2 {
  margin-bottom: 6px;
  font-size: 31px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px 9px 18px;
  border-radius: 999px;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 8px 22px rgba(163, 125, 228, 0.28);
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.section-link svg {
  width: 16px;
  transition: transform 0.2s ease;
}

.section-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(163, 125, 228, 0.36);
}

.section-link:hover svg { transform: translateX(4px); }

.filter-bar {
  display: flex;
  align-items: center;
  margin-bottom: 28px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  gap: 14px;
}

.filter-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  padding: 7px 13px;
  border: 0;
  border-radius: 999px;
  color: #737b91;
  background: #f7f8fc;
  cursor: pointer;
  font-size: 12px;
  transition: 0.2s ease;
}

.chip:hover,
.chip.active {
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 6px 16px rgba(107, 85, 228, 0.18);
}

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

.entity-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(234, 234, 245, 0.9);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(56, 54, 105, 0.055);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
}

.entity-card:hover {
  border-color: rgba(122, 99, 231, 0.2);
  box-shadow: 0 20px 45px rgba(70, 65, 135, 0.13);
  transform: translateY(-7px);
}

.card-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.55;
  margin: 9px 9px 0;
  border-radius: 15px;
  background: #eef2f7;
}

.card-cover::after {
  position: absolute;
  right: -25%;
  bottom: -60%;
  width: 90%;
  height: 110%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  content: none;
}

.content-media-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hospital-brand {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand, #6d61e8);
  background: var(--cover, linear-gradient(135deg, #f2edff, #e6f8ff));
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.hospital-brand span {
  padding: 9px 15px;
  border: 1px solid currentColor;
  border-radius: 8px 17px 8px 17px;
}

.card-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(20, 27, 55, 0.68);
  font-size: 10px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 17px 17px 18px;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 12px;
}

.card-title-row h3 {
  overflow: hidden;
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rating {
  flex: 0 0 auto;
  color: #ffad32;
  font-size: 11px;
  letter-spacing: 0.05em;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  min-height: 24px;
  margin: 9px 0;
  gap: 6px;
}

.tag {
  padding: 4px 7px;
  border-radius: 6px;
  color: #7964de;
  background: #f3f0ff;
  font-size: 10px;
}

.card-desc {
  display: -webkit-box;
  overflow: hidden;
  min-height: 37px;
  margin-bottom: 13px;
  color: #8b92a7;
  font-size: 11px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #a0a7b9;
  font-size: 10px;
}

.card-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-meta svg {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
}

.detail-link {
  display: inline-flex;
  align-items: center;
  color: var(--violet-deep);
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
}

.detail-link svg { width: 13px; }

.doctor-card .card-cover {
  aspect-ratio: 1.22;
  background: #eef2f7;
}

.doctor-photo { object-position: center 18%; }

.doctor-portrait {
  position: absolute;
  inset: 8px 16px 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.portrait-art {
  position: relative;
  width: 76%;
  height: 100%;
}

.portrait-head {
  position: absolute;
  z-index: 2;
  top: 13%;
  left: 50%;
  width: 64px;
  height: 78px;
  border-radius: 45% 48% 45% 45%;
  background: var(--skin, #f6d1bd);
  box-shadow: inset 5px -4px 0 rgba(206, 132, 113, 0.08);
  transform: translateX(-50%);
}

.portrait-head::before {
  position: absolute;
  top: -9px;
  right: -8px;
  left: -8px;
  height: 41px;
  border-radius: 50% 54% 36% 35%;
  content: "";
  background: var(--hair, #26202c);
  clip-path: polygon(0 0, 100% 0, 96% 100%, 82% 48%, 64% 27%, 43% 47%, 20% 35%, 6% 100%);
}

.portrait-head::after {
  position: absolute;
  right: 18px;
  bottom: 17px;
  width: 20px;
  height: 7px;
  border-bottom: 2px solid rgba(145, 67, 74, 0.55);
  border-radius: 0 0 50% 50%;
  content: "";
}

.portrait-body {
  position: absolute;
  right: 7%;
  bottom: -13%;
  left: 7%;
  height: 72%;
  border-radius: 50% 50% 0 0;
  background: #fff;
  box-shadow: 0 -2px 20px rgba(61, 61, 118, 0.09);
  clip-path: polygon(22% 0, 41% 11%, 59% 11%, 78% 0, 100% 100%, 0 100%);
}

.portrait-body::before {
  position: absolute;
  top: 17%;
  left: 50%;
  width: 2px;
  height: 75%;
  content: "";
  background: #e6e8ef;
}

.portrait-body::after {
  position: absolute;
  top: 31%;
  left: 60%;
  width: 24px;
  height: 10px;
  border-radius: 3px;
  content: "";
  background: var(--violet-deep);
  opacity: 0.55;
}

.doctor-card:nth-child(even) .portrait-art { transform: scale(1.02) translateX(3px); }
.doctor-card:nth-child(3n) .portrait-head { --hair: #4b392d; }
.doctor-card:nth-child(4n) .portrait-head { --skin: #ebc4a9; --hair: #1e2730; }

.doctor-role {
  color: var(--violet-deep);
  font-size: 10px;
  font-weight: 700;
}

.verify-dot {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  display: grid;
  width: 23px;
  height: 23px;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--gradient);
  font-size: 11px;
  font-weight: 900;
  place-items: center;
}

.service-card {
  min-height: 292px;
}

.service-cover {
  position: relative;
  overflow: hidden;
  height: auto;
  aspect-ratio: 4 / 3;
  margin: 9px 9px 0;
  padding: 0;
  border-radius: 15px;
  background: #eef2f7;
}

.service-cover::before {
  position: absolute;
  right: -17px;
  bottom: -28px;
  width: 128px;
  height: 128px;
  border: 26px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  content: none;
}

.service-cover::after {
  position: absolute;
  top: 26px;
  right: 32px;
  width: 40px;
  height: 55px;
  border-radius: 50% 50% 43% 43%;
  content: none;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 20px rgba(88, 83, 148, 0.1);
  transform: rotate(11deg);
}

.service-cover h3 {
  position: relative;
  z-index: 2;
  max-width: 150px;
  margin: 20px 0 6px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.service-cover p {
  position: relative;
  z-index: 2;
  color: #737995;
  font-size: 10px;
}

.service-kicker {
  position: relative;
  z-index: 2;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.service-price {
  color: var(--danger);
  font-size: 16px;
  font-weight: 900;
}

.service-price small {
  font-size: 10px;
  font-weight: 500;
}

/*
 * 这一块的每条轨道都写成 minmax(0, …)，不能图省事写裸 fr。
 *
 * 裸 `1fr` 等价于 `minmax(auto, 1fr)`，而 auto 那一侧取的是格子里内容的
 * **最小内容宽度**；下面 .news-row p 是 `white-space: nowrap` 的摘要，
 * 它的最小内容宽度就等于整段话排成一行的长度（实测 240~350 字，10px 字号
 * 约 2400~3500px）。这个宽度会一路往上顶：格子 → .news-row → .news-list
 * → .news-layout 的列 → .container，最后把整个文档撑宽，页面就能左右拖。
 *
 * 表现上最扎眼的反而不是那行摘要（它自己 overflow:hidden 看不出来），
 * 而是同一行里的 .featured-news：列被撑宽后它跟着变宽，
 * 而 .featured-news-media 是 aspect-ratio: 1.75，宽度一涨高度同比涨，
 * 于是首图直接戳出屏幕右边 —— 这就是「m 端下半部分没适配」的真相。
 *
 * 隔壁 .weekly-hot-item / .hot-hospital-list 早就是 minmax(0, 1fr) + min-width: 0
 * 的写法，这一块是漏网的。
 */
.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.38fr);
  gap: 36px;
}

.featured-news {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.featured-news-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.75;
  background: #eef2f7;
}

.featured-news-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: none;
}

.featured-news-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 55%, rgba(27, 31, 68, 0.18));
}

.featured-news-body { padding: 22px; }
.featured-news h3 { margin-bottom: 10px; font-size: 19px; }
.featured-news p { color: var(--muted); font-size: 12px; line-height: 1.8; }

.news-list {
  display: flex;
  flex-direction: column;
  /* 轨道写成 minmax(0,…) 只是让「算列宽」时不看内容；格子自己的
     min-width 仍是 auto，还能顶着列宽往外鼓。两处都要管。
     .featured-news 有 overflow: hidden，规范里这种盒子的自动最小尺寸本来就是 0，
     不用补；.news-list 是 overflow: visible，必须显式写。 */
  min-width: 0;
}

.news-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  gap: 18px;
  transition: transform 0.2s ease;
}

/* 中间那一格是模板里没有类名的裸 <div>，只能这样够到它。
   它一放开，.news-row p 上那对 overflow:hidden + text-overflow:ellipsis
   才真正开始工作 —— 之前格子被撑到跟文字一样宽，省略号永远没机会出现。 */
.news-row > * { min-width: 0; }

.news-row:hover { transform: translateX(5px); }
.news-date strong { display: block; color: var(--violet-deep); font-size: 25px; line-height: 1; }
.news-date span { color: #aaaec0; font-size: 9px; }
.news-row h4 { margin: 0 0 5px; font-size: 14px; }
.news-row p { overflow: hidden; margin: 0; color: #989eb0; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.news-row svg { width: 18px; color: #b4b6c6; }

.benefit-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border-radius: 22px;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 18px 40px rgba(93, 99, 221, 0.23);
}

.benefit-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 95px;
  gap: 13px;
}

.benefit-item + .benefit-item { border-left: 1px solid rgba(255,255,255,.18); }
.benefit-item svg { width: 27px; opacity: 0.88; }
.benefit-item strong { display: block; font-size: 13px; }
.benefit-item span { color: rgba(255,255,255,.7); font-size: 9px; }

.site-footer {
  padding: 55px 0 22px;
  color: #9ca0b1;
  background: #141522;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr repeat(3, 1fr);
  padding-bottom: 42px;
  gap: 55px;
}

.footer-brand .brand-logo { width: 154px; height: auto; }
.footer-brand p { max-width: 300px; margin: 18px 0; font-size: 11px; line-height: 1.9; }
.footer-socials { display: flex; gap: 9px; }
.social { display: grid; width: 32px; height: 32px; border-radius: 10px; color: #fff; background: rgba(255,255,255,.07); place-items: center; font-size: 11px; }
.footer-col h4 { margin-bottom: 17px; color: #fff; font-size: 13px; }
.footer-col a, .footer-col span { display: block; margin: 10px 0; color: #888d9f; font-size: 11px; }
.footer-col a:hover { color: #fff; }
.copyright { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.07); font-size: 9px; }

/* 电脑版 / 手机版切换入口，自动判定认错时的手动出口 */
.device-switch { color: inherit; opacity: .62; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.device-switch:hover { opacity: 1; }

.float-tools {
  position: fixed;
  z-index: 50;
  right: 18px;
  top: 50%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateY(-40%);
}

.float-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 54px;
  padding: 7px 0 6px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: #fff;
  box-shadow: 0 8px 22px rgba(29, 27, 67, .14);
  cursor: pointer;
  gap: 4px;
  transition: transform .22s ease, box-shadow .22s ease;
}

.float-btn:hover { transform: translateX(-4px); box-shadow: 0 12px 28px rgba(29, 27, 67, .2); }
.float-icon {
  display: grid;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  place-items: center;
}
.float-icon svg { width: 17px; height: 17px; }
.float-label {
  font-size: 10px;
  font-weight: 600;
  color: #5d647f;
  line-height: 1;
}
.float-btn-book .float-icon { background: linear-gradient(135deg, #a37de4 0%, #7e64d6 100%); }
.float-btn-wechat .float-icon { background: linear-gradient(135deg, #07c160 0%, #05a350 100%); }
.float-btn-phone .float-icon { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
.float-btn-top .float-icon { background: linear-gradient(135deg, #5bc0de 0%, #4aa9c7 100%); }

/* 在线咨询：图标是张头像图，直接铺满圆形，不套渐变底 */
.float-btn-consult { touch-action: none; }
.float-icon-photo {
  width: 38px;
  height: 38px;
  overflow: hidden;
  background: #f2f0ff;
}
.float-icon-photo img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.float-btn-consult .float-label { white-space: nowrap; }

.float-tooltip {
  position: absolute;
  top: 50%;
  right: 62px;
  width: max-content;
  padding: 7px 10px;
  border-radius: 8px;
  color: #fff;
  background: #27293c;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(5px,-50%);
  transition: .2s ease;
}
.float-btn:hover .float-tooltip { opacity: 1; transform: translate(0,-50%); }

/* WeChat side modal */
.wechat-modal {
  width: min(420px, calc(100vw - 116px));
  max-height: calc(100vh - 40px);
  padding: 0 !important;
  border-radius: 22px;
  text-align: center;
  overflow: hidden;
  background: #fff;
  justify-self: end;
  margin-right: 86px;
}
.wechat-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 22px;
  background: #fff;
  border-bottom: 1px solid #f0f1f5;
  text-align: left;
}
.wechat-modal-icon {
  display: grid;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #07c160 0%, #05a350 100%);
  place-items: center;
  flex-shrink: 0;
}
.wechat-modal-icon svg { width: 22px; height: 22px; color: #fff; }
.wechat-modal-title-wrap h3 {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 800;
  color: #1f2336;
}
.wechat-modal-title-wrap p {
  margin: 0;
  font-size: 12px;
  color: #8a91a5;
}
.wechat-accounts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 22px;
}
.wechat-account {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.wechat-account-label {
  font-size: 13px;
  font-weight: 700;
  color: #4b5068;
}
.wechat-qrcode-box {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  max-width: 160px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #eceef4;
  box-shadow: 0 6px 18px rgba(7, 193, 96, .06);
  overflow: hidden;
}
.wechat-qrcode-box.wechat-qrcode-fallback {
  background: #f9fafc;
  border: 2px dashed #d9dde8;
}
.wechat-qrcode-img {
  width: 88%;
  height: 88%;
  object-fit: contain;
}
.wechat-qrcode-fallback-icon svg { width: 44px; height: 44px; stroke-width: 1.4; color: #07c160; }
.wechat-qrcode-fallback-text {
  margin-top: 6px;
  font-size: 10px;
  color: #9ba0b0;
}
.qr-corners {
  position: absolute;
  inset: 8px;
  pointer-events: none;
}
.qr-corners span {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: #07c160;
  border-style: solid;
  border-width: 0;
}
.qr-corners span:nth-child(1) { top: 0; left: 0; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 6px; }
.qr-corners span:nth-child(2) { top: 0; right: 0; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 6px; }
.qr-corners span:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 6px; }
.qr-corners span:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 6px; }
.wechat-id {
  width: 100%;
  padding: 7px 4px;
  border-radius: 8px;
  background: #f5f6fa;
  font-size: 12px;
  font-weight: 700;
  color: #27293c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wechat-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  padding: 9px 0;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #07c160 0%, #05a350 100%);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.wechat-copy-btn:hover { filter: brightness(1.05); }
.wechat-copy-btn:active { transform: scale(.98); }
.wechat-copy-btn:disabled {
  background: #d3d6e0;
  cursor: not-allowed;
}
.wechat-copy-btn svg { width: 13px; height: 13px; }
.wechat-copy-btn.copied { background: #4b5cf0; }
.wechat-modal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px;
  border-top: 1px solid #f0f1f5;
  font-size: 11px;
  color: #9ba0b0;
}
.wechat-modal-footer svg { width: 14px; height: 14px; stroke-width: 1.8; }
.wechat-modal .modal-close {
  top: 16px;
  right: 16px;
  color: #a7adc0;
  background: #f4f5f9;
}
.wechat-modal .modal-close:hover {
  background: #eceef4;
  color: #6c7289;
}

/* Online consultation */
.chat-widget {
  position: fixed;
  z-index: 95;
  right: 24px;
  bottom: 24px;
}

.chat-launcher {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 126px;
  height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 15px 35px rgba(84, 74, 205, 0.32);
  cursor: pointer;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.chat-launcher:hover {
  box-shadow: 0 19px 42px rgba(84, 74, 205, 0.4);
  transform: translateY(-3px);
}

.chat-launcher svg {
  width: 21px;
}

.chat-unread {
  position: absolute;
  top: -5px;
  right: -4px;
  display: grid;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #ff5d78;
  font-size: 10px;
  font-style: normal;
  place-items: center;
  transition: 0.2s ease;
}

.chat-unread.read {
  opacity: 0;
  transform: scale(0.6);
}

.chat-panel {
  position: absolute;
  right: 0;
  bottom: 66px;
  display: flex;
  width: 370px;
  height: min(560px, calc(100vh - 120px));
  overflow: hidden;
  border: 1px solid rgba(218, 216, 239, 0.95);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(34, 31, 76, 0.25);
  opacity: 0;
  pointer-events: none;
  flex-direction: column;
  transform: translateY(16px) scale(0.97);
  transform-origin: bottom right;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.chat-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.chat-head {
  display: flex;
  align-items: center;
  min-height: 78px;
  padding: 15px 17px;
  color: #fff;
  background: var(--gradient);
  gap: 11px;
}

.chat-agent-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 43px;
  height: 43px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 14px;
  background: rgba(255,255,255,.18);
  place-items: center;
}

.chat-agent-avatar svg {
  width: 23px;
}

.chat-head strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.chat-head span {
  display: flex;
  align-items: center;
  color: rgba(255,255,255,.76);
  gap: 5px;
  font-size: 9px;
}

.chat-head span i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #75f2bc;
  box-shadow: 0 0 0 3px rgba(117,242,188,.16);
}

.chat-head button {
  display: grid;
  width: 32px;
  height: 32px;
  margin-left: auto;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: rgba(255,255,255,.14);
  cursor: pointer;
  place-items: center;
}

.chat-head button svg {
  width: 16px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px 12px;
  background:
    radial-gradient(circle at 100% 0, rgba(121, 94, 238, 0.07), transparent 28%),
    #f8f9fe;
}

.chat-message {
  display: flex;
  align-items: flex-end;
  margin-bottom: 14px;
  gap: 8px;
  animation: fadeUp .28s ease both;
}

.chat-message > div {
  max-width: 78%;
  padding: 11px 13px;
  border-radius: 6px 15px 15px 15px;
  color: #616a81;
  background: #fff;
  box-shadow: 0 6px 18px rgba(59, 56, 109, 0.07);
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-line;
}

.chat-message.user {
  justify-content: flex-end;
}

.chat-message.user > div {
  border-radius: 15px 6px 15px 15px;
  color: #fff;
  background: var(--gradient);
}

.message-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  color: #fff;
  background: var(--gradient);
  font-size: 10px;
  font-weight: 900;
  place-items: center;
}

.chat-message.typing > div {
  color: #999fb1;
  font-size: 10px;
}

.chat-quick {
  display: flex;
  overflow-x: auto;
  padding: 10px 14px 6px;
  background: #fff;
  gap: 6px;
  scrollbar-width: none;
}

.chat-quick::-webkit-scrollbar { display: none; }

.chat-quick button {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #e5e2f5;
  border-radius: 999px;
  color: var(--violet-deep);
  background: #f8f7ff;
  cursor: pointer;
  font-size: 9px;
}

.chat-quick button:hover {
  color: #fff;
  border-color: transparent;
  background: var(--gradient);
}

.chat-input-row {
  display: flex;
  align-items: center;
  margin: 7px 14px 4px;
  padding: 5px 5px 5px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafbff;
  gap: 7px;
}

.chat-input-row:focus-within {
  border-color: #9e88eb;
  box-shadow: 0 0 0 3px rgba(116,91,230,.08);
}

.chat-input-row input {
  flex: 1;
  min-width: 0;
  height: 35px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
}

.chat-input-row button {
  display: grid;
  flex: 0 0 auto;
  width: 35px;
  height: 35px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--gradient);
  cursor: pointer;
  place-items: center;
}

.chat-input-row button svg {
  width: 16px;
}

.chat-privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 0 10px;
  color: #a3a8b8;
  gap: 4px;
  font-size: 8px;
}

.chat-privacy svg {
  width: 11px;
}

/* Listing pages */
.inner-page {
  padding-top: 74px;
  background: linear-gradient(180deg, #f5f2ff 0, #f6faff 350px, #fff 700px);
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 270px;
  padding: 65px 0 50px;
}

.page-hero-bg {
  min-height: 320px;
}

.page-hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  z-index: 0;
}

.page-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(240,238,255,.88) 0%, rgba(235,245,255,.82) 50%, rgba(230,242,255,.75) 100%);
  z-index: 1;
}

.page-hero::before,
.page-hero::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.page-hero::before {
  top: -130px;
  right: 6%;
  width: 330px;
  height: 330px;
  border: 70px solid rgba(255,255,255,.5);
}

.page-hero::after {
  right: 25%;
  bottom: -50px;
  width: 110px;
  height: 110px;
  background: rgba(109, 196, 250, 0.15);
  filter: blur(1px);
}

.breadcrumb {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  margin-bottom: 26px;
  color: #9a9fb4;
  gap: 7px;
  font-size: 11px;
}

.breadcrumb a:hover { color: var(--violet-deep); }
.breadcrumb svg { width: 12px; }

.page-hero-content { position: relative; z-index: 2; max-width: 670px; }
.page-hero h1 { margin-bottom: 12px; font-size: 42px; font-weight: 900; letter-spacing: -0.045em; }
.page-hero p { margin: 0; color: #747c96; font-size: 14px; line-height: 1.8; display: inline-block; background: rgba(255,255,255,.88); padding: 6px 16px; border-radius: 5px; backdrop-filter: blur(4px); }

.page-content {
  position: relative;
  z-index: 2;
  padding: 10px 0 95px;
}

.listing-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
  padding: 13px 15px 13px 19px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  gap: 18px;
}

.result-count { color: var(--muted); font-size: 12px; }
.result-count strong { color: var(--violet-deep); }
.toolbar-actions { display: flex; align-items: center; gap: 9px; }

.select-control,
.input-control {
  height: 39px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  color: #697187;
  background: #fafbff;
  font-size: 11px;
}

.select-control { padding: 0 30px 0 12px; }
.input-control { min-width: 205px; padding: 0 13px; }
.input-control:focus, .select-control:focus { border-color: #a695ed; box-shadow: 0 0 0 3px rgba(117, 94, 232, 0.08); }

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

.list-card-grid .doctor-card .card-cover { aspect-ratio: 1.42; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 40px;
  gap: 8px;
}

.page-btn {
  display: grid;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #747b90;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  place-items: center;
}

.page-btn.active, .page-btn:hover { color: #fff; border-color: transparent; background: var(--gradient); }

.no-results {
  grid-column: 1 / -1;
  padding: 75px 20px;
  border: 1px dashed #dfe0ed;
  border-radius: 20px;
  color: #9ba0b2;
  background: #fafbff;
  text-align: center;
}

.no-results .empty-icon { margin: 0 auto 14px; font-size: 36px; }

/* Detail pages */
.detail-page {
  padding-top: 74px;
  background: linear-gradient(180deg, #f3f1ff, #f8fbff 500px, #fff 900px);
}

.detail-wrap { padding: 38px 0 90px; }

.detail-hero-card {
  display: grid;
  grid-template-columns: 420px 1fr;
  overflow: hidden;
  margin-bottom: 26px;
  border: 1px solid rgba(224, 224, 240, .9);
  border-radius: 28px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow);
}

.detail-visual {
  position: relative;
  overflow: hidden;
  min-height: 380px;
  background: #eef2f7;
}

.detail-media-image { object-position: center; }

.detail-visual .hospital-brand { font-size: 42px; }
.detail-visual .doctor-portrait { inset: 30px 45px 0; }
.detail-visual .portrait-head { width: 98px; height: 119px; }
.detail-visual .service-cover { height: 100%; margin: 0; border-radius: 0; padding: 55px; }
.detail-visual .service-cover h3 { max-width: 220px; margin-top: 100px; font-size: 42px; }
.detail-visual .service-cover::after { top: 80px; right: 65px; width: 75px; height: 105px; }
.detail-visual .service-cover::before { width: 240px; height: 240px; border-width: 50px; }

.detail-summary { padding: 42px 45px; }
.detail-summary .eyebrow { background: #f5f1ff; box-shadow: none; }
.detail-summary h1 { margin: 0 0 9px; font-size: 33px; font-weight: 900; letter-spacing: -0.035em; }
.detail-subtitle { color: #747c92; font-size: 13px; }
.detail-tags { margin: 18px 0 20px; }
.detail-desc { color: #7a8299; font-size: 13px; line-height: 1.9; }
.detail-facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 24px 0; padding: 17px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail-fact + .detail-fact { border-left: 1px solid var(--line); padding-left: 18px; }
.detail-fact strong { display: block; margin-bottom: 4px; color: var(--violet-deep); font-size: 17px; }
.detail-fact span { color: #9ba1b4; font-size: 10px; }
.detail-actions { display: flex; gap: 11px; }

.detail-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
  gap: 25px;
}

.detail-recommendations {
  padding-top: 78px;
}

.detail-recommend-section + .detail-recommend-section {
  margin-top: 78px;
}

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

.recommend-news-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .28s ease, box-shadow .28s ease;
}

.recommend-news-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

.recommend-news-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  aspect-ratio: 1.75;
  color: rgba(111,82,232,.38);
  background: #eef2f7;
}

.recommend-news-visual::before {
  position: absolute;
  right: -26px;
  bottom: -48px;
  width: 145px;
  height: 145px;
  border: 25px solid rgba(255,255,255,.48);
  border-radius: 50%;
  content: none;
}

.recommend-news-visual img { width: 100%; height: 100%; object-fit: cover; }

.recommend-news-visual > span {
  position: absolute;
  top: 16px;
  left: 17px;
  color: #73749a;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
}

.recommend-news-visual > svg {
  z-index: 1;
  width: 54px;
  height: 54px;
}

.recommend-news-body {
  padding: 18px;
}

.recommend-news-body h3 {
  display: -webkit-box;
  overflow: hidden;
  min-height: 42px;
  margin: 10px 0 7px;
  font-size: 15px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recommend-news-body p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 37px;
  color: #868da0;
  font-size: 10px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.content-card {
  margin-bottom: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.content-card h2 { margin-bottom: 21px; font-size: 20px; }
.content-card p { color: #737c92; font-size: 13px; line-height: 2; }

.content-card > p svg {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin: 0 4px 0 2px;
  vertical-align: -3px;
}

.tab-list {
  display: flex;
  margin: -7px 0 24px;
  border-bottom: 1px solid var(--line);
  gap: 25px;
}

.tab-btn {
  position: relative;
  padding: 15px 2px;
  border: 0;
  color: #868da0;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.tab-btn.active { color: var(--violet-deep); }
.tab-btn.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; border-radius: 3px 3px 0 0; content: ""; background: var(--gradient); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .35s ease both; }

.timeline { position: relative; padding-left: 26px; }
.timeline::before { position: absolute; top: 8px; bottom: 8px; left: 7px; width: 1px; content: ""; background: #deddf1; }
.timeline-item { position: relative; margin-bottom: 24px; }
.timeline-item::before { position: absolute; top: 6px; left: -24px; width: 11px; height: 11px; border: 3px solid #ece8ff; border-radius: 50%; content: ""; background: var(--violet-deep); }
.timeline-item h4 { margin: 0 0 5px; font-size: 13px; }
.timeline-item p { margin: 0; font-size: 11px; line-height: 1.7; }

.sidebar-card {
  position: sticky;
  top: 94px;
  margin-bottom: 20px;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.sidebar-card h3 { margin-bottom: 17px; font-size: 17px; }
.schedule-list { display: flex; flex-direction: column; gap: 9px; }
.schedule-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 12px; border-radius: 11px; color: #7c8397; background: #f8f9fd; font-size: 11px; }
.schedule-row b { color: var(--success); font-size: 10px; }
.schedule-row.full b { color: #b0b4c2; }
.sidebar-card .btn { width: 100%; margin-top: 17px; }
.contact-line { display: flex; align-items: center; margin-top: 14px; color: #7e8699; gap: 9px; font-size: 11px; }
.contact-line svg { width: 16px; color: var(--violet-deep); }

.doctor-mini {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  gap: 11px;
}
.mini-avatar { display: block; width: 42px; height: 42px; border-radius: 13px; background: #eef2f7; object-fit: cover; object-position: center 18%; }
.doctor-mini strong { display: block; font-size: 12px; }
.doctor-mini span { color: #969daf; font-size: 9px; }

.process-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 13px; }
.process-item { position: relative; padding: 18px 15px; border-radius: 15px; background: #f8f8ff; }
.process-number { display: grid; width: 31px; height: 31px; margin-bottom: 12px; border-radius: 10px; color: #fff; background: var(--gradient); font-size: 11px; font-weight: 800; place-items: center; }
.process-item h4 { margin-bottom: 5px; font-size: 12px; }
.process-item p { margin: 0; font-size: 10px; line-height: 1.6; }

.faq-item { border-bottom: 1px solid var(--line); }
.faq-question { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 17px 0; border: 0; background: transparent; cursor: pointer; text-align: left; font-size: 13px; font-weight: 700; }
.faq-question svg { width: 17px; transition: transform .25s ease; }
.faq-item.open .faq-question svg { transform: rotate(45deg); }
.faq-answer { overflow: hidden; max-height: 0; color: #7f879c; font-size: 12px; line-height: 1.8; transition: max-height .3s ease, padding .3s ease; }
.faq-item.open .faq-answer { max-height: 160px; padding-bottom: 17px; }

/* Article pages */
.article-list-card { display: grid; grid-template-columns: 220px 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow-sm); transition: .25s ease; }
.article-list-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.article-thumb { position: relative; overflow: hidden; min-height: 175px; background: #eef2f7; }
.article-thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-thumb .tooth-motif { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.8); font-size: 68px; }
.article-card-body { padding: 24px; }
.article-card-body h3 { margin: 7px 0 9px; font-size: 18px; }
.article-card-body p { display: -webkit-box; overflow: hidden; color: #7d8499; font-size: 11px; line-height: 1.8; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.article-meta { display: flex; align-items: center; color: #a0a5b5; gap: 15px; font-size: 10px; }
.article-stack { display: flex; flex-direction: column; gap: 18px; }
.article-list-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 26px; }

.weekly-hot-panel {
  position: sticky;
  top: 92px;
  overflow: hidden;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.weekly-hot-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 19px; }
.weekly-hot-head > div > span { color: var(--violet-deep); font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.weekly-hot-head h2 { margin: 4px 0 0; font-size: 20px; letter-spacing: -.03em; }
.weekly-hot-icon { display: grid; width: 40px; height: 40px; border: 1px solid #e8e3f8; border-radius: 13px; color: var(--violet-deep); background: #f8f6ff; place-items: center; }
.weekly-hot-icon svg { width: 19px; }
.weekly-hot-lead { display: block; }
.weekly-hot-lead-media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; margin-bottom: 14px; border-radius: 16px; background: #eef2f7; }
.weekly-hot-lead-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.weekly-hot-lead:hover .weekly-hot-lead-media img { transform: scale(1.04); }
.weekly-hot-rank { position: absolute; top: 11px; left: 11px; display: grid; width: 35px; height: 35px; border-radius: 11px; color: #fff; background: rgba(39, 28, 79, .86); box-shadow: 0 8px 20px rgba(37, 27, 74, .22); font-size: 11px; font-weight: 800; backdrop-filter: blur(8px); place-items: center; }
.weekly-hot-lead h3 { display: -webkit-box; overflow: hidden; margin: 9px 0 10px; font-size: 16px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.weekly-hot-meta { display: flex; color: #a0a5b5; gap: 12px; font-size: 9px; }
.weekly-hot-list { margin-top: 18px; border-top: 1px solid var(--line); }
.weekly-hot-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) 14px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line); gap: 9px; }
.weekly-hot-number { color: #c7bddf; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.weekly-hot-copy { min-width: 0; }
.weekly-hot-copy strong { display: -webkit-box; overflow: hidden; font-size: 12px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.weekly-hot-copy small { display: block; overflow: hidden; margin-top: 4px; color: #a0a5b5; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.weekly-hot-item > svg { width: 14px; color: #c4c0d1; transition: transform .2s ease, color .2s ease; }
.weekly-hot-item:hover .weekly-hot-copy strong { color: var(--violet-deep); }
.weekly-hot-item:hover > svg { color: var(--violet-deep); transform: translateX(3px); }
.weekly-hot-more { display: flex; align-items: center; justify-content: center; margin-top: 16px; padding: 11px; border-radius: 12px; color: var(--violet-deep); background: #f8f6ff; gap: 7px; font-size: 11px; font-weight: 800; }
.weekly-hot-more svg { width: 15px; transition: transform .2s ease; }
.weekly-hot-more:hover svg { transform: translateX(3px); }

.article-page .detail-wrap { max-width: 940px; }
.article-paper { padding: 45px 60px; border: 1px solid var(--line); border-radius: 28px; background: #fff; box-shadow: var(--shadow); }
.article-paper h1 { margin: 12px 0 14px; font-size: 35px; line-height: 1.35; letter-spacing: -0.035em; }
.article-lead { margin: 28px 0; padding: 18px 20px; border-left: 4px solid var(--violet-deep); border-radius: 0 13px 13px 0; color: #646d85; background: #f7f6ff; font-size: 13px; line-height: 1.9; }
.article-hero-img { overflow: hidden; aspect-ratio: 2.15; margin: 28px 0; border-radius: 18px; background: #eef2f7; }
.article-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.article-paper h2 { margin: 32px 0 13px; font-size: 21px; }
.article-paper p { color: #657086; font-size: 14px; line-height: 2.1; }
.article-paper ul { padding-left: 21px; color: #657086; font-size: 14px; line-height: 2; }
.article-share { display: flex; align-items: center; justify-content: space-between; margin-top: 35px; padding-top: 22px; border-top: 1px solid var(--line); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 24px; }
.contact-info { overflow: hidden; padding: 35px; border-radius: 24px; color: #fff; background: var(--gradient); box-shadow: var(--shadow); }
.contact-info h2 { font-size: 28px; }
.contact-info p { color: rgba(255,255,255,.75); font-size: 12px; line-height: 1.9; }
.contact-method { display: flex; align-items: center; margin-top: 25px; gap: 14px; }
.contact-method-icon { display: grid; width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.14); place-items: center; }
.contact-method-icon svg { width: 20px; }
.contact-method strong { display: block; font-size: 13px; }
.contact-method span { color: rgba(255,255,255,.68); font-size: 10px; }
.contact-form { padding: 35px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--shadow-sm); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 7px; color: #626b80; font-size: 11px; font-weight: 700; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 12px; outline: none; background: #fafbff; font-size: 12px; }
.field input, .field select { height: 46px; padding: 0 14px; }
.field textarea { min-height: 110px; padding: 13px 14px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #9b87eb; box-shadow: 0 0 0 3px rgba(125,99,232,.08); }

/* Modal and search */
.modal-backdrop,
.search-overlay {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  padding: 20px;
  background: rgba(26, 28, 48, 0.52);
  opacity: 0;
  place-items: center;
  transition: opacity .25s ease;
  backdrop-filter: blur(10px);
}

.modal-backdrop.show,
.search-overlay.show { opacity: 1; }

.modal {
  position: relative;
  width: min(100%, 520px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 31px;
  border-radius: 25px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(29, 27, 67, .28);
  transform: translateY(20px) scale(.98);
  transition: transform .25s ease;
}

.modal-backdrop.show .modal { transform: translateY(0) scale(1); }
.modal h2 { margin-bottom: 7px; font-size: 24px; }
.modal-subtitle { margin-bottom: 24px; color: #8a91a5; font-size: 11px; }
.modal-close { position: absolute; top: 18px; right: 18px; display: grid; width: 35px; height: 35px; border: 0; border-radius: 11px; color: #858b9e; background: #f4f5f9; cursor: pointer; place-items: center; }
.modal-close svg { width: 17px; }
.agreement { color: #9a9fb1; font-size: 10px; line-height: 1.7; }
.agreement input { margin-right: 5px; }
.modal .btn-primary { width: 100%; margin-top: 15px; }

.search-dialog { width: min(100%, 690px); transform: translateY(-10vh); }
.search-main { display: flex; align-items: center; height: 58px; padding: 0 17px; border: 2px solid #8c72ed; border-radius: 16px; gap: 11px; }
.search-main svg { width: 23px; color: var(--violet-deep); }
.search-main input { flex: 1; border: 0; outline: 0; font-size: 16px; }
.search-results { max-height: 310px; overflow: auto; margin-top: 13px; }
.search-result { display: flex; align-items: center; justify-content: space-between; padding: 13px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.search-result:hover { background: #f8f7ff; }
.search-result strong { display: block; font-size: 12px; }
.search-result span { color: #999fb1; font-size: 10px; }
.search-result-type { padding: 4px 8px; border-radius: 6px; color: var(--violet-deep)!important; background: #f0edff; }

#toast-root { position: fixed; z-index: 200; top: 90px; right: 22px; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; min-width: 260px; padding: 13px 16px; border: 1px solid rgba(109,92,221,.16); border-radius: 14px; color: #565e74; background: rgba(255,255,255,.95); box-shadow: var(--shadow); gap: 10px; font-size: 12px; animation: toastIn .35s ease both; backdrop-filter: blur(15px); }
.toast-icon { display: grid; width: 27px; height: 27px; border-radius: 9px; color: #fff; background: var(--gradient); place-items: center; }

.reveal { opacity: 0; transform: translateY(24px); }
.reveal.visible { animation: fadeUp .65s ease forwards; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto!important; animation-duration: .01ms!important; transition-duration: .01ms!important; }
}

@media (max-width: 1080px) {
  .nav-wrap { gap: 16px; }
  .main-nav { gap: 2px; margin-left: 0; }
  .nav-link { padding: 10px 8px; font-size: 12px; }
  .search-trigger { width: 42px; justify-content: center; }
  .search-trigger span { display: none; }
  .card-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .list-card-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .detail-hero-card { grid-template-columns: 360px 1fr; }
  .article-list-layout { grid-template-columns: minmax(0, 1fr) 286px; gap: 20px; }
  .article-list-card { grid-template-columns: 185px 1fr; }
}

@media (max-width: 820px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .site-header { background: rgba(255,255,255,.93); backdrop-filter: blur(18px); }
  .nav-wrap { height: 64px; }
  .main-nav { display: none; }
  .menu-btn { display: none; }
  .nav-appointment { display: none; }
  .mobile-quick-nav {
    position: fixed;
    z-index: 70;
    top: 64px;
    right: 0;
    left: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    height: 46px;
    overflow-x: auto;
    white-space: nowrap;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 6px 18px rgba(48,45,96,.05);
    backdrop-filter: blur(14px);
    scrollbar-width: none;
  }
  .mobile-quick-nav::-webkit-scrollbar { display: none; }
  .mobile-quick-nav .nav-link {
    flex: 0 0 auto;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    color: #515a72;
  }
  .mobile-quick-nav .nav-link.active {
    color: #fff;
    background: var(--gradient);
    box-shadow: 0 4px 12px rgba(163,125,228,.28);
  }
  .mobile-quick-nav .nav-link.active::after { display: none; }
  .search-dropdown {
    position: fixed;
    top: 70px;
    right: 14px;
    left: 14px;
    width: auto;
    transform-origin: top center;
  }
  .region-dropdown {
    position: fixed;
    top: 70px;
    right: 14px;
    left: 14px;
    width: auto;
    transform-origin: top center;
  }
  .home-page { padding-top: 118px; }
  .hero-shell { width: min(calc(100% - 24px), 1240px); }
  .hero-carousel { aspect-ratio: 2.325 / 1; border-radius: 22px; }
  .hero-slide:first-child .hero-image { object-position: center; }
  .hero-slide:nth-child(2) .hero-image { object-position: center; }
  .hero-slide:first-child::after { position: absolute; inset: auto 0 0; height: 40%; content: ""; background: linear-gradient(transparent, rgba(42,35,90,.25)); }
  .hero-slide.tinted .hero-image { object-position: center; }
  .slide-copy { top: auto; right: 25px; bottom: 24px; left: 25px; max-width: 410px; transform: none; }
  .slide-copy h1 { margin-bottom: 8px; font-size: 28px; }
  .slide-copy p { display: none; }
  .slide-kicker { margin-bottom: 8px; }
  .slide-copy .btn { min-height: 38px; padding: 0 15px; }
  .hero-dots { right: 14px; bottom: 13px; }
  .hero-slide.tinted + .hero-dots { bottom: 13px; }
  .hero-arrow { display: none; }
  .trust-row { grid-template-columns: repeat(2,1fr); gap: 20px 8px; }
  .trust-item { justify-content: flex-start; }
  .trust-item strong { font-size: 20px; }
  .section { padding: 68px 0; }
  .section-head { align-items: flex-start; }
  .section-title h2 { font-size: 26px; }
  .card-grid, .list-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  /* 这里必须跟着写 minmax(0, 1fr)：裸 1fr 会把基础样式那条整个覆盖掉，
     单列反而是最危险的一档 —— 摘要撑出来的宽度不再有另一列分担，
     全部落在唯一一列上 */
  .news-layout { grid-template-columns: minmax(0, 1fr); }
  .benefit-strip { grid-template-columns: repeat(2,1fr); }
  .benefit-item:nth-child(3) { border-left: 0; border-top: 1px solid rgba(255,255,255,.18); }
  .benefit-item:nth-child(4) { border-top: 1px solid rgba(255,255,255,.18); }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 28px; }
  .footer-col:last-child { grid-column: 1 / -1; }
  .float-tools { right: 10px; top: auto; bottom: 82px; flex-direction: row; transform: none; gap: 8px; }
  .float-btn { width: 48px; padding: 6px 0 5px; border-radius: 14px; }
  .float-icon { width: 30px; height: 30px; }
  .float-icon svg { width: 15px; height: 15px; }
  .float-label { font-size: 9px; }
  .float-btn-top { display: none; }
  .float-tooltip { display: none; }

  /*
   * 小屏时工具条整体挪到底部横排，在线咨询单独拎出来贴右侧悬浮。
   * 它是全站转化率最高的那一颗，挤在底部四连里跟「顶部」一个分量，
   * 拎出来单独占一侧才对得上它的权重。
   *
   * 四个方位全部写死，一个都不能省 —— 这正是上一版失效的原因：
   * 当时只写了 top，right/left/bottom 留 auto，于是水平方向回退到「静态位置」，
   * 也就是它在底部横排里本该待的地方，看起来就像 fixed 没生效。
   * 同理 --consult-top 必须带 fallback：变量没定义时整条声明作废，
   * top 掉回 auto，垂直方向同样回落到静态位置。
   *
   * 位置由 site.js 拖动时写进 --consult-top（它会 clamp 在可视区内）。
   * 宽屏下这条规则不生效，按钮回到右侧竖排工具条里，--consult-top 也就没人读。
   */
  .float-btn-consult {
    position: fixed;
    /* 比 .float-tools 的 50 高一级：拖到底部横排附近时压在上面，不被切掉 */
    z-index: 51;
    top: var(--consult-top, 58%);
    right: 10px;
    bottom: auto;
    left: auto;

    /* wydh.js 会按 .zaixian_fuwu 这个类隐藏元素，我们的按钮也挂着它。
       m/live-chat.php 里还有一份 600ms 的定时兜底，两边都要有 ——
       CSS 挡不住 wydh 写在 style 上的内联值，JS 挡不住首屏那一下。 */
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;

    box-shadow: 0 10px 26px rgba(29, 27, 67, .22);
  }

  /* 悬浮态下 hover 的横移会和拖动打架，直接去掉；小屏上本来也没有 hover */
  .float-btn-consult:hover { transform: none; }
  .float-icon-photo { width: 36px; height: 36px; }
  .wechat-modal { width: min(360px, calc(100vw - 28px)); margin-right: 0; justify-self: center; }
  .chat-widget { right: 14px; bottom: 14px; }
  .chat-panel { width: min(370px, calc(100vw - 28px)); }
  .inner-page, .detail-page { padding-top: 114px; }
  .page-hero { min-height: 235px; padding: 48px 0 35px; }
  .page-hero h1 { font-size: 34px; }
  .detail-hero-card { grid-template-columns: 1fr; }
  .detail-visual { min-height: 330px; }
  .detail-columns { grid-template-columns: 1fr; }
  .recommend-news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar-card { position: static; }
  .article-list-layout { grid-template-columns: 1fr; }
  .weekly-hot-panel { position: static; }
  .process-grid { grid-template-columns: repeat(2,1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .wechat-accounts { grid-template-columns: 1fr; padding: 18px; }
  .wechat-qrcode-box { max-width: 200px; }
  .wechat-modal { border-radius: 18px; }
  .brand-logo { width: 104px; height: 50px; }
  .nav-actions { gap: 7px; }
  .search-trigger { width: 39px; height: 39px; }
  .search-dropdown-content { max-height: calc(100vh - 158px); }
  .region-trigger { width: 39px; height: 39px; padding: 0; justify-content: center; }
  .region-trigger .region-label { display: none; }
  .region-trigger svg:last-of-type { display: none; }
  .region-cols { grid-template-columns: 1fr; max-height: 236px; }
  .hot-service-grid,
  .hot-hospital-list { grid-template-columns: 1fr; }
  .hero-carousel { aspect-ratio: 2.325 / 1; }
  .hero-slide:first-child .hero-image { object-position: center; }
  .hero-slide:nth-child(2) .hero-image { object-position: center; }
  .hero-slide.tinted::after { background: linear-gradient(0deg, rgba(240,232,255,.98), rgba(236,245,255,.3) 70%); }
  .hero-slide.tinted .hero-image { object-position: center; }
  .slide-copy { right: 20px; bottom: 28px; left: 20px; }
  .hero-slide:first-child .mobile-hero-note { display: block; }
  .trust-row { padding-top: 19px; }
  .trust-icon { width: 38px; height: 38px; border-radius: 12px; }
  .trust-item strong { font-size: 17px; }
  .section { padding: 55px 0; }
  .section-head { margin-bottom: 23px; }
  .section-link { white-space: nowrap; padding: 7px 13px 7px 15px; font-size: 12px; }
  .filter-bar { align-items: flex-start; flex-direction: column; }
  .card-grid, .list-card-grid { grid-template-columns: 1fr; }
  .home-page .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
  .home-page .entity-card:nth-child(n+5) { display: none; }
  .home-page .card-body { padding: 13px; }
  .home-page .card-cover, .home-page .service-cover { margin: 6px 6px 0; }
  .home-page .card-title-row { align-items: flex-start; }
  .home-page .card-title-row h3 { font-size: 13px; }
  .home-page .card-desc { display: none; }
  .home-page .rating { display: none; }
  .home-page .doctor-card .card-cover { aspect-ratio: 1.05; }
  .home-page .service-cover { height: auto; aspect-ratio: 4 / 3; padding: 0; }
  .home-page .service-cover h3 { margin-top: 22px; font-size: 19px; }
  .news-row { grid-template-columns: 49px minmax(0, 1fr) auto; gap: 10px; }
  .news-date strong { font-size: 21px; }
  .benefit-item { min-height: 82px; padding: 12px; justify-content: flex-start; }
  .benefit-item svg { width: 21px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col:last-child { grid-column: 1 / -1; }
  .copyright { align-items: flex-start; flex-direction: column; gap: 8px; }
  .listing-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-actions { width: 100%; }
  .input-control { flex: 1; min-width: 0; width: 100%; }
  .page-hero h1 { font-size: 30px; }
  .detail-wrap { padding-top: 25px; }
  .detail-visual { min-height: 270px; }
  .detail-summary { padding: 29px 23px; }
  .detail-summary h1 { font-size: 27px; }
  .detail-facts { grid-template-columns: repeat(3,1fr); }
  .detail-fact strong { font-size: 14px; }
  .detail-actions { flex-direction: column; }
  .detail-actions .btn { width: 100%; }
  .detail-recommendations { padding-top: 58px; }
  .detail-recommend-section + .detail-recommend-section { margin-top: 58px; }
  .recommend-news-grid { grid-template-columns: 1fr; }
  .chat-launcher { width: 52px; min-width: 52px; padding: 0; }
  .chat-launcher > span { display: none; }
  .chat-panel { bottom: 64px; height: calc(100vh - 92px); }
  .content-card { padding: 22px 18px; }
  .tab-list { overflow-x: auto; gap: 18px; }
  .tab-btn { flex: 0 0 auto; }
  .process-grid { grid-template-columns: 1fr; }
  .article-list-card { grid-template-columns: 1fr; }
  .article-thumb { min-height: 155px; }
  .weekly-hot-panel { padding: 20px; }
  .article-paper { padding: 29px 20px; }
  .article-paper h1 { font-size: 27px; }
  .article-hero-img { aspect-ratio: 1.35; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .contact-form, .contact-info { padding: 27px 22px; }
  .modal { padding: 28px 20px; }
  #toast-root { right: 12px; left: 12px; }
  .toast { min-width: 0; }
}

/*
 * 小屏断点。必须排在 1080 / 820 / 560 之后 ——
 * 断点之间选择器特异性相同，谁在后面谁说了算，顺序写反了窄屏反而拿不到自己的值。
 * 往下再加断点就接在这一段后面。
 */

/* 首屏联系条：480px 以下两个按钮并排就挤成两行字了，改成上下堆叠 */
@media (max-width: 480px) {
  .hero-contact-bar {
    flex-direction: column;
    gap: 10px;
  }
  .hero-contact-item {
    width: 100%;
    justify-content: center;
  }
  .hero-contact-btn {
    width: auto;
    min-width: min(100%, 280px);
    max-width: 100%;
    justify-content: center;
    padding: 12px 20px;
  }
  .copy-hint {
    margin-left: 10px;
    padding: 4px 10px;
    font-size: 12px;
  }
}

/*
 * 主流手机（412 / 393 / 390 / 360）。以前最窄的断点是 560px，
 * 那套尺寸是照 540 左右的屏定的，412 上原样套过来就显得处处过大：
 * 区块上下各 55px 留白、hero 标题 28px、详情页参数挤三列。
 * 这一块只改尺寸，不动任何布局结构（列数、显隐一律沿用 560 那套）。
 */
@media (max-width: 430px) {
  /* 左右各留 10px 即可，28px 在 412 上等于白扔掉 8px 正文宽度 */
  .container { width: min(calc(100% - 20px), var(--max)); }

  /* 一屏 924px 高，每个区块上下共 110px 留白占掉 12%，翻着翻着全是空白 */
  .section { padding: 38px 0; }
  .section-title h2 { font-size: 22px; }

  /* hero 是 2.325:1，412 宽算下来只有 177px 高，28px 的标题加按钮放不下 */
  .slide-copy h1 { font-size: 22px; }

  .page-hero h1 { font-size: 25px; }
  .trust-item strong { font-size: 16px; }

  /* 13px 是全站最小字号，用在卡片标题上偏小，这里反而要加回来 */
  .home-page .card-title-row h3 { font-size: 14px; }

  /* 三列的话每列只剩约 120px，数字和单位会折行 */
  .detail-facts { grid-template-columns: repeat(2,1fr); }
}
