/* Dr. Stephanie Gan Dental Clinics — shared styles
   Brand colours (CLAUDE.md): #EB80B3 pink · #FFF8FB blush white · #365A5A deep teal */

:root {
  --pink: #EB80B3;
  --pink-soft: #FBE3EE;
  --pink-tint: #FFEFF6;
  --blush: #FFF8FB;
  --teal: #365A5A;
  --teal-deep: #263F3F;
  --text: #3E5555;
  --muted: #6B7F7F;
  --line: #F1DCE6;
  --white: #FFFFFF;
  --radius: 22px;
  --shadow: 0 18px 50px -28px rgba(54, 90, 90, .35);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--blush);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--serif);
  color: var(--teal);
  line-height: 1.08;
  margin: 0;
  font-weight: 600;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); }
h2 { font-size: clamp(2rem, 3.4vw, 3rem); }
h3 { font-size: 1.4rem; }
p { margin: 0; }

.wrap { width: min(1180px, 92vw); margin-inline: auto; }
.section { padding: clamp(72px, 9vw, 120px) 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 1.1rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.tint { background: var(--white); }
.pink { background: var(--pink-tint); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  background: var(--teal);
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid var(--teal);
  cursor: pointer;
  font-family: var(--sans);
  transition: background .2s, border-color .2s, transform .2s;
}
.btn:hover { background: var(--teal-deep); border-color: var(--teal-deep); transform: translateY(-1px); }
.btn.big { padding: 19px 36px; font-size: 1.08rem; }
.btn.ghost { background: transparent; color: var(--teal); }
.btn.ghost:hover { background: var(--teal); color: var(--white); }
.btn.small { padding: 11px 20px; font-size: .92rem; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 248, 251, .9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 78px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img {
  width: 48px; height: 48px; border-radius: 50%;
  object-fit: cover; object-position: top;
  background: var(--pink-soft);
  border: 2px solid var(--pink);
}
.brand strong { display: block; font-family: var(--serif); color: var(--teal); font-size: 1.2rem; line-height: 1.1; }
.brand span { display: block; font-size: .78rem; color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { text-decoration: none; font-weight: 500; color: var(--teal); font-size: .98rem; }
.nav-links a.btn { color: var(--white); }
.nav-links a:not(.btn):hover,.nav-links a[aria-current="page"] { color: var(--pink); }
.nav-links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

/* Hero */
.hero { padding: clamp(56px, 7vw, 96px) 0 clamp(64px, 8vw, 110px); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero p { font-size: 1.25rem; margin: 24px 0 36px; max-width: 30ch; color: var(--text); }
.hero.center { text-align: center; }
.hero.center p { margin-inline: auto; max-width: 40ch; }
.hero-art { position: relative; aspect-ratio: 4 / 5; }
.hero-art .arch {
  position: absolute; inset: 0;
  border-radius: 999px 999px var(--radius) var(--radius);
  background: linear-gradient(180deg, var(--pink-soft), #F7CFE1);
}
.hero-art img.mascot { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 96%; }
.hero-photo { border-radius: 999px 999px var(--radius) var(--radius); overflow: hidden; aspect-ratio: 4 / 5; box-shadow: var(--shadow); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Featured treatments */
.featured { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card-body { padding: 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body p { color: var(--muted); }
.card-body a { margin-top: auto; padding-top: 12px; color: var(--teal); font-weight: 600; text-decoration: none; }
.card-body a:hover { color: var(--pink); }

/* Services */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.service {
  padding: 28px 24px;
  border-radius: 18px;
  background: var(--blush);
  border: 1px solid var(--line);
}
.service h3 { font-size: 1.18rem; margin-bottom: 8px; }
.service p { font-size: .95rem; color: var(--muted); }
.service::before {
  content: ""; display: block; width: 34px; height: 4px; border-radius: 4px;
  background: var(--pink); margin-bottom: 18px;
}

/* About */
.about { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 5; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-text p { margin-top: 16px; font-size: 1.1rem; max-width: 46ch; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 40px; margin-top: 40px; }
.stat strong { display: block; font-family: var(--serif); font-size: clamp(2.4rem, 4vw, 3.2rem); color: var(--pink); line-height: 1; font-weight: 600; }
.stat span { display: block; margin-top: 8px; color: var(--teal); font-weight: 500; }

/* Reviews */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; }
.tab {
  padding: 10px 20px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--white);
  color: var(--teal); font: 500 .95rem var(--sans); cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--teal); border-color: var(--teal); color: var(--white); }
.review-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.review-group + .review-group { margin-top: 24px; }
.js .review-group[hidden] { display: none; }
.review {
  background: var(--white); border-radius: var(--radius); padding: 30px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 18px; margin: 0;
}
.review .stars { color: var(--pink); letter-spacing: 3px; font-size: 1.05rem; }
.review blockquote { margin: 0; font-family: var(--serif); font-size: 1.18rem; line-height: 1.45; color: var(--teal); }
.review figcaption { margin-top: auto; font-size: .9rem; color: var(--muted); }
.review figcaption strong { color: var(--teal); display: block; font-size: .98rem; }
.rating-line { text-align: center; margin-top: 36px; color: var(--muted); }

/* Contact list */
.clinic-list { display: grid; gap: 14px; }
.clinic-row {
  display: grid; grid-template-columns: 1.3fr 1fr auto; align-items: center; gap: 24px;
  padding: 22px 28px; background: var(--white); border-radius: 18px; border: 1.5px solid var(--line);
  transition: border-color .2s, box-shadow .2s;
}
.clinic-row h3 { font-size: 1.25rem; }
.clinic-row .town { color: var(--muted); font-size: .95rem; }
.clinic-row .hours { font-size: .95rem; }
.clinic-row.nearest, .branch.nearest .branch-info { border-color: var(--pink); box-shadow: 0 0 0 4px var(--pink-soft); }
.near-tag { display: none; color: var(--pink); font-weight: 600; font-size: .9rem; }
.nearest .near-tag { display: block; }
.locate { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.locate-msg { color: var(--muted); font-size: .95rem; min-height: 1.4em; text-align: center; }

/* Branch page */
.town-group + .town-group { margin-top: 90px; }
.town-group > h2 { margin-bottom: 32px; }
.branch { display: grid; grid-template-columns: 1.25fr 1fr; gap: 32px; align-items: stretch; }
.branch + .branch { margin-top: 48px; }
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; min-height: 420px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.gallery img:first-child { grid-row: span 2; }
.branch-info {
  background: var(--white); border-radius: var(--radius); padding: 36px;
  border: 1.5px solid var(--line); display: flex; flex-direction: column; gap: 18px;
}
.branch-info h3 { font-size: 1.7rem; }
.branch-info .rating { color: var(--pink); font-weight: 600; }
.branch-info .rating span { color: var(--muted); font-weight: 400; }
.branch-info address { font-style: normal; }
.hours-table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.hours-table td { padding: 4px 0; }
.hours-table td:last-child { text-align: right; color: var(--teal); font-weight: 500; }
.branch-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; }

/* Talks page */
.offer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.offer { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.offer img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.offer-body { padding: 34px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.offer-body p { color: var(--muted); font-size: 1.05rem; }
.offer-body .btn { margin-top: auto; align-self: flex-start; }
.timeline { display: grid; gap: 28px; }
.talk { display: grid; grid-template-columns: 200px 1fr 1.1fr; gap: 36px; align-items: center; padding: 28px 0; border-top: 1px solid var(--line); }
.talk:last-child { border-bottom: 1px solid var(--line); }
.talk time { font-family: var(--serif); font-size: 1.35rem; color: var(--pink); font-weight: 600; }
.talk h3 { margin-bottom: 8px; }
.talk p { color: var(--muted); }
.talk img { border-radius: 16px; aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.trainer { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.trainer p { margin-top: 16px; font-size: 1.1rem; max-width: 46ch; }

/* Footer */
.site-footer { background: var(--teal); color: #DCE8E8; padding: 64px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer .brand strong { color: var(--white); }
.site-footer .brand span { color: #B9CCCC; }
.site-footer h4 { margin: 0 0 14px; color: var(--white); font: 600 1rem var(--sans); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--pink); }
.site-footer p { margin-top: 18px; max-width: 36ch; font-size: .95rem; }
.copyright { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.15); font-size: .85rem; color: #A9BFBF; }

/* Floating WhatsApp */
.wa-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 22px 14px 18px; border-radius: 999px;
  background: var(--pink); color: var(--teal-deep);
  font-weight: 700; text-decoration: none;
  box-shadow: 0 14px 30px -10px rgba(235, 128, 179, .8);
}
.wa-float:hover { background: #E66BA6; }
.wa-float svg { width: 24px; height: 24px; }

/* Responsive basics (full phone version comes later) */
@media (max-width: 960px) {
  .hero-grid, .about, .branch, .trainer, .offer-grid { grid-template-columns: 1fr; }
  .featured, .review-group { grid-template-columns: 1fr; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .talk { grid-template-columns: 1fr; gap: 14px; }
  .clinic-row { grid-template-columns: 1fr; gap: 10px; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
  .hero-art { max-width: 420px; }
}

/* ---- EMS & protocol pages ---- */
.nav-links { gap: 24px; }
.years { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.year {
  background: var(--white); border-radius: 18px; padding: 26px 26px 24px;
  border: 1px solid var(--line);
}
.year b { display: block; font-family: var(--serif); font-size: 2rem; color: var(--pink); line-height: 1; margin-bottom: 12px; font-weight: 600; }
.year h3 { font-size: 1.15rem; margin-bottom: 6px; }
.year p { font-size: .95rem; color: var(--muted); }
.year.key { background: var(--teal); border-color: var(--teal); }
.year.key h3, .year.key p { color: #E6F0F0; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.split + .split { margin-top: 72px; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; background: var(--white); }
.split p { margin-top: 14px; font-size: 1.08rem; max-width: 46ch; }
.split.flip > :first-child { order: 2; }

.powders { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.powder { background: var(--white); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.powder b { font-family: var(--serif); color: var(--pink); font-size: 1.6rem; font-weight: 600; }
.powder h3 { margin: 10px 0 8px; }
.powder p { color: var(--muted); }

.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.compare th, .compare td { padding: 20px 24px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-size: .98rem; }
.compare thead th { background: var(--teal); color: var(--white); font: 600 1.05rem var(--sans); }
.compare thead th:nth-child(2) { background: #2C4B4B; }
.compare tbody th { color: var(--teal); font-weight: 600; width: 22%; background: var(--blush); }
.compare td:nth-child(2) { color: var(--teal); }
.compare td:nth-child(3) { color: var(--muted); }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare .num { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: var(--pink); color: var(--white); font-weight: 700; font-size: .85rem; align-items: center; justify-content: center; margin-right: 10px; }
.compare .none { color: #A3B2B2; font-style: italic; }

.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; }
.versus .side { background: var(--white); border-radius: var(--radius); padding: 40px; text-align: center; box-shadow: var(--shadow); }
.versus .side.gbt { background: var(--teal); }
.versus .side.gbt h3, .versus .side.gbt p, .versus .side.gbt b { color: var(--white); }
.versus b { display: block; font-family: var(--serif); font-size: clamp(3rem, 6vw, 4.6rem); line-height: 1; color: var(--teal); font-weight: 600; }
.versus h3 { margin: 16px 0 6px; }
.versus p { color: var(--muted); }
.versus .gap { font-family: var(--serif); font-size: 1.4rem; color: var(--pink); text-align: center; font-weight: 600; }

.points { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.point { padding: 28px; border-radius: 18px; background: var(--white); border: 1px solid var(--line); }
.point h3 { font-size: 1.2rem; margin-bottom: 8px; }
.point p { color: var(--muted); }

.sources { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.sources h4 { margin: 0 0 10px; font: 600 .9rem var(--sans); color: var(--teal); }
.sources ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.sources a { color: var(--teal); }

@media (max-width: 960px) {
  .years, .powders, .points, .split, .versus { grid-template-columns: 1fr; }
  .split.flip > :first-child { order: 0; }
  .compare th, .compare td { padding: 14px; font-size: .9rem; }
}
.nav-links a { white-space: nowrap; }
@media (max-width: 1180px) {
  .brand span { display: none; }
  .nav-links { gap: 18px; }
  .nav-links a { font-size: .92rem; }
}

/* Wide gallery: storefront photo full width, so the whole signboard shows */
.gallery.wide { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; min-height: 0; align-content: start; }
.gallery.wide img:first-child { grid-column: span 2; grid-row: auto; height: auto; aspect-ratio: 16 / 9; }
.gallery.wide img:not(:first-child) { height: auto; aspect-ratio: 4 / 3; }

/* Our Clinics hero: five links of a modern clinic */
.chain {
  list-style: none; margin: 72px auto 0; padding: 0; max-width: 1120px;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; position: relative;
}
.chain::before, .chain::after {
  content: ""; position: absolute; top: 38px; left: 10%; right: 10%; height: 3px; border-radius: 3px;
}
.chain::before { background: var(--line); }
.chain::after { background: var(--pink); transform-origin: left; transform: scaleX(1); }
.chain .link { position: relative; z-index: 1; text-align: center; }
.chain .dot {
  width: 78px; height: 78px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; background: var(--white);
  border: 3px solid var(--pink); color: var(--pink); box-shadow: var(--shadow);
}
.chain .dot svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.chain .last .dot { background: var(--pink); color: var(--white); }
.chain h3 { font-size: 1.15rem; margin-bottom: 6px; }
.hero .chain p { font-size: .95rem; margin: 0 auto; max-width: 22ch; color: var(--muted); }
.hero p.chain-note { margin-top: 40px; font-family: var(--serif); font-size: 1.35rem; color: var(--teal); }

/* Animation: the line draws across, each link lights up in turn */
@media (prefers-reduced-motion: no-preference) {
  .js .chain::after { animation: chain-draw 3s ease-in-out .4s both; }
  .js .chain .dot { animation: link-on .5s ease-out both; animation-delay: calc(.4s + var(--i) * .65s); }
  .js .chain .last .dot { animation-name: link-on-last; }
  .js .chain .link h3, .js .chain .link p { animation: fade-up .6s ease-out both; animation-delay: calc(.5s + var(--i) * .65s); }
  .js .chain-note { animation: fade-up .8s ease-out 3.6s both; }
}
@keyframes chain-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes link-on {
  from { border-color: var(--line); color: var(--muted); transform: scale(.9); }
  60% { transform: scale(1.08); }
  to { border-color: var(--pink); color: var(--pink); transform: scale(1); }
}
@keyframes link-on-last {
  from { border-color: var(--line); background: var(--white); color: var(--muted); transform: scale(.9); }
  60% { transform: scale(1.12); }
  to { border-color: var(--pink); background: var(--pink); color: var(--white); transform: scale(1); }
}
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 960px) {
  .chain { grid-template-columns: 1fr; gap: 28px; max-width: 460px; margin-top: 56px; }
  .chain::before, .chain::after { top: 39px; bottom: 39px; left: 38px; right: auto; width: 3px; height: auto; }
  .chain::after { transform-origin: top; }
  .chain .link { display: grid; grid-template-columns: 78px 1fr; column-gap: 20px; text-align: left; align-items: center; }
  .chain .dot { margin: 0; grid-row: span 2; }
  .chain h3 { margin: 0; align-self: end; }
  .hero .chain p { margin: 0; max-width: none; align-self: start; }
  @keyframes chain-draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
}
/* Hold the chain animation until it scrolls into view */
.js .chain-hero:not(.play) .chain::after,
.js .chain-hero:not(.play) .chain *,
.js .chain-hero:not(.play) .chain-note { animation-play-state: paused; }

/* EMS page: warm water temperature dial */
.warm h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.warm-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.warm-points li { padding-left: 30px; position: relative; font-size: 1.05rem; }
.warm-points li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 14px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 5px rgba(235, 128, 179, .18); }
.warm-points strong { color: var(--teal); }
.thermo { --c: #EB80B3; --frac: 1; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px 32px 32px; text-align: center; }
.gauge { position: relative; width: min(300px, 100%); margin: 0 auto; aspect-ratio: 1; }
.gauge > svg { width: 100%; height: 100%; transform: rotate(135deg); }
.gauge circle { fill: none; stroke-width: 14; stroke-linecap: round; stroke-dasharray: 377 503; }
.gauge .track { stroke: var(--line); }
.gauge .fill { stroke: var(--c); stroke-dashoffset: calc(377px * (1 - var(--frac))); transition: stroke-dashoffset .8s ease, stroke .8s ease; }
.readout { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 2px; }
.readout .temp { font-family: var(--serif); font-size: 3.2rem; line-height: 1; color: var(--teal); }
.readout span { font-size: .9rem; color: var(--muted); }
.drop { width: 34px; height: 46px; margin-bottom: 6px; overflow: visible; }
.drop .water { fill: var(--c); transition: fill .8s ease; }
.drop .steam { fill: none; stroke: var(--c); stroke-width: 1.6; stroke-linecap: round; opacity: 0; transition: opacity .6s ease, stroke .8s ease; }
.thermo.hot .drop .steam { opacity: .85; }
.levels { list-style: none; padding: 0; margin: 22px 0 0; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.levels li { min-width: 52px; padding: 8px 10px; border-radius: 999px; border: 1.5px solid var(--line); font-size: .92rem; font-weight: 600; color: var(--muted); transition: all .5s ease; }
.levels li.on { background: var(--c); border-color: var(--c); color: var(--white); }
@media (prefers-reduced-motion: no-preference) {
  .thermo.hot .steam { animation: steam-rise 1.8s ease-in-out infinite; }
  .thermo.hot .s2 { animation-delay: .4s; }
  .thermo.hot .s3 { animation-delay: .8s; }
}
@keyframes steam-rise { 0% { transform: translateY(2px); opacity: 0; } 40% { opacity: .85; } 100% { transform: translateY(-6px); opacity: 0; } }

/* EMS GBT circle animation (gbt.html hero), clip from EMS video */
.gbt-anim { position: relative; aspect-ratio: 720 / 616; background: #E9ECF1; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); outline: 10px solid var(--pink-soft); }
.gbt-anim video { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 960px) { .gbt-anim { max-width: 520px; margin-inline: auto; } }

/* EMS page: AIRFLOW on purple-disclosed teeth (clip from EMS footage) */
.airflow-film { max-width: 960px; margin: 0 auto; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #E7C3D3; }
.airflow-film video { display: block; width: 100%; height: 100%; object-fit: cover; }

/* EMS page hero: AFPM showcase film (EMS footage), no arch */
.afpm-film { aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: #0d0d0d; box-shadow: 0 30px 60px -24px rgba(54, 90, 90, .45); }
.afpm-film video { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 960px) { .afpm-film { max-width: 420px; } }

/* ---- Mobile menu ---- */
.nav-toggle { display: none; }
@media (max-width: 960px) {
  .nav { position: relative; }
  .nav-toggle { display: inline-flex; align-items: center; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--teal); font: 600 .95rem var(--sans); cursor: pointer; }
  .nav-links:not(.open) { display: none; }
  .nav-links.open { position: absolute; top: 78px; left: -4vw; right: -4vw; z-index: 50; flex-direction: column; align-items: stretch; gap: 0; background: var(--blush); border-bottom: 1px solid var(--line); padding: 4px 4vw 20px; box-shadow: var(--shadow); }
  .nav-links.open a:not(.btn) { display: block; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; text-decoration: none; }
  .nav-links.open a.btn { margin-top: 16px; justify-content: center; }
}

/* ---- Shared: notice, chips ---- */
.notice { max-width: 760px; margin: 0 auto 56px; padding: 16px 24px; border-radius: 16px; background: var(--pink-tint); border: 1px solid var(--line); color: var(--teal); text-align: center; font-size: .98rem; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 36px; }
.chips a { padding: 8px 16px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); text-decoration: none; color: var(--teal); font-weight: 500; font-size: .92rem; }
.chips a:hover { border-color: var(--pink); color: var(--pink); }

/* ---- Treatments page ---- */
.tx-group { scroll-margin-top: 100px; }
.tx-group + .tx-group { margin-top: 72px; }
.tx-group > p.lead { color: var(--muted); font-size: 1.1rem; margin: 10px 0 28px; }
.tx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tx-grid .point { background: var(--blush); }
.tx-grid .point a { color: var(--pink); font-weight: 600; }
.point .avail { margin-top: 12px; font-size: .85rem; color: var(--teal); font-weight: 500; }

/* ---- FAQ page ---- */
.faq { max-width: 880px; }
.faq-group { scroll-margin-top: 100px; }
.faq-group + .faq-group { margin-top: 56px; }
.faq-group h2 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); margin-bottom: 18px; }
details.qa { background: var(--blush); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 12px; }
details.qa[open] { background: var(--white); box-shadow: var(--shadow); }
details.qa summary { cursor: pointer; list-style: none; padding: 20px 56px 20px 22px; font-weight: 600; color: var(--teal); position: relative; font-size: 1.05rem; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; color: var(--pink); font-weight: 400; }
details.qa[open] summary::after { content: "\2013"; }
.qa .n { color: var(--pink); margin-right: 12px; font-family: var(--serif); }
.qa .ans { padding: 0 22px 22px 56px; }
.qa .ans ul { margin: 10px 0; padding-left: 20px; }
.qa .ans li { margin: 6px 0; }
.qa .ans sup { color: var(--pink); font-size: .7em; }
.qa .ans a { color: var(--teal); font-weight: 600; }
.faq-search { display: block; width: min(560px, 100%); margin: 32px auto 0; padding: 15px 24px; border-radius: 999px; border: 1px solid var(--line); font: inherit; background: var(--white); color: var(--text); }
.faq-search:focus { outline: 2px solid var(--pink); outline-offset: 2px; }
.hero p.faq-count { margin: 12px auto 0; font-size: .95rem; color: var(--muted); min-height: 1.4em; }

/* ---- Doctors page ---- */
.doctor { display: grid; grid-template-columns: 320px 1fr; gap: 40px; align-items: start; background: var(--blush); border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); scroll-margin-top: 100px; }
.doctor + .doctor { margin-top: 32px; }
.doctor > img { border-radius: 18px; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; height: auto; }
.doctor h2 { font-size: clamp(1.8rem, 2.8vw, 2.4rem); }
.doctor .role { color: var(--pink); font-weight: 600; margin-top: 6px; }
.doctor p a { color: var(--teal); font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0; }
.facts div { background: var(--white); border-radius: 14px; padding: 14px 16px; border: 1px solid var(--line); }
.facts b { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.facts span { color: var(--teal); font-weight: 600; line-height: 1.35; display: block; }
.quotes-head { font-size: 1.15rem; margin: 26px 0 12px; }
.quotes { display: grid; gap: 10px; }
.quotes blockquote { margin: 0; padding: 14px 18px; border-left: 3px solid var(--pink); background: var(--white); border-radius: 0 14px 14px 0; font-style: italic; }
.quotes cite { display: block; margin-top: 6px; font-style: normal; font-size: .85rem; color: var(--muted); }
.facts span.tbc, .tbc { display: inline-block; color: #B0507F; background: #FFF0F6; border: 1px dashed var(--pink); border-radius: 8px; padding: 0 8px; font-weight: 500; font-style: normal; }

/* ---- Branches: nearby areas ---- */
.nearby { font-size: .93rem; color: var(--muted); }
.nearby b { color: var(--teal); font-weight: 600; }

@media (max-width: 960px) {
  .tx-grid { grid-template-columns: 1fr 1fr; }
  .doctor { grid-template-columns: 1fr; }
  .doctor > img { max-width: 360px; }
  .facts { grid-template-columns: 1fr; }
  .qa .ans { padding-left: 22px; }
}
@media (max-width: 640px) { .tx-grid { grid-template-columns: 1fr; } }

/* ---- Phone fixes (2026-12-04) ---- */
html, body { overflow-x: clip; }              /* no sideways wiggle on phones */
.thermo { overflow: hidden; }                  /* rotated gauge stays inside its card */
.years.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) {
  .years.four { grid-template-columns: 1fr 1fr; }
  /* treatment jump links: one swipeable row instead of nine stacked rows */
  .chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin-inline: -4vw; padding: 2px 4vw 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .chips::-webkit-scrollbar { display: none; }
  .chips a { flex: 0 0 auto; }
}
@media (max-width: 640px) { .years.four { grid-template-columns: 1fr; } }

/* ---- Language switcher (EN · BM · 中文) ---- */
.lang-switch { display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font-size: .82rem; font-weight: 600; }
.lang-switch a, .lang-switch span { padding: 5px 9px; border-radius: 999px; text-decoration: none; color: var(--teal); line-height: 1; white-space: nowrap; }
.lang-switch a:hover { color: var(--pink); }
.lang-switch span[aria-current] { background: var(--teal); color: var(--white); }
@media (max-width: 960px) {
  .nav { gap: 10px; }
  .lang-switch { margin-left: auto; }
}
@media (max-width: 400px) { .brand strong { font-size: 1.05rem; } .lang-switch a, .lang-switch span { padding: 5px 7px; } }
/* Chinese text: system CJK fonts read better than the Latin display serif */
html[lang^="zh"] body { font-family: var(--sans), "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
html[lang^="zh"] h1, html[lang^="zh"] h2, html[lang^="zh"] h3 { font-family: var(--serif), "Noto Serif SC", "Songti SC", "SimSun", serif; letter-spacing: 0; line-height: 1.25; }
/* Header fits brand + 7 links + WhatsApp + language switch */
.brand strong { white-space: nowrap; }
@media (max-width: 1440px) { .brand span { display: none; } .nav-links { gap: 18px; } .nav-links a { font-size: .92rem; } }
@media (max-width: 1240px) and (min-width: 961px) { .nav { gap: 14px; } .nav-links { gap: 14px; } .nav-links a { font-size: .86rem; } .nav-links a.btn { padding: 10px 14px; } .brand img { width: 40px; height: 40px; } .brand strong { font-size: 1.05rem; } }
@media (max-width: 1100px) and (min-width: 961px) { .nav-links a.btn { font-size: 0; gap: 0; padding: 10px; } .nav-links a.btn svg { margin: 0; } }
.brand { flex-shrink: 0; }
@media (max-width: 1440px) and (min-width: 1241px) { .nav-links { gap: 16px; } .nav-links a { font-size: .88rem; } .nav-links a.btn { padding: 11px 16px; } }
.lang-switch.in-menu { display: none; }
@media (max-width: 960px) {
  .nav > .lang-switch { display: none; }
  .nav-links.open .lang-switch.in-menu { display: flex; align-self: center; margin-top: 16px; font-size: .95rem; }
  .nav-links.open .lang-switch.in-menu a, .nav-links.open .lang-switch.in-menu span { padding: 8px 16px; border: 0; }
}

/* ---- Speed: images carry width/height so the page doesn't jump while loading ---- */
img { height: auto; }
.split video { display: block; border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; background: var(--white); }

/* ---- Clinic pages ---- */
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--teal); text-decoration: none; font-weight: 500; }
.crumbs a:hover { color: var(--pink); }
.clinic-hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.9rem); }
.clinic-hero .branch-actions { margin-top: 8px; }
.clinic-photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.clinic-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cf { background: var(--blush); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; }
.cf h3 { font: 600 .78rem var(--sans); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 10px; }
.cf address { font-style: normal; color: var(--teal); font-weight: 500; }
.cf p { color: var(--text); }
.cf .cf-links { margin-top: 10px; font-size: .92rem; }
.cf a { color: var(--teal); font-weight: 600; }
.cf .cf-big { font-family: var(--serif); font-size: 1.7rem; margin-bottom: 6px; }
.cf .cf-big a { text-decoration: none; }
.cf .rating a { color: var(--pink); text-decoration: none; font-weight: 600; }
.cf .rating span { color: var(--muted); font-weight: 400; }
.equip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.equip .point h3 { font-size: 1.15rem; margin: 0; }
.gallery-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.gallery-pair img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; }
.chips.left { justify-content: flex-start; margin-top: 0; }
.clinic-reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.other-h { text-align: center; margin: 64px 0 18px; font-size: 1.3rem; }
.other-clinics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.other-clinics a { display: block; padding: 16px 18px; border-radius: 16px; background: var(--white); border: 1px solid var(--line); text-decoration: none; }
.other-clinics a:hover { border-color: var(--pink); }
.other-clinics strong { display: block; color: var(--teal); font-size: .95rem; }
.other-clinics span { color: var(--muted); font-size: .88rem; }
.branch-actions .more { align-self: center; color: var(--teal); font-weight: 600; text-decoration: none; }
.branch-actions .more:hover { color: var(--pink); }
@media (max-width: 960px) {
  .clinic-facts, .clinic-reviews { grid-template-columns: 1fr; }
  .equip { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) { .gallery-pair { grid-template-columns: 1fr; } }
.cf .cf-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.crumbs { display: flex; gap: 8px; align-items: center; }
.clinic-row h3 a, .branch-info h3 a { color: inherit; text-decoration: none; }
.clinic-row h3 a:hover, .branch-info h3 a:hover { color: var(--pink); }
footer li a { color: inherit; text-decoration: none; }
footer li a:hover { text-decoration: underline; }
.reviewed { font-size: .85rem; color: var(--teal); opacity: .8; margin-top: -4px; }
.nw { white-space: nowrap; }
.btn:has(.nw) { flex-wrap: wrap; justify-content: center; column-gap: .35em; }
