:root {
  --bg: #f8f6f0;
  --bg-secondary: #ede9de;
  --green: #718365;
  --forest: #3f5143;
  --terracotta: #cb8c68;
  --sand: #d9d0bc;
  --text: #42463f;
  --text-soft: #5c6158;
  --card-radius: 18px;
  --photo-radius: 50%;
  --line: rgba(63, 81, 67, 0.14);
  --shadow: 0 12px 40px rgba(63, 81, 67, 0.06);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  background: var(--bg);
  font-family: "Noto Sans TC", "PingFang TC", "Hiragino Sans CNS", sans-serif;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

.is-hidden {
  display: none !important;
}

.page {
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.page--booking {
  justify-content: center;
  padding: 16px 16px 24px;
}

.botanical {
  position: absolute;
  pointer-events: none;
  opacity: 0.22;
}

.botanical--tl {
  top: 20px;
  left: 16px;
  width: min(22vw, 108px);
}

.botanical--br {
  right: 18px;
  bottom: 20px;
  width: min(22vw, 108px);
}

.card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: 28px 28px 22px;
  border: 1px solid var(--sand);
  border-radius: var(--card-radius);
  background: color-mix(in srgb, var(--bg) 88%, white);
  box-shadow: var(--shadow);
}

.card__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.photo {
  width: 118px;
  height: 118px;
  margin-bottom: 14px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--sand);
  background: var(--bg-secondary);
}

.photo img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.photo img.is-visible {
  display: block;
}

.photo__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--forest);
}

.photo__placeholder svg {
  width: 56px;
  height: 56px;
}

.name-zh {
  margin: 0;
  color: var(--forest);
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.35;
}

.name-en {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.15rem;
  font-style: italic;
  letter-spacing: 0.03em;
}

.title {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0 8px;
  margin: 8px 0 0;
  color: var(--forest);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
}

.reg-no {
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.title__en {
  flex-basis: 100%;
  display: block;
  margin-top: 2px;
  color: var(--text-soft);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.95rem;
  font-style: italic;
  letter-spacing: 0.04em;
}

.rule {
  width: 48px;
  height: 1px;
  margin: 14px auto;
  background: var(--sand);
  border: 0;
}

.tagline {
  margin: 0;
  color: var(--terracotta);
  font-family: "Noto Serif TC", serif;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-align: center;
}

.tagline span {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
}

.section {
  margin-top: 14px;
}

.section__label {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
}

.education {
  margin: 0;
  padding: 0;
  list-style: none;
}

.education li {
  position: relative;
  padding-left: 14px;
  color: var(--text);
  font-size: 0.92rem;
}

.education li + li {
  margin-top: 4px;
}

.education li::before {
  content: "";
  position: absolute;
  top: 0.85em;
  left: 0;
  width: 8px;
  height: 1px;
  background: var(--green);
}

.intro {
  margin: 0;
  font-size: 0.94rem;
  color: var(--text);
}

.intro p {
  margin: 0;
}

.intro p + p {
  margin-top: 8px;
}

.links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.link-btn {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--forest);
  background: var(--bg);
  border: 1px solid var(--sand);
  border-radius: 12px;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.link-btn svg {
  width: 22px;
  height: 22px;
}

.link-btn:hover,
.link-btn:focus-visible {
  color: var(--bg);
  background: var(--forest);
  border-color: var(--forest);
  outline: none;
}

.link-btn.is-disabled {
  color: var(--sand);
  cursor: not-allowed;
  pointer-events: none;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 14px;
  color: var(--forest);
  background: var(--bg);
  border: 1px solid var(--sand);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.text-btn:hover,
.text-btn:focus-visible {
  color: var(--bg);
  background: var(--forest);
  border-color: var(--forest);
  outline: none;
}

.card--booking {
  width: min(100%, 520px);
  border-radius: 24px;
  padding: 18px 20px 16px;
}

.card--booking .section {
  margin-top: 12px;
}

.card--booking .rule {
  margin: 10px auto;
}

.name-zh--sm {
  font-size: 1.3rem;
  letter-spacing: 0.16em;
}

.card--booking .title {
  margin-top: 2px;
  font-size: 0.88rem;
}

.booking-heading {
  margin: 0 0 4px;
  color: var(--forest);
  font-family: "Noto Serif TC", serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-align: center;
}

.card--booking .tagline {
  font-size: 0.95rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--green);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-decoration: none;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--forest);
  outline: none;
}

