/* Vepro Medical Centre — site styles (2026 redesign)
   Palette from the clinic itself: sage walls, plum lettering, lavender mark,
   and the five colours of the VEPRO sign used as terrazzo "dots". */

:root {
  --paper: #f7f9f6;
  --white: #ffffff;
  --sage-50: #eef3ee;
  --sage-100: #e3ece3;
  --sage-300: #b9cdbc;
  --sage-700: #355246;
  --sage-800: #2a4238;
  --plum-900: #2e2236;
  --plum-800: #45334f;
  --plum-600: #6a5578;
  --lavender: #b9aed3;
  --lavender-100: #ece8f4;
  --ink: #2b2630;
  --ink-soft: #57505e;
  --line: #d3ddd4;
  --dot-1: #d63a6e;
  --dot-2: #f2c230;
  --dot-3: #f28a2e;
  --dot-4: #2f6cc9;
  --dot-5: #4f9b5c;

  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: "PingFang HK", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC", system-ui, sans-serif;
  --latin: "Jost", "Avenir Next", "Segoe UI", sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4rem, 9vw, 7rem);
  --arch: 999px 999px 1.5rem 1.5rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.8;
  letter-spacing: 0.01em;
}

img { max-width: 100%; height: auto; display: block; }
picture { display: block; }
a { color: var(--plum-800); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--plum-600); }
:focus-visible { outline: 3px solid var(--dot-4); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--plum-900);
  line-height: 1.3;
  letter-spacing: 0.02em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.25rem, 1.5rem + 3.2vw, 3.6rem); line-height: 1.2; }
h2 { font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem); }
h3 { font-size: 1.35rem; font-weight: 600; }
p { margin: 0 0 1em; max-width: 38em; }
ul, ol { margin: 0; padding: 0; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--section); }
.section-head { margin-bottom: clamp(2rem, 4vw, 3rem); max-width: 40em; }
.section-head p { color: var(--ink-soft); }
.lead { font-size: 1.15rem; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
.note { color: var(--ink-soft); font-size: 0.92rem; margin: 1.25rem 0 0; }
.mt-md { margin-top: 1rem; }
.mt-lg { margin-top: 1.75rem; }
.mt-xl { margin-top: 3rem; }
.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: 1rem; top: -4rem; z-index: 100;
  background: var(--plum-800); color: var(--white); padding: 0.6rem 1rem; border-radius: 0.5rem;
}
.skip-link:focus { top: 1rem; color: var(--white); }

/* ---------- buttons & icons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 3rem; padding: 0.5rem 1.4rem;
  border-radius: 999px; border: 2px solid var(--plum-800);
  font-family: var(--sans); font-size: 1rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--plum-800); color: var(--white); }
.btn-primary:hover { background: var(--plum-900); border-color: var(--plum-900); color: var(--white); }
.btn-outline { background: transparent; color: var(--plum-800); }
.btn-outline:hover { background: var(--plum-800); color: var(--white); }
.btn-light { background: var(--white); border-color: var(--white); color: var(--sage-800); }
.btn-light:hover { background: var(--sage-100); border-color: var(--sage-100); color: var(--sage-800); }
.btn-ghost-light { background: transparent; border-color: rgba(255, 255, 255, 0.7); color: var(--white); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.12); color: var(--white); }
.btn-small { min-height: 2.5rem; padding: 0.35rem 1rem; font-size: 0.95rem; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: currentColor; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- wordmark ---------- */
.wordmark { font-family: var(--latin); font-weight: 500; letter-spacing: 0.06em; line-height: 1; }
.wordmark b { font-weight: 500; }
.wordmark .c1 { color: var(--dot-1); }
.wordmark .c2 { color: #e0aa12; }
.wordmark .c3 { color: var(--dot-3); }
.wordmark .c4 { color: var(--dot-4); }
.wordmark .c5 { color: var(--dot-5); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 4.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--plum-800); }
.brand .wordmark { font-size: 1.75rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-zh { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; color: var(--plum-900); letter-spacing: 0.08em; }
.brand-en { font-family: var(--latin); font-size: 0.72rem; letter-spacing: 0.12em; color: var(--plum-600); }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 1.75rem; }
.site-nav ul { list-style: none; display: flex; gap: 1.5rem; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; padding-block: 0.4rem; border-bottom: 2px solid transparent; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current] { border-bottom-color: var(--lavender); color: var(--plum-800); }

.nav-toggle {
  display: none; margin-left: auto; align-items: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0 0.9rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--white); color: var(--plum-800);
  font: inherit; font-weight: 600; cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 1.1rem; height: 2px; background: currentColor; border-radius: 2px; position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 1rem;
    padding: 1rem var(--gutter) 1.5rem; background: var(--white); border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -24px rgba(46, 34, 54, 0.5);
  }
  .site-header.is-open .site-nav { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav li a:not(.btn) { display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--sage-100); }
  .header-cta { align-self: flex-start; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--sage-50); }
