:root {
  color-scheme: dark;
  --bg: #0b1210;
  --panel: #101815;
  --primary: #f0f6ee;
  --body: #dfeadd;
  --secondary: #a4b3a2;
  --muted: #7e8d7c;
  --accent: #bfe8c0;
  --button-bg: #eff7ee;
  --button-fg: #10240f;
  --danger: #ffb4a0;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--primary);
  font-family: "Instrument Sans", sans-serif;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 520px at 16% -12%, rgba(64,145,108,.42), transparent 65%),
    radial-gradient(820px 480px at 90% 6%, rgba(94,164,143,.26), transparent 60%),
    radial-gradient(760px 520px at 55% 118%, rgba(146,196,146,.18), transparent 60%),
    var(--bg);
}

.site-header {
  margin: 22px clamp(16px,3vw,32px) 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(20px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 24px 50px -30px rgba(0,0,0,.7);
  position: relative;
  z-index: 30;
}

.brand, .user-button { display: flex; align-items: center; }
.brand { gap: 11px; }
.brand img { object-fit: contain; filter: drop-shadow(0 0 6px rgba(191,232,192,.5)) brightness(1.12); }
.brand-copy { display: flex; flex-direction: column; }
.brand-copy span { color: var(--accent); font-size: 9.5px; letter-spacing: 1.4px; }
.brand-copy strong { font: 600 15.5px/1.35 "Space Grotesk", sans-serif; }
.brand-copy-mobile { display: none; max-width: 130px; font: 600 14px/1.15 "Space Grotesk", sans-serif; }

.user-wrap { position: relative; }
.user-button {
  gap: 8px;
  padding: 6px 12px 6px 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
  cursor: pointer;
  font-size: 13.5px;
}
.user-button:hover { background: rgba(255,255,255,.11); }
.avatar { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: rgba(191,232,192,.2); color: #dff3de; font-size: 12px; font-weight: 600; }
.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 242px;
  padding: 16px;
  border-radius: 14px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.13), 0 30px 60px -18px rgba(0,0,0,.85);
  animation: stepIn 160ms ease both;
}
.user-menu strong, .user-menu span { display: block; }
.user-menu strong { font-family: "Space Grotesk", sans-serif; font-size: 14px; }
.user-menu span { margin-top: 3px; color: var(--muted); font-size: 12px; word-break: break-word; }
.user-menu hr { border: 0; border-top: 1px solid rgba(255,255,255,.1); margin: 13px -5px 8px; }
.user-menu a { display: flex; align-items: center; gap: 9px; padding: 9px; margin: 0 -9px -9px; color: var(--body); text-decoration: none; border-radius: 9px; font-size: 13px; }
.user-menu a:hover { background: rgba(255,255,255,.07); }
.user-menu svg { color: var(--accent); }

.main-content {
  flex: 1;
  display: grid;
  align-items: center;
  padding: clamp(24px,4vh,44px) clamp(20px,5vw,64px) clamp(40px,9vh,84px);
}

.screen { display: none; width: 100%; flex-direction: column; align-items: center; text-align: center; animation: stepIn 320ms ease both; }
.screen.active { display: flex; }
.screen-wide { align-self: stretch; }
.eyebrow { margin: 0; color: var(--accent); font-size: 11px; font-weight: 500; letter-spacing: 2.6px; text-transform: uppercase; }
h1, h2, h3 { font-family: "Space Grotesk", sans-serif; }
h1 { max-width: 640px; margin: 22px 0 0; font-size: clamp(38px,6.5vw,58px); font-weight: 500; letter-spacing: -.03em; line-height: 1.04; text-wrap: balance; }
h1 em { color: var(--accent); font-style: normal; }
h2 { margin: 20px 0 0; font-size: clamp(28px,5vw,40px); font-weight: 500; letter-spacing: -.025em; line-height: 1.1; }
.subline { margin: 16px 0 0; color: var(--secondary); font-size: 15.5px; }

.address-search-wrap { width: min(640px,100%); margin-top: 34px; position: relative; }
.address-search {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 6px 6px 22px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(18px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15), 0 34px 70px -34px rgba(0,0,0,.75);
}
.address-search.has-error { box-shadow: inset 0 0 0 1px rgba(255,140,110,.55), 0 34px 70px -34px rgba(0,0,0,.75); }
.address-search > svg { flex: 0 0 auto; color: var(--accent); }
.address-search input { flex: 1; min-width: 0; padding: 8px 0; border: 0; outline: 0; color: var(--primary); background: transparent; font-size: 16px; }
input::placeholder { color: #6f7f74; }
.clear-button { width: 30px; height: 30px; flex: 0 0 auto; border: 0; border-radius: 50%; background: transparent; color: var(--secondary); cursor: pointer; font-size: 20px; }
.clear-button:hover { background: rgba(255,255,255,.12); }

.primary-button {
  border: 0;
  border-radius: 999px;
  padding: 15px 30px;
  background: var(--button-bg);
  color: var(--button-fg);
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.6);
  cursor: pointer;
  font: 600 14.5px/1 "Space Grotesk", sans-serif;
  transition: filter 150ms ease, transform 150ms ease;
}
.primary-button.compact { flex: 0 0 auto; padding: 15px 28px; }
.primary-button:hover { filter: brightness(.95); }
.primary-button:active { transform: scale(.98); }
.primary-button:disabled { opacity: .55; cursor: wait; }

