/* ==========================================================================
   โรงพยาบาลชัยอรุณเวชการ — site stylesheet
   Pink-led palette from the hospital logo (magenta heart #E21565 + cyan #00BFFF).
   Sections: fonts · tokens · base · buttons · header · hero (do not edit) · sections ·
   cards · doctors · equipment · prose · services · TABLE SYSTEM (.tbl/.t) · rooms ·
   contact/aside · tabs · footer · lightbox · motion · print
   ========================================================================== */

/* ---------- Fonts (self-hosted) ---------- */
@font-face { font-family: "Noto Sans Thai"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/noto-sans-thai-var-thai.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Noto Sans Thai"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/noto-sans-thai-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Thai Looped"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-thai-looped-500-thai.woff2") format("woff2"); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "IBM Plex Sans Thai Looped"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-thai-looped-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Thai Looped"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-thai-looped-600-thai.woff2") format("woff2"); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "IBM Plex Sans Thai Looped"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-thai-looped-600-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Thai Looped"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-thai-looped-700-thai.woff2") format("woff2"); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "IBM Plex Sans Thai Looped"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-thai-looped-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */
:root {
  --brand: #E21565;          /* logo magenta (graphics only) */
  --primary: #C4145A;        /* AA on white for text/buttons */
  --primary-dark: #9E0F48;
  --primary-soft: #FDE7EF;
  --blush: #FFF4F8;
  --blush-2: #FBE3EC;
  --cyan: #00BFFF;           /* decorative accent */
  --cyan-dark: #076E93;      /* accent text (AA 5.7:1 on white) */
  --cyan-soft: #E4F7FF;
  --ink: #2B1A22;
  --ink-2: #5A4650;
  --muted: #7A6670;          /* 5.3:1 on white */
  --muted-2: #6F5A66;        /* for small text on blush */
  --line: #F0D9E2;
  --surface: #FFFFFF;
  --page: #FFFBFC;
  --ok: #157A4E;
  --shadow-sm: 0 1px 2px rgba(120, 20, 60, .06), 0 2px 8px rgba(120, 20, 60, .06);
  --shadow-md: 0 6px 20px rgba(140, 20, 70, .10), 0 2px 6px rgba(140, 20, 70, .06);
  --shadow-lg: 0 20px 50px rgba(140, 20, 70, .16);
  --radius: 18px;
  --radius-sm: 12px;
  --font-body: "Noto Sans Thai", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-head: "IBM Plex Sans Thai Looped", "Noto Sans Thai", system-ui, sans-serif;
  --container: 1180px;
  --gutter: 16px;
  --header-h: 72px;          /* measured by JS; only the main bar is sticky */
  --sticky-h: 72px;          /* header + any sticky bar below it (JS) */
  /* spacing scale */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  /* table system */
  --t-head-bg: #FFF0F5; --t-head-ink: var(--primary-dark);
  --t-line: #F3E1E8; --t-line-strong: #E9C6D4; --t-zebra: #FFFAFC; --t-hover: #FFF3F8; --t-col-hi: rgba(226, 21, 101, .06);
  --t-pad-y: 12px; --t-pad-x: 16px;
  --mark-yes-bg: #E3F5EC; --mark-yes: #157A4E; --mark-no: #8E7A84; --note-ink: #076E93;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--sticky-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; font-family: var(--font-body); font-size: 17px; line-height: 1.7; color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.nav-open, body.lightbox-open { overflow: hidden; }
img, svg, iframe { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--primary); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.35; color: var(--ink); margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.9rem); line-height: 1.25; }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.2vw, 2.05rem); }
h3 { font-size: 1.2rem; }
p, li, dd, dt, figcaption { text-wrap: pretty; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
table { border-collapse: collapse; width: 100%; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--cyan-dark); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
.nw { white-space: nowrap; }
a[href^="tel:"] .tel-note { white-space: normal; font-weight: 500; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 1000; }
.skip-link:focus { top: 8px; }
.icon { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container.narrow { max-width: 820px; }
.text-center { text-align: center; }
.muted { color: var(--muted); }
.meta { color: var(--muted); font-size: .92rem; }
.note { font-size: .92rem; color: var(--ink-2); background: var(--blush); border-left: 4px solid var(--brand); padding: 10px 14px; border-radius: 0 10px 10px 0; }
.eyebrow { font-family: var(--font-head); font-weight: 600; font-size: .82rem; color: var(--primary); margin-bottom: .5em; letter-spacing: 0; }
.eyebrow a { color: inherit; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 70ch; }
.h-sub { display: block; font-size: .6em; font-weight: 500; color: var(--muted); margin-top: .2em; }
.link-arrow { font-weight: 600; display: inline-flex; align-items: center; gap: .35em; }
.link-arrow .icon { transition: transform .2s; }
.link-arrow:hover .icon { transform: translateX(3px); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .4em; align-items: center; list-style: none; padding: 0; margin: 0 0 .6em; font-size: .88rem; color: var(--muted); }
.breadcrumb a { color: var(--primary); font-weight: 600; }
.breadcrumb li + li::before { content: "›"; margin-right: .4em; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: 12px 22px; border-radius: 999px; font-weight: 600; border: 2px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s, color .15s; line-height: 1.3; min-height: 44px; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--primary)); color: #fff; box-shadow: 0 6px 16px rgba(226, 21, 101, .28); }
.btn-primary:hover { box-shadow: 0 10px 22px rgba(226, 21, 101, .36); color: #fff; }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--primary-soft); box-shadow: var(--shadow-sm); }
.btn-outline:hover { border-color: var(--primary); }
.btn-sm { padding: 8px 16px; min-height: 40px; font-size: .92rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.2em 0; }
.btn-row.center { justify-content: center; }

/* ---------- Header ---------- */
.topbar { background: linear-gradient(90deg, var(--primary-dark), var(--brand)); color: #fff; font-size: .86rem; }
.topbar a { color: #fff; font-weight: 600; }
.topbar-inner { display: flex; gap: 22px; align-items: center; min-height: 36px; justify-content: space-between; }
.topbar-item { display: inline-flex; align-items: center; gap: .4em; white-space: nowrap; }
.topbar-phone { margin-left: auto; }
@media (max-width: 900px) { .topbar-item:not(.topbar-phone) { display: none; } .topbar-inner { justify-content: center; } .topbar-phone { margin: 0; } }
@media (max-width: 400px) { .topbar { font-size: .8rem; } }
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); transition: box-shadow .2s; }
.site-header.is-stuck { box-shadow: var(--shadow-md); }
.header-inner { display: flex; align-items: center; gap: 14px; min-height: var(--header-h); position: relative; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); min-width: 0; }
.brand:hover { text-decoration: none; }
.logo-mark { width: 48px; height: 48px; flex: none; filter: drop-shadow(0 2px 4px rgba(226, 21, 101, .25)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-th { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--primary-dark); white-space: nowrap; }
.brand-en { white-space: nowrap; font-size: .7rem; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; flex-wrap: nowrap; justify-content: flex-end; align-items: center; }
.site-nav .nav-flat-only { display: none; }
.nav-more { position: relative; }
.nav-more summary { list-style: none; cursor: pointer; padding: 8px 9px; border-radius: 10px; font-weight: 500; color: var(--ink-2); font-size: .95rem; white-space: nowrap; }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary:hover, .nav-more details[open] summary { background: var(--blush); color: var(--primary); }
.nav-more summary.is-active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.nav-caret { font-size: .75em; margin-left: 2px; }
.site-nav .nav-more-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; flex-direction: column; align-items: stretch; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px; z-index: 120; }
.site-nav a:not(.btn) { display: block; padding: 8px 9px; border-radius: 10px; font-weight: 500; color: var(--ink-2); font-size: .95rem; white-space: nowrap; }
.site-nav a:not(.btn):hover { background: var(--blush); color: var(--primary); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.nav-call { padding: 9px 14px; font-size: .92rem; margin-left: 4px; white-space: nowrap; min-height: 42px; }
.nav-toggle { display: none; margin-left: auto; background: var(--blush); border: 1px solid var(--line); border-radius: 12px; width: 46px; height: 46px; align-items: center; justify-content: center; color: var(--primary); cursor: pointer; flex: none; }
.nav-toggle .icon { width: 26px; height: 26px; }
.nav-toggle-close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-close { display: inline; }
@media (max-width: 1320px) { .brand-en { display: none; } }
@media (max-width: 1240px) {
  .site-nav a:not(.btn), .nav-more summary { padding: 8px 8px; font-size: .9rem; }
  .nav-call { padding: 0; width: 42px; height: 42px; border-radius: 50%; }   /* icon-only call button 961–1240 */
  .nav-call .nav-call-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .brand-en { display: none; }
}
@media (max-width: 1060px) { .site-nav a:not(.btn), .nav-more summary { padding: 8px 6px; font-size: .86rem; } .site-nav { gap: 4px; } .header-inner { gap: 10px; } }
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% + 8px); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 14px; flex-direction: column; align-items: stretch; border: 1px solid var(--line); max-height: calc(100dvh - var(--header-h) - 60px); overflow-y: auto; overscroll-behavior: contain; }
  .site-nav.is-open { display: flex; }
  .site-nav .nav-flat-only { display: list-item; }
  .nav-more { display: none; }
  .site-nav ul { flex-direction: column; gap: 2px; align-items: stretch; }
  .site-nav a:not(.btn) { padding: 12px 14px; font-size: 1.02rem; min-height: 46px; }
  .nav-call { display: inline-flex; justify-content: center; margin: 10px 0 0; width: auto; height: auto; border-radius: 999px; padding: 12px 20px; }
  .nav-call .nav-call-text { position: static; width: auto; height: auto; clip: auto; }
  .brand-th { font-size: 1rem; }
  .brand-en { display: none; }
  body { padding-bottom: 88px; }   /* room for the floating call button */
}
@media (max-width: 400px) { .brand-th { font-size: .92rem; } .logo-mark { width: 42px; height: 42px; } }

