:root {
  --ink: #17312d;
  --ink-soft: #536662;
  --ink-muted: #7e8d89;
  --green-950: #102e2a;
  --green-900: #153d37;
  --green-800: #174c44;
  --green-700: #20675b;
  --green-600: #2a7b6c;
  --green-100: #deeee8;
  --green-50: #eff7f3;
  --sage: #acc7b9;
  --cream: #f7f3e9;
  --cream-deep: #eee6d6;
  --paper: #fffdfa;
  --white: #ffffff;
  --orange: #d87949;
  --orange-soft: #fbebdf;
  --red: #b54b45;
  --red-soft: #fae9e7;
  --border: #e4e9e4;
  --shadow-sm: 0 8px 24px rgba(23, 49, 45, 0.06);
  --shadow-md: 0 18px 50px rgba(23, 49, 45, 0.1);
  --shadow-lg: 0 32px 80px rgba(16, 46, 42, 0.18);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hidden {
  display: none !important;
}

.patient-page {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 87% 7%, rgba(203, 222, 208, 0.5), transparent 26rem),
    linear-gradient(180deg, #f8f5ec 0%, #fbfaf6 32%, #f7f8f4 100%);
}

.ambient {
  position: absolute;
  z-index: 0;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(1px);
}

.ambient-one {
  width: 420px;
  height: 420px;
  top: 80px;
  right: -260px;
  border: 1px solid rgba(42, 123, 108, 0.13);
}

.ambient-two {
  width: 120px;
  height: 120px;
  top: 290px;
  left: -78px;
  background: rgba(220, 231, 218, 0.5);
}

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--green-700);
  border: 1px solid rgba(23, 76, 68, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
}

.brand-mark svg {
  width: 30px;
  height: 30px;
  stroke-width: 1.9;
}

.brand > span:last-child {
  display: flex;
  flex-direction: column;
}

.brand strong {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand small {
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.brand-light {
  color: #f4f2e9;
}

.brand-light .brand-mark {
  color: #f4f2e9;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
}

.brand-light small {
  color: rgba(255, 255, 255, 0.52);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 26px;
}

.header-my-booking svg {
  width: 18px;
  height: 18px;
}

.header-admin-link {
  color: var(--ink-muted);
  font-size: 13px;
  transition: color 0.2s ease;
}

.header-admin-link:hover {
  color: var(--green-700);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 9px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.button svg {
  width: 18px;
  height: 18px;
}

.button-primary {
  color: white;
  background: var(--green-800);
  box-shadow: 0 9px 20px rgba(23, 76, 68, 0.18);
}

.button-primary:hover:not(:disabled) {
  background: var(--green-700);
}

.button-secondary {
  color: var(--ink);
  border: 1px solid var(--border);
  background: white;
}

.button-secondary:hover:not(:disabled) {
  border-color: #cbd8d1;
  background: var(--green-50);
}

.button-quiet {
  min-height: 40px;
  padding: 0 6px;
  color: var(--ink-soft);
  font-size: 13px;
}

.button-quiet:hover {
  color: var(--green-700);
  transform: none;
}

.button-danger {
  color: white;
  background: var(--red);
}

.button-danger-quiet {
  color: var(--red);
  border: 1px solid #efd6d2;
  background: #fff8f7;
}

.button-wide {
  width: 100%;
  min-height: 50px;
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.72fr);
  gap: 70px;
  align-items: center;
  width: min(1180px, calc(100% - 48px));
  margin: 44px auto 62px;
}

.eyebrow,
.section-kicker,
.modal-step {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--green-700);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 22px;
  height: 1px;
  background: var(--green-600);
}

.hero h1 {
  max-width: 710px;
  margin: 22px 0;
  color: var(--green-950);
  font-family: var(--font-serif);
  font-size: clamp(42px, 5.7vw, 72px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.16;
}

.hero h1 em {
  position: relative;
  font-style: normal;
  color: var(--green-700);
}

.hero h1 em::after {
  position: absolute;
  right: -8px;
  bottom: 1px;
  left: 0;
  height: 7px;
  border-radius: 99px;
  background: rgba(209, 163, 99, 0.24);
  content: "";
  transform: rotate(-1deg);
}

.hero-lead {
  max-width: 580px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.9;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 34px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 11px;
}

.meta-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--green-700);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 6px 18px rgba(23, 49, 45, 0.05);
}

