.booking-intro { margin-block: 4px 15px; }
.booking-intro .primary { margin-block-start: 12px; }
.customer-back { border: 0; background: none; padding: 0; cursor: pointer; }
.summary-value { margin: 0; text-align: end; }
.detail > .booking-form { margin-block-start: 14px; }
.booking-form :where(h2, p) { margin: 0; }
.booking-form .summary { margin: 0; }
.choice-grid.booking-times { grid-template-columns: repeat(auto-fill, minmax(min(100%, 74px), 1fr)); }
.booking-times .slot { white-space: nowrap; }
.booking-form .manage-link-field { direction: ltr; text-align: left; }
.booking-form .verification-digits { letter-spacing: .18em; }
.booking-form .field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.booking-form .field select { cursor: pointer; }
.recovery-result { margin-block: 14px; }
.detail > .feedback { margin-block: 12px; }
.detail > .primary { margin-block: 14px; }
@media (max-width: 470px) {
  .booking-form .field-pair { grid-template-columns: 1fr; }
}

.customer-screen {
  --customer-paper: #f9f4f0;
  --customer-card: #fffafa;
  --customer-line: #d8c9ce;
  --customer-wine: #743052;
  --customer-wine-hover: #602340;
  --customer-pink: #f0dce4;
  --customer-green: #dce7d8;
  --customer-orange: #f9e6cc;
  --customer-icon-date: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M7 3v4m10-4v4M3 10h18'/%3E%3C/svg%3E");
  --customer-icon-person: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3Cpath d='M4 21v-2a8 8 0 0 1 16 0v2z'/%3E%3C/svg%3E");
  --customer-icon-service: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 12V5a3 3 0 0 1 6 0v7m-7 0h8a2 2 0 0 1 2 2.3l-1 5.1a2 2 0 0 1-2 1.6H9a2 2 0 0 1-2-1.6l-1-5.1A2 2 0 0 1 8 12Z'/%3E%3C/svg%3E");
  --customer-icon-price: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 10h18M7 14h4'/%3E%3C/svg%3E");
  --customer-icon-warning: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 4.9a2 2 0 0 1 3.4 0l7.1 12.2a2 2 0 0 1-1.7 3H4.9a2 2 0 0 1-1.7-3zM12 9v4m0 3h.01'/%3E%3C/svg%3E");
  --customer-icon-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l4 2'/%3E%3C/svg%3E");
  --customer-icon-ok: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L19 7'/%3E%3C/svg%3E");
  --customer-icon-cancel: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M7 3v4m10-4v4M3 10h18m-12 3 6 5m0-5-6 5'/%3E%3C/svg%3E");
  --customer-icon-link: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round'%3E%3Cpath d='m12 8 3.5-3.5a3.5 3.5 0 0 1 5 5L16 14a3.5 3.5 0 0 1-3.6.8M12 16l-3.5 3.5a3.5 3.5 0 0 1-5-5L8 10a3.5 3.5 0 0 1 3.6-.8M3 8h2m1-4 1 1m3-3v2'/%3E%3C/svg%3E");
  position: relative;
  max-inline-size: 440px;
  display: grid;
  gap: 14px;
  color: #281f27;
}

