:root {
  color-scheme: light;
  --ink: #17365f;
  --ink-strong: #0d2b50;
  --muted: #5d7795;
  --blue: #2874f0;
  --blue-soft: #eaf3ff;
  --panel: #f6f9fe;
  --surface: #ffffff;
  --line: #b8d3f6;
  --line-soft: #d7e6fb;
  --danger: #b42318;
  --green: #0f7a4a;
  --green-soft: #e9f8ef;
  --warm: #fff7e8;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.booking-shell {
  width: min(1120px, calc(100% - 34px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-strong);
  font-size: 1.22rem;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--blue);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  background: var(--blue-soft);
}

.status-pill {
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--ink-strong);
  font-size: 0.92rem;
  font-weight: 850;
}

.hero {
  padding: 34px 0 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 720px;
  margin-bottom: 12px;
  color: var(--ink-strong);
  font-size: clamp(2.15rem, 4.4vw, 4rem);
  font-weight: 620;
  line-height: 1.03;
}

.hero p:last-child {
  max-width: 700px;
  margin-bottom: 0;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.45;
}

.booking-board {
  display: grid;
  grid-template-columns: minmax(240px, 290px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.booking-sidebar,
.schedule-panel,
.confirmation-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 48px rgba(23, 54, 95, 0.08);
}

.booking-sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 22px;
  padding: 20px;
}

.booking-sidebar h2,
.panel-head h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 1.16rem;
  line-height: 1.15;
}

.schedule-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(250px, 0.85fr);
  gap: 14px;
  min-width: 0;
  padding: 16px;
}

.calendar-panel,
.time-panel,
.contact-panel {
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: var(--surface);
  padding: 16px;
}

.calendar-panel {
  min-width: 0;
  overflow: hidden;
}

.time-panel {
  min-width: 0;
  min-height: 442px;
}

.contact-panel {
  grid-column: 1 / -1;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

#calendarMonth {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--ink-strong);
  padding: 0 12px;
  font-size: 0.84rem;
  font-weight: 900;
  white-space: nowrap;
}

.field-block {
  display: grid;
  gap: 10px;
}

.field-label,
label span {
  color: var(--muted);
  font-weight: 850;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-row.compact {
  display: grid;
  grid-template-columns: 1fr;
}

.group-choice-row {
  gap: 10px;
}

.choice-button,
.date-button,
.time-button,
.primary-button,
.secondary-link {
  border-radius: 999px;
  font-weight: 900;
  transition:
    transform 120ms ease,
    background-color 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease,
    color 120ms ease;
}

.choice-button {
  min-height: 40px;
  border: 1px solid var(--line-soft);
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink-strong);
}

.choice-button.group-choice {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  min-height: 92px;
  align-items: center;
  border-radius: 20px;
  padding: 12px;
  text-align: left;
}

.group-count {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 1.15rem;
  font-weight: 950;
}

.group-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.choice-kicker {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.group-copy strong {
  color: var(--ink-strong);
  font-size: 0.96rem;
  line-height: 1.08;
}

.group-copy small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 780;
  line-height: 1.25;
}

.choice-button.active,
.choice-button:hover,
.date-button.selected,
.time-button.selected {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 0 0 3px rgba(40, 116, 240, 0.12);
}

.choice-button.group-choice.active .group-count {
  background: var(--blue);
  color: #ffffff;
}

.selection-summary {
  display: grid;
  gap: 7px;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--panel);
}

.selection-summary strong {
  color: var(--ink-strong);
  font-size: 0.98rem;
}

.selection-summary span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.3;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.referral-note {
  margin: 0;
  border: 1px solid rgba(15, 122, 74, 0.24);
  border-radius: 16px;
  padding: 10px 12px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.3;
}

.referral-note.is-invalid {
  border-color: rgba(177, 82, 15, 0.24);
  background: #fff7e8;
  color: #8a470a;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.calendar-weekdays {
  margin-bottom: 8px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.date-spacer,
.date-button {
  min-height: 74px;
  min-width: 0;
}

.date-button {
  display: grid;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  align-content: center;
  justify-items: center;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 9px 5px;
  background: #ffffff;
  color: var(--ink-strong);
  text-align: center;
}

.date-button strong {
  font-size: 1.42rem;
  line-height: 1;
}

.date-availability {
  display: grid;
  grid-template-columns: repeat(4, 5px);
  width: 44px;
  min-height: 18px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 999px;
  padding: 0 6px;
  background: var(--blue-soft);
  overflow: hidden;
}

.date-availability i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--blue);
}

.date-availability i.is-empty {
  opacity: 0.16;
}

.date-button.has-limited-space {
  background: var(--warm);
}

.date-button.has-selected-slots {
  border-color: var(--green);
  background: var(--green-soft);
}