.meta-icon svg {
  width: 19px;
  height: 19px;
}

.meta-item > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-item small {
  color: var(--ink-muted);
  font-size: 10px;
}

.meta-item strong {
  font-size: 13px;
  font-weight: 650;
}

.availability-card {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  padding: 30px;
  color: white;
  border-radius: 30px 30px 30px 8px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.07), transparent 45%),
    var(--green-900);
  box-shadow: 0 30px 70px rgba(18, 55, 49, 0.24);
}

.availability-card::before {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  content: "";
}

.availability-top,
.availability-foot {
  position: relative;
  z-index: 1;
}

.availability-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  color: #f2f9f5;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
}

.live-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #88c7aa;
  box-shadow: 0 0 0 4px rgba(136, 199, 170, 0.12);
}

.availability-count {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 50px 0 46px;
}

.availability-count strong {
  font-family: var(--font-serif);
  font-size: 78px;
  font-weight: 500;
  letter-spacing: -0.08em;
  line-height: 1;
}

.availability-count span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
}

.availability-foot p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.64);
  font-size: 11px;
  line-height: 1.6;
}

.progress-track {
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #c4d6a2;
  transition: width 0.7s ease;
}

.orbit {
  position: absolute;
  right: -22px;
  bottom: -58px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.orbit::after {
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: inherit;
  content: "";
}

.booking-section {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 58px 0 68px;
  border-top: 1px solid rgba(23, 76, 68, 0.1);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.section-heading h2,
.note-intro h2 {
  margin: 10px 0 8px;
  color: var(--green-950);
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
}

.schedule-legend {
  display: flex;
  gap: 20px;
  color: var(--ink-soft);
  font-size: 11px;
}

.schedule-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend-dot.available {
  background: var(--green-600);
}

.legend-dot.booked {
  background: #cad2ce;
}

.legend-dot.closed {
  background: #d6a36c;
}

.week-switcher {
  display: flex;
  gap: 8px;
  margin: 34px 0 20px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.week-switcher::-webkit-scrollbar {
  display: none;
}

.week-tab {
  flex: 0 0 auto;
  min-width: 126px;
  padding: 11px 18px;
  color: var(--ink-soft);
  border: 1px solid var(--border);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.66);
  cursor: pointer;
  font-size: 12px;
  transition: 0.2s ease;
}

.week-tab small {
  display: block;
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 9px;
}

.week-tab.active {
  color: white;
  border-color: var(--green-800);
  background: var(--green-800);
  box-shadow: 0 8px 18px rgba(23, 76, 68, 0.15);
}

.week-tab.active small {
  color: rgba(255, 255, 255, 0.6);
}

.week-loading {
  padding: 10px 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.schedule-shell {
  position: relative;
  min-height: 310px;
}

.schedule-loading {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: var(--radius-lg);
  background: rgba(248, 249, 245, 0.92);
}

.schedule-loading p,
.login-loading p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.spinner {
  display: inline-block;
  width: 25px;
  height: 25px;
  border: 2px solid rgba(23, 76, 68, 0.16);
  border-top-color: var(--green-700);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.schedule-week {
  display: none;
}

.schedule-week.active {
  display: block;
  animation: fadeUp 0.35s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.day-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.day-card {
  display: flex;
  min-height: 310px;
  flex-direction: column;
  padding: 16px;
  border: 1px solid rgba(221, 229, 222, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 28px rgba(23, 49, 45, 0.035);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

.day-card:hover {
  border-color: rgba(42, 123, 108, 0.24);
  transform: translateY(-2px);
}

.day-card.today {
  border-color: rgba(42, 123, 108, 0.34);
  background: linear-gradient(180deg, #f7fbf8, rgba(255, 255, 255, 0.86));
}

.day-card.closed {
  background: rgba(248, 246, 240, 0.8);
}

.day-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf0ec;
}

.day-date {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.day-date strong {
  color: var(--ink);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.day-date strong small {
  margin-left: 2px;
  font-size: 12px;
  font-weight: 500;
}

.day-date span {
  color: var(--ink-muted);
  font-size: 11px;
}

.today-badge {
  padding: 4px 7px;
  color: var(--green-700);
  border-radius: 99px;
  background: var(--green-100);
  font-size: 9px;
  font-weight: 700;
}

.slot-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
}

.slot-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 39px;
  padding: 0 12px;
  color: var(--green-800);
  border: 1px solid #dfeae4;
  border-radius: 10px;
  background: #f5faf7;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: 0.16s ease;
}

.slot-button::after {
  width: 6px;
  height: 6px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.slot-button:hover {
  color: white;
  border-color: var(--green-700);
  background: var(--green-700);
}

.slot-button.unavailable {
  color: #a4afaa;
  border-color: transparent;
  background: #f1f3f1;
  cursor: not-allowed;
  font-weight: 500;
}

.slot-button.unavailable::after {
  display: none;
}

.slot-button.unavailable:hover {
  color: #a4afaa;
  background: #f1f3f1;
}

.closed-message {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #9a7c5d;
  text-align: center;
}

.closed-message svg {
  width: 26px;
  height: 26px;
}

.closed-message strong {
  font-size: 12px;
}

.closed-message span {
  font-size: 10px;
}

.visit-notes {
  display: grid;
  grid-template-columns: 0.75fr 2fr;
  gap: 70px;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 70px;
  padding: 46px 48px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.08), transparent 45%),
    var(--green-950);
}

.note-intro h2 {
  color: #f7f4ea;
}

.note-intro .section-kicker {
  color: #96b8aa;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.note-grid article {
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.note-grid article > span {
  color: #8eaa9f;
  font-family: var(--font-serif);
  font-size: 11px;
}

.note-grid h3 {
  margin: 14px 0 9px;
  color: #f5f3eb;
  font-size: 14px;
}

.note-grid p {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  line-height: 1.75;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 34px;
  color: var(--ink-muted);
  font-size: 10px;
}

.site-footer p {
  margin: 0;
}

.site-footer strong {
  color: var(--ink-soft);
}

.mobile-booking-button {
  display: none;
}

.modal {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  padding: 20px;
  border: 0;
  background: transparent;
}

.modal[open] {
  display: grid;
  place-items: center;
  animation: modalFade 0.2s ease;
}

.modal::backdrop {
  background: rgba(12, 33, 29, 0.64);
  backdrop-filter: blur(5px);
}

@keyframes modalFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-card {
  position: relative;
  width: min(500px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 34px;
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow-lg);
}

.modal-card-compact {
  width: min(430px, 100%);
  text-align: center;
}

.modal-card-wide {
  width: min(760px, 100%);
}

.modal-close {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  color: var(--ink-muted);
  border: 0;
  border-radius: 50%;
  background: #f4f5f1;
  cursor: pointer;
}

.modal-close svg {
  width: 16px;
  height: 16px;
}

.modal-heading {
  margin-bottom: 23px;
  padding-right: 30px;
}

.modal-heading h2,
.modal-card > h2 {
  margin: 8px 0 6px;
  color: var(--green-950);
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.modal-heading p,
.modal-card > p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.7;
}

.selected-slot {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
  padding: 17px 20px;
  border-radius: 14px;
  background: var(--green-50);
}

.selected-date,
.selected-time {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.selected-date strong,
.selected-time strong {
  color: var(--green-900);
  font-size: 15px;
}

.selected-date small,
.selected-time small {
  color: var(--ink-muted);
  font-size: 9px;
}

.slot-divider {
  width: 1px;
  height: 34px;
  background: #d4e2dc;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
}

.field > span {
  display: flex;
  justify-content: space-between;
}

.field b {
  color: var(--orange);
}

.field small {
  color: var(--ink-muted);
  font-weight: 400;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 45px;
  padding: 11px 13px;
  color: var(--ink);
  outline: 0;
  border: 1px solid #dfe5df;
  border-radius: 10px;
  background: white;
  font-size: 13px;
  font-weight: 400;
  transition:
    border 0.18s ease,
    box-shadow 0.18s ease;
}

.field textarea {
  min-height: 84px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(42, 123, 108, 0.09);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #abb5b0;
}

.form-notice {
  margin: 14px 0 !important;
  color: var(--ink-muted) !important;
  font-size: 9px !important;
  line-height: 1.65 !important;
}

.modal-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.modal-action-row .button {
  min-width: 104px;
}

.success-card {
  padding: 42px;
  text-align: center;
}

.success-check {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 20px;
  place-items: center;
  color: var(--green-700);
  border-radius: 50%;
  background: var(--green-100);
}

.success-check svg {
  width: 30px;
  height: 30px;
  stroke-width: 2;
}

.booking-code-box {
  display: grid;
  grid-template-columns: 1fr auto;
  margin: 24px 0 18px;
  padding: 15px;
  text-align: left;
  border: 1px dashed #bfd6cb;
  border-radius: 14px;
  background: #f5faf7;
}

.booking-code-box small {
  grid-column: 1;
  color: var(--ink-muted);
  font-size: 9px;
}

.booking-code-box strong {
  grid-column: 1;
  margin-top: 3px;
  color: var(--green-800);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 19px;
  letter-spacing: 0.05em;
}

.booking-code-box button {
  grid-column: 2;
  grid-row: 1 / span 2;
  padding: 0 8px;
  color: var(--green-700);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.success-note {
  font-size: 10px !important;
}

.my-appointment {
  margin-top: 12px;
}

.lookup-records-loading,
.lookup-empty {
  display: flex;
  min-height: 190px;
  margin-top: 18px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.lookup-records-loading p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 11px;
}

.lookup-empty {
  color: var(--ink-muted);
  border: 1px dashed #dce3dc;
  border-radius: 14px;
  background: #fafbf8;
}

.lookup-empty svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #91a29b;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.lookup-empty strong {
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 17px;
}

.lookup-empty span {
  font-size: 10px;
}

.my-appointment-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.my-appointment-heading strong {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 16px;
}

.my-appointment-heading span {
  color: var(--ink-muted);
  font-size: 10px;
}

.my-appointment-list {
  display: grid;
  gap: 8px;
  max-height: min(54vh, 430px);
  overflow-y: auto;
  padding-right: 2px;
}

.my-appointment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 15px;
  border: 1px solid #e1e7e0;
  border-radius: 14px;
  background: #fff;
}

.my-record-main {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.my-record-date,
.my-record-time,
.my-record-therapist {
  display: block;
}

.my-record-date {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.3;
}

.my-record-time {
  color: var(--green-800);
  font-size: 17px;
  font-weight: 750;
  letter-spacing: 0.01em;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.my-record-therapist {
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.4;
}

.my-record-therapist::before {
  content: "治疗师 · ";
  font-weight: 400;
}

.my-record-action {
  justify-self: end;
}

.my-record-action .button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 11px;
  white-space: nowrap;
}

.my-appointment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.cancel-appointment-summary {
  padding: 9px 11px;
  color: var(--ink-soft) !important;
  border-radius: 9px;
  background: #f5f7f3;
  font-size: 10px !important;
  line-height: 1.55;
}

.danger-icon {
  display: grid;
  width: 50px;
  height: 50px;
  margin: 0 auto 16px;
  place-items: center;
  color: var(--red);
  border-radius: 50%;
  background: var(--red-soft);
}

.danger-icon svg {
  width: 24px;
  height: 24px;
}

.modal-card-compact > p {
  margin: 8px 0 20px;
}

.modal-card-compact .field {
  text-align: left;
}

.toast-region {
  position: fixed;
  z-index: 1000;
  right: 24px;
  bottom: 24px;
  display: flex;
  width: min(360px, calc(100% - 48px));
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  color: white;
  border-radius: 12px;
  background: var(--green-950);
  box-shadow: var(--shadow-md);
  font-size: 12px;
  line-height: 1.5;
  animation: toastIn 0.25s ease;
}

.toast.error {
  background: #863e39;
}

.toast.success::before {
  display: inline-grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  content: "✓";
  font-size: 10px;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .availability-card {
    min-height: 220px;
  }

  .availability-count {
    margin: 34px 0 30px;
  }

  .availability-count strong {
    font-size: 64px;
  }

  .day-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .visit-notes {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 720px) {
  .site-header {
    width: calc(100% - 32px);
    padding-top: 20px;
  }

  .header-actions {
    gap: 10px;
  }

  .header-my-booking,
  .header-admin-link {
    display: none;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .hero {
    width: calc(100% - 32px);
    margin-top: 24px;
    margin-bottom: 46px;
  }

  .hero h1 {
    margin: 17px 0;
    font-size: clamp(38px, 11vw, 52px);
    letter-spacing: -0.06em;
  }

  .hero-lead {
    font-size: 14px;
    line-height: 1.8;
  }

  .hero-meta {
    gap: 17px;
  }

  .meta-item {
    min-width: 145px;
  }

  .availability-card {
    min-height: 210px;
    padding: 24px;
    border-radius: 24px 24px 24px 8px;
  }

  .availability-count {
    margin: 30px 0 28px;
  }

  .booking-section {
    width: calc(100% - 32px);
    padding-top: 44px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 17px;
  }

  .section-heading h2,
  .note-intro h2 {
    font-size: 29px;
  }

  .schedule-legend {
    gap: 16px;
  }

  .week-switcher {
    margin-top: 24px;
  }

  .week-tab {
    min-width: 112px;
    padding: 10px 14px;
  }

  .day-grid {
    display: flex;
    gap: 10px;
    margin-right: -16px;
    padding-right: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .day-grid::-webkit-scrollbar {
    display: none;
  }

  .day-card {
    width: min(74vw, 270px);
    min-height: 310px;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .visit-notes {
    width: calc(100% - 32px);
    margin-bottom: 40px;
    padding: 32px 25px;
  }

  .note-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .note-grid article {
    display: grid;
    grid-template-columns: 28px 90px 1fr;
    gap: 8px;
    align-items: start;
    padding: 0 0 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 0;
  }

  .note-grid h3 {
    margin: 0;
  }

  .site-footer {
    display: block;
    width: calc(100% - 32px);
    padding-bottom: 90px;
    line-height: 1.7;
  }

  .site-footer p + p {
    margin-top: 4px;
  }

  .mobile-booking-button {
    position: fixed;
    z-index: 50;
    right: 16px;
    bottom: 16px;
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    gap: 8px;
    padding: 0 18px;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 99px;
    background: var(--green-800);
    box-shadow: 0 12px 30px rgba(23, 76, 68, 0.28);
    font-size: 12px;
    font-weight: 600;
  }

  .mobile-booking-button svg {
    width: 16px;
    height: 16px;
  }

  .modal {
    padding: 0;
  }

  .modal[open] {
    align-items: end;
  }

  .modal-card {
    width: 100%;
    max-height: 92vh;
    padding: 28px 22px 24px;
    border-radius: 24px 24px 0 0;
  }

  .modal-card-wide {
    width: 100%;
  }

  .modal-heading h2,
  .modal-card > h2 {
    font-size: 24px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .toast-region {
    right: 16px;
    bottom: 76px;
    width: calc(100% - 32px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.patient-page {
  background: #f6f8f4;
}

.patient-page .site-header {
  padding-top: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(23, 76, 68, 0.1);
}

.patient-page .header-my-booking {
  display: inline-flex;
  color: var(--green-800);
}

.patient-page .header-actions {
  gap: 10px;
}

.patient-refresh-button {
  color: var(--ink-soft);
  white-space: nowrap;
}

.patient-refresh-button svg {
  width: 15px;
  height: 15px;
}

.patient-refresh-button.is-refreshing svg {
  animation: patient-refresh-spin 0.8s linear infinite;
}

@keyframes patient-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

.patient-page .brand strong {
  font-size: 17px;
  letter-spacing: 0.02em;
}

.simple-patient-main {
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 90px);
  margin: 0 auto;
  padding-bottom: 56px;
}

.simple-booking-section {
  width: 100%;
  padding: 44px 0 64px;
  border-top: 0;
}

.simple-booking-section .section-heading {
  align-items: center;
}

.simple-booking-section .section-heading h2 {
  margin-bottom: 0;
}

.patient-contact {
  padding: 22px 16px 28px;
  color: var(--ink-soft);
  border-top: 1px solid rgba(23, 76, 68, 0.1);
  background: #f0f4ef;
  font-size: 13px;
  text-align: center;
}

.patient-contact a {
  color: var(--green-700);
  font-weight: 700;
}

@media (max-width: 720px) {
  .patient-page .header-my-booking {
    display: inline-flex;
  }

  .patient-page .site-header {
    gap: 10px;
  }

  .patient-page .brand {
    min-width: 0;
    gap: 8px;
  }

  .patient-page .brand strong {
    max-width: 230px;
    font-size: 14px;
    line-height: 1.25;
  }

  .patient-page .brand small {
    display: none;
  }

  .patient-page .header-my-booking {
    flex: 0 0 auto;
    padding-right: 0;
    padding-left: 0;
    font-size: 12px;
  }

  .simple-patient-main {
    width: calc(100% - 32px);
    min-height: calc(100vh - 78px);
  }

  .simple-booking-section {
    padding: 30px 0 36px;
  }

  .simple-booking-section .section-heading {
    align-items: flex-start;
    gap: 18px;
  }
}

@media (max-width: 480px) {
  .patient-page .brand-mark {
    width: 32px;
    height: 32px;
  }

  .patient-page .brand strong {
    max-width: 175px;
    font-size: 13px;
  }

  .patient-page .header-my-booking {
    font-size: 11px;
  }
}

/* 患者端统一使用手机版布局；电脑打开时保持居中的手机页面宽度。 */
.patient-page {
  background:
    radial-gradient(circle at 20% 5%, rgba(255, 255, 255, 0.75), transparent 24rem),
    #e8ede7;
}

.patient-page .site-header,
.patient-page .simple-patient-main,
.patient-page .patient-contact {
  width: min(480px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.patient-page .site-header {
  padding: 16px 18px 14px;
  background: #fbfaf6;
}

.patient-page .brand {
  gap: 9px;
}

.patient-page .brand strong {
  max-width: 220px;
  font-size: 14px;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.patient-page .brand small {
  display: none;
}

.patient-page .header-my-booking {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 0;
  font-size: 12px;
}

.simple-patient-main {
  min-height: calc(100vh - 78px);
  padding-bottom: 28px;
  background: #f7f8f4;
}

.simple-booking-section {
  padding: 26px 18px 34px;
}

.simple-booking-section .section-heading h2 {
  font-size: 27px;
}

.week-switcher {
  gap: 8px;
  margin: 20px 0 14px;
}

.week-tab {
  min-width: 104px;
  padding: 10px 14px;
}

.day-grid {
  display: flex;
  gap: 10px;
  margin-right: -18px;
  padding-right: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.day-grid::-webkit-scrollbar {
  display: none;
}

.day-card {
  width: min(78vw, 340px);
  min-height: 300px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.patient-contact {
  margin-bottom: 0;
  background: #f0f4ef;
}

@media (min-width: 721px) {
  .patient-page {
    padding: 20px 0;
  }

  .patient-page .site-header {
    border-radius: 24px 24px 0 0;
    box-shadow:
      0 0 0 1px rgba(23, 76, 68, 0.08),
      0 18px 50px rgba(23, 49, 45, 0.08);
  }

  .patient-page .simple-patient-main {
    box-shadow:
      -1px 0 0 rgba(23, 76, 68, 0.08),
      1px 0 0 rgba(23, 76, 68, 0.08);
  }

  .patient-page .patient-contact {
    border-radius: 0 0 24px 24px;
    box-shadow:
      0 0 0 1px rgba(23, 76, 68, 0.08),
      0 24px 54px rgba(23, 49, 45, 0.1);
  }
}

/* 2026 appointment system upgrade */
.therapist-section {
  padding: 30px 18px 30px;
  border-bottom: 1px solid rgba(23, 76, 68, 0.1);
}

.therapist-section .section-heading h2 {
  margin: 8px 0 6px;
  color: var(--green-950);
  font-family: var(--font-serif);
  font-size: 27px;
}

.therapist-section .section-heading p,
.simple-booking-section .section-heading p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.7;
}

.therapist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.therapist-loading,
.therapist-empty,
.schedule-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--ink-muted);
  font-size: 12px;
}

.therapist-loading,
.therapist-empty {
  grid-column: 1 / -1;
  min-height: 92px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.therapist-card {
  position: relative;
  display: flex;
  min-height: 104px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 7px 22px rgba(23, 49, 45, 0.04);
  cursor: pointer;
  text-align: left;
  transition: 0.2s ease;
}

.therapist-card:hover {
  border-color: rgba(42, 123, 108, 0.38);
  transform: translateY(-2px);
}

.therapist-card.active {
  color: white;
  border-color: var(--green-800);
  background:
    radial-gradient(circle at 100% 0, rgba(255, 255, 255, 0.14), transparent 48%),
    var(--green-800);
  box-shadow: 0 14px 30px rgba(23, 76, 68, 0.2);
}

.therapist-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--green-800);
  border-radius: 50%;
  background: var(--green-100);
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
}

.therapist-card.active .therapist-avatar {
  color: white;
  background: rgba(255, 255, 255, 0.16);
}

.therapist-card strong {
  display: block;
  font-size: 14px;
}

.therapist-card small {
  display: block;
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 10px;
}

.therapist-card.active small {
  color: rgba(255, 255, 255, 0.65);
}

.therapist-check {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: white;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 11px;
}

.schedule-placeholder {
  min-height: 210px;
  flex-direction: column;
  margin-top: 18px;
  border: 1px dashed rgba(23, 76, 68, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.5);
}

.schedule-placeholder span {
  color: var(--green-800);
  font-family: var(--font-serif);
  font-size: 18px;
}

.schedule-placeholder small {
  color: var(--ink-muted);
}

.slot-period + .slot-period {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px dashed #e5ebe6;
}

.slot-period-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.slot-period-title span {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
}

.slot-period .slot-list {
  gap: 6px;
}

.slot-period .slot-button {
  min-height: 34px;
  font-size: 11px;
}

.patient-page .day-card {
  min-height: 580px;
}

.patient-profile-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 14px;
  color: var(--green-900);
  border: 1px solid #cfe2d8;
  border-radius: 14px;
  background: var(--green-50);
}

.patient-profile-notice span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.patient-profile-notice strong {
  font-size: 12px;
}

.patient-profile-notice small {
  color: var(--ink-muted);
  font-size: 9px;
}

.patient-profile-notice button {
  flex: 0 0 auto;
  padding: 6px 9px;
  color: var(--green-700);
  border: 1px solid #c8ddd3;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-size: 10px;
}

.selected-slot {
  gap: 12px;
}

.selected-slot .selected-time {
  min-width: 0;
}

.selected-slot .selected-time strong {
  white-space: nowrap;
}

.my-therapist {
  margin-top: -6px !important;
  color: var(--green-700) !important;
  font-size: 11px !important;
}

@media (max-width: 380px) {
  .therapist-grid {
    grid-template-columns: 1fr;
  }

  .selected-slot {
    gap: 8px;
  }

  .selected-slot .slot-divider {
    display: none;
  }
}

/* Compact appointment slots and visit notice */
.slot-period .slot-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.slot-period .slot-button {
  min-width: 0;
  min-height: 34px;
  justify-content: center;
  padding: 0 7px;
  white-space: nowrap;
}

.slot-period .slot-button::after {
  display: none;
}

.slot-button.is-booking {
  color: white;
  border-color: var(--green-700);
  background: var(--green-700);
  cursor: wait;
  animation: slotPulse 0.9s ease-in-out infinite alternate;
}

@keyframes slotPulse {
  to {
    opacity: 0.58;
  }
}

.day-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.makeup-badge {
  padding: 4px 7px;
  color: #8b6647;
  border-radius: 99px;
  background: #f6ead9;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.patient-page .day-card {
  min-height: 420px;
}

.patient-page .visit-notice {
  width: min(480px, 100%);
  margin-right: auto;
  margin-left: auto;
  padding: 26px 20px 30px;
  color: var(--ink-soft);
  border-top: 1px solid rgba(23, 76, 68, 0.1);
  background: #f0f4ef;
}

.visit-notice h2 {
  margin: 7px 0 13px;
  color: var(--green-950);
  font-family: var(--font-serif);
  font-size: 22px;
}

.visit-notice ol {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 22px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.75;
}

.visit-notice li::marker {
  color: var(--green-700);
  font-weight: 700;
}

.visit-notice a {
  color: var(--green-700);
  font-weight: 700;
}

@media (min-width: 721px) {
  .patient-page .visit-notice {
    border-radius: 0 0 24px 24px;
    box-shadow:
      0 0 0 1px rgba(23, 76, 68, 0.08),
      0 24px 54px rgba(23, 49, 45, 0.1);
  }
}
