:root {
  --ink: #17211f;
  --muted: #65706d;
  --green-950: #0d312d;
  --green-900: #173f3a;
  --green-800: #24554e;
  --green-700: #2f6d63;
  --green-100: #e8f0ed;
  --green-50: #f3f7f5;
  --cream: #f7f4ed;
  --gold: #c6a36a;
  --line: #dfe6e3;
  --danger: #a4483f;
  --white: #fff;
  --shadow: 0 24px 70px rgba(20, 48, 43, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--cream);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 4% 2%, rgba(198, 163, 106, 0.12), transparent 24rem),
    linear-gradient(180deg, #fbfaf6 0, var(--cream) 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(47, 109, 99, 0.28);
  outline-offset: 2px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 30px;
}

.brand {
  display: inline-flex;
  gap: 13px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--green-900);
  font-family: Georgia, serif;
  font-size: 18px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  letter-spacing: 0.04em;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.ghost-button {
  padding: 10px 17px;
  border: 1px solid var(--green-900);
  border-radius: 999px;
  color: var(--green-900);
  background: transparent;
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(300px, 0.75fr);
  max-width: 1240px;
  margin: 0 auto 54px;
  padding: 0 30px;
  overflow: hidden;
  border: 1px solid rgba(23, 63, 58, 0.08);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.booking-panel {
  padding: 58px 62px 64px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green-700);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.eyebrow.light {
  color: #b9d2cc;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 560px;
  margin-bottom: 16px;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.hero-copy {
  max-width: 590px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.clinic-hours {
  flex: 0 0 auto;
  padding: 17px 20px;
  border-radius: 14px;
  color: var(--green-900);
  background: var(--green-50);
  text-align: right;
}

.clinic-hours span,
.clinic-hours strong {
  display: block;
}

.clinic-hours span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.clinic-hours strong {
  font-family: Georgia, serif;
  font-size: 20px;
}

.doctor-profile {
  display: grid;
  grid-template-columns: 152px 1fr;
  gap: 27px;
  align-items: stretch;
  margin-top: 30px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(198, 163, 106, 0.12), transparent 15rem),
    linear-gradient(135deg, #fbfcfb, var(--green-50));
}

.doctor-photo-wrap {
  grid-row: 1 / span 2;
  min-height: 192px;
  overflow: hidden;
  border-radius: 14px;
  background: #eef2f0;
  box-shadow: 0 12px 28px rgba(23, 63, 58, 0.12);
}

.doctor-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}

.doctor-profile-content {
  min-width: 0;
  padding: 5px 2px 2px;
}

.doctor-profile-content .eyebrow {
  margin-bottom: 8px;
}

.doctor-heading {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  justify-content: space-between;
}

.doctor-heading h2 {
  margin-bottom: 5px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 29px;
  font-weight: 500;
}

.doctor-credentials {
  margin-bottom: 0;
  color: var(--green-700);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}

.doctor-badge {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(47, 109, 99, 0.22);
  border-radius: 999px;
  color: var(--green-800);
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.doctor-specialties {
  display: grid;
  grid-column: 2;
  gap: 9px;
  margin-top: 16px;
}

.doctor-specialties p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.doctor-specialties strong {
  display: inline-block;
  margin-right: 9px;
  color: var(--ink);
  font-size: 12px;
}

.status-banner {
  margin: 24px 0 -4px;
  padding: 13px 15px;
  border-radius: 10px;
  color: #72423d;
  background: #fff0ed;
  font-size: 14px;
}

.step-section {
  padding-top: 38px;
}

.step-heading {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.step-number {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 50%;
  color: var(--green-700);
  background: var(--green-100);
  font-family: Georgia, serif;
  font-size: 12px;
}

.step-heading h2 {
  margin-bottom: 4px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 24px;
  font-weight: 500;
}

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

.date-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(72px, 1fr));
  gap: 10px;
}

.date-button {
  min-height: 96px;
  padding: 13px 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: #fbfcfb;
  transition: 160ms ease;
}

.date-button:hover {
  border-color: #8aaca4;
  transform: translateY(-1px);
}

.date-button[aria-checked="true"] {
  border-color: var(--green-900);
  color: var(--white);
  background: var(--green-900);
  box-shadow: 0 8px 22px rgba(23, 63, 58, 0.18);
}

.date-button span,
.date-button strong {
  display: block;
}

.date-button span {
  font-size: 11px;
  opacity: 0.78;
}

.date-button strong {
  margin: 6px 0 3px;
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 500;
}

.slot-label {
  margin: 20px 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(78px, 1fr));
  gap: 9px;
}

.slot-button {
  min-height: 58px;
  padding: 9px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--green-900);
  background: var(--white);
  transition: 150ms ease;
}