.date-button em {
  display: inline-flex;
  max-width: 100%;
  min-height: 18px;
  align-items: center;
  border-radius: 999px;
  padding: 0 7px;
  background: #ffffff;
  color: var(--green);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.date-empty,
.time-empty {
  margin: 0;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 820;
  line-height: 1.38;
}

.date-empty {
  grid-column: 1 / -1;
}

.time-list {
  display: grid;
  gap: 12px;
  padding-top: 8px;
}

.time-help {
  margin: 0;
  border-radius: 16px;
  padding: 11px 13px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 820;
  line-height: 1.35;
}

.time-button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 76px;
  align-items: center;
  border: 1px solid var(--line-soft);
  padding: 12px 18px;
  background: #ffffff;
  color: var(--ink-strong);
  text-align: left;
}

.time-check {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 1rem;
  font-weight: 950;
}

.time-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.time-button strong {
  display: block;
  font-size: 1.2rem;
  line-height: 1.1;
}

.time-copy span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.time-button em {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--green);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.selected-slot-list {
  display: grid;
  gap: 7px;
}

.selected-slot-pill {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--ink-strong);
  text-align: left;
}

.selected-slot-pill span {
  color: var(--ink-strong);
  font-size: 0.82rem;
  font-weight: 880;
}

.selected-slot-pill em {
  color: var(--blue);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 950;
}

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

label {
  display: grid;
  gap: 7px;
}

.notes-field {
  grid-column: 1 / -1;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink-strong);
}

input {
  min-height: 48px;
  padding: 0 13px;
}

textarea {
  min-height: 76px;
  padding: 11px 13px;
  resize: vertical;
  line-height: 1.35;
}

.contact-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 780;
  line-height: 1.35;
}

.form-error {
  margin: 12px 0 0;
  color: var(--danger);
  font-weight: 850;
}

.primary-button {
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
  border: 1px solid transparent;
  padding: 0 20px;
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 9px 18px rgba(40, 116, 240, 0.18);
}

.primary-button:hover {
  background: #1e67df;
}

.primary-button:active,
.choice-button:active,
.date-button:active,
.time-button:active,
.secondary-link:active,
.primary-button.is-pressed,
.choice-button.is-pressed,
.date-button.is-pressed,
.time-button.is-pressed {
  transform: translateY(1px) scale(0.985);
}

.primary-button:focus-visible,
.choice-button:focus-visible,
.date-button:focus-visible,
.time-button:focus-visible,
.secondary-link:focus-visible {
  outline: 3px solid rgba(40, 116, 240, 0.28);
  outline-offset: 3px;
}

.confirmation-panel {
  margin-top: 18px;
  padding: 22px;
}

.confirmation-panel h2 {
  margin-bottom: 8px;
  color: var(--ink-strong);
  font-size: 1.8rem;
}

.confirmation-panel p {
  max-width: 820px;
  color: var(--ink);
  line-height: 1.45;
}

.confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.secondary-link {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  padding: 0 20px;
  background: #ffffff;
  color: var(--ink-strong);
  text-decoration: none;
}

.hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .booking-board {
    grid-template-columns: 1fr;
  }

  .booking-sidebar {
    position: static;
  }

  .choice-row.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 860px) {
  .schedule-panel,
  .contact-fields {
    grid-template-columns: 1fr;
  }

  .time-panel {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .booking-shell {
    width: min(100% - 22px, 1120px);
    padding-top: 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    padding: 28px 0 16px;
  }

  h1 {
    font-size: 2.15rem;
  }

  .booking-sidebar,
  .schedule-panel {
    border-radius: 22px;
  }

  .schedule-panel {
    padding: 12px;
  }

  .calendar-panel,
  .time-panel,
  .contact-panel {
    border-radius: 18px;
    padding: 13px;
  }

  .calendar-weekdays,
  .calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
  }

  .date-spacer,
  .date-button {
    min-height: 60px;
  }

  .date-button {
    border-radius: 14px;
    gap: 6px;
    padding: 7px 2px;
  }

  .date-button strong {
    font-size: 1.08rem;
  }

  .date-availability {
    grid-template-columns: repeat(4, 4px);
    width: 30px;
    min-height: 16px;
    gap: 2px;
    padding: 0 4px;
  }

  .date-availability i {
    width: 4px;
    height: 4px;
  }

  .date-button em {
    font-size: 0.52rem;
    padding: 0 5px;
  }

  .time-button {
    grid-template-columns: 24px minmax(0, 1fr);
    padding: 11px 13px;
  }

  .time-button em {
    grid-column: 2;
    justify-self: start;
  }

  .time-check {
    width: 24px;
    height: 24px;
  }

  .choice-row,
  .choice-row.compact {
    grid-template-columns: 1fr;
  }
}