.hours {
  display: grid;
  grid-template-columns: max-content 1fr 1fr;
  column-gap: 12px;
  align-items: baseline;
}

.hours-row,
.hours-row__slots {
  display: contents;
}

.hours-row__days,
.hours-row__slots p {
  margin: 0;
  padding: 5px 0;
  border-bottom: 1px solid var(--sand);
  font-size: 0.84rem;
}

.hours-row__days {
  color: var(--forest);
  letter-spacing: 0.02em;
}

.hours-row:last-child .hours-row__days,
.hours-row:last-child .hours-row__slots p {
  border-bottom: 0;
  padding-bottom: 0;
}

.clinics {
  display: grid;
  gap: 0;
}

.clinic {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  row-gap: 1px;
  padding: 8px 0;
  border-bottom: 1px solid var(--sand);
}

.clinic:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.clinic h3 {
  margin: 0;
  color: var(--forest);
  font-family: "Noto Serif TC", serif;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.clinic p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
}

.clinic p:first-of-type {
  justify-self: end;
}

.clinic p:last-of-type {
  grid-column: 1 / -1;
}

.clinic a {
  color: var(--forest);
  text-decoration: none;
  border-bottom: 1px solid var(--sand);
}

.clinic a:hover,
.clinic a:focus-visible {
  border-bottom-color: var(--forest);
  outline: none;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.copy-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  color: var(--forest);
  background: transparent;
  border: 1px solid var(--sand);
  box-sizing: border-box;
}

.copy-btn__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.copy-btn:hover,
.copy-btn:focus-visible {
  border-color: var(--forest);
  outline: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 10;
  padding: 10px 16px;
  color: var(--bg);
  background: var(--forest);
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 480px) {
  body {
    line-height: 1.55;
  }

  .page {
    padding: 10px 12px;
    justify-content: center;
  }

  .botanical--tl,
  .botanical--br {
    width: 72px;
    opacity: 0.16;
  }

  .card {
    padding: 16px 16px 14px;
  }

  .photo {
    width: 88px;
    height: 88px;
    margin-bottom: 10px;
    border-radius: 50%;
  }

  .photo__placeholder svg {
    width: 40px;
    height: 40px;
  }

  .name-zh {
    font-size: 1.6rem;
    letter-spacing: 0.14em;
    line-height: 1.25;
  }

  .name-en {
    font-size: 1.05rem;
  }

  .title {
    margin-top: 6px;
    font-size: 0.88rem;
  }

  .title__en {
    font-size: 0.88rem;
  }

  .rule {
    margin: 10px auto;
  }

  .tagline {
    font-size: 0.98rem;
  }

  .section {
    margin-top: 10px;
  }

  .section__label {
    margin-bottom: 4px;
  }

  .education li,
  .intro {
    font-size: 0.86rem;
  }

  .links {
    margin-top: 12px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .text-btn {
    height: 42px;
    padding: 0 12px;
    font-size: 0.8rem;
    border-radius: 10px;
  }

  .page--booking {
    padding: 8px 10px 12px;
    justify-content: center;
  }

  .card--booking {
    padding: 12px 14px 12px;
    border-radius: 20px;
  }

  .card--booking .section {
    margin-top: 8px;
  }

  .card--booking .rule {
    margin: 8px auto;
  }

  .card--booking .section__label {
    margin-bottom: 2px;
    font-size: 0.68rem;
  }

  .name-zh--sm {
    font-size: 1.15rem;
  }

  .booking-heading {
    font-size: 1.05rem;
    letter-spacing: 0.12em;
  }

  .card--booking .tagline {
    font-size: 0.88rem;
  }

  .hours {
    column-gap: 8px;
  }

  .hours-row__days,
  .hours-row__slots p {
    padding: 4px 0;
    font-size: 0.72rem;
    line-height: 1.4;
    letter-spacing: 0;
  }

  .card--booking .education li {
    font-size: 0.78rem;
  }

  .clinic {
    padding: 6px 0;
  }

  .clinic h3 {
    font-size: 0.84rem;
  }

  .clinic p {
    font-size: 0.76rem;
    line-height: 1.4;
  }

  .link-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }

  .link-btn svg {
    width: 20px;
    height: 20px;
  }

  .actions {
    margin-top: 10px;
  }

  .copy-btn {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .link-btn,
  .text-btn,
  .copy-btn,
  .toast {
    transition: none;
  }
}
