:root {
  --brand: #e12421;
  --brand-dark: #b81b18;
  --brand-tint: #fdecec;
  --ink: #1d2733;
  --ink-2: #4a5866;
  --muted: #7a8794;
  --line: #e4e8ec;
  --bg: #f5f6f8;
  --card: #ffffff;
  --ok: #157f3c;
  --err: #b42318;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); line-height: 1.5; font-size: 15px; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Page shell ---------- */
.page { max-width: 1080px; margin: 0 auto; padding: 40px 20px 24px; }
body.embed { background: transparent; }
body.embed .page { padding: 0; }
body.embed .page-footer { display: none; }
.page-footer { text-align: center; color: var(--muted); font-size: 13px; margin-top: 24px; }
.page-footer a { color: var(--muted); }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }

/* ---------- Index (list of meeting types) ---------- */
.index-head { text-align: center; padding: 8px 0 28px; }
.index-head img { height: 96px; width: auto; }
.index-head h1 { font-size: 26px; font-weight: 650; margin: 18px 0 6px; letter-spacing: -.01em; }
.index-head p { color: var(--ink-2); margin: 0 auto; max-width: 560px; }
.types { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; max-width: 980px; margin: 0 auto; }
.type-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; padding: 22px 22px 18px; border-top: 4px solid var(--c, var(--brand)); transition: transform .12s ease, box-shadow .12s ease; }
.type-card:hover, .type-card:focus-visible { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(16,24,40,.06), 0 14px 32px rgba(16,24,40,.10); outline: none; }
.type-card h2 { font-size: 18px; margin: 0 0 8px; font-weight: 650; }
.type-card p { color: var(--ink-2); font-size: 14px; margin: 10px 0 16px; flex: 1; }
.type-card .go { color: var(--brand); font-weight: 600; font-size: 14px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--ink-2); font-size: 14px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta svg { width: 17px; height: 17px; color: var(--muted); flex: none; }

