:root {
  --bg: #f5f1ea;
  --surface: #ffffff;
  --surface-2: #faf8f4;
  --ink: #2d2a26;
  --muted: #7a7368;
  --line: #e7e0d5;
  --accent: #566e5b;
  --accent-hover: #475c4c;
  --accent-soft: #e6ede5;
  --danger: #a4493d;
  --danger-soft: #f6e5e2;
  --radius: 14px;
  --heading: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/24px var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--heading); margin: 0; }
/* Type scale matches the main website: 48/60 · 30/36 · 24/32, tight tracking */
h1 { font-size: clamp(30px, 6vw, 48px); line-height: 1.25; font-weight: 700; letter-spacing: -0.027em; }
h2 { font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -0.81px; }
h3 { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.648px; }

.muted { color: var(--muted); }
.small { font-size: 12px; line-height: 16px; }

/* ── Layout ─────────────────────────────────────────── */
.site-header {
  padding: 22px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1080px;
  margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .logo { display: block; height: 52px; width: auto; }
.brand small { font-size: 14px; font-weight: 600; color: var(--muted); }
.header-contact { font-size: 14px; font-weight: 600; color: var(--muted); text-align: right; }
.header-contact a { color: inherit; text-decoration: none; }
@media (max-width: 520px) { .brand .logo { height: 40px; } }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px 80px; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.layout > * { min-width: 0; }
@media (min-width: 900px) {
  .layout.has-summary { grid-template-columns: minmax(0, 1fr) 300px; }
}

/* ── Progress ───────────────────────────────────────── */
.progress { display: flex; gap: 6px; list-style: none; padding: 0; margin: 4px 0 26px; flex-wrap: wrap; }
.progress li {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: var(--muted);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
}
.progress li.done { color: var(--accent); border-color: var(--accent-soft); background: var(--accent-soft); }
.progress li.current { color: #fff; background: var(--accent); border-color: var(--accent); }

.step-head { margin-bottom: 20px; }
.step-head p { margin: 8px 0 0; color: var(--muted); font-size: 18px; line-height: 28px; font-weight: 300; }

/* ── Cards ──────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }

.locations { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.location-card { display: flex; flex-direction: column; gap: 14px; }
.location-card .address { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.today-status { font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.today-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.today-status.open::before { background: #6f9a72; }

.hours { width: 100%; border-collapse: collapse; font-size: 14px; }
.hours td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; }
.hours tr:last-child td { border-bottom: 0; }
.hours tr.closed td { color: var(--muted); }
.hours tr.is-today td { font-weight: 600; color: var(--accent); }

/* ── Buttons ────────────────────────────────────────── */
.btn {
  appearance: none;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  padding: 11px 22px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  transition: background .15s, opacity .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.secondary { background: transparent; color: var(--accent); }
.btn.secondary:hover { background: var(--accent-soft); }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.small { padding: 6px 14px; font-size: 13px; }
.btn.block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; text-decoration: underline; font-family: var(--ui); font-weight: 500; font-size: 14px; }
.actions { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 24px; flex-wrap: wrap; }

/* ── Treatments ─────────────────────────────────────── */
.category { margin-bottom: 26px; }
.category h3 { margin-bottom: 10px; }
.treatment-list { display: grid; gap: 10px; }
.treatment {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color .15s, box-shadow .15s;
}
.treatment.is-selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.treatment-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.treatment .name { font-weight: 700; font-size: 17px; line-height: 24px; letter-spacing: -0.2px; }
.treatment .from { color: var(--muted); font-size: 14px; white-space: nowrap; }
.treatment .desc {
  color: var(--muted); font-size: 14px; line-height: 21px; margin: 6px 0 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.treatment.expanded .desc { -webkit-line-clamp: unset; display: block; }
.treatment .more { background: none; border: 0; padding: 2px 0; margin-top: 2px; color: var(--accent); font-family: var(--ui); font-weight: 500; font-size: 14px; cursor: pointer; text-decoration: underline; }
.options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.option { position: relative; cursor: pointer; }
.option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.option span { display: inline-block; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; background: var(--surface); transition: background .15s, border-color .15s; }
.option span strong { font-weight: 600; }
.option:hover span { border-color: var(--accent); }
.option input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.option input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }

/* ── Dates & slots ──────────────────────────────────── */
.date-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.date-pill {
  flex: 0 0 auto;
  width: 66px;
  padding: 10px 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  scroll-snap-align: start;
  line-height: 1.2;
}
.date-pill .dow { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.date-pill .day { font-size: 22px; font-family: var(--heading); font-weight: 700; letter-spacing: -0.5px; margin: 2px 0; }
.date-pill .mon { font-size: 12px; color: var(--muted); }
.date-pill:disabled { opacity: .38; cursor: not-allowed; background: transparent; }
.date-pill.selected { background: var(--accent); border-color: var(--accent); color: #fff; }
.date-pill.selected .dow, .date-pill.selected .mon { color: #e8efe7; }

.slot-group { margin-top: 18px; }
.slot-group h4 { margin: 0 0 8px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slot {
  padding: 10px 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-weight: 500;
}
.slot:hover { border-color: var(--accent); }
.slot.selected { background: var(--accent); border-color: var(--accent); color: #fff; }

.empty { padding: 26px; text-align: center; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ── Forms ──────────────────────────────────────────── */
.form-grid { display: grid; gap: 16px; }
@media (min-width: 620px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
.field label, .field .label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 14px; line-height: 20px; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 5px; }
.field input[type='text'], .field input[type='email'], .field input[type='tel'], .field input[type='password'],
.field input[type='date'], .field input[type='time'], .field input[type='url'], .field input[type='number'], .field select, .field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.checkbox input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--accent); }
.file-drop {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px dashed #cfc6b8;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 14px;
}
.file-drop input { font-size: 13px; max-width: 100%; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { padding: 12px 14px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: 14px; margin-top: 16px; }
.notice { padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-hover); font-size: 14px; }

/* ── Summary ────────────────────────────────────────── */
.summary { position: sticky; top: 20px; }
.summary h3 { font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: 0; margin-bottom: 12px; }
.summary dl { margin: 0; display: grid; gap: 10px; font-size: 14px; }
.summary dt { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.summary dd { margin: 2px 0 0; }
.summary .line { display: flex; justify-content: space-between; gap: 10px; }
.summary .total { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; display: flex; justify-content: space-between; font-weight: 600; font-size: 16px; }
@media (max-width: 899px) {
  .summary { position: static; order: -1; padding: 14px 18px; }
  .summary h3 { display: none; }
  .summary dl { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
}

/* ── Confirmation ───────────────────────────────────── */
.confirmation { max-width: 620px; margin: 0 auto; text-align: center; }
.tick {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin: 0 auto 18px; font-size: 30px;
}
.confirmation .card { text-align: left; margin: 24px 0; }
.detail-rows { display: grid; gap: 0; }
.detail-rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.detail-rows > div:last-child { border-bottom: 0; }
.detail-rows span:first-child { color: var(--muted); }
.detail-rows span:last-child { text-align: right; }
.ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; font-weight: 600; }

.spinner { width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

footer.site-footer { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 20px; }

/* ── Consultation call-to-action ── */
.form-cta { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--accent-soft); border-color: #cfdccd; text-align: left; }
.form-cta h3 { font-size: 18px; line-height: 24px; font-weight: 700; letter-spacing: -0.3px; }
.form-cta p { margin: 4px 0 0; font-size: 14px; }
.form-cta > div { flex: 1 1 280px; }

/* ── Confirmation dialog (see askConfirm in common.js) ── */
.confirm-dialog { border: 0; border-radius: 16px; padding: 24px; width: min(420px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0, 0, 0, .2); color: var(--ink); }
.confirm-dialog::backdrop { background: rgba(45, 42, 38, .45); }
.confirm-dialog h3 { font-size: 22px; line-height: 28px; margin-bottom: 8px; }
.confirm-dialog p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.confirm-dialog .checkbox { margin: 4px 0 18px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); }
.btn.danger-solid:hover { background: #8c3c32; }
