:root {
  --bg: #f6f2ec;
  --surface: #fffdf9;
  --ink: #1f1b17;
  --muted: #8a8076;
  --line: #e4ddd3;
  --accent: #1f1b17;
  --accent-ink: #f6f2ec;
  --soft: #efe8de;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.widget {
  max-width: 980px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

/* Header */
.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.title {
  margin: 0 0 28px;
  font: 400 clamp(36px, 6vw, 56px)/1.05 var(--serif);
  letter-spacing: -.01em;
}
.steps {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 36px;
  counter-reset: s;
}
.steps li {
  flex: 1;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  counter-increment: s;
  transition: color .3s, border-color .3s;
}
.steps li::before { content: '0' counter(s) '  '; white-space: pre; }
.steps li.active, .steps li.done { color: var(--ink); border-top-color: var(--ink); }

/* Packages */
.packages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.pkg {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 28px 24px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.pkg:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: 0 12px 30px -18px rgba(31,27,23,.35); }
.pkg.featured { background: var(--ink); color: var(--accent-ink); border-color: var(--ink); }
.pkg.featured .pkg-meta, .pkg.featured li { color: #cfc6bb; }
.pkg-badge {
  position: absolute; top: 16px; right: 16px;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 8px; border: 1px solid currentColor; border-radius: 99px; opacity: .8;
}
.pkg-name { font: 400 28px/1.1 var(--serif); margin: 0 0 4px; }
.pkg-meta { font-size: 13px; color: var(--muted); margin: 0 0 20px; }
.pkg-price { font: 400 44px/1 var(--serif); margin: 0 0 20px; }
.pkg ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.pkg li { font-size: 14px; color: var(--muted); padding: 6px 0; border-top: 1px solid rgba(138,128,118,.2); }
.pkg-cta {
  font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  padding-top: 14px; border-top: 1px solid currentColor;
}

/* Picked package bar */
.picked {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 14px 18px; margin-bottom: 20px;
  background: var(--soft); border-radius: 4px; font-size: 14px;
}
.picked strong { font: 500 20px var(--serif); }

/* Scheduler */
.scheduler {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px;
}
.calendar, .times {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 20px;
}
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-month { font: 400 22px var(--serif); }
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: none; font-size: 18px; line-height: 1;
}
.icon-btn:disabled { opacity: .3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow span { text-align: center; font-size: 11px; color: var(--muted); padding-bottom: 6px; text-transform: uppercase; letter-spacing: .08em; }
.day {
  aspect-ratio: 1; border: 0; border-radius: 50%; background: none;
  font-size: 14px; color: #c9c0b5; cursor: default; position: relative;
}
.day.avail { color: var(--ink); background: var(--soft); cursor: pointer; }
.day.avail:hover { background: #e4dace; }
.day.selected { background: var(--ink) !important; color: var(--accent-ink); }
.day.today::after { content: ''; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }

.times { display: flex; flex-direction: column; }
.times-label { margin: 0 0 14px; font: 400 22px var(--serif); }
.time-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; flex: 1; }
.time {
  padding: 11px 8px; border: 1px solid var(--line); border-radius: 4px; background: none;
  font-size: 14px; transition: border-color .2s, background .2s;
}
.time:hover { border-color: var(--ink); }
.time.selected { background: var(--ink); color: var(--accent-ink); border-color: var(--ink); }
.empty { grid-column: 1 / -1; color: var(--muted); font-size: 14px; margin: 0; }
.tz { margin: 14px 0 0; font-size: 12px; color: var(--muted); }

/* Form */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.form label:last-child { grid-column: 1 / -1; }
.opt { font-size: 11px; opacity: .7; }
.form input, .form textarea {
  font: 15px var(--sans); color: var(--ink);
  padding: 12px 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 4px; outline: none; resize: vertical;
}
.form input:focus, .form textarea:focus { border-color: var(--ink); }
.form .invalid { border-color: #b4553f; }

/* Summary */
.summary {
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 8px 24px;
}
.row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 14px; }
.row:first-child { border-top: 0; }
.row span:first-child { color: var(--muted); }
.row.total { font: 400 26px var(--serif); }
.row.total span:first-child { color: var(--ink); }
.secure { font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.turnstile:not(:empty) { margin-top: 16px; }
.error { font-size: 13px; color: #b4553f; margin: 12px 0 0; }

/* Actions */
.actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 28px;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid var(--accent); border-radius: 99px;
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  transition: opacity .2s;
}
.btn:hover { opacity: .85; }
.btn:disabled { opacity: .3; cursor: default; }
.btn.ghost { background: none; color: var(--ink); border-color: var(--line); }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; margin-top: 24px; font-size: 13px; }

/* Done */
.done { text-align: center; padding: 24px 0; }
.check {
  width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: var(--accent-ink); font-size: 26px;
}
.done-text { font: 400 24px/1.35 var(--serif); max-width: 520px; margin: 0 auto 28px; }
.cal-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Overlay */
.overlay {
  position: fixed; inset: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: rgba(246,242,236,.94); text-align: center;
}
.overlay p { margin: 12px 0 0; font: 400 24px var(--serif); }
.overlay small { color: var(--muted); }
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--ink);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.panel { animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* Mobile */
@media (max-width: 760px) {
  .widget { padding: 32px 16px 48px; }
  .packages, .scheduler, .form { grid-template-columns: 1fr; }
  .steps li { font-size: 0; }
  .steps li::before { font-size: 12px; }
  .actions { flex-direction: column-reverse; }
  .actions .btn { width: 100%; }
  .time { font-size: 13px; padding: 11px 4px; white-space: nowrap; }
}