.terrazzo::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  /* Dots stay on the edges, like terrazzo chips, never behind text. */
  background:
    radial-gradient(circle at 4% 9%, var(--dot-1) 0 5px, transparent 6px),
    radial-gradient(circle at 12% 95%, var(--dot-2) 0 8px, transparent 9px),
    radial-gradient(circle at 27% 5%, var(--dot-4) 0 4px, transparent 5px),
    radial-gradient(circle at 41% 96%, var(--dot-5) 0 6px, transparent 7px),
    radial-gradient(circle at 55% 7%, var(--dot-3) 0 3px, transparent 4px),
    radial-gradient(circle at 63% 92%, var(--dot-2) 0 5px, transparent 6px),
    radial-gradient(circle at 94% 90%, var(--dot-1) 0 7px, transparent 8px),
    radial-gradient(circle at 97% 12%, var(--dot-5) 0 5px, transparent 6px),
    radial-gradient(circle at 80% 4%, var(--dot-4) 0 4px, transparent 5px),
    radial-gradient(circle at 1.5% 52%, var(--dot-3) 0 4px, transparent 5px);
  opacity: 0.6;
}
.hero-inner {
  position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.hero-brand { font-family: var(--serif); font-weight: 600; color: var(--sage-700); margin-bottom: 1rem; letter-spacing: 0.06em; }
.hero-brand .en { font-family: var(--latin); font-weight: 500; letter-spacing: 0.08em; margin-left: 0.5em; }
.hero h1 { margin-bottom: 0.45em; }
.hero h1 .line { display: block; }
.hero .lead { margin-bottom: 1.75rem; }
.hero-address { display: flex; gap: 0.5rem; align-items: flex-start; margin-top: 1.75rem; color: var(--ink-soft); font-size: 0.98rem; }
.hero-address .icon { margin-top: 0.35em; color: var(--sage-700); }
.hero-photo { position: relative; isolation: isolate; justify-self: center; width: min(100%, 26rem); }
.hero-photo picture { border-radius: var(--arch); overflow: hidden; background: var(--white); box-shadow: 0 30px 60px -40px rgba(46, 34, 54, 0.55); }
.hero-photo::after {
  content: ""; position: absolute; inset: -0.9rem -0.9rem 2.5rem; z-index: -1;
  border: 1.5px solid var(--lavender); border-radius: var(--arch);
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-photo { width: min(62%, 17rem); margin-top: 0.5rem; }
}

/* ---------- journey (a real sequence) ---------- */
.journey, .band-white { background: var(--white); border-block: 1px solid var(--line); }
.journey-list { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: step; }
.journey-step { position: relative; padding: 0 1.25rem 0 0; }
.journey-step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  font-family: var(--latin); font-weight: 500; color: var(--white); margin-bottom: 1rem;
  background: var(--step-color, var(--plum-800)); position: relative; z-index: 1;
}
.journey-step:not(:last-child)::after {
  content: ""; position: absolute; top: 1.25rem; left: 2.5rem; right: 0; height: 2px;
  background: repeating-linear-gradient(90deg, var(--sage-300) 0 6px, transparent 6px 12px);
}
.journey-step:nth-child(1) { --step-color: var(--dot-1); }
.journey-step:nth-child(2) { --step-color: #d99a0b; }
.journey-step:nth-child(3) { --step-color: var(--dot-3); }
.journey-step:nth-child(4) { --step-color: var(--dot-4); }
.journey-step h3 { margin-bottom: 0.3em; }
.journey-step h3 a { color: inherit; text-decoration: none; }
.journey-step h3 a:hover { color: var(--plum-600); text-decoration: underline; }
.journey-step p { color: var(--ink-soft); font-size: 0.98rem; margin: 0; }
@media (max-width: 760px) {
  .journey-list { grid-template-columns: 1fr; gap: 1.75rem; }
  .journey-step { display: grid; grid-template-columns: 2.5rem 1fr; column-gap: 1rem; padding: 0; }
  .journey-step::before { grid-row: span 2; margin: 0; }
  .journey-step:not(:last-child)::after {
    top: 2.5rem; bottom: -1.75rem; left: 1.25rem; right: auto; width: 2px; height: auto;
    background: repeating-linear-gradient(180deg, var(--sage-300) 0 6px, transparent 6px 12px);
  }
}

/* ---------- services: one hairline grid, readable at a glance ---------- */
.service-list {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 1.25rem; overflow: hidden;
}
.service-row { background: var(--white); padding: 1.5rem 1.4rem 1.6rem; scroll-margin-top: 6rem; }
.service-row:target { background: var(--lavender-100); }
.service-row h3 { font-size: 1.2rem; margin-bottom: 0.35em; }
.service-row p { color: var(--ink-soft); margin: 0 0 0.9rem; font-size: 0.92rem; line-height: 1.65; }
.service-items { list-style: none; font-size: 0.97rem; line-height: 1.55; }
.service-items li { padding: 0.18rem 0 0.18rem 1rem; position: relative; }
.service-items li::before {
  content: ""; position: absolute; left: 0; top: 0.8em; width: 0.4rem; height: 0.4rem;
  border-radius: 50%; background: var(--sage-300);
}
@media (max-width: 1000px) { .service-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .service-list { grid-template-columns: 1fr; }
  .service-row { padding: 1.2rem 1.15rem 1.3rem; }
  .service-row p { margin-bottom: 0.5rem; }
  /* On phones the items run on as one line of text, separated by 、 */
  .service-items li { display: inline; padding: 0; }
  .service-items li::before { content: none; }
  .service-items li:not(:last-child)::after { content: "、"; }
}

/* ---------- doctors ---------- */
.doctors { background: var(--sage-50); }
.doctor-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
.doctor-card { display: flex; flex-direction: column; }
.doctor-photo { border-radius: var(--arch); overflow: hidden; background: var(--lavender-100); margin-bottom: 1.25rem; }
.doctor-photo img { width: 100%; aspect-ratio: 37 / 40; object-fit: cover; }
.doctor-card h3 { font-size: 1.5rem; margin-bottom: 0.15em; }
.doctor-card h3 a { color: inherit; text-decoration: none; }
.doctor-card h3 a:hover { text-decoration: underline; }
.doctor-role { color: var(--sage-700); font-weight: 600; margin: 0 0 0.4rem; }
.doctor-highlight { color: var(--ink-soft); font-size: 0.98rem; margin-bottom: 1.25rem; }
.doctor-card .btn-row { margin-top: auto; }
@media (max-width: 900px) { .doctor-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .doctor-grid { grid-template-columns: 1fr; max-width: 24rem; } }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.hazel {
  position: relative; background: var(--white); border: 1px solid var(--line);
  border-radius: 1.5rem; padding: clamp(1.75rem, 4vw, 2.5rem); overflow: hidden;
}
.hazel-glyph {
  display: block; margin: -0.25rem 0 0.75rem;
  font-family: var(--serif); font-weight: 700; font-size: clamp(4.5rem, 9vw, 6.5rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--lavender); user-select: none;
}
@supports not (-webkit-text-stroke: 1px black) { .hazel-glyph { color: var(--lavender); } }
.hazel p { margin-bottom: 0; }
.clinic-photos { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.clinic-photos figure { margin: 0; }
.clinic-photos img { border-radius: 1rem; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.clinic-photos figcaption { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.5rem; }
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .clinic-photos { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- videos ---------- */
.video-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem 1.5rem; }
.video-card h3 { font-size: 1.1rem; margin: 0.85rem 0 0; line-height: 1.5; }
.yt {
  position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 1rem; overflow: hidden;
  background: var(--plum-900); color: var(--white);
}
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: 0.92; transition: opacity 0.2s; }
.yt:hover img { opacity: 1; }
.yt-play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%;
  background: rgba(46, 34, 54, 0.82); color: var(--white);
}
.yt-play .icon { width: 1.6rem; height: 1.6rem; margin-left: 0.2rem; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-group + .video-group { margin-top: clamp(3rem, 6vw, 4.5rem); }
@media (max-width: 900px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .video-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq-list { max-width: 48rem; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  cursor: pointer; list-style: none; padding: 1.25rem 2.5rem 1.25rem 0; position: relative;
  font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--plum-900);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; position: absolute; right: 0.5rem; top: 50%; width: 0.6rem; height: 0.6rem;
  border-right: 2px solid var(--plum-600); border-bottom: 2px solid var(--plum-600);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.2s;
}
.faq-list details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-list details p { padding-bottom: 1.25rem; margin: 0; color: var(--ink-soft); }
@media (prefers-reduced-motion: reduce) { .faq-list summary::after { transition: none; } }

/* ---------- visit / contact band ---------- */
.visit { background: var(--sage-700); color: var(--white); }
.visit h2, .visit h3 { color: var(--white); }
.visit a:not(.btn) { color: var(--white); }
.visit-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.visit dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.6rem 1.5rem; }
.visit dt { color: var(--sage-300); }
.visit dd { margin: 0; }
.visit .lead { color: var(--sage-100); }
@media (max-width: 860px) { .visit-grid { grid-template-columns: 1fr; } }

/* ---------- page header (inner pages) ---------- */
.page-head { position: relative; overflow: hidden; background: var(--sage-50); padding-block: clamp(2.5rem, 6vw, 4rem); }
.page-head .wrap { position: relative; }
.breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 1rem; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.4rem; color: var(--sage-300); }
.breadcrumb a { color: var(--ink-soft); }
.page-head h1 { margin-bottom: 0.3em; }
.page-head .lead { margin: 0; }

