:root {
  --bg: #101010;
  --bg-elev: #1a1a1a;
  --surface: #2b2b2b;
  --surface-hover: #333333;
  --border: #2e2e2e;
  --border-strong: #3f3f3f;
  --text: #ffffff;
  --muted: #a3a3a3;
  --muted-2: #888888;
  --dot: #22c55e;
  --danger: #f87171;
  --radius: 8px;
  --radius-lg: 12px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); font-family: var(--font); min-height: 100%; }
body { -webkit-font-smoothing: antialiased; }
button, input { font-family: inherit; }
.hidden { display: none !important; }

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 16px 12px 28px;
}

.booker {
  width: min(1080px, 100%);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  min-height: 640px;
}

.booker[data-view="calendar"] {
  grid-template-columns: 280px minmax(320px, 1fr) 250px;
}

.booker[data-view="form"],
.booker[data-view="success"] {
  grid-template-columns: 300px minmax(360px, 1fr);
}

.event-pane,
.calendar-pane,
.slots-pane,
.form-pane {
  padding: 28px 24px;
  min-height: 0;
}

.calendar-pane,
.slots-pane,
.form-pane {
  border-left: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #d4d4d4;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #111;
}

.event-title {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.event-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 22px;
}

.meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.meta-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.meta-row svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 2px;
  opacity: 0.9;
}

.tz-btn {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

.tz-btn:hover { color: var(--text); }

.tz-wrap { position: relative; flex: 1; }
.tz-pop {
  position: absolute;
  left: -26px;
  top: 28px;
  z-index: 20;
  width: 300px;
  background: #171717;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
  padding: 8px;
}
.tz-pop input {
  width: 100%;
  background: #111;
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  outline: none;
  margin-bottom: 6px;
}
.tz-list {
  max-height: 220px;
  overflow: auto;
}
.tz-item {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.tz-item:hover, .tz-item.is-active { background: var(--surface); color: var(--text); }

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.month-label { font-size: 16px; font-weight: 600; }
.nav {
  display: flex;
  gap: 4px;
}
.nav button,
.icon-btn {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.nav button:hover { background: var(--surface); color: var(--text); }

.dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 8px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
}
.grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px 6px;
}
.day {
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  cursor: default;
  font-size: 14px;
  font-weight: 500;
  position: relative;
}
.day.is-available {
  background: var(--surface);
  cursor: pointer;
}
.day.is-available:hover { background: var(--surface-hover); }
.day.is-selected {
  background: #fff;
  color: #111;
  cursor: pointer;
}
.day.is-selected::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #111;
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
}
.day.is-muted { color: #4a4a4a; }
.day:disabled { color: #5a5a5a; background: transparent; cursor: default; }

.slots-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.slots-date { font-size: 16px; font-weight: 600; }
.fmt {
  display: flex;
  background: var(--surface);
  border-radius: 8px;
  padding: 2px;
}
.fmt button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.fmt button.is-on { background: #fff; color: #111; }

.slot-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}
.slot {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}
.slot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dot);
}
.slot:hover { border-color: #fff; }
.slot.is-selected {
  background: #fff;
  color: #111;
  border-color: #fff;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  cursor: default;
}
.slot.is-selected::before { display: none; }
.next-btn {
  width: 100%;
  background: #111;
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 8px;
  font-weight: 600;
  cursor: pointer;
}

.form-pane h2 { font-size: 18px; margin-bottom: 18px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}
.req { color: #fb7185; }
.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  background: #171717;
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
}
.field input:focus { border-color: #fff; }
.radios { display: flex; flex-direction: column; gap: 10px; }
.radio {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}
.radio input { accent-color: #fff; }
.guests-link {
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: -4px 0 16px;
}
.guests-link:hover { color: #fff; opacity: 0.85; }
.legal {
  color: var(--muted-2);
  font-size: 12px;
  margin-top: 18px;
}
.legal a { color: var(--muted); }
.actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}
.back {
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
}
.confirm {
  background: #fff;
  color: #111;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
}
.confirm:disabled { opacity: 0.55; cursor: wait; }
.error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 10px;
}
.empty-slots {
  color: var(--muted);
  font-size: 14px;
  padding: 20px 0;
}
.success {
  text-align: left;
}
.success h2 { font-size: 22px; margin-bottom: 8px; }
.success p { color: var(--muted); }

.cal-credit {
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 12px;
  text-decoration: none;
}

@media (max-width: 900px) {
  .booker[data-view="calendar"] {
    grid-template-columns: 1fr;
  }
  .calendar-pane, .slots-pane, .form-pane { border-left: 0; border-top: 1px solid var(--border); }
  .booker[data-view="form"],
  .booker[data-view="success"] { grid-template-columns: 1fr; }
  .slot-list { max-height: none; }
  .field-row { grid-template-columns: 1fr; }
}
