:root {
  --bg: #f7f5ef;
  --surface: #ffffff;
  --surface-soft: #f2f5ef;
  --ink: #25322b;
  --muted: #67736c;
  --brand: #3f6b54;
  --brand-dark: #2f5540;
  --accent: #b78343;
  --line: #dfe5df;
  --shadow: 0 12px 34px rgba(35, 55, 44, 0.09);
  --radius: 18px;
  --max: 1160px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, video { max-width: 100%; display: block; }
.container { width: min(calc(100% - 32px), var(--max)); margin: 0 auto; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 9999; background: #fff; padding: 8px 12px; border-radius: 8px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 24px; }
.brand { text-decoration: none; display: flex; align-items: center; gap: 12px; min-width: max-content; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  overflow: hidden; flex: 0 0 44px;
  background: #fff; border: 1px solid var(--line);
}
.brand-mark img {
  width: 100%; height: 100%; object-fit: cover; display:block;
}
.brand-text strong { display:block; font-size: 18px; line-height: 1.2; }
.brand-text small { color: var(--muted); font-size: 12px; }
.nav { display: flex; gap: 18px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.nav::-webkit-scrollbar { display:none; }
.nav a { text-decoration: none; color: #455248; font-size: 14px; padding: 22px 0; }
.nav a:hover { color: var(--brand); }

.hero {
  padding: 72px 0 54px;
  background:
    radial-gradient(circle at 82% 18%, rgba(183,131,67,.15), transparent 26%),
    linear-gradient(135deg, #eff5ef 0%, #faf7ef 52%, #f5efe6 100%);
  border-bottom: 1px solid var(--line);
}
.hero-grid { display:grid; grid-template-columns: 1.2fr .8fr; gap: 38px; align-items:center; }
.eyebrow { color: var(--brand); font-weight: 800; letter-spacing: .08em; margin:0 0 8px; }
h1 { font-size: clamp(34px, 5.5vw, 58px); line-height: 1.12; margin: 0 0 16px; letter-spacing: -0.03em; }
.hero-lead { font-size: 18px; color: #526058; max-width: 700px; margin: 0 0 24px; }
.hero-badges { display:flex; flex-wrap:wrap; gap:10px; margin: 0 0 26px; }
.badge { display:inline-flex; align-items:center; padding: 8px 13px; border-radius:999px; background:#fff; border:1px solid var(--line); font-weight:700; font-size:14px; }
.hero-actions { display:flex; flex-wrap:wrap; gap:12px; }
.btn { display:inline-flex; align-items:center; justify-content:center; min-height:46px; padding: 0 18px; border-radius: 12px; text-decoration:none; font-weight:800; border:1px solid transparent; }
.btn-primary { background: var(--brand); color:#fff; }
.btn-primary:hover { background:var(--brand-dark); }
.btn-secondary { background:#fff; color:var(--brand); border-color:var(--line); }
.hero-card { background: rgba(255,255,255,.92); box-shadow: var(--shadow); border:1px solid rgba(223,229,223,.9); border-radius:24px; padding:28px; }
.hero-card h2 { margin:0 0 6px; font-size:22px; }
.hero-card .price { font-size: 34px; font-weight:900; color:var(--brand); line-height:1.25; margin: 10px 0; }
.hero-card ul { margin:16px 0 0; padding-left:20px; color:#556159; }
.hero-card.hero-card-image { padding: 12px; overflow: hidden; }
.hero-card-image img { width: 100%; height: auto; border-radius: 18px; display: block; }

.section { padding: 70px 0; }
.section.alt { background:#fff; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.section-head { margin-bottom: 30px; }
.kicker { color:var(--accent); font-weight:900; letter-spacing:.08em; font-size:13px; margin:0 0 7px; }
h2 { font-size: clamp(28px, 4.5vw, 42px); line-height:1.22; margin:0 0 12px; letter-spacing:-.02em; }
.section-head p { margin:0; color:var(--muted); max-width: 820px; }
h3 { font-size: 22px; margin: 0 0 12px; }
h4 { font-size: 18px; margin: 0 0 9px; }
p { margin-top: 0; }
.grid-2 { display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap:22px; }
.grid-3 { display:grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap:18px; }
.card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:24px; box-shadow: 0 5px 18px rgba(37,50,43,.04); }
.alt .card { background:#fbfcfa; }
.card p:last-child, .card ul:last-child { margin-bottom:0; }
.card ul, .card ol { padding-left: 22px; }
.meta-list { margin:0; padding:0; list-style:none; display:grid; gap:10px; }
.meta-list li { display:grid; grid-template-columns: 88px 1fr; gap:10px; padding-bottom:10px; border-bottom:1px dashed var(--line); }
.meta-list li:last-child { border-bottom:0; padding-bottom:0; }
.meta-list strong { color:var(--brand-dark); }
.notice { border-left:4px solid var(--accent); background:#fffaf1; padding:16px 18px; border-radius:0 12px 12px 0; color:#5f584d; }
.price-panels { display:grid; grid-template-columns:repeat(2,1fr); gap:18px; margin-bottom:18px; }
.price-card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:25px; }
.price-card strong { display:block; color:var(--brand); font-size:29px; margin-top:5px; }

.gallery { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:24px; }
.photo { margin:0; background:#fff; border:1px solid var(--line); border-radius:16px; overflow:hidden; box-shadow:0 6px 20px rgba(37,50,43,.05); }
.photo img { width:100%; height:320px; object-fit:cover; object-position:center; background:#eceeea; }
.photo figcaption { padding:11px 14px; color:#556159; font-size:14px; font-weight:700; }

.service-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.service-item { background:#fff; border:1px solid var(--line); border-radius:16px; padding:20px; }
.service-item b { display:block; color:var(--brand); margin-bottom:5px; }
.video-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; align-items:start; }
.video-card { background:#fff; border:1px solid var(--line); border-radius:18px; overflow:hidden; box-shadow:var(--shadow); }
.video-wrap { background:#111; display:flex; justify-content:center; }
.video-wrap video { width:min(100%, 540px); max-height:690px; background:#111; }
.video-card h3 { padding:18px 20px 0; margin:0; }
.video-card p { padding:6px 20px 18px; margin:0; color:var(--muted); }

.steps { counter-reset: step; display:grid; gap:16px; }
.step { background:#fff; border:1px solid var(--line); border-radius:16px; padding:22px; }
.step h3::before { counter-increment:step; content: counter(step); display:inline-grid; place-items:center; width:30px; height:30px; border-radius:50%; background:var(--brand); color:#fff; margin-right:9px; font-size:14px; vertical-align:2px; }
.compact-list { margin:0; padding-left:22px; }
.compact-list li + li { margin-top:5px; }

.contact-box { background:var(--brand-dark); color:#fff; border-radius:24px; padding:32px; display:grid; grid-template-columns:1fr auto; gap:24px; align-items:center; }
.contact-box h2 { margin-bottom:8px; color:#fff; }
.contact-box p { margin:0; color:#dfe9e2; }
.contact-actions { display:flex; flex-direction:column; gap:10px; min-width:240px; }
.contact-actions .btn { background:#fff; color:var(--brand-dark); }
.contact-actions .btn.secondary { background:transparent; color:#fff; border-color:rgba(255,255,255,.35); }
.site-footer { padding:28px 0 38px; color:#758078; font-size:13px; text-align:center; }


.fee-table-wrap { overflow-x:auto; margin-bottom:18px; }
.fee-table {
  width:100%; border-collapse: collapse; background:var(--surface); border:1px solid var(--line);
  border-radius: var(--radius); overflow:hidden; box-shadow: 0 5px 18px rgba(37,50,43,.04);
}
.fee-table th, .fee-table td {
  padding: 15px 16px; border-bottom:1px solid var(--line); text-align:center;
}
.fee-table thead th {
  background:#eef4ef; color:var(--brand-dark); font-size:16px;
}
.fee-table tbody th {
  background:#fafcf9; color:var(--brand-dark); text-align:left; white-space:nowrap;
}
.fee-table tbody tr:last-child th, .fee-table tbody tr:last-child td { border-bottom:0; }
.fee-notes p { margin: 4px 0; }

.campus-prices { grid-template-columns: repeat(2,minmax(0,1fr)); align-items:start; }
.campus-card { padding: 22px; }
.campus-card h3 { margin-bottom: 14px; color: var(--brand-dark); }
.campus-card .fee-table { box-shadow:none; }


@media (max-width: 900px) {
  .header-row { flex-direction:column; align-items:stretch; padding-top:12px; gap:4px; }
  .nav { gap:16px; }
  .nav a { padding:11px 0 13px; }
  .hero { padding-top:48px; }
  .hero-grid { grid-template-columns:1fr; }
  .grid-3, .service-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .contact-box { grid-template-columns:1fr; }
  .contact-actions { min-width:0; flex-direction:row; flex-wrap:wrap; }
}
@media (max-width: 620px) {
  .container { width:min(calc(100% - 22px), var(--max)); }
  .photo img { height: 250px; }
  .section { padding:52px 0; }
  .hero { padding:38px 0 42px; }
  .hero-card { padding:22px; }
  .grid-2, .grid-3, .price-panels, .gallery, .service-list, .video-grid { grid-template-columns:1fr; }
  .meta-list li { grid-template-columns:76px 1fr; }
  .contact-actions { flex-direction:column; }
  h1 { font-size:39px; }
}
@media print {
  .site-header, .hero-actions, video { display:none !important; }
  body { background:#fff; }
  .section { padding:28px 0; }
  .card, .photo, .video-card { box-shadow:none; }
}

.medical-gallery { margin-top: 8px; }
.medical-gallery .photo img { height: 300px; object-fit: cover; object-position: center; }
.medical-gallery .photo figcaption { min-height: 68px; }
.medical-note { margin-top: 18px; }


/* 2026-08-11: clean mobile price layout.
   Important: on phones the HTML table is not used at all, so table intrinsic sizing
   cannot make the price section wider than the same .container used by all sections. */
.fee-mobile-grid { display: none; }

@media (max-width: 620px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }

  /* Keep the exact same outer .container width as every other section. */
  #fees { width: 100%; max-width: 100%; overflow-x: clip; }
  #fees > .container { min-width: 0; }

  #fees .section-head h2 {
    font-size: 25px;
    line-height: 1.25;
  }

  #fees .price-panels.campus-prices {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 0 18px;
    padding: 0;
  }

  #fees .campus-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 18px 14px;
    overflow: hidden;
    contain: inline-size;
  }

  /* Remove the auto-sizing table entirely from phone layout. */
  #fees .fee-table-wrap { display: none !important; }

  #fees .fee-mobile-grid {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
  }

  #fees .fee-mobile-row {
    display: grid;
    grid-template-columns: minmax(0, 31fr) repeat(3, minmax(0, 23fr));
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  #fees .fee-mobile-row > div {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    padding: 12px 2px;
    border-bottom: 1px solid var(--line);
    text-align: center;
    font-size: 13px;
    line-height: 1.35;
    overflow: hidden;
  }

  #fees .fee-mobile-head > div {
    background: #eef4ef;
    color: var(--brand-dark);
    font-weight: 800;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  #fees .fee-label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 10px !important;
    color: var(--brand-dark);
    background: #fafcf9;
    font-weight: 800;
    white-space: nowrap;
  }

  #fees .fee-price strong {
    display: block;
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
  }
  #fees .fee-price span {
    display: block;
    margin-top: 3px;
    color: var(--ink);
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
  }

  #fees .fee-mobile-row:last-child > div { border-bottom: 0; }
  #fees .notice { box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; }
}

@media (max-width: 380px) {
  #fees .campus-card { padding-left: 11px; padding-right: 11px; }
  #fees .fee-mobile-row > div { font-size: 12px; padding-left: 1px; padding-right: 1px; }
  #fees .fee-label { padding-left: 7px !important; }
  #fees .fee-price strong { font-size: 13px; }
  #fees .fee-price span { font-size: 11px; }
}


/* 2026-08-11: desktop QR in contact section + mobile floating WeChat consult */
.contact-main { min-width: 0; }
.contact-emphasis { display:inline-block; margin-top: 4px; }
.contact-side { display:flex; align-items:center; gap:16px; }
.contact-actions { flex: 0 0 auto; }
.wechat-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 152px;
}
.wechat-card img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  display: block;
  border-radius: 14px;
  background: #fff;
  padding: 6px;
}
.wechat-card-text { display:flex; flex-direction:column; align-items:center; gap:4px; text-align:center; }
.wechat-card-text strong { color:#fff; font-size: 16px; line-height:1.2; }
.wechat-card-text span { color:#dfe9e2; font-size: 12px; line-height:1.35; word-break: break-all; }

.wechat-float {
  display:none;
  position: fixed;
  right: 12px;
  bottom: 86px;
  z-index: 80;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #21b14b 0%, #15803d 100%);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(21,128,61,.28);
  animation: wechat-bob 2.4s ease-in-out infinite;
}
.wechat-float-icon { font-size: 18px; line-height: 1; }
.wechat-float-text { font-size: 14px; line-height:1; white-space: nowrap; }
@keyframes wechat-bob {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.wechat-modal[hidden] { display:none !important; }
.wechat-modal { position: fixed; inset: 0; z-index: 100; }
.wechat-modal-backdrop { position:absolute; inset:0; background: rgba(0,0,0,.55); }
.wechat-modal-panel {
  position: relative;
  width: min(92vw, 340px);
  margin: 8vh auto 0;
  background: #fff;
  border-radius: 22px;
  padding: 22px 18px 18px;
  box-shadow: 0 20px 48px rgba(0,0,0,.24);
  text-align: center;
}
.wechat-modal-close {
  position:absolute; top:10px; right:10px; width:34px; height:34px; border:0; border-radius:50%;
  background:#f1f5f2; color:#33443b; font-size:24px; line-height:1; cursor:pointer;
}
.wechat-modal-panel h3 { margin: 4px 0 14px; color: var(--brand-dark); font-size: 24px; }
.wechat-modal-panel img { width: 210px; max-width: 72vw; height:auto; display:block; margin:0 auto 14px; border-radius:18px; background:#fff; padding:8px; border:1px solid var(--line); }
.wechat-modal-id { margin:0 0 12px; display:flex; flex-direction:column; gap:4px; color: var(--brand-dark); }
.wechat-modal-id strong { font-size: 14px; color: var(--muted); }
.wechat-modal-id span { font-size: 18px; font-weight: 800; word-break: break-all; }
.wechat-copy-btn {
  display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:0 18px; border:0; border-radius:12px;
  background: var(--brand); color:#fff; font-weight:800; cursor:pointer; margin-bottom:10px;
}
.wechat-modal-note { margin:0; color: var(--muted); font-size: 13px; line-height:1.55; }

@media (max-width: 900px) {
  .contact-side { align-items:flex-start; }
}

@media (max-width: 620px) {
  .desktop-wechat { display:none; }
  .wechat-float { display:inline-flex; }
  .contact-side { width:100%; }
  .contact-actions { width:100%; }
  .contact-actions .btn { width:100%; }
}

@media (min-width: 621px) {
  .wechat-modal { display:none !important; }
}


/* 2026-08-11: floating nursing-home song play/pause button */
.music-float {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 78;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  max-width: min(78vw, 245px);
  padding: 10px 15px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 999px;
  background: rgba(47,85,64,.96);
  color: #fff;
  font-family: inherit;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(32,58,43,.24);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.music-float:hover { background: #274a37; }
.music-float[aria-pressed="true"] { background: #7a4e24; }
.music-float-icon { font-size: 17px; line-height: 1; flex: 0 0 auto; }
.music-float-text { font-size: 14px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 620px) {
  .music-float {
    right: 12px;
    bottom: 140px;
    min-height: 40px;
    padding: 9px 12px;
    max-width: 68vw;
    z-index: 79;
  }
  .music-float-text { font-size: 13px; }
}

@media print {
  .music-float, #dongfangSong { display:none !important; }
}


/* 2026-08-12: minimal mobile title adjustment only */
@media (max-width: 620px) {
  .hero h1 {
    font-size: 37px !important;
    line-height: 1.16 !important;
    letter-spacing: -0.03em;
  }

  #antu .section-head h2,
  #shimen .section-head h2 {
    font-size: 25px !important;
    line-height: 1.26 !important;
    letter-spacing: -0.02em;
    text-wrap: balance;
  }
}

@media (max-width: 380px) {
  .hero h1 {
    font-size: 37px !important;
  }

  #antu .section-head h2,
  #shimen .section-head h2 {
    font-size: 25px !important;
    line-height: 1.28 !important;
  }
}

/* 2026-08-19: Yuanqi AI nursing-home advisor */
.pc-float-actions {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 78;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pc-float-actions .music-float {
  position: static;
  right: auto;
  bottom: auto;
}
.ai-float {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 999px;
  background: rgba(44,94,129,.97);
  color: #fff;
  font-family: inherit;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(31,70,96,.24);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.ai-float:hover { background: #244f6c; color:#fff; }
.ai-float-icon { font-size: 17px; line-height: 1; flex: 0 0 auto; }
.ai-float-text { font-size: 14px; line-height: 1.15; white-space: nowrap; }

/* Mobile: keep existing floating WeChat + song only; place AI inside 联系我们. */
.ai-contact-btn { display:none !important; }

@media (max-width: 620px) {
  .pc-float-actions {
    position: static;
    display: block;
  }
  .pc-float-actions .ai-float { display:none !important; }
  .pc-float-actions .music-float {
    position: fixed;
    right: 12px;
    bottom: 140px;
  }
  .ai-contact-btn {
    display:flex !important;
    align-items:center;
    justify-content:center;
    text-align:center;
    min-height:50px;
    background:#e8f2f8 !important;
    color:#163f56 !important;
    border-color:rgba(255,255,255,.45) !important;
    font-weight:800;
  }
}

@media print {
  .pc-float-actions, .ai-contact-btn { display:none !important; }
}