/* ---------- doctor profile ---------- */
.profile { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.profile-photo { border-radius: var(--arch); overflow: hidden; background: var(--lavender-100); max-width: 24rem; }
.profile-photo img { width: 100%; aspect-ratio: 37 / 40; object-fit: cover; }
.credentials { list-style: none; border-top: 1px solid var(--line); margin-bottom: 2.5rem; }
.credentials li { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.contact-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 1.25rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
}
.contact-card h2, .contact-card h3 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.contact-lines { list-style: none; display: grid; gap: 0.85rem; margin-bottom: 1.25rem; }
.contact-lines li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.5rem 1rem; }
.contact-lines .label { color: var(--ink-soft); }
.contact-lines a { font-weight: 600; }
.other-doctors { list-style: none; display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (max-width: 820px) {
  .profile { grid-template-columns: 1fr; }
  .profile-photo { max-width: 18rem; }
}
@media (max-width: 480px) { .contact-lines li { grid-template-columns: 1fr; gap: 0; } }

/* ---------- contact page ---------- */
.booking-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.booking-grid .contact-card { height: 100%; display: flex; flex-direction: column; }
.booking-grid .btn-row { margin-top: auto; }
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 4.5rem); align-items: start; }
.map-frame { border: 0; width: 100%; aspect-ratio: 4 / 3; border-radius: 1.25rem; background: var(--sage-100); }
@media (max-width: 900px) {
  .booking-grid { grid-template-columns: 1fr; max-width: 32rem; }
  .contact-layout { grid-template-columns: 1fr; }
}