.slot-button span {
  display: block;
}

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

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

.slot-button[aria-pressed="true"] {
  border-color: var(--green-900);
  color: var(--white);
  background: var(--green-900);
}

.slot-button[aria-pressed="true"] small {
  color: #cfe1dc;
}

.slot-button:disabled {
  cursor: not-allowed;
  color: #98a19f;
  background: #f4f5f4;
  opacity: 0.78;
}

.slot-skeleton {
  height: 210px;
  border-radius: 14px;
  background: linear-gradient(90deg, #f0f3f2 25%, #f8faf9 45%, #f0f3f2 65%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

.primary-action,
.submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 11px;
  color: var(--white);
  background: var(--green-900);
  font-weight: 700;
  transition: 160ms ease;
}

.primary-action {
  justify-content: space-between;
  margin-top: 26px;
  padding: 0 20px;
}

.primary-action:not(:disabled):hover,
.submit-button:not(:disabled):hover {
  background: var(--green-800);
  transform: translateY(-1px);
}

.primary-action:disabled,
.submit-button:disabled {
  cursor: not-allowed;
  color: #8d9794;
  background: #e8ecea;
}

.notice-panel {
  position: relative;
  padding: 58px 40px;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 100% 0, rgba(198, 163, 106, 0.18), transparent 17rem),
    var(--green-900);
}

.notice-panel::after {
  position: absolute;
  right: -40px;
  bottom: -100px;
  content: "诊";
  color: rgba(255, 255, 255, 0.035);
  font-family: Georgia, serif;
  font-size: 260px;
}

.notice-panel h2 {
  margin-bottom: 34px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.25;
}

.notice-list {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
  list-style: none;
}

.notice-list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 13px;
  padding: 19px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.notice-list li > span {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 12px;
}

.notice-list p {
  margin: 0;
  color: #cdded9;
  font-size: 13px;
  line-height: 1.7;
}

.notice-list strong {
  display: block;
  margin-bottom: 2px;
  color: var(--white);
  font-size: 14px;
}

.existing-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  margin-top: 34px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.06);
}

.existing-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: var(--green-900);
  background: #dbe9e5;
  font-family: Georgia, serif;
}

.existing-card h3 {
  margin-bottom: 5px;
  font-size: 16px;
}

.existing-card p {
  margin-bottom: 10px;
  color: #cdded9;
  font-size: 12px;
}

.existing-card button {
  padding: 0;
  border: 0;
  color: var(--white);
  background: transparent;
  font-size: 12px;
}

.urgent-note {
  position: relative;
  z-index: 1;
  margin: 34px 0 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  color: #b9d2cc;
  font-size: 11px;
  line-height: 1.7;
}

footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 30px 44px;
  color: var(--muted);
  font-size: 12px;
}

footer strong {
  color: var(--green-900);
}

footer p {
  display: inline;
  margin-left: 12px;
}

.modal {
  width: min(92vw, 520px);
  max-height: 92vh;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 19px;
  background: transparent;
}

.modal::backdrop {
  background: rgba(8, 25, 23, 0.64);
  backdrop-filter: blur(3px);
}

.modal-card {
  position: relative;
  max-height: 92vh;
  padding: 34px;
  overflow-y: auto;
  border-radius: 19px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.modal-wide {
  width: min(92vw, 620px);
}

.close-button {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: var(--green-50);
  font-size: 20px;
}

.modal h2 {
  margin-bottom: 8px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 30px;
  font-weight: 500;
}

.modal-intro {
  color: var(--muted);
  font-size: 13px;
}

.selected-appointment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0;
  padding: 15px 17px;
  border-radius: 11px;
  color: var(--green-900);
  background: var(--green-50);
}

.selected-appointment span {
  color: var(--muted);
  font-size: 11px;
}

