.time-card {
  background: hsl(252 64% var(--lightness));
  color: var(--foreground);
  transition: background 0.2s;
}

.time-card span {
  color: inherit;
  opacity: 0.88;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 34px;
  height: 34px;
  color: var(--purple);
  flex: none;
}

.choice-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin-bottom: 20px;
  border-radius: 9px;
  background: #f0eef8;
}

.choice-tab {
  border: 0;
  border-radius: 6px;
  padding: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
  cursor: pointer;
}

.choice-tab.active {
  background: white;
  color: var(--purple);
  box-shadow: 0 1px 4px #17212b18;
}

.weekday-picker {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 20px;
  user-select: none;
  touch-action: none;
}

.weekday-option {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 3px;
  background: white;
  font-weight: 700;
  cursor: pointer;
}

.weekday-option.selected {
  border-color: var(--purple);
  background: var(--purple);
  color: white;
}

.slot-heading { margin-top: 18px; }

.creator-slots-wrap {
  max-height: 330px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}

.creator-slots {
  display: grid;
  min-width: 480px;
  grid-template-columns: 82px repeat(var(--creator-columns), minmax(88px, 1fr));
  user-select: none;
  touch-action: auto;
}

.creator-slots .time,
.calendar .time {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
}

.creator-slots .day-head,
.calendar .day-head { z-index: 3; }

.creator-slots > .day-head:first-child,
.calendar > .day-head:first-child {
  left: 0;
  z-index: 4;
}

.calendar {
  user-select: none;
  touch-action: auto;
}

.calendar .slot { touch-action: none; }