.form { display: grid; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.field .hint { font-weight: 400; color: var(--ink-soft); font-size: 0.9rem; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 0.75rem 0.9rem; border: 1px solid #b9c6bb; border-radius: 0.75rem; background: var(--white);
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--lavender); outline-offset: 0; border-color: var(--plum-600); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { border-radius: 0.75rem; padding: 0.9rem 1.1rem; margin-bottom: 1.25rem; }
.notice-ok { background: #e4f1e6; color: #1f4a2c; border: 1px solid #b6d6bd; }
.notice-error { background: #fbe9ee; color: #7a1f3d; border: 1px solid #efc0cf; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* ---------- 404 ---------- */
.not-found { min-height: 50vh; display: grid; align-content: center; }

/* ---------- footer ---------- */
.site-footer { background: var(--plum-900); color: #e6dfee; padding-top: clamp(3rem, 6vw, 4.5rem); }
.site-footer a { color: #ffffff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1.3fr 0.8fr 0.8fr; gap: 2rem; padding-bottom: 2.5rem; }
.footer-h { font-family: var(--sans); font-size: 0.95rem; font-weight: 600; color: var(--lavender); margin-bottom: 0.9rem; letter-spacing: 0.04em; }
.site-footer ul { list-style: none; display: grid; gap: 0.45rem; }
.site-footer address { font-style: normal; display: grid; gap: 0.45rem; }
.footer-brand .brand { margin-bottom: 1rem; }
.footer-brand .brand-zh { color: var(--white); }
.footer-brand .brand-en { color: var(--lavender); }
.footer-brand p { color: #cfc6da; font-size: 0.95rem; }
.footer-bottom {
  border-top: 1px solid rgba(185, 174, 211, 0.25); padding-block: 1.25rem 1.5rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem;
  font-size: 0.88rem; color: #bdb3ca;
}
.footer-bottom p { margin: 0; max-width: none; }
.footer-dots { height: 4px; display: grid; grid-template-columns: repeat(5, 1fr); }
.footer-dots span:nth-child(1) { background: var(--dot-1); }
.footer-dots span:nth-child(2) { background: var(--dot-2); }
.footer-dots span:nth-child(3) { background: var(--dot-3); }
.footer-dots span:nth-child(4) { background: var(--dot-4); }
.footer-dots span:nth-child(5) { background: var(--dot-5); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- mobile action bar ---------- */
.action-bar { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: 4.5rem; }
  .action-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97); border-top: 1px solid var(--line);
  }
  .action-bar .btn { width: 100%; }
}

@media print {
  .site-header, .action-bar, .site-footer, .yt { display: none !important; }
}