.modal-card > label:not(.consent-option) {
  display: block;
  margin-top: 17px;
}

.modal-card > label > span:first-child,
.modal-card legend {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.modal-card input[type="text"],
.modal-card input[type="tel"],
.admin-login input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fbfcfb;
}

fieldset {
  display: flex;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

fieldset legend {
  width: 100%;
}

.radio-option {
  position: relative;
  flex: 1;
}

.radio-option input {
  position: absolute;
  opacity: 0;
}

.radio-option span {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.radio-option input:checked + span {
  border-color: var(--green-900);
  color: var(--green-900);
  background: var(--green-50);
  font-weight: 700;
}

.consent-option {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  align-items: flex-start;
  margin: 20px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.consent-option input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--green-900);
}

.form-error {
  min-height: 20px;
  margin-bottom: 8px;
  color: var(--danger);
  font-size: 12px;
}

.success-card {
  text-align: center;
}

.success-mark {
  display: grid;
  width: 62px;
  height: 62px;
  margin: 0 auto 19px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--green-700);
  font-size: 28px;
}

.success-details {
  margin: 24px 0;
  padding: 18px;
  border-radius: 12px;
  color: var(--green-900);
  background: var(--green-50);
}

.success-details strong {
  display: block;
  margin-bottom: 5px;
  font-size: 18px;
}

.success-card > p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.my-booking-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.booking-item {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfb;
}

.booking-item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.booking-item-head strong {
  color: var(--green-900);
  font-size: 16px;
}

.booking-item p {
  margin: 5px 0;
  color: var(--muted);
  font-size: 12px;
}

.cancel-button {
  margin-top: 12px;
  padding: 8px 12px;
  border: 1px solid #d8aaa5;
  border-radius: 8px;
  color: var(--danger);
  background: #fff8f7;
  font-size: 12px;
}

.empty-state {
  padding: 34px 18px;
  border-radius: 12px;
  color: var(--muted);
  background: var(--green-50);
  text-align: center;
  font-size: 13px;
}

@media (max-width: 980px) {
  .page-shell {
    grid-template-columns: 1fr;
  }
  .booking-panel {
    padding: 46px 42px;
  }
  .notice-panel {
    padding: 44px 42px;
  }
}

@media (max-width: 680px) {
  .topbar {
    padding: 18px 16px;
  }
  .brand-mark {
    width: 39px;
    height: 39px;
  }
  .brand small {
    display: none;
  }
  .ghost-button {
    padding: 8px 13px;
    font-size: 13px;
  }
  .page-shell {
    margin-bottom: 28px;
    padding: 0;
    border: 0;
    border-radius: 0;
  }
  .booking-panel,
  .notice-panel {
    padding: 36px 18px 42px;
  }
  .hero {
    display: block;
    padding-bottom: 30px;
  }
  h1 {
    font-size: 38px;
  }
  .clinic-hours {
    display: inline-block;
    margin-top: 22px;
    text-align: left;
  }
  .doctor-profile {
    grid-template-columns: 92px 1fr;
    gap: 16px;
    margin-top: 22px;
    padding: 16px;
    border-radius: 15px;
  }
  .doctor-photo-wrap {
    grid-row: auto;
    min-height: 122px;
    align-self: start;
  }
  .doctor-heading {
    display: block;
  }
  .doctor-heading h2 {
    font-size: 24px;
  }
  .doctor-credentials {
    font-size: 11px;
  }
  .doctor-badge {
    display: inline-block;
    margin-top: 9px;
  }
  .doctor-specialties {
    grid-column: 1 / -1;
    margin-top: 13px;
  }
  .doctor-specialties p {
    font-size: 12px;
  }
  .date-list {
    grid-template-columns: repeat(3, 1fr);
  }
  .date-button {
    min-height: 82px;
  }
  .slot-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .slot-button {
    min-height: 54px;
    font-size: 13px;
  }
  .modal-card {
    padding: 30px 20px 24px;
  }
  .selected-appointment {
    display: block;
  }
  .selected-appointment span {
    display: block;
    margin-top: 5px;
  }
  footer {
    padding: 0 18px 30px;
  }
  footer p {
    display: block;
    margin: 7px 0 0;
  }
}

@media (max-width: 390px) {
  .slot-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
