:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #1a2233;
  --muted: #6b7488;
  --line: #e3e7ef;
  --brand: #2f5bea;
  --brand-ink: #ffffff;
  --brand-soft: #eaf0ff;
  --ok: #17915b;
  --err: #c0392b;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(26, 34, 51, 0.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 680px; margin: 0 auto; padding: 40px 20px 80px; }
.wrap.wide { max-width: 960px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; }
h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -0.02em; }
.intro { color: var(--muted); margin: 0 0 4px; }
.steps { display: flex; gap: 8px; margin: 24px 0 28px; }
.step-dot { flex: 1; height: 5px; border-radius: 99px; background: var(--line); transition: background .2s; }
.step-dot.active { background: var(--brand); }
.section-label { font-weight: 600; margin: 0 0 12px; }
.day-group { margin-bottom: 20px; }
.day-heading { font-size: 14px; font-weight: 600; color: var(--muted); margin: 0 0 10px; text-transform: uppercase; letter-spacing: .04em; }

/* Calendar (week-style) layout */
.calendar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 12px;
}
.cal-day {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cal-day-head {
  text-align: center;
  padding: 12px 8px 10px;
  background: #fafbfe;
  border-bottom: 1px solid var(--line);
}
.cal-weekday { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cal-daynum { font-size: 26px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
.cal-month { font-size: 12px; color: var(--muted); }
.cal-slots { padding: 10px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cal-empty { padding: 16px 10px; text-align: center; color: var(--muted); font-size: 13px; }

.slot-btn {
  appearance: none; border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 9px; padding: 10px 8px; font-size: 14px; font-weight: 600; cursor: pointer;
  text-align: center; transition: border-color .15s, background .15s, transform .05s; width: 100%;
}
.slot-btn:hover { border-color: var(--brand); background: var(--brand-soft); }
.slot-btn:active { transform: translateY(1px); }
.slot-btn.selected { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
label.field { display: block; margin-bottom: 18px; }
.field-label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15px; }
.field-help { color: var(--muted); font-size: 13px; margin: -2px 0 8px; }
input[type="text"], input[type="email"], input[type="password"], textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px;
  font-size: 15px; font-family: inherit; color: var(--ink); background: #fff;
}
input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea { resize: vertical; min-height: 84px; }
.email-row { display: flex; gap: 8px; margin-bottom: 8px; }
.email-row input { flex: 1; }
.icon-btn { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; width: 46px; flex: 0 0 46px; font-size: 20px; color: var(--muted); cursor: pointer; }
.icon-btn:hover { border-color: var(--err); color: var(--err); }
.link-btn { background: none; border: none; color: var(--brand); font-weight: 600; cursor: pointer; padding: 4px 0; font-size: 14px; }
.joint-option { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; transition: border-color .15s, background .15s; }
.joint-option:hover { border-color: var(--brand); }
.joint-option.selected { border-color: var(--brand); background: var(--brand-soft); }
.joint-option input { accent-color: var(--brand); width: 18px; height: 18px; }
.actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 26px; }
.btn { appearance: none; border: none; border-radius: 10px; padding: 13px 22px; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:disabled { opacity: .55; cursor: default; }
.btn-ghost { background: none; color: var(--muted); border: none; }
.btn-ghost:hover { color: var(--ink); }
.error { background: #fdecea; color: var(--err); border-radius: 10px; padding: 12px 14px; margin: 0 0 18px; font-size: 14px; }
.selected-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--brand-soft); color: var(--brand); border-radius: 99px; padding: 6px 14px; font-weight: 600; font-size: 14px; margin-bottom: 20px; }
.thanks { text-align: center; padding: 20px 10px; }
.thanks .check { width: 64px; height: 64px; border-radius: 50%; background: var(--ok); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 34px; margin: 0 auto 20px; }
.thanks h2 { font-size: 22px; margin: 0 0 8px; }
.thanks p { color: var(--muted); margin: 0; }
.muted { color: var(--muted); font-size: 14px; }
.center { text-align: center; color: var(--muted); padding: 30px 0; }
.hidden { display: none !important; }
table.bookings { width: 100%; border-collapse: collapse; font-size: 14px; }
table.bookings th { text-align: left; color: var(--muted); padding: 8px 10px; font-weight: 600; white-space: nowrap; }
table.bookings td { padding: 10px; vertical-align: top; border-top: 1px solid var(--line); }
.tally-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.poll-group { padding: 10px 0; border-bottom: 1px solid var(--line); }
.poll-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.poll-head span { font-weight: 600; }
.poll-names { color: var(--muted); font-size: 14px; margin-top: 4px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; letter-spacing: .02em; }
.pill-free { background: #e7f6ee; color: var(--ok); }
.pill-booked { background: var(--brand-soft); color: var(--brand); }
.btn-remove { border: 1px solid var(--line); background: #fff; color: var(--err); border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn-remove:hover { border-color: var(--err); background: #fdecea; }
.btn-remove:disabled { opacity: .5; cursor: default; }
tr.is-free td { color: var(--muted); }