.calendar-wrap {
  max-height: min(65vh, 620px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.creator-slots-wrap { -webkit-overflow-scrolling: touch; }

.creator-slot {
  height: 23px;
  border: 0;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: white;
  cursor: crosshair;
  touch-action: none;
}

.mobile-scroll-hint { display: none; }

.creator-slot:hover { background: #f2efff; }
.creator-slot.selected { background: var(--purple); }
.creator-slots .time { height: 23px; padding: 3px 8px; font-size: 11px; }
.creator-slots .day-head { padding: 7px 5px; font-size: 11px; }
.creator-slots .time { white-space: nowrap; }

.calendar .slot,
.calendar .time { height: 30px; }
.calendar .time { padding: 5px 8px; font-size: 11px; }
.calendar .day-head { padding: 9px 7px; font-size: 12px; }

.best-times {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.time-card { padding: 10px; }
.time-card strong { margin-bottom: 3px; font-size: 14px; }
.time-card span { font-size: 11px; line-height: 1.3; }

.slot.unavailable {
  background: #f3f4f5;
  cursor: default;
  pointer-events: auto;
}

.selection-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
}

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

.dialog-heading h2 { margin-bottom: 24px; }
.dialog-heading .reset-button { white-space: nowrap; }

.step-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.step-control .field-label { margin: 0; }

.selection-footer .selection-summary,
.selection-footer .selected-dates {
  margin: 0;
}

.reset-button {
  border: 0;
  padding: 7px 10px;
  background: transparent;
  color: #b3261e;
  font-weight: 750;
  cursor: pointer;
}

.selection-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.danger-button {
  border: 1px solid #dcaaa6;
  border-radius: 8px;
  padding: 8px 11px;
  background: #fff;
  color: #a9221a;
  font-weight: 750;
  cursor: pointer;
}

.danger-button:hover,
.danger-button:focus-visible {
  border-color: #b3261e;
  background: #fff4f3;
}

.danger-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.field-label {
  margin: 0 0 7px;
  font-size: 13px;
  font-weight: 700;
}

.date-picker {
  padding: 12px;
  border: 1px solid #cbd4dc;
  border-radius: 8px;
  background: #fff;
  max-width: 420px;
  margin: 0 auto;
}

.date-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.calendar-nav {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: var(--lav);
  color: var(--purple);
  cursor: pointer;
  font-size: 23px;
}

.calendar-nav:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.quick-date-ranges {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  max-width: 520px;
  margin: 10px auto 14px;
}

.quick-date-ranges button {
  min-height: 38px;
  padding: 7px 8px;
  border: 1px solid #c9c1eb;
  border-radius: 8px;
  background: #f7f5ff;
  color: var(--purple);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.quick-date-ranges button:hover,
.quick-date-ranges button:focus-visible {
  border-color: var(--purple);
  background: var(--lav);
}

.date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  user-select: none;
  touch-action: none;
}

.weekday {
  padding: 4px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}

.calendar-day {
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

#meetingDialog {
  width: min(680px, calc(100% - 30px));
  max-height: calc(100dvh - 30px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.dialog-open { overflow: hidden; }

#meetingForm,
.dialog-step,
.dialog-heading h2 {
  min-width: 0;
}

.compact-form-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}

.compact-form-row label { margin-bottom: 12px; }
.dialog-step .choice-tabs { margin-bottom: 12px; }
.dialog-step .selected-dates { margin-bottom: 10px; }
.dialog-step .weekday-picker { margin-bottom: 18px; }
.dialog-step .creator-slots-wrap { max-height: min(55vh, 410px); }

.step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

@media (max-width: 720px) {
  #meetingDialog {
    width: calc(100% - 12px);
    max-height: calc(100dvh - 12px);
    margin-block: clamp(6px, 1.2dvh, 12px);
    padding: clamp(12px, 2.2dvh, 20px) clamp(14px, 4vw, 22px);
  }
  #meetingForm > .eyebrow { display: none; }
  #meetingDialog .close { top: 6px; right: 8px; }
  .compact-form-row {
    grid-template-columns: minmax(0, 2fr) minmax(88px, 1fr);
    gap: 8px;
  }
  .compact-form-row label { margin-bottom: clamp(6px, 1.1dvh, 10px); font-size: 11px; }
  .compact-form-row input { margin-top: 3px; padding: clamp(7px, 1.1dvh, 10px) 8px; }
  .dialog-heading { display: block; padding-right: 28px; }
  .dialog-heading h2 {
    margin-bottom: clamp(8px, 1.5dvh, 14px);
    font-size: clamp(18px, 2.5dvh, 21px);
  }
  .dialog-heading .reset-button { padding: 0 0 12px; white-space: normal; }
  .dialog-step .choice-tabs {
    margin-bottom: clamp(6px, 1.1dvh, 10px);
    padding: clamp(3px, .6dvh, 5px);
  }
  .choice-tab { padding: clamp(7px, 1dvh, 10px) 5px; font-size: 12px; }
  .step-control { margin-bottom: clamp(4px, .8dvh, 8px); }
  .step-control .field-label { font-size: 11px; }
  .date-picker { padding: clamp(6px, 1.1dvh, 10px); }
  .date-picker-head { margin-bottom: clamp(4px, .8dvh, 8px); }
  .calendar-nav {
    width: clamp(28px, 3.8dvh, 34px);
    height: clamp(28px, 3.8dvh, 34px);
    font-size: clamp(19px, 2.7dvh, 23px);
  }
  .date-picker-grid { gap: 2px; }
  .weekday { padding: 2px; font-size: 10px; }
  .calendar-day { height: clamp(27px, 4dvh, 34px); }
  .dialog-step .selected-dates {
    min-height: 14px;
    margin: clamp(4px, .7dvh, 7px) 0 clamp(5px, .9dvh, 9px);
    line-height: 1.15;
  }
  .quick-date-ranges {
    gap: clamp(4px, .7dvh, 7px);
    margin: clamp(5px, .8dvh, 8px) auto clamp(7px, 1.2dvh, 12px);
  }
  .quick-date-ranges button {
    min-height: clamp(30px, 4.4dvh, 38px);
    padding: clamp(4px, .8dvh, 7px) 5px;
    font-size: 11px;
  }
  #meetingDetailsStep > .primary.full {
    margin-top: 0;
    padding: clamp(10px, 1.6dvh, 13px) 14px;
  }
  .creator-slot,
  .creator-slots .time { height: 26px; }
  .creator-slots .time { padding-top: 5px; }
  .meeting-head .actions button { flex: 1 1 150px; }
  .selection-footer { align-items: flex-start; }
  .weekday-picker { gap: 3px; }
  .weekday-option { min-height: 44px; }
  .quick-date-ranges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar {
    width: max(100%, var(--mobile-grid-width));
    min-width: max(100%, var(--mobile-grid-width)) !important;
    grid-template-columns: 48px repeat(var(--days), minmax(60px, 1fr));
  }
  .creator-slots {
    width: max(100%, var(--mobile-grid-width));
    min-width: max(100%, var(--mobile-grid-width)) !important;
    grid-template-columns: 54px repeat(var(--creator-columns), minmax(60px, 1fr));
  }
  .calendar .day-head,
  .creator-slots .day-head {
    overflow: visible;
    padding-left: 2px;
    padding-right: 2px;
    line-height: 1.15;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }
  .calendar .time,
  .creator-slots .time {
    padding-left: 3px;
    padding-right: 5px;
    font-size: 10px;
  }
  .mobile-scroll-hint {
    display: block;
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 12px;
  }
}

.creator-slots,
.calendar {
  margin-left: auto;
  margin-right: auto;
  box-shadow: inset -1px 0 var(--line), inset 0 -1px var(--line);
}

.calendar-day:hover { background: var(--lav); }
.calendar-day.selected { background: var(--purple); color: #fff; }
.calendar-day.outside { visibility: hidden; }
.calendar-day.past { color: #aab2b9; cursor: not-allowed; }

#nameHint.error {
  color: #c62828;
  font-weight: 700;
}

.identity-or {
  color: var(--muted);
  font-size: 13px;
}

.identity { flex-wrap: wrap; }

#googleSignIn {
  min-height: 40px;
}

.site-footer {
  width: min(1180px, calc(100% - 44px));
  margin: 40px auto 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line, #dfe3ea);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #657184;
  font-size: 0.9rem;
}

.site-footer nav {
  display: flex;
  gap: 18px;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #6045d6;
  text-decoration: underline;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.privacy-page {
  width: min(760px, calc(100% - 44px));
  margin: 54px auto 80px;
  padding: 42px;
  border: 1px solid var(--line, #dfe3ea);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(42, 32, 86, 0.08);
}

.privacy-page h1 {
  margin: 8px 0 4px;
}

.privacy-page h2 {
  margin: 30px 0 8px;
  font-size: 1.2rem;
}

.privacy-page p,
.privacy-page li {
  color: #4f5d70;
  line-height: 1.65;
}

.privacy-page li + li {
  margin-top: 6px;
}

.privacy-updated {
  margin-top: 0;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .site-footer {
    width: min(100% - 28px, 1180px);
    align-items: flex-start;
    flex-direction: column;
  }

  .privacy-page {
    width: min(100% - 28px, 760px);
    margin: 28px auto 48px;
    padding: 24px 20px;
    border-radius: 16px;
  }

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

  .selection-controls {
    width: 100%;
    justify-content: space-between;
  }
}

.selected-dates {
  min-height: 18px;
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 12px;
}

.empty-slots {
  grid-column: 1 / -1;
  padding: 20px;
  color: var(--muted);
  text-align: center;
}