html:has(#app > .customer-screen) { background: #e9dbe4; }
.shell:has(#app > .customer-screen) {
  max-inline-size: 440px;
  background: #f9f4f0;
}
.shell:has(#app > .customer-screen) .topbar {
  justify-content: center;
  min-block-size: 62px;
  border-block-end: 1px solid #ded1d6;
}
.shell:has(#app > .customer-screen) .brand strong { font-size: 1.45rem; font-weight: 800; }
.shell:has(#app > .customer-screen) :where(.brand-mark, .brand small, .preview-tag) { display: none; }
#app:has(> .customer-screen) { min-block-size: 0; padding: 20px 16px; }

.customer-screen > .back-link {
  position: absolute;
  inset-block-start: -70px;
  inset-inline-start: -5px;
  inline-size: 44px;
  min-block-size: 44px;
  justify-content: center;
  font-size: 0;
  color: inherit;
}
.customer-screen > .back-link::before { content: "→"; font-size: 1.6rem; font-weight: 400; }
.customer-screen > .back-link:hover { text-decoration: none; }
.customer-screen .booking-intro { margin: 0; }
.customer-screen .booking-intro h1 { font-size: clamp(1.65rem, 6.5vw, 2.15rem); font-weight: 850; line-height: 1.35; }

.customer-screen > .booking-form {
  margin: 0;
  padding: 0;
  gap: 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.customer-screen .booking-actions { display: grid; gap: 10px; }
.customer-screen :where(.primary, .danger, .secondary) {
  width: 100%;
  min-block-size: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 14px;
  border-radius: 13px;
  text-align: center;
  font-size: 1rem;
  font-weight: 750;
}
.customer-screen .primary {
  border-color: transparent;
  background: var(--customer-wine);
  color: #fffafc;
}
.customer-screen .primary:hover { background: var(--customer-wine-hover); }
.customer-screen :is(.secondary, .danger) {
  border: 1px solid var(--customer-wine);
  color: var(--customer-wine);
  background: transparent;
  cursor: pointer;
}
.customer-screen > .primary { margin: 0; }

.customer-screen .summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 6px 12px;
  border-color: var(--customer-line);
  border-radius: 15px;
  background: var(--customer-card);
}
.customer-screen .summary-row {
  min-inline-size: 0;
  min-block-size: 44px;
  display: flex;
  grid-column: 1 / -1;
  justify-content: start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  padding-block: 5px;
}
.customer-screen .summary-row::before,
.customer-screen .feedback:not([hidden])::before,
.customer-manage button.danger::before,
.customer-invalid .booking-intro::before,
.customer-manage--changed .booking-intro::before,
.customer-manage--cancelled .booking-intro::before {
  content: "";
  display: inline-block;
  flex: none;
  inline-size: 23px;
  block-size: 23px;
  background: currentColor;
  mask: var(--customer-icon, var(--customer-icon-warning)) center / contain no-repeat;
}
.customer-screen .summary-row dt {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.customer-screen .summary-row dd { min-inline-size: 0; text-align: start; overflow-wrap: anywhere; }
.customer-screen .summary-row:nth-child(1) { --customer-icon: var(--customer-icon-service); font-weight: 800; }
.customer-screen .summary-row:nth-child(2) { --customer-icon: var(--customer-icon-person); }
.customer-screen .summary-row:nth-child(3) { --customer-icon: var(--customer-icon-date); grid-column: 1; }
.customer-screen .summary-row:nth-child(4) { grid-column: 2; }
.customer-screen .summary-row:nth-child(4)::before { display: none; }
.customer-screen .summary-row:nth-child(5) { --customer-icon: var(--customer-icon-price); }
.customer-screen .summary-row + .summary-row { border-color: var(--customer-line); }

.customer-screen .feedback {
  --customer-icon: var(--customer-icon-clock);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid #eacfad;
  border-radius: 13px;
  background: var(--customer-orange);
  color: #70420f;
}
.customer-screen .feedback.success {
  --customer-icon: var(--customer-icon-ok);
  border: 0;
  background: var(--customer-green);
  color: #34513b;
  font-weight: 750;
}
.customer-screen .feedback.error {
  --customer-icon: var(--customer-icon-warning);
  border-color: #e1a7b6;
  background: #f5dde6;
  color: #822b4b;
}
.customer-screen .field-note { text-align: center; font-size: .86rem; }
.customer-manage .feedback.success { justify-self: center; }
.customer-manage .feedback:not(.success):not(.error) { order: 1; }
.customer-manage .booking-actions { order: 2; }
.customer-manage button.danger::before { inline-size: 20px; block-size: 20px; }

.customer-reschedule > .summary { background: #f6ecef; }
.customer-reschedule fieldset { border-block-start: 1px solid var(--customer-line); padding-block-start: 12px; }
.customer-reschedule legend { font-size: 1.04rem; }
.customer-reschedule .booking-times { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.customer-reschedule .booking-times .slot { min-block-size: 46px; border-color: #c6b3bc; }
.customer-reschedule .booking-times .slot[aria-pressed="true"] { border-color: var(--customer-wine); background: var(--customer-pink); }

.customer-cancel {
  margin-block-start: 76px;
  padding: 18px 14px;
  border: 1px solid var(--customer-line);
  border-radius: 24px;
  background: var(--customer-paper);
  box-shadow: 0 -6px 30px #35222d14;
}
.customer-cancel > .back-link { inset-block-start: -146px; }
.customer-cancel::before {
  content: "";
  inline-size: 42px;
  block-size: 4px;
  justify-self: center;
  border-radius: 999px;
  background: #d0c1c7;
}
.customer-cancel .booking-intro,
.customer-recovery-code .booking-intro,
.customer-invalid .booking-intro,
.customer-manage--changed .booking-intro,
.customer-manage--cancelled .booking-intro { text-align: center; }
.customer-cancel .booking-actions > .danger {
  border-color: transparent;
  background: var(--customer-wine);
  color: #fffafc;
}
.customer-cancel .booking-actions > .danger:hover { background: var(--customer-wine-hover); }

.customer-invalid,
.customer-recovery-code { align-content: start; }
.customer-invalid .booking-intro,
.customer-manage--changed .booking-intro,
.customer-manage--cancelled .booking-intro { --customer-icon: var(--customer-icon-link); position: relative; padding-block-start: 110px; }
.customer-manage--changed .booking-intro { --customer-icon: var(--customer-icon-ok); }
.customer-manage--cancelled .booking-intro { --customer-icon: var(--customer-icon-cancel); }
:is(.customer-invalid, .customer-manage--changed, .customer-manage--cancelled) .booking-intro::after,
:is(.customer-invalid, .customer-manage--changed, .customer-manage--cancelled) .booking-intro::before {
  position: absolute;
  inset-inline-start: 50%;
  translate: 50%;
}
:is(.customer-invalid, .customer-manage--changed, .customer-manage--cancelled) .booking-intro::after {
  content: "";
  inset-block-start: 8px;
  inline-size: 88px;
  block-size: 88px;
  border-radius: 50%;
  background: var(--customer-pink);
}
:is(.customer-invalid, .customer-manage--changed, .customer-manage--cancelled) .booking-intro::before {
  inset-block-start: 29px;
  z-index: 1;
  inline-size: 46px;
  block-size: 46px;
  color: var(--customer-wine);
}
.customer-manage--changed .booking-intro::after { background: var(--customer-green); }
.customer-manage--changed .booking-intro::before { color: #34513b; }
.customer-invalid.customer-screen > .feedback {
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: center;
}
.customer-invalid.customer-screen > .feedback::before { display: none; }
.customer-invalid > .primary { margin-block-start: clamp(28px, 15vh, 110px); }
.customer-recovery-code .booking-form .verification-digits {
  min-block-size: 54px;
  text-align: center;
  font-size: 1.4rem;
  letter-spacing: .55em;
  padding-inline-start: 1.05em;
}
.customer-recovery-results .recovery-result { padding-block: 8px; }

@media (min-width: 360px) {
  .customer-reschedule .booking-form .field-pair { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 500px) {
  .shell:has(#app > .customer-screen) {
    min-block-size: 0;
    margin-block: 24px;
    border: 1px solid #c7b5bf;
    border-radius: 23px;
    overflow: hidden;
    box-shadow: 0 12px 35px #70435c12;
  }
  #app:has(> .customer-screen) { padding: 22px 17px 26px; }
  .customer-screen > .back-link { inset-block-start: -69px; }
  .customer-cancel > .back-link { inset-block-start: -145px; }
}