/* ---------- Booking layout ---------- */
.booking { display: grid; grid-template-columns: 320px 1fr; min-height: 560px; overflow: hidden; }
.side { padding: 28px; border-right: 1px solid var(--line); }
.side .logo { display: block; height: 62px; width: auto; margin-bottom: 22px; }
.side .back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); text-decoration: none; margin-bottom: 18px; }
.side .back:hover { color: var(--brand); }
.side .back svg { width: 16px; height: 16px; }
.side .host { color: var(--muted); font-size: 14px; margin: 0 0 4px; }
.side h1 { font-size: 24px; line-height: 1.25; margin: 0 0 16px; font-weight: 650; letter-spacing: -.01em; }
.side .meta { flex-direction: column; gap: 10px; font-weight: 500; }
.side .desc { margin-top: 18px; color: var(--ink-2); font-size: 14px; white-space: pre-line; }
.side .chosen { margin-top: 18px; padding: 12px 14px; background: var(--brand-tint); border-radius: 8px; color: var(--ink); font-weight: 600; font-size: 14px; display: flex; gap: 8px; }
.side .chosen svg { width: 18px; height: 18px; color: var(--brand); flex: none; margin-top: 1px; }
.notice { margin-top: 18px; padding: 10px 12px; background: #fff8e6; border: 1px solid #f5d98b; border-radius: 8px; font-size: 13px; color: #6b4e00; }

.main { padding: 28px 30px; min-width: 0; }
.main h2 { font-size: 19px; margin: 0 0 18px; font-weight: 650; }

.picker { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 28px; }
.picker.no-day { grid-template-columns: minmax(0, 1fr); }
.picker.no-day .times { display: none; }

/* Calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head strong { font-size: 16px; font-weight: 600; }
.cal-nav { display: flex; gap: 6px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.icon-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn svg { width: 18px; height: 18px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-grid .dow { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 6px 0; font-weight: 600; }
.day { aspect-ratio: 1; max-height: 52px; border: 0; background: none; border-radius: 50%; font-size: 15px; cursor: default; color: #b7c0c8; position: relative; }
.day.avail { background: var(--brand-tint); color: var(--brand-dark); font-weight: 650; cursor: pointer; }
.day.avail:hover { background: #f9d5d4; }
.day.sel { background: var(--brand); color: #fff; }
.day.today::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.cal-foot { margin-top: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.cal-foot select { border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; background: #fff; max-width: 260px; }
.cal-foot .seg { margin-left: auto; display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.cal-foot .seg button { border: 0; background: #fff; padding: 4px 10px; cursor: pointer; font-size: 12px; }
.cal-foot .seg button.on { background: var(--ink); color: #fff; }

/* Times */
.times h3 { font-size: 15px; font-weight: 600; margin: 6px 0 14px; }
.time-list { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.time { display: flex; gap: 6px; }
.time button { flex: 1; padding: 11px 0; border: 1px solid var(--brand); color: var(--brand); background: #fff; border-radius: 8px; font-weight: 600; cursor: pointer; transition: all .1s; }
.time button:hover { border-width: 2px; padding: 10px 0; }
.time.sel button.t { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.time button.next { background: var(--brand); color: #fff; }
.time button.next:hover { background: var(--brand-dark); border-width: 1px; padding: 11px 0; }
.empty { color: var(--muted); font-size: 14px; padding: 12px 0; }

/* Form */
.form { max-width: 520px; }
.field { margin-bottom: 18px; }
.field label, .field .label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field label.opt { display: flex; font-weight: 400; margin-bottom: 0; }
.field label.chk { display: inline-flex; font-weight: 500; margin-bottom: 0; }
.field .req { color: var(--brand); margin-left: 2px; }
.field .help { color: var(--muted); font-size: 13px; margin: -2px 0 6px; }
.input, textarea.input, select.input { width: 100%; border: 1px solid #cfd6dd; border-radius: 8px; padding: 10px 12px; background: #fff; transition: border-color .1s, box-shadow .1s; }
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(225, 36, 33, .15); }
.field.bad .input { border-color: var(--err); }
.field .err { color: var(--err); font-size: 13px; margin-top: 4px; }
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.opt input { margin-top: 3px; accent-color: var(--brand); width: 16px; height: 16px; }
.link-btn { background: none; border: 0; color: var(--brand); font-weight: 600; cursor: pointer; padding: 0; font-size: 14px; }
.hp { position: absolute; left: -9999px; }
.privacy { font-size: 12.5px; color: var(--muted); margin: 6px 0 18px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: 999px; border: 1px solid transparent; font-weight: 600; cursor: pointer; text-decoration: none; font-size: 15px; transition: background .1s; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.btn-ghost { background: #fff; border-color: #cfd6dd; color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-danger { background: var(--err); color: #fff; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.alert { padding: 12px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.alert-err { background: #fdeceb; color: var(--err); border: 1px solid #f5c2bf; }
.alert-ok { background: #e9f6ee; color: var(--ok); border: 1px solid #b9e2c7; }

/* Confirmation */
.done { text-align: center; max-width: 520px; margin: 10px auto; }
.done .tick { width: 56px; height: 56px; border-radius: 50%; background: #e9f6ee; color: var(--ok); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.done .tick.x { background: #fdeceb; color: var(--err); }
.done .tick svg { width: 28px; height: 28px; }
.done h2 { font-size: 22px; margin: 0 0 6px; }
.done > p { color: var(--ink-2); margin: 0 0 20px; }
.summary { text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin: 0 0 20px; }
.summary h3 { margin: 0 0 12px; font-size: 17px; }
.summary .meta { flex-direction: column; gap: 10px; }
.summary .strike { text-decoration: line-through; color: var(--muted); }
.done .small { font-size: 13px; color: var(--muted); }

.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 60px 0; color: var(--muted); }

@media (max-width: 860px) {
  .booking { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); padding: 22px; }
  .side .logo { height: 48px; margin-bottom: 14px; }
  .side .desc { display: none; }
  .main { padding: 22px; }
  .picker { grid-template-columns: 1fr; gap: 22px; }
  .time-list { max-height: none; }
  .page { padding: 16px 12px; }
}