.suggestions {
  position: absolute;
  z-index: 50;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  overflow: hidden;
  border-radius: 16px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.13), 0 30px 60px -24px rgba(0,0,0,.85);
  text-align: left;
}
.suggestion { width: 100%; display: grid; grid-template-columns: 20px 1fr; gap: 9px; padding: 12px 18px; border: 0; border-bottom: 1px solid rgba(255,255,255,.07); background: transparent; text-align: left; cursor: pointer; }
.suggestion:hover, .suggestion.active { background: rgba(191,232,192,.08); }
.suggestion svg { color: var(--muted); margin-top: 2px; }
.suggestion strong { display: block; color: var(--primary); font-size: 15px; }
.suggestion span { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.google-attribution { padding: 7px 16px 9px; color: var(--muted); text-align: right; font-size: 10.5px; }
.field-error { color: var(--danger); font-size: 12.5px; }
.field-error.centered { margin: 10px 0 0; text-align: center; }

.spinner { width: 52px; height: 52px; margin-top: 52px; border: 3px solid rgba(255,255,255,.14); border-top-color: var(--accent); border-radius: 50%; animation: spin 900ms linear infinite; }

.address-line { font-size: 14.5px; }
.text-button { border: 0; padding: 0; background: transparent; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.schedule-card, .form-card {
  background: rgba(255,255,255,.055);
  backdrop-filter: blur(24px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.13), 0 50px 110px -50px rgba(0,0,0,.85);
}
.schedule-card {
  width: min(1000px,100%);
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(28px,4vw,40px) 44px;
  padding: clamp(20px,4vw,38px) clamp(16px,4vw,42px);
  border-radius: 26px;
  text-align: left;
}
.calendar-column { width: min(440px,100%); }
.times-column { width: min(400px,100%); }
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.calendar-header strong { font: 500 21px/1.2 "Space Grotesk", sans-serif; }
.round-button { width: 30px; height: 30px; margin-left: 6px; border: 0; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); cursor: pointer; font-size: 20px; }
.round-button:disabled { opacity: .35; cursor: default; }
.weekday-row, .calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 6px; }
.weekday-row { margin-bottom: 6px; }
.weekday-row span { padding: 4px 0; color: var(--muted); text-align: center; font-size: 10px; letter-spacing: 1.3px; text-transform: uppercase; }
.day-cell { aspect-ratio: 1; min-height: 46px; display: grid; place-items: center; border: 0; border-radius: 10px; color: rgba(233,242,231,.26); background: transparent; font-size: 15px; font-weight: 500; }
button.day-cell { color: #e9f2e7; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.09); cursor: pointer; }
button.day-cell:hover { background: rgba(191,232,192,.1); }
button.day-cell.selected { background: var(--button-bg); color: var(--button-fg); font-weight: 600; box-shadow: 0 16px 34px -12px rgba(0,0,0,.6); }
button.day-cell.available:not(.selected)::after { content: ""; position: absolute; width: 4px; height: 4px; margin-top: 25px; border-radius: 50%; background: var(--accent); }
button.day-cell { position: relative; }
.day-cell.blank { visibility: hidden; }

.times-column h3 { margin: 2px 0 16px; font-size: 19px; font-weight: 500; }
.change-day { display: none; margin: 0 0 13px; padding: 7px 10px; border: 0; border-radius: 9px; background: transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); cursor: pointer; font-size: 13px; }
.times-list { max-height: 400px; overflow-y: auto; padding-right: 10px; scrollbar-color: #33413a rgba(255,255,255,.05); }
.empty-times { color: var(--muted); font-size: 13px; }
.route-card { display: flex; gap: 10px; margin-bottom: 10px; padding: 13px 15px; border-radius: 16px; background: rgba(191,232,192,.08); box-shadow: inset 0 0 0 1px rgba(191,232,192,.22); }
.route-card svg { flex: 0 0 auto; color: var(--accent); }
.route-card strong, .route-card span { display: block; }
.route-card strong { color: #dff3de; font-size: 13.5px; }
.route-card span { margin-top: 2px; color: var(--secondary); font-size: 12.5px; }
.slot-label { margin: 14px 0 8px; color: var(--muted); font-size: 10px; letter-spacing: 2.2px; text-transform: uppercase; }
.slot-label.first { color: var(--accent); }
.slots { display: flex; flex-direction: column; gap: 8px; }
.slot-button { width: 100%; min-height: 46px; padding: 13px 18px; border: 0; border-radius: 14px; background: rgba(255,255,255,.06); color: var(--body); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); cursor: pointer; font-size: 14.5px; font-weight: 500; }
.slot-button:hover { background: rgba(255,255,255,.1); color: var(--primary); }
.slot-button.route { background: rgba(191,232,192,.1); color: #dff3de; box-shadow: inset 0 0 0 1px rgba(191,232,192,.3); font-weight: 600; }
.slot-button.route:hover { background: rgba(191,232,192,.16); }
.conflict-card { margin-bottom: 12px; padding: 13px 16px; border-radius: 14px; background: rgba(255,120,90,.09); box-shadow: inset 0 0 0 1px rgba(255,140,110,.4); color: var(--danger); font-size: 13.5px; }

.form-card { width: min(700px,100%); margin-top: 32px; padding: clamp(18px,4.5vw,30px); border-radius: 24px; text-align: left; }
.booking-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.booking-summary strong, .booking-summary span { display: block; }
.booking-summary strong { font: 600 15.5px/1.3 "Space Grotesk", sans-serif; }
.booking-summary span { margin-top: 4px; color: var(--secondary); font-size: 12.5px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(280px,100%),1fr)); gap: 15px; }
.form-grid label { color: #8a998a; font-size: 10px; letter-spacing: 1.8px; text-transform: uppercase; }
.form-grid label small { color: #5f6f64; font-size: inherit; font-weight: 400; letter-spacing: .2px; text-transform: none; }
.form-grid input, .form-grid select { width: 100%; margin-top: 7px; padding: 14px 15px; border: 0; outline: 0; border-radius: 12px; background: rgba(11,18,16,.5); color: var(--primary); box-shadow: inset 0 0 0 1px rgba(255,255,255,.13); font-size: 15.5px; text-transform: none; letter-spacing: 0; }
.form-grid input:focus, .form-grid select:focus { box-shadow: inset 0 0 0 1.5px rgba(191,232,192,.65); }
.form-grid .invalid { box-shadow: inset 0 0 0 1.5px rgba(255,140,110,.55); }
.input-error { min-height: 17px; display: block; margin-top: 6px; color: var(--danger); font-size: 12.5px; letter-spacing: 0; text-transform: none; }
.form-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.booking-note { margin: 16px 0 0; color: var(--muted); text-align: center; font-size: 12px; }
.api-error { padding: 12px 14px; border-radius: 12px; background: rgba(255,120,90,.09); color: var(--danger); box-shadow: inset 0 0 0 1px rgba(255,140,110,.4); font-size: 13px; }

.success-badge { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 50%; background: var(--button-bg); color: #156118; box-shadow: 0 0 60px rgba(191,232,192,.35), 0 24px 50px -20px rgba(0,0,0,.7); }
#screen-success h2 { margin-top: 26px; font-size: clamp(34px,6.5vw,50px); }
.success-meta { max-width: 680px; color: var(--secondary); font-size: 15.5px; line-height: 1.6; white-space: pre-line; }
.success-list { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 18px; color: var(--body); font-size: 13.5px; }
.success-list span::first-letter { color: var(--accent); }
#book-another, #error-restart { margin-top: 34px; }
.error-badge { width: 70px; height: 70px; display: grid; place-items: center; margin-bottom: 26px; border-radius: 50%; background: rgba(255,180,160,.12); color: var(--danger); box-shadow: inset 0 0 0 1px rgba(255,180,160,.35); font: 600 32px/1 "Space Grotesk", sans-serif; }

footer { padding: 16px clamp(20px,5vw,36px); border-top: 1px solid rgba(255,255,255,.09); color: var(--muted); text-align: center; font-size: 12px; }
footer a { color: var(--accent); text-underline-offset: 2px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes stepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1099px) {
  .schedule-card { display: block; }
  .schedule-card.show-times .calendar-column { display: none; }
  .schedule-card:not(.show-times) .times-column { display: none; }
  .times-column { width: 100%; }
  .change-day { display: inline-block; }
  .times-list { max-height: none; overflow: visible; padding-right: 0; }
}

@media (max-width: 560px) {
  .site-header { padding-inline: 12px; }
  .brand-copy-wide { display: none; }
  .brand-copy-mobile { display: block; }
  #user-name { display: none; }
  .user-button { padding-right: 8px; }
  .main-content { padding-inline: 16px; }
  .address-search { padding-left: 15px; gap: 7px; }
  .address-search input { font-size: 15px; }
  .primary-button.compact { padding-inline: 18px; }
  .day-cell { min-height: 40px; }
}

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