/* Floating call button (mobile) */
.call-fab { display: none; position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 90; background: linear-gradient(135deg, var(--brand), var(--primary)); color: #fff; border-radius: 999px; padding: 14px 20px; font-weight: 700; box-shadow: 0 10px 24px rgba(226, 21, 101, .4); align-items: center; gap: .5em; min-height: 48px; }
.call-fab:hover { text-decoration: none; color: #fff; }
.call-fab .icon { width: 1.3em; height: 1.3em; }
@media (max-width: 960px) { .call-fab { display: inline-flex; } body.nav-open .call-fab { display: none; } }

/* Mourning mode */
.mourning-ribbon { background: #1a1a1a; color: #eee; text-align: center; font-size: .9rem; padding: 6px 12px; display: flex; justify-content: center; gap: .5em; align-items: center; }
.mourning-ribbon .icon { width: 1.4em; height: 1.4em; color: #fff; }
body.mourning .topbar { filter: grayscale(1); }
body.mourning .site-header { filter: grayscale(1); }

/* ---------- Hero ---------- */
.hero { position: relative; background: radial-gradient(900px 420px at 95% 0%, var(--cyan-soft), transparent 60%), linear-gradient(180deg, var(--blush-2), var(--blush) 75%, var(--page)); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.15fr); gap: 44px; align-items: center; padding-top: 56px; padding-bottom: 60px; }
.hero .eyebrow { color: var(--primary); }
.hero h1 { color: var(--primary-dark); margin-bottom: .35em; font-size: clamp(1.45rem, 3.1vw, 2.75rem); white-space: nowrap; }
.hero .lead { color: var(--ink-2); }
.hero-note { font-size: .92rem; color: var(--muted); margin: 0; display: flex; gap: .4em; align-items: center; }
.hero-note .icon { color: var(--primary); }
.hero-photo { margin: 0; border-radius: 24px; overflow: hidden; background: #fff; border: 6px solid #fff; box-shadow: var(--shadow-lg); aspect-ratio: 1600 / 679; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 18px; }
@media (max-width: 960px) { .hero-inner { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; padding-bottom: 40px; } .hero-photo { order: -1; } }
@media (max-width: 640px) { .hero h1 { font-size: clamp(1.2rem, 6.4vw, 1.6rem); white-space: normal; text-wrap: balance; } .hero-photo { border-width: 4px; border-radius: 18px; } .hero-photo img { border-radius: 14px; } }


/* ---------- Sections ---------- */
.section { padding: var(--s-8) 0; }
.section-alt { background: linear-gradient(180deg, var(--blush), #fff); }
.section-head { margin-bottom: 28px; }
.section-head.split { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.section-sub { color: var(--ink-2); max-width: 70ch; margin: 0; }
@media (max-width: 640px) { .section { padding: 44px 0; } .section-head { margin-bottom: 20px; } }
.page-hero { background: radial-gradient(1200px 400px at 85% -20%, var(--cyan-soft), transparent 60%), linear-gradient(180deg, var(--blush-2), var(--blush) 70%, var(--page)); padding: 48px 0 36px; border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-bottom: .3em; }
.page-hero .lead { margin-bottom: .4em; }
.page-hero .split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 36px; align-items: center; }
@media (max-width: 860px) { .page-hero .split { grid-template-columns: 1fr; } .page-hero .split .hero-figure { order: -1; } .page-hero { padding: 36px 0 28px; } }
.hero-figure { margin: 0; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.hero-figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 48%; }
.hero-figure figcaption { padding: 10px 14px; font-size: .9rem; text-align: center; }
.jump-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.jump-list a { display: inline-flex; align-items: center; min-height: 40px; background: #fff; border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; font-size: .9rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.jump-list a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.group-title { margin: 40px 0 16px; padding-left: 14px; border-left: 5px solid var(--brand); }
.group-title:first-of-type { margin-top: 0; }

/* ---------- Contact grid ---------- */
.contact-grid { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; min-width: 0; }
.contact-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.contact-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.contact-icon .icon { width: 24px; height: 24px; }
.contact-dept { font-size: .92rem; color: var(--ink-2); line-height: 1.4; }
.contact-tel { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; color: var(--primary); margin-top: auto; display: inline-flex; align-items: center; min-height: 32px; }
@media (max-width: 520px) {
  .contact-grid { grid-template-columns: 1fr; gap: 10px; }
  .contact-card { flex-direction: row; align-items: center; padding: 12px 14px; gap: 12px; }
  .contact-icon { width: 38px; height: 38px; }
  .contact-dept { flex: 1 1 auto; font-size: .9rem; }
  .contact-tel { margin: 0; font-size: 1.1rem; min-height: 44px; flex: none; }
}

/* ---------- News / cards ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 18px; }
.news-grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); }
.news-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 6px; position: relative; }
.news-card h2, .news-card h3 { font-size: 1.15rem; margin: 0; }
.news-card p { margin: 0; color: var(--ink-2); }
.news-card .link-arrow { margin-top: auto; padding-top: 6px; }
.news-card .link-arrow.stretched::after { content: ""; position: absolute; inset: 0; }
.news-card:has(.stretched):hover { box-shadow: var(--shadow-md); }
.news-card.is-highlight { background: linear-gradient(145deg, #fff 60%, var(--blush-2)); border-color: var(--blush-2); }
.news-date { font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: .35em; flex-wrap: wrap; }
.event-cover { margin: -22px -22px 8px; display: block; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.event-cover img { width: 100%; height: 200px; object-fit: cover; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 18px; }
.feature-grid.two { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.feature-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; min-width: 0; }
.feature-card h2, .feature-card h3 { margin: 0; font-size: 1.2rem; }
.feature-card p { margin: 0; color: var(--ink-2); }
.feature-card .btn { align-self: flex-start; margin-top: 8px; }
.feature-card .link-arrow { margin-top: auto; padding-top: 8px; }
.feature-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--primary-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; }
.feature-icon .icon { width: 26px; height: 26px; }
.feature-birth { background: linear-gradient(145deg, #fff 60%, var(--blush-2)); }
.feature-card .tbl { margin: 6px 0 12px; }

.cta-band { background: linear-gradient(120deg, var(--primary-dark), var(--brand)); color: #fff; border-radius: 24px; padding: 32px 36px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; box-shadow: var(--shadow-md); }
.cta-band h2 { color: #fff; margin-bottom: .2em; }
.cta-band .eyebrow { color: #FFD1E3; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .9); max-width: 60ch; }
.cta-band .btn-primary { background: #fff; color: var(--primary); box-shadow: none; }
.cta-band .btn-primary:hover { color: var(--primary-dark); }
@media (max-width: 640px) { .cta-band { padding: 24px 20px; } }

/* ---------- Doctors (home strip) ---------- */
.doctor-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.doctor-strip .doctor-chip { flex: 0 1 calc(20% - 12px); min-width: 180px; }
@media (max-width: 1100px) { .doctor-strip .doctor-chip { flex-basis: calc(25% - 11px); min-width: 170px; } }
@media (max-width: 640px) { .doctor-strip { gap: 10px; } .doctor-strip .doctor-chip { flex-basis: calc(50% - 5px); min-width: 0; padding: 12px 8px; } }
.doctor-chip { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.doctor-chip:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.doctor-chip-photo { width: 96px; height: 117px; object-fit: cover; border-radius: 14px; border: 3px solid var(--primary-soft); }
.doctor-chip-name { font-weight: 700; font-size: .95rem; margin-top: 6px; line-height: 1.35; }
.doctor-chip-spec { font-size: .8rem; color: var(--muted); line-height: 1.35; }
.doctor-chip-days { display: flex; gap: 3px; margin-top: 8px; }
.doctor-chip-days .day { font-size: .7rem; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #F3EDF0; color: var(--muted-2); text-decoration: line-through; }
.doctor-chip-days .day.on { background: var(--primary); color: #fff; font-weight: 600; text-decoration: none; }

/* ---------- Doctors page ---------- */
body.page-doctors { --sticky-h: 160px; }          /* pre-JS estimate (header + sticky filter bar) */
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: flex-end; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow-sm); margin-bottom: 24px; position: sticky; top: calc(var(--header-h) + 8px); z-index: 20; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: var(--muted); min-width: 150px; flex: 1 1 150px; }
.field-grow { flex: 2 1 220px; }
.field select, .field input { font: inherit; font-size: 1rem; color: var(--ink); padding: 8px 12px; border: 1px solid #E5CBD6; border-radius: 10px; background: #fff; min-height: 44px; width: 100%; }
.filter-count { margin: 0; font-size: .9rem; color: var(--ink-2); align-self: center; padding-top: 18px; white-space: nowrap; }
.filter-reset { display: none; align-self: center; margin-top: 18px; }
.filter-bar.has-filter .filter-reset { display: inline-flex; }
@media (max-width: 640px) { body.page-doctors { --sticky-h: var(--header-h); } .filter-bar { position: static; padding: 14px; } .field { flex: 1 1 100%; } .filter-count { padding-top: 0; flex: 1 1 auto; } .filter-reset { margin-top: 0; } }
.doctor-list { display: flex; flex-direction: column; gap: 20px; }
.doctor-card { display: grid; grid-template-columns: 150px minmax(0, 1fr) 320px; grid-template-areas: "photo head sched" "photo info sched"; grid-template-rows: auto 1fr; gap: 10px 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); transition: box-shadow .3s; }
.doctor-card.is-hidden { display: none; }
.doctor-card:target { box-shadow: 0 0 0 3px var(--primary), var(--shadow-md); animation: target-flash 1.6s ease-out 1; }
@keyframes target-flash { 0% { background: var(--primary-soft); } 100% { background: #fff; } }
.doctor-photo { grid-area: photo; }
.doctor-photo img { width: 100%; max-width: 150px; border-radius: 14px; border: 4px solid var(--primary-soft); }
.doctor-head { grid-area: head; }
.doctor-spec { color: var(--primary); font-weight: 600; font-size: .9rem; margin: 0 0 .15em; }
.doctor-name { font-size: 1.35rem; margin-bottom: .15em; }
.doctor-info { grid-area: info; }
.doctor-info summary { list-style: none; cursor: pointer; display: none; align-items: center; gap: .4em; font-size: .9rem; font-weight: 600; color: var(--primary); padding: 6px 0; }
.doctor-info summary::-webkit-details-marker { display: none; }
.doctor-info summary::after { content: "▾"; font-size: .8em; transition: transform .2s; }
.doctor-info details[open] summary::after { transform: rotate(180deg); }
.doctor-info h3 { font-size: .85rem; color: var(--muted); margin: .9em 0 .3em; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
.doctor-info h3:first-child { margin-top: .4em; }
.doctor-edu { margin: 0; padding-left: 1.2em; font-size: .95rem; color: var(--ink-2); }
.doctor-edu li { margin-bottom: 2px; }
.doctor-schedule { grid-area: sched; background: var(--blush); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; align-self: start; }
.sched-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: .85rem; font-weight: 600; color: var(--muted); margin: 0 0 10px; }
.sched-title .today-note { font-weight: 500; color: var(--cyan-dark); white-space: nowrap; }
.week { display: flex; gap: 5px; list-style: none; padding: 0; margin: 0 0 14px; }
.week li { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 600; background: #F3EDF0; color: var(--muted-2); text-decoration: line-through; flex: none; }
.week li.on { background: var(--primary); color: #fff; text-decoration: none; }
.week li.is-today { box-shadow: 0 0 0 2px var(--blush), 0 0 0 4px var(--cyan); }
.week li.is-filter { box-shadow: 0 0 0 2px var(--blush), 0 0 0 4px var(--primary-dark); }
.week li.is-today.is-filter { box-shadow: 0 0 0 2px var(--blush), 0 0 0 4px var(--primary-dark), 0 0 0 6px var(--cyan); }
.sched { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: .95rem; align-items: start; }
.sched-row { display: contents; }
.sched dt { font-weight: 600; color: var(--ink-2); white-space: nowrap; padding-top: 3px; }
.sched dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.slot { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 2px 10px; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; color: var(--ink); font-size: .92rem; line-height: 1.6; }
.sched .off dt { color: var(--muted); font-weight: 500; }
.sched .off dd { color: var(--muted); font-size: .9rem; padding-top: 3px; }
.sched .is-match dt { color: var(--primary); }
.sched .is-match .slot { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
.sched .is-match.off dd { color: var(--primary); font-weight: 600; }
@media (max-width: 1023px) {
  .doctor-card { grid-template-columns: 140px minmax(0, 1fr); grid-template-areas: "photo head" "photo info" "sched sched"; grid-template-rows: auto 1fr auto; gap: 10px 24px; }
  .doctor-schedule { margin-top: 8px; }
  .week li { width: 40px; height: 40px; }
}
@media (max-width: 560px) {
  .doctor-card { grid-template-columns: 96px minmax(0, 1fr); grid-template-areas: "photo head" "sched sched" "info info"; grid-template-rows: auto auto auto; gap: 12px 16px; padding: 18px 16px; }
  .doctor-photo img { max-width: 96px; border-width: 3px; }
  .doctor-head { align-self: center; }
  .doctor-name { font-size: 1.15rem; }
  .doctor-info summary { display: flex; }
  .doctor-schedule { padding: 14px; }
  .week { justify-content: space-between; gap: 2px; }
  .week li { width: 38px; height: 38px; }
  .sched { grid-template-columns: 1fr; gap: 6px; }
  .sched dt { padding-top: 6px; }
}
.empty-state { text-align: center; color: var(--muted); padding: 30px 16px; background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-state p { margin: 0 0 .8em; }

/* ---------- Equipment ---------- */
.equip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 18px; }
.equip-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; min-width: 0; }
.equip-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.equip-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 48%; background: var(--cyan-soft); }
.equip-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.equip-short { font-family: var(--font-head); font-weight: 700; color: var(--cyan-dark); font-size: .85rem; letter-spacing: .03em; }
.equip-name { font-weight: 600; line-height: 1.4; }
.equip-summary { font-size: .88rem; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.equip-card.is-wide { grid-column: 1 / -1; flex-direction: row; align-items: stretch; }
.equip-card.is-wide .equip-img { width: 38%; max-width: 420px; aspect-ratio: auto; min-height: 200px; }
.equip-card.is-wide .equip-body { padding: 22px 26px; justify-content: center; gap: 4px; }
.equip-card.is-wide .equip-name { font-size: 1.15rem; font-family: var(--font-head); }
.equip-card.is-wide .equip-summary { font-size: .95rem; }
@media (max-width: 640px) { .equip-card.is-wide { flex-direction: column; } .equip-card.is-wide .equip-img { width: 100%; max-width: none; aspect-ratio: 16 / 9; min-height: 0; } .equip-card.is-wide .equip-body { padding: 14px 16px 18px; } }
.use-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 18px; margin-top: 8px; box-shadow: var(--shadow-sm); }
.use-title { font-weight: 700; color: var(--primary); margin: 0 0 4px; font-size: .9rem; }
.use-box ul { list-style: none; padding: 0; margin: 0; }
.use-box li { display: flex; gap: .4em; align-items: flex-start; }
.use-box .icon { color: var(--ok); margin-top: .3em; }
.equip-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; align-items: start; }
@media (max-width: 900px) { .equip-detail { grid-template-columns: 1fr; } }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); position: sticky; top: calc(var(--header-h) + 16px); min-width: 0; }
.side-card > p { display: flex; gap: .5em; align-items: flex-start; margin-bottom: .6em; }
.side-card .icon { color: var(--brand); margin-top: .25em; }
.side-card .note { display: block; }
.side-card .btn { margin: 4px 0 14px; }
.side-title { font-size: 1.05rem; margin-bottom: .8em; }
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .9rem; font-weight: 600; }
.prev-next a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--blush); min-width: 0; }
.prev-next a:hover { text-decoration: none; border-color: var(--primary); }
.prev-next small { font-weight: 500; color: var(--muted); font-size: .78rem; }
.prev-next a + a { text-align: right; }
.inline-figure { margin: 1.5em 0; }
.inline-figure img { border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.inline-figure figcaption { font-size: .88rem; color: var(--muted); margin-top: 6px; }
.poster-thumb { margin: 14px 0 0; }
.poster-thumb img { border-radius: var(--radius-sm); border: 1px solid var(--line); max-height: 320px; width: auto; }
.poster-thumb figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }

/* Spec list (equipment "ข้อมูลเครื่อง", contact extensions/hours) */
.spec { margin: 0; display: grid; grid-template-columns: minmax(7.5em, 36%) minmax(0, 1fr); }
.spec > div { display: contents; }
.spec dt, .spec dd { padding: 11px 0; border-bottom: 1px solid var(--line); margin: 0; min-width: 0; }
.spec dt { color: var(--muted); font-size: .9rem; padding-right: 12px; }
.spec dd { font-weight: 600; color: var(--ink); font-size: .97rem; }
.spec > div:last-child dt, .spec > div:last-child dd { border-bottom: 0; }
.spec--right dd { text-align: right; }
.spec-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 22px; box-shadow: var(--shadow-sm); margin: 0 0 20px; }
.spec-card .spec-title { font-size: .85rem; color: var(--muted); font-weight: 600; margin: 12px 0 2px; }
@media (max-width: 480px) {
  .spec { grid-template-columns: 1fr; }
  .spec dt { padding-bottom: 0; border-bottom: 0; font-size: .82rem; }
  .spec dd { padding-top: 2px; }
  .spec--right dd { text-align: left; }
}

/* ---------- Prose ---------- */
.prose h2 { margin-top: 1.4em; }
.prose h3 { margin-top: 1.4em; color: var(--primary-dark); }
.prose h3:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul li, .prose ol li { margin-bottom: .35em; }
.prose .note { margin-top: 1.5em; }
.article-body { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow-sm); }
.article-body p:first-of-type { font-size: 1.1rem; }
.byline { color: var(--muted); font-size: .95rem; }
@media (max-width: 640px) { .article-body { padding: 22px 18px; } }

/* ---------- Services ---------- */
.service-pills { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.service-pills a { display: inline-flex; align-items: center; gap: .5em; min-height: 44px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; font-weight: 600; color: var(--ink); box-shadow: var(--shadow-sm); }
.service-pills a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.service-pills .icon { color: var(--brand); width: 1.3em; height: 1.3em; }
.service-stack { display: flex; flex-direction: column; gap: 22px; }
.service-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.service-card:target { box-shadow: 0 0 0 3px var(--primary), var(--shadow-md); }
.service-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.service-head h2 { margin-bottom: .2em; font-size: 1.5rem; }
.service-lead { color: var(--ink-2); margin: 0; }
.service-icon { flex: none; width: 54px; height: 54px; border-radius: 16px; background: linear-gradient(135deg, var(--primary-soft), var(--cyan-soft)); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; }
.service-icon .icon { width: 30px; height: 30px; }
.service-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; }
.service-body:empty { display: none; }
.service-meta { background: var(--blush); border-radius: var(--radius-sm); padding: 16px 18px; font-size: .95rem; align-self: start; min-width: 0; }
.service-meta p { display: flex; gap: .5em; margin-bottom: .8em; }
.service-meta p:last-child { margin-bottom: 0; }
.service-meta .icon { color: var(--brand); margin-top: .25em; }
@media (max-width: 860px) { .service-grid { grid-template-columns: 1fr; } .service-meta { order: -1; } }
@media (max-width: 640px) { .service-card { padding: 20px 16px; } .service-head { gap: 12px; } .service-head h2 { font-size: 1.3rem; } .service-icon { width: 46px; height: 46px; } .service-icon .icon { width: 26px; height: 26px; } }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: .6em 0; }
.tag { display: inline-flex; align-items: center; background: var(--primary-soft); color: var(--primary-dark); border-radius: 999px; padding: 4px 12px; font-size: .85rem; font-weight: 600; min-height: 32px; }
a.tag { min-height: 40px; padding: 6px 14px; }
a.tag:hover { background: var(--primary); color: #fff; text-decoration: none; }
.tag-soft { background: var(--cyan-soft); color: var(--cyan-dark); }
.tag-plain { background: #F3EDF0; color: var(--ink-2); font-weight: 500; }

/* ==========================================================================
   TABLE SYSTEM — one family: .tbl (figure) > .tbl-head + .tbl-scroll > table.t
   Modifiers: .t--compact .t--zebra .t--price-matrix .t--grouped .t--checklist .t--matrix
   ========================================================================== */
.tbl { margin: 0 0 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: clip; }
.tbl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 16px var(--t-pad-x) 12px; border-bottom: 1px solid var(--t-line); }
.tbl-title { margin: 0; font: 700 1.05rem/1.4 var(--font-head); color: var(--ink); }
.tbl-meta { margin: 0 0 0 auto; font-size: .82rem; color: var(--muted); text-align: right; }
.tbl-meta a { font-weight: 600; }
.tbl-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin: 4px 0 0; padding: 0; font-size: .82rem; color: var(--ink-2); flex-basis: 100%; }
.tbl-legend li { display: inline-flex; align-items: center; gap: 6px; }
.tbl-scroll { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(90deg, #fff 30%, rgba(255, 255, 255, 0)) left / 40px 100% no-repeat local,
    linear-gradient(270deg, #fff 30%, rgba(255, 255, 255, 0)) right / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(140, 20, 70, .16), rgba(140, 20, 70, 0)) left / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(140, 20, 70, .16), rgba(140, 20, 70, 0)) right / 14px 100% no-repeat scroll; }
.tbl-scroll.is-tall { max-height: min(78vh, 880px); overflow: auto; }
abbr[title] { text-decoration: underline dotted; text-decoration-color: var(--t-line-strong); text-underline-offset: 3px; cursor: help; }
.tbl-scroll:focus-visible { outline-offset: -3px; }
.tbl-hint { display: none; margin: 0; padding: 8px var(--t-pad-x); font-size: .78rem; color: var(--muted); border-top: 1px solid var(--t-line); }
.tbl[data-overflow] .tbl-hint { display: block; }
.tbl-foot { margin: 0; padding: 10px var(--t-pad-x); font-size: .85rem; color: var(--ink-2); border-top: 1px solid var(--t-line); background: var(--blush); }
@media (max-width: 640px) { .tbl-head { padding: 14px 14px 10px; } .tbl-meta { margin-left: 0; text-align: left; } :root { --t-pad-x: 12px; --t-pad-y: 10px; } }

.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .95rem; font-variant-numeric: tabular-nums lining-nums; }
.t th, .t td { padding: var(--t-pad-y) var(--t-pad-x); border-bottom: 1px solid var(--t-line); text-align: left; vertical-align: middle; }
.t thead th { position: sticky; top: 0; z-index: 2; background: var(--t-head-bg); color: var(--t-head-ink); font: 600 .85rem/1.35 var(--font-body); border-bottom: 1px solid var(--t-line-strong); white-space: nowrap; }
.t thead th .sub { display: block; font-weight: 500; font-size: .76rem; color: var(--muted); margin-top: 2px; }
.t .cell-sub { display: block; margin-top: 2px; font-size: .82rem; font-weight: 400; color: var(--muted); line-height: 1.5; }
.t tbody th { font-weight: 600; }
.t tbody tr:last-child > * { border-bottom: 0; }
@media (hover: hover) { .t tbody tr:hover > * { background: var(--t-hover); } }
.t--zebra tbody tr:nth-child(even) > * { background: var(--t-zebra); }
.t .num, .t thead th.num { text-align: right; white-space: nowrap; }
.t .mark, .t thead th.mark { text-align: center; width: 5.5rem; }
.t .idx { width: 3ch; text-align: right; color: var(--muted); padding-right: 6px; }
.t .ctr { text-align: center; }
.t--compact { font-size: .9rem; }
.t--compact th, .t--compact td { padding: 8px 10px; }
.t a { font-weight: 600; }
.price { font: 700 1.05rem/1.2 var(--font-head); color: var(--primary); white-space: nowrap; font-variant-numeric: tabular-nums; }
.price--lg { font-size: 1.3rem; }
.price small { font: 500 .72rem/1 var(--font-body); color: var(--muted); }
.price-was { color: var(--muted); text-decoration: line-through; font-size: .88rem; white-space: nowrap; }
.badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .72rem; font-weight: 600; white-space: nowrap; line-height: 1.6; vertical-align: middle; }
.badge-save { background: var(--cyan-soft); color: var(--note-ink); }
.badge-best { background: var(--primary-soft); color: var(--primary-dark); }
.mark-i { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; vertical-align: middle; }
.mark-i .icon { width: 15px; height: 15px; vertical-align: 0; }
.mark-i.yes { background: var(--mark-yes-bg); color: var(--mark-yes); }
.mark-i.no { color: var(--mark-no); }
.mark-note { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--cyan-soft); color: var(--note-ink); font-size: .74rem; font-weight: 600; white-space: nowrap; }
.t tfoot > tr > * { background: var(--blush); border-top: 1px solid var(--t-line-strong); font-weight: 700; }
.t tr.is-total > * { background: var(--primary-soft); color: var(--primary-dark); }
.t tbody.group + tbody.group > tr:first-child > * { border-top: 2px solid var(--t-line-strong); }
.t .band > th { background: #FBF3F6; color: var(--primary-dark); font-size: .82rem; font-weight: 700; padding: 8px var(--t-pad-x); border-bottom: 1px solid var(--t-line-strong); position: sticky; top: 0; z-index: 1; }
.t thead + tbody .band > th, .t .band > th { top: var(--t-head-h, 41px); }

/* T2 — price matrix (birth package) */
.t--price-matrix thead th { text-align: center; }
.t--price-matrix thead th:first-child { text-align: left; }
.t--price-matrix tbody th { width: 40%; font-family: var(--font-head); font-size: 1.02rem; }
.t--price-matrix tbody th .cell-sub { font-family: var(--font-body); display: flex; gap: .4em; align-items: flex-start; }
.t--price-matrix tbody th .cell-sub .icon { color: var(--brand); width: 1em; height: 1em; margin-top: .25em; }
.t--price-matrix td { text-align: center; width: 20%; }
.t--price-matrix td .badge { display: block; width: max-content; margin: 2px auto 0; }
.t--price-matrix .stay { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; background: #fff; border: 1px solid var(--t-line-strong); font-size: .72rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
@media (max-width: 767px) {
  .t--price-matrix thead { position: absolute; clip: rect(0 0 0 0); width: 1px; height: 1px; overflow: hidden; }
  .t--price-matrix tbody tr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px; border-bottom: 1px solid var(--t-line); }
  .t--price-matrix tbody tr:last-child { border-bottom: 0; }
  .t--price-matrix tbody th { grid-column: 1 / -1; padding: 0 0 4px; border: 0; width: auto; }
  .t--price-matrix td { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; padding: 10px 4px; border: 1px solid var(--t-line); border-radius: 12px; background: var(--blush); width: auto; min-width: 0; }
  .t--price-matrix td::before { content: attr(data-label); font-size: .72rem; color: var(--ink-2); text-align: center; line-height: 1.35; text-wrap: balance; }
  .t--price-matrix td::after { content: attr(data-stay); font-size: .68rem; color: var(--muted); white-space: nowrap; }
  .t--price-matrix td .price { font-size: 1.05rem; }
  .t--price-matrix td .badge { margin: 0; }
  @media (hover: hover) { .t--price-matrix tbody tr:hover > * { background: var(--blush); } .t--price-matrix tbody tr:hover > th { background: transparent; } }
}
@media (max-width: 380px) { .t--price-matrix tbody tr { gap: 5px; padding: 12px 10px; } .t--price-matrix td .price { font-size: .95rem; } }

/* T3 — grouped price list (health-check summary) */
.t--grouped th[scope="rowgroup"] { vertical-align: top; white-space: nowrap; }
.t--grouped th[scope="rowgroup"] a { font-family: var(--font-head); font-size: 1.02rem; }
.t--grouped th[scope="rowgroup"] .cell-sub { white-space: normal; max-width: 16em; }
.t--grouped .sex { color: var(--ink-2); width: 5rem; }
.t--grouped tbody.group > tr:first-child > * { border-top: 2px solid var(--t-line-strong); }
.t--grouped tbody.group:first-of-type > tr:first-child > * { border-top: 0; }
.sum-cards { display: none; list-style: none; padding: 14px; margin: 0; gap: 12px; }
.sum-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.sum-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.sum-card-head h3 { margin: 0; font-size: 1.05rem; }
.sum-card-head span { font-size: .82rem; color: var(--muted); text-align: right; }
.sum-card-rows { display: grid; grid-template-columns: 1fr; gap: 6px; }
.sum-card-row { display: grid; grid-template-columns: 3.2em 1fr auto; align-items: center; gap: 8px; }
.sum-card-row .sex { color: var(--ink-2); font-size: .9rem; }
.sum-card-row .prices { display: flex; gap: 8px; align-items: baseline; }
.sum-card .link-arrow { font-size: .9rem; margin-top: 10px; }
@media (max-width: 640px) { .tbl--summary .tbl-scroll { display: none; } .sum-cards { display: grid; } }

/* T3b — checklist (health-check items) */
.t--checklist tbody.in tr.is-in > td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.t--checklist tbody.extra td { color: var(--ink-2); }
.t--checklist tbody.extra .name { color: var(--ink-2); }
.t--checklist .name .cell-sub { font-size: .78rem; }
.t--checklist .num { color: var(--ink-2); font-size: .9rem; }
.t--checklist tbody.extra .num { color: var(--ink); font-weight: 600; }
.t--checklist tfoot th { text-align: right; }
.t--checklist tfoot .price--lg { font-size: 1.2rem; }
@media (max-width: 640px) { .t--checklist { font-size: .9rem; } .t .mark, .t thead th.mark { width: 3.6rem; } .t--checklist .idx { display: none; } }

/* T4 — feature matrix (rooms) */
.t--matrix { table-layout: auto; }
.t--matrix thead th { text-align: center; min-width: 5.7rem; white-space: normal; vertical-align: bottom; line-height: 1.3; padding-top: 10px; padding-bottom: 10px; }
.t--matrix thead th:first-child, .t--matrix th[scope="row"] { position: sticky; left: 0; z-index: 1; background: #fff; text-align: left; min-width: 9.5rem; max-width: 13rem; font-weight: 500; font-size: .92rem; box-shadow: 8px 0 8px -8px rgba(140, 20, 70, .18); }
.t--matrix thead th:first-child { z-index: 3; background: var(--t-head-bg); }
.t--matrix td.mark { padding-left: 6px; padding-right: 6px; }
.tbl--matrix .tbl-scroll.is-tall { max-height: min(84vh, 1100px); }
.t--matrix .band > th { left: 0; position: sticky; z-index: 1; box-shadow: none; max-width: none; font-size: .82rem; font-weight: 700; }
.t--matrix .band > th[colspan] { position: sticky; left: 0; }
.t--matrix tr.is-total > th { background: var(--primary-soft); }
.t--matrix tr.is-total > td { text-align: center; }
.t--matrix td.mark { width: auto; }
.t--matrix .is-col-hi, .t--matrix .is-hover { background: var(--t-col-hi) !important; }
.t--matrix thead th.is-col-hi, .t--matrix thead th.is-hover { background: #F9DCE7 !important; }
.t--matrix tr.is-total > td.is-col-hi, .t--matrix tr.is-total > td.is-hover { background: #F6CFDE !important; }
.room-cards { display: none; list-style: none; padding: 0; margin: 0 0 24px; gap: 10px; }
.room-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.room-card:target { box-shadow: 0 0 0 3px var(--primary), var(--shadow-md); }
.room-card summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto 20px; grid-template-areas: "name price caret" "floor price caret"; align-items: center; gap: 0 10px; padding: 12px 14px; min-height: 60px; }
.room-card summary::-webkit-details-marker { display: none; }
.room-card summary::after { content: "▾"; grid-area: caret; color: var(--muted); transition: transform .2s; text-align: right; }
.room-card[open] summary::after { transform: rotate(180deg); }
.room-card .rate-name { grid-area: name; font-weight: 700; }
.room-card .rate-floor { grid-area: floor; font-size: .82rem; color: var(--muted); }
.room-card .price { grid-area: price; }
.amenity-chips { list-style: none; padding: 4px 14px 14px; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--t-line); }
.amenity-chips li { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .82rem; }
.amenity-chips li.has { background: var(--mark-yes-bg); color: #0E5A39; font-weight: 600; }
.amenity-chips li.note { background: var(--cyan-soft); color: var(--note-ink); font-weight: 600; }
.amenity-chips li.not { color: var(--muted); text-decoration: line-through; font-size: .78rem; }
.amenity-chips li .icon { width: .9em; height: .9em; }
@media (max-width: 719px) { .rate-cards, .tbl--matrix { display: none; } .room-cards { display: grid; } }

/* ---------- Rooms ---------- */
.rate-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 36px; }
@media (min-width: 1100px) { .rate-cards { grid-template-columns: repeat(5, 1fr); } }
.rate-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 2px; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; min-height: 128px; }
.rate-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary-soft); }
.rate-name { font-weight: 700; }
.rate-floor { font-size: .82rem; color: var(--muted); }
.rate-price { font-family: var(--font-head); font-weight: 700; font-size: 1.45rem; color: var(--primary); margin-top: auto; padding-top: 6px; white-space: nowrap; }
.rate-price small { font-size: .7rem; color: var(--muted); font-weight: 500; }
.panorama { margin: 0 auto 28px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); max-width: 760px; }
.panorama img { width: 100%; }
.gallery-block { margin-bottom: 36px; }
.gallery-block:target h3 { color: var(--primary); }
.gallery { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.gallery li { min-width: 0; }
.gallery a { display: flex; flex-direction: column; height: 100%; border-radius: var(--radius-sm); overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--ink-2); transition: box-shadow .15s, transform .15s; }
.gallery a:hover { text-decoration: none; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.gallery a[aria-current="true"], .gallery li:target a { box-shadow: 0 0 0 3px var(--primary); }
.gallery img { width: 100%; aspect-ratio: 450 / 230; object-fit: cover; }
.gallery-events img { aspect-ratio: 4 / 3; }
.gallery-cap { display: block; padding: 8px 12px; font-size: .85rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gallery + .note { margin-top: 20px; }

/* ---------- Two-col / aside / about / contact ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.two-col > * { min-width: 0; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } .side-card { position: static; } }
.about-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: start; }
.about-grid > * { min-width: 0; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
.about-photo { margin: 0 0 18px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.about-photo img { width: 100%; }
.fact-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 0; }
.fact-list div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.fact-list div:last-child { border-bottom: 0; }
.fact-list dt { color: var(--muted); font-weight: 600; }
.fact-list dd { margin: 0; }
.timeline { list-style: none; padding: 0; margin: 0 0 1.5em; border-left: 3px solid var(--primary-soft); }
.timeline li { position: relative; padding: 0 0 18px 24px; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: 8px; width: 15px; height: 15px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--primary-soft); }
.timeline-date { font-family: var(--font-head); font-weight: 700; color: var(--primary); display: block; }
.timeline p { margin: 0; color: var(--ink-2); }
.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 18px; }
.value-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.value-vision { background: linear-gradient(135deg, var(--primary-dark), var(--brand)); color: #fff; display: flex; flex-direction: column; justify-content: center; }
.value-vision .eyebrow { color: #FFD1E3; }
.value-quote { font-family: var(--font-head); font-size: 1.35rem; font-weight: 600; line-height: 1.5; margin: 0; text-wrap: balance; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; gap: .5em; align-items: flex-start; margin-bottom: .5em; }
.check-list .icon { color: var(--ok); margin-top: .3em; flex: none; }
.motto-list { list-style: none; padding: 0; margin: 0 0 1em; display: flex; flex-wrap: wrap; gap: 8px; }
.motto-list li { background: var(--primary-soft); color: var(--primary-dark); border-radius: 999px; padding: 4px 14px; font-weight: 600; }
.postpartum { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start; }
@media (max-width: 800px) { .postpartum { grid-template-columns: 1fr; } }
.price-lead { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.job-list { list-style: none; padding: 0; margin: 0 0 1.2em; }
.job-list li { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); }
.job-title { font-weight: 700; font-size: 1.05rem; }
.job-count { color: var(--cyan-dark); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.job-note { color: var(--ink-2); font-size: .92rem; flex-basis: 100%; }
.callout { background: var(--blush); border-radius: var(--radius-sm); padding: 12px 16px; display: flex; gap: .5em; align-items: flex-start; flex-wrap: wrap; margin-bottom: 2em; }
.callout .icon { color: var(--brand); margin-top: .3em; }
.big-phones { font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.conditions li { margin-bottom: .5em; }
.conditions li::marker { color: var(--primary); font-weight: 700; }
@media (min-width: 1024px) { .conditions.cols-2 { columns: 2; column-gap: 36px; } .conditions.cols-2 li { break-inside: avoid; } }
.note-list { font-size: .92rem; color: var(--ink-2); background: var(--blush); border-radius: var(--radius-sm); padding: 14px 18px 14px 36px; }
.map-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; }
.map-grid > * { min-width: 0; }
@media (max-width: 860px) { .map-grid { grid-template-columns: 1fr; } }
.map-embed { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); background: var(--blush-2) radial-gradient(circle at 50% 45%, var(--primary-soft) 0, transparent 40%); min-height: 320px; }
.map-embed iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }

/* ---------- Tabs ---------- */
.tabs { margin-top: 10px; }
.tab-list { display: flex; gap: 8px; margin: 0 0 18px; padding: 8px 0; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; position: sticky; top: var(--header-h); z-index: 15; background: linear-gradient(180deg, #fff 70%, rgba(255, 255, 255, 0)); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.tab-list::-webkit-scrollbar { display: none; }
.tab { flex: none; scroll-snap-align: start; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 9px 16px; cursor: pointer; font-weight: 600; color: var(--ink-2); display: flex; flex-direction: column; align-items: flex-start; line-height: 1.3; min-height: 44px; white-space: nowrap; box-shadow: var(--shadow-sm); }
.tab small { font-weight: 400; color: var(--muted); font-size: .76rem; }
.tab[aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.tab[aria-selected="true"] small { color: #FFD1E3; }
.tab-panel-title { margin: 0 0 12px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.tab-panel-title .h-sub { display: inline; font-size: .62em; margin: 0; }
@media (min-width: 900px) { .tab-list { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; position: static; padding: 0; background: none; } }

/* ---------- Footer ---------- */
.site-footer { background: linear-gradient(180deg, #3A1020, #2A0B17); color: #F3DCE5; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 36px; padding: 52px var(--gutter) 36px; }
.footer-col { min-width: 0; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 40px; } }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.site-footer .brand-th { color: #fff; white-space: normal; }
.site-footer .brand-en { color: #D9A9BC; display: block; }
.site-footer .logo-mark { filter: none; }
.footer-address { display: flex; gap: .5em; align-items: flex-start; }
.site-footer .icon { color: #F48FB1; }
.footer-link { color: #FFD1E3; display: inline-block; padding: 4px 0; }
.footer-heading { font-size: .85rem; color: #F48FB1; margin: 0 0 12px; letter-spacing: 0; }
.footer-list { list-style: none; padding: 0; margin: 0 0 14px; }
.footer-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; font-size: .92rem; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.footer-label { color: #D9A9BC; flex: 1 1 10em; min-width: 0; }
.footer-value { text-align: right; flex: 0 1 auto; min-width: 0; }
.footer-tels { display: flex; flex-wrap: wrap; gap: 2px 12px; justify-content: flex-end; }
.footer-tel { color: #fff; font-weight: 600; white-space: nowrap; display: inline-block; padding: 4px 0; }
.footer-value a:not(.footer-tel) { color: #fff; font-weight: 600; }
.footer-nav { list-style: none; padding: 0; margin: 0; columns: 2; font-size: .92rem; }
.footer-nav a { color: #F3DCE5; display: inline-block; padding: 6px 0; min-height: 36px; }
.iso-badge { display: inline-flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 10px 14px; margin-top: 8px; max-width: 100%; }
.iso-ring { width: 56px; height: 56px; border-radius: 50%; border: 3px double #8BD9A5; color: #CFF5DB; display: inline-flex; align-items: center; justify-content: center; font-size: .66rem; font-weight: 700; text-align: center; line-height: 1.1; flex: none; }
.iso-text { font-size: .82rem; color: #D9A9BC; line-height: 1.4; min-width: 0; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 18px 0; font-size: .85rem; color: #D9A9BC; }
.footer-bottom p { margin: 0; }
.footer-small { font-size: .82rem; opacity: .85; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(30, 5, 18, .93); display: flex; align-items: center; justify-content: center; padding: 20px 72px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(1100px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lightbox img { max-height: calc(100dvh - 130px); width: auto; max-width: 100%; border-radius: 10px; box-shadow: var(--shadow-lg); background: #fff; opacity: 0; transition: opacity .25s; }
.lightbox img.is-loaded { opacity: 1; }
.lightbox figcaption { color: #fff; font-size: .95rem; text-align: center; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.lightbox-meta { display: flex; gap: 16px; align-items: center; font-size: .85rem; color: #FFD1E3; }
.lightbox-count { font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.lightbox-full { color: #fff; display: inline-flex; align-items: center; gap: .3em; padding: 4px 0; }
.lightbox-close, .lightbox-nav { position: absolute; background: #fff; border: 0; border-radius: 50%; width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; color: var(--primary); cursor: pointer; box-shadow: var(--shadow-md); }
.lightbox-close { top: 14px; right: 14px; }
.lightbox-close .icon, .lightbox-nav .icon { width: 24px; height: 24px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-nav[hidden] { display: none; }
.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }
@media (max-width: 640px) {
  .lightbox { padding: 64px 12px 16px; }
  .lightbox-nav { top: auto; bottom: 14px; transform: none; width: 44px; height: 44px; background: rgba(255, 255, 255, .92); }
  .lightbox-prev { left: 12px; } .lightbox-next { right: 12px; }
  .lightbox img { max-height: calc(100dvh - 190px); }
  .lightbox figcaption { padding-bottom: 50px; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
  html.js .reveal.is-visible { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .topbar, .site-header, .call-fab, .site-footer .footer-nav, .nav-toggle, .lightbox, .filter-bar, .tbl-hint, .tab-list { display: none !important; }
  body { background: #fff; color: #000; padding-bottom: 0; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .tbl-scroll { overflow: visible; max-height: none; background: none; }
  .t thead th, .t .band > th, .t--matrix th { position: static; }
  .tab-panel[hidden] { display: block; }
  .room-cards { display: none; }
  .rate-cards, .tbl--matrix { display: block; }
  .doctor-info details { display: block; }
  .doctor-info summary { display: none; }
}

/* ---------- Late additions ---------- */
.link-arrow { display: inline; }
.link-arrow .icon { margin-left: .25em; vertical-align: -.2em; display: inline-block; }
.text-center .lead { margin-inline: auto; }
.contact-grid-home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .contact-grid-home { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .contact-grid-home { grid-template-columns: 1fr; } }
.tbl--flat { border: 0; box-shadow: none; border-radius: 0; background: transparent; }
.tbl--flat .tbl-scroll { background: none; }
.tbl--flat .t thead th { background: transparent; border-bottom: 1px solid var(--t-line-strong); position: static; }
.tbl--flat .t th, .tbl--flat .t td { padding-left: 0; padding-right: 0; }
.tbl--flat .t tbody tr:last-child > * { border-bottom: 1px solid var(--t-line); }
.equip-grid-home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .equip-grid-home { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .equip-grid-home { grid-template-columns: 1fr; } }
.equip-card.is-wide .equip-img { aspect-ratio: 16 / 9; min-height: 0; align-self: center; }
.gallery-events { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
@media (max-width: 719px) { .rate-cards { display: none; } }
@media (max-width: 640px) {
  .doctor-chip-days { gap: 2px; }
  .doctor-chip-days .day { width: 21px; height: 21px; font-size: .62rem; }
  .doctor-chip-name { text-wrap: balance; }
  .t--checklist th.mark, .t--checklist td.mark { width: 2.9rem; padding-left: 4px; padding-right: 4px; }
  .t--checklist .num { padding-left: 6px; padding-right: 8px; }
  .t--checklist .name { padding-right: 6px; }
}
.t .band > th { position: static; }
@media (max-width: 360px) { .week li { width: 32px; height: 32px; font-size: .74rem; } .doctor-schedule { padding: 12px 10px; } }
/* Tap targets ≥ 44px on touch widths (inline padding enlarges the hit area without moving the text) */
@media (max-width: 640px) {
  .link-arrow, .footer-link, .footer-value a, .tbl-meta a, .note a, .prose a, .sum-card a, .breadcrumb a, .footer-tel { padding-block: .5em; }
  a[href^="tel:"], a[href^="mailto:"], .t a, .tbl-foot a { padding-block: .75em; }
  .footer-tel { padding-block: .65em; }
  .topbar a { padding-block: .9em; }
  .footer-nav a { padding: 10px 0; min-height: 44px; }
  .doctor-info summary { min-height: 44px; }
  .brand { min-height: 44px; }
  .tab-list { padding-block: 6px; }
}
@media (max-width: 640px) {
  .link-arrow { padding-block: .6em; }
  .t a, .tbl-foot a, .tbl-meta a, .breadcrumb a, .sum-card a, .hero-figure figcaption a, .poster-thumb figcaption a, .meta a { padding-block: .85em; }
  .jump-list a { min-height: 44px; }
}
@media (max-width: 640px) { a.tag { min-height: 44px; } .spec--right a { padding-inline: .4em; } .tbl-meta a { padding-block: 1em; } }

/* ---------- v1.2.0 SEO/GEO blocks: breadcrumb nav, facts, FAQ, related, provenance, doctor & service pages ---------- */
.breadcrumb-nav { margin-bottom: .6em; }
.breadcrumb li[aria-current] { color: var(--ink-2); font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }
.container.narrow .breadcrumb { justify-content: flex-start; }
.jump-list.center { justify-content: center; margin-top: 18px; }
.inline-address { display: inline; font-style: normal; }
.section-facts { padding: 0 0 var(--s-7); margin-top: -8px; }
.section-facts .facts { margin: 0; }
.facts { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow-sm); margin: 0 0 28px; }
.facts-title { font-size: 1.05rem; margin: 0 0 10px; display: flex; align-items: center; gap: .4em; color: var(--primary-dark); }
.facts-title .icon { color: var(--ok); }
.facts-list { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.facts-list > div { display: grid; grid-template-columns: minmax(7em, 32%) minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.facts-list dt { color: var(--muted); font-weight: 600; }
.facts-list dd { margin: 0; color: var(--ink); font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.facts-list dd a { font-weight: 600; }
@media (max-width: 900px) { .facts-list { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .facts { padding: 16px 16px; } .facts-list > div { grid-template-columns: 1fr; gap: 2px; } .facts-list dt { font-size: .82rem; } }
.faq { margin: 36px 0 8px; }
.faq-title { margin-bottom: 14px; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; font-family: var(--font-head); font-weight: 600; color: var(--ink); min-height: 48px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--primary); }
.faq-caret { color: var(--primary); transition: transform .2s; flex: none; }
.faq-caret .icon { width: 1.1em; height: 1.1em; }
.faq-item[open] .faq-caret { transform: rotate(90deg); }
.faq-a { padding: 0 18px 16px; color: var(--ink-2); border-top: 1px dashed var(--line); }
.faq-a p { margin: 12px 0 0; }
.related { margin: 28px 0 0; }
.side-card .related { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.related-title { font-size: .95rem; color: var(--muted); margin: 0 0 10px; font-family: var(--font-body); font-weight: 600; }
.related-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.related-list a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--blush); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font-weight: 600; min-height: 44px; }
.related-list a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.related-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.related-text small { font-weight: 500; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.related-list a .icon { color: var(--primary); flex: none; }
.provenance { margin: 28px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.side-sub { font-size: .9rem; color: var(--muted); margin: 18px 0 8px; font-family: var(--font-body); font-weight: 600; }
.side-list { list-style: none; padding: 0; margin: 0 0 14px; font-size: .95rem; }
.side-list li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.side-list li:last-child { border-bottom: 0; }
.footer-nav + .footer-heading, .footer-list + .footer-heading { margin-top: 18px; }
.footer-nap { font-style: normal; }
/* doctor detail page */
.doctor-hero { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: center; }
.doctor-hero-photo { margin: 0; }
.doctor-hero-photo img { width: 100%; max-width: 200px; border-radius: 20px; border: 5px solid #fff; box-shadow: var(--shadow-md); }
.doctor-hero-copy .btn-row { margin-bottom: 0; }
@media (max-width: 640px) { .doctor-hero { grid-template-columns: 1fr; gap: 18px; } .doctor-hero-photo img { max-width: 150px; } }
.doctor-main, .service-main, .equip-main { min-width: 0; }
.doctor-schedule--page { margin: 0 0 28px; }
.doctor-schedule--page .sched-h { font-size: 1.15rem; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.doctor-schedule--page .sched-h .today-note { font-size: .85rem; font-weight: 500; color: var(--cyan-dark); white-space: nowrap; }
.doctor-schedule--page .week { gap: 8px; }
.doctor-schedule--page .week li { width: 42px; height: 42px; }
.doctor-schedule--page .sched { grid-template-columns: max-content minmax(0, 1fr); font-size: 1rem; }
.doctor-schedule--page .note { margin: 16px 0 0; }
@media (max-width: 480px) { .doctor-schedule--page .week { justify-content: space-between; gap: 2px; } .doctor-schedule--page .week li { width: 38px; height: 38px; } .doctor-schedule--page .sched { grid-template-columns: 1fr; gap: 6px; } }
.doctor-bio h2 { font-size: 1.25rem; }
.doctor-edu--page { font-size: 1rem; }
.doctor-name-link { color: inherit; }
.doctor-name-link:hover { color: var(--primary); text-decoration: none; }
.doctor-more { margin: .2em 0 0; font-size: .9rem; }
.doctor-head .doctor-more .link-arrow { font-size: .9rem; }
/* service detail page */
.service-hero { display: flex; gap: 20px; align-items: flex-start; }
.service-hero > div { min-width: 0; }
.service-icon--lg { width: 68px; height: 68px; border-radius: 20px; margin-top: 6px; }
.service-icon--lg .icon { width: 38px; height: 38px; }
.service-hero .btn-row { align-items: center; margin-bottom: 0; }
.service-hero .hero-note { display: inline-flex; align-items: center; gap: .4em; color: var(--ink-2); font-weight: 500; }
.service-hero .hero-note .icon { color: var(--brand); }
@media (max-width: 640px) { .service-hero { gap: 14px; } .service-icon--lg { width: 52px; height: 52px; border-radius: 16px; } .service-icon--lg .icon { width: 30px; height: 30px; } }
.service-title-link { color: inherit; }
.service-title-link:hover { color: var(--primary); text-decoration: none; }
.service-body { margin-bottom: 28px; }
.doctor-mini-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 14px; }
.doctor-mini { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); align-items: start; }
.doctor-mini-photo img { width: 100%; max-width: 110px; border-radius: 14px; border: 3px solid var(--primary-soft); }
.doctor-mini-name { font-size: 1.15rem; margin: 0 0 .3em; }
.doctor-mini-name a { color: inherit; }
.doctor-mini-name a:hover { color: var(--primary); text-decoration: none; }
.doctor-mini-days { display: flex; gap: 4px; margin: 0 0 6px; }
.doctor-mini-days .day { font-size: .72rem; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #F3EDF0; color: var(--muted-2); text-decoration: line-through; }
.doctor-mini-days .day.on { background: var(--primary); color: #fff; font-weight: 600; text-decoration: none; }
.doctor-mini-sum { font-size: .92rem; color: var(--ink-2); margin: 0 0 .4em; }
.doctor-mini .link-arrow { font-size: .9rem; }
@media (max-width: 480px) { .doctor-mini { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 14px; } .doctor-mini-photo img { max-width: 84px; } .doctor-mini-days { flex-wrap: wrap; } }
.equip-grid-compact { margin-bottom: 28px; }
.policy h2 { margin-top: 1.6em; }
.policy .spec-card { margin: .6em 0 1.2em; }
