:root {
  color-scheme: light;
  --cream: #f8f3ee;
  --paper: #fffaf6;
  --ink: #15120f;
  --muted: #6f675b;
  --line: rgba(21, 18, 15, 0.14);
  --sage: #7b846d;
  --soft: rgba(123, 132, 109, 0.1);
  --error: #8f3f2f;
  --error-bg: #fbf1ee;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  background: var(--cream);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: radial-gradient(circle at 30% 0%, rgba(255, 255, 255, 0.85), transparent 38%), var(--cream);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.booking-app {
  width: min(100%, 1120px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 18px calc(112px + env(safe-area-inset-bottom));
}

.booking-app__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}

.booking-app__brand {
  display: inline-flex;
  width: min(154px, 46vw);
}

.booking-app__brand img {
  display: block;
  width: 100%;
  height: auto;
}

.booking-app__classic,
.booking-app__secondary,
.booking-app__back,
.booking-app__primary,
.booking-app__empty button {
  min-height: 48px;
  border-radius: 999px;
  padding: 0 18px;
  text-decoration: none;
  font-weight: 850;
}

.booking-app__classic,
.booking-app__secondary,
.booking-app__back,
.booking-app__empty button + button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink);
}

.booking-app__hero {
  margin-bottom: 22px;
}

.booking-app__kicker {
  margin: 0 0 9px;
  color: var(--sage);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.booking-app h1,
.booking-app h2 {
  max-width: 12ch;
  margin: 0;
  font-weight: 450;
  letter-spacing: 0;
  line-height: 0.96;
}

.booking-app h1 {
  font-size: clamp(3rem, 17vw, 6rem);
}

.booking-app h2 {
  margin-bottom: 12px;
  font-size: clamp(2.35rem, 12vw, 4.5rem);
}

.booking-app__hero p:not(.booking-app__kicker),
.booking-app__copy {
  max-width: 42rem;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.55;
}

.booking-app__steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 18px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.booking-app__steps::-webkit-scrollbar {
  display: none;
}

.booking-app__steps button {
  min-width: 78px;
  min-height: 58px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: rgba(21, 18, 15, 0.46);
  text-align: left;
  font-weight: 850;
}

.booking-app__steps button span {
  display: block;
  margin-bottom: 5px;
  color: inherit;
  font-size: 0.74rem;
}

.booking-app__steps button[aria-current="step"] {
  border-bottom-color: var(--ink);
  color: var(--ink);
}

.booking-app__summary {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 -10px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 250, 246, 0.94);
  backdrop-filter: blur(14px);
}

.booking-app__summary > button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  border: 0;
  padding: 14px 16px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.booking-app__summary small,
.booking-app__summary [data-summary-total],
.booking-app__summary-panel {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.booking-app__summary-panel {
  padding: 0 16px 16px;
}

.booking-app__summary-item,
.booking-app__review-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.booking-app__screen {
  display: none;
  min-height: 48vh;
  animation: booking-step-in 180ms ease-out;
}

.booking-app__screen.is-active {
  display: block;
}

.booking-app__type-list,
.booking-app__provider-mode {
  display: flex;
  gap: 9px;
  margin: 22px 0 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.booking-app__type-list::-webkit-scrollbar,
.booking-app__provider-mode::-webkit-scrollbar {
  display: none;
}

.booking-app__type-list button,
.booking-app__provider-mode button {
  flex: 0 0 auto;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  font-weight: 850;
}

.booking-app__type-list button.is-active,
.booking-app__provider-mode button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.booking-app__search {
  display: grid;
  gap: 7px;
  margin: 18px 0;
}

.booking-app__search label,
.booking-app__form label,
.booking-app__visit-line small,
.booking-app__provider-card small,
.booking-app__time-group small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.booking-app__search input,
.booking-app__form input,
.booking-app__form textarea,
.booking-app__provider-card select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 15px;
  background: #fff;
  color: var(--ink);
}

.booking-app__form textarea {
  padding-block: 13px;
  resize: vertical;
}

.booking-app__service-list,
.booking-app__visit-lines,
.booking-app__provider-list,
.booking-app__time-list,
.booking-app__review {
  display: grid;
  gap: 12px;
}

.booking-app__service-card,
.booking-app__visit-line,
.booking-app__provider-card,
.booking-app__time-group,
.booking-app__review,
.booking-app__policy,
.booking-app__empty {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 250, 246, 0.76);
}

.booking-app__service-card,
.booking-app__visit-line,
.booking-app__provider-card,
.booking-app__time-group,
.booking-app__policy,
.booking-app__empty {
  padding: 16px;
}

.booking-app__service-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  width: 100%;
  text-align: left;
}

.booking-app__service-card strong,
.booking-app__visit-line strong,
.booking-app__provider-card strong,
.booking-app__time-group strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.05rem;
  line-height: 1.2;
}

.booking-app__service-card span,
.booking-app__visit-line span,
.booking-app__provider-card span,
.booking-app__policy p {
  color: var(--muted);
  line-height: 1.45;
}

.booking-app__service-card.is-selected {
  border-color: rgba(123, 132, 109, 0.58);
  background: var(--soft);
}

.booking-app__qty {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.booking-app__line-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.booking-app__line-actions button {
  min-width: 44px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.booking-app__calendar {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  gap: 10px;
  align-items: stretch;
  margin: 22px 0 12px;
}

.booking-app__calendar > button {
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 1.8rem;
  font-weight: 800;
}

.booking-app__days {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(96px, 1fr);
  gap: 9px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.booking-app__days::-webkit-scrollbar {
  display: none;
}

.booking-app__days button {
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  font-weight: 850;
  scroll-snap-align: start;
}

.booking-app__days button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.booking-app__slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.booking-app__slot {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.booking-app__slot.is-active {
  border-color: var(--ink);
  background: #e9e7df;
}

.booking-app__slot.is-held {
  color: rgba(21, 18, 15, 0.38);
  text-decoration: line-through;
  cursor: not-allowed;
}

.booking-app__empty {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.booking-app__empty button:first-of-type {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

.booking-app__form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.booking-app__form label {
  display: grid;
  gap: 7px;
}

.booking-app__check {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.booking-app__check input {
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  margin: 2px 0 0;
}

.booking-app__policy {
  margin-top: 14px;
}

.booking-app__footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(92px, 0.34fr) minmax(0, 1fr);
  gap: 10px;
  padding: 14px max(18px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  border-top: 1px solid var(--line);
  background: rgba(248, 243, 238, 0.94);
  backdrop-filter: blur(16px);
}

.booking-app__primary {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

.booking-app__primary:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.booking-app__error {
  border-color: rgba(143, 63, 47, 0.32);
  background: var(--error-bg);
  color: var(--error);
}

@keyframes booking-step-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 760px) {
  .booking-app {
    padding-inline: 34px;
  }

  .booking-app__top {
    margin-bottom: 48px;
  }

  .booking-app__summary {
    margin-inline: 0;
  }

  .booking-app__service-list,
  .booking-app__provider-list,
  .booking-app__form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .booking-app__wide,
  .booking-app__form .booking-app__check,
  .booking-app__review,
  .booking-app__policy {
    grid-column: 1 / -1;
  }

  .booking-app__slots {
    grid-template-columns: repeat(auto-fit, minmax(118px, 132px));
  }

  .booking-app__footer {
    right: 50%;
    left: 50%;
    width: min(100%, 1120px);
    transform: translateX(-50%);
  }
}

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