/* =========================================================
   Glow Studio — demo booking app
   Palette: blush / sage / deep plum on warm cream.
   Type: DM Serif Display (headings) + DM Sans (UI).
   ========================================================= */

:root {
  --plum-900: #2e1530;
  --plum: #4a2545;
  --plum-700: #6b3a63;
  --plum-100: #f1e6ef;
  --blush: #f4c7c0;
  --blush-200: #f8dcd6;
  --blush-100: #fbeae6;
  --blush-50: #fdf5f2;
  --sage: #8fae96;
  --sage-700: #4a6b53;
  --sage-100: #e6efe7;
  --cream: #fcf8f5;
  --white: #ffffff;
  --ink: #2b1d2a;
  --muted: #6c5b69;
  --line: #eadcdc;
  --line-strong: #d9c4c7;
  --danger: #a3354b;
  --danger-100: #fbe4e8;
  --focus: #b04f7e;

  --cat-hair: #6b3a63;
  --cat-hair-bg: #f1e6ef;
  --cat-color: #b4604f;
  --cat-color-bg: #fbe7e1;
  --cat-nails: #a84a72;
  --cat-nails-bg: #fbe4ee;
  --cat-skin: #4a6b53;
  --cat-skin-bg: #e6efe7;

  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 12px;
  --pill: 999px;

  --shadow-sm: 0 1px 2px rgba(74, 37, 69, .06), 0 2px 8px -4px rgba(74, 37, 69, .12);
  --shadow: 0 2px 4px rgba(74, 37, 69, .04), 0 16px 36px -18px rgba(74, 37, 69, .32);
  --shadow-lg: 0 24px 60px -20px rgba(46, 21, 48, .45);

  --ribbon-h: 36px;
  --header-h: 64px;
  --font-serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--ribbon-h) + var(--header-h) + 16px);
}

body {
  margin: 0;
  padding-top: var(--ribbon-h);
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 100% -10%, rgba(244, 199, 192, .45), transparent 60%),
    radial-gradient(700px 420px at -10% 20%, rgba(143, 174, 150, .22), transparent 60%),
    var(--cream);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.15; }
h1, h2 { font-family: var(--font-serif); font-weight: 400; letter-spacing: -.01em; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
a { color: var(--plum-700); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 8px;
}
[tabindex="-1"]:focus { outline: none; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  left: 12px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--plum);
  color: #fff;
  border-radius: var(--pill);
  font-weight: 600;
  text-decoration: none;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: calc(var(--ribbon-h) + 8px); }

.icon {
  width: 20px; height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Demo ribbon ---------- */
.demo-ribbon {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  height: var(--ribbon-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 16px;
  background: #1c1b1f;
  color: #d9d6dc;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
}
.ribbon-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ribbon-short { display: none; }
.ribbon-link {
  flex: none;
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 6px 2px;
}
.ribbon-link:hover { color: #f4c7c0; }
.ribbon-link:focus-visible { outline-color: #f4c7c0; }

/* ---------- App header ---------- */
.app-header {
  position: sticky;
  top: var(--ribbon-h);
  z-index: 50;
  background: rgba(252, 248, 245, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1200px;
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--plum);
  text-decoration: none;
  min-height: 44px;
}
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-name { font-family: var(--font-serif); font-size: 1.4rem; white-space: nowrap; }

.view-nav {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  box-shadow: var(--shadow-sm);
}
.view-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--pill);
  color: var(--muted);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.view-tab:hover { color: var(--plum); background: var(--blush-50); }
.view-tab[aria-current="page"] { background: var(--plum); color: #fff; }
.badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--pill);
  background: var(--blush);
  color: var(--plum-900);
  font-size: .75rem;
  font-weight: 700;
}
.badge.bump { animation: bump .4s var(--ease); }
@keyframes bump { 40% { transform: scale(1.3); } }

/* ---------- Layout ---------- */
.book-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
@media (min-width: 1000px) {
  .book-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; }
}

.wizard { min-width: 0; }
.eyebrow {
  color: var(--sage-700);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.wizard-head h1, .bookings-head h1 {
  margin-top: 6px;
  font-size: clamp(1.9rem, 1.3rem + 2vw, 2.6rem);
  color: var(--plum);
}

/* ---------- Stepper ---------- */
.stepper-nav { margin: 22px 0 18px; }
.stepper {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stepper li {
  display: flex;
  align-items: center;
  flex: 1 1 0;
  min-width: 0;
  gap: 6px;
}
.stepper li:last-child { flex: 0 0 auto; }
.stepper li:not(:last-child)::after {
  content: "";
  flex: 1 1 auto;
  min-width: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--line);
  transition: background .3s var(--ease);
}
.stepper li.is-done:not(:last-child)::after { background: var(--sage); }
.step-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 10px 4px 4px;
  border: 0;
  border-radius: var(--pill);
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
}
.step-btn:disabled { cursor: default; }
.step-btn:not(:disabled):hover { background: var(--blush-100); color: var(--plum); }
.step-num {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--white);
  font-size: .85rem;
  transition: all .25s var(--ease);
}
.step-num .icon { width: 16px; height: 16px; stroke-width: 3; }
.is-done .step-num { background: var(--sage); border-color: var(--sage); color: #fff; }
.is-current .step-btn { color: var(--plum); }
.is-current .step-num { background: var(--plum); border-color: var(--plum); color: #fff; box-shadow: 0 0 0 4px var(--blush-200); }
.is-locked .step-btn { opacity: .55; }
@media (max-width: 760px) {
  .stepper li:not(.is-current) .step-label { display: none; }
  .step-btn { padding-right: 4px; }
  .is-current .step-btn { padding-right: 10px; }
}

/* ---------- Reschedule banner ---------- */
.reschedule-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--sage-100);
  border: 1px solid #cfdfd2;
  color: var(--sage-700);
  font-weight: 500;
}
.reschedule-banner strong { color: var(--ink); }

/* ---------- Panels & transitions ---------- */
.panels { position: relative; min-width: 0; }
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow);
}
.panel-head { margin-bottom: 18px; }
.panel-head h2 { font-size: 1.6rem; color: var(--plum); }
.panel-sub { margin-top: 6px; color: var(--muted); }
.panel.enter-fwd { animation: enterFwd .38s var(--ease); }
.panel.enter-back { animation: enterBack .38s var(--ease); }
/* Vertical + scale motion only, so the transition never causes horizontal overflow */
@keyframes enterFwd { from { opacity: 0; transform: translateY(14px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes enterBack { from { opacity: 0; transform: translateY(-10px) scale(.99); } to { opacity: 1; transform: none; } }

.card-soft {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--blush-50);
  padding: 18px;
}

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--pill);
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font-weight: 600;
  font-size: .92rem;
  transition: all .2s var(--ease);
}
.chip:hover { border-color: var(--line-strong); color: var(--plum); }
.chip[aria-pressed="true"] { background: var(--plum); border-color: var(--plum); color: #fff; }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .7; }
.chip-count { font-size: .75rem; opacity: .75; }
.list-meta { margin: 14px 0 12px; color: var(--muted); font-size: .9rem; }

/* ---------- Service cards ---------- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 12px;
}
.svc {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
  padding: 16px;
  text-align: left;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.svc:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.svc[aria-pressed="true"] { border-color: var(--plum); background: var(--blush-50); box-shadow: 0 0 0 3px var(--blush-200); }
.svc-icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  flex: none;
  border-radius: 14px;
}
.svc-icon .icon { width: 22px; height: 22px; stroke-width: 1.8; }
.cat-Hair { color: var(--cat-hair); background: var(--cat-hair-bg); }
.cat-Color { color: var(--cat-color); background: var(--cat-color-bg); }
.cat-Nails { color: var(--cat-nails); background: var(--cat-nails-bg); }
.cat-Skin { color: var(--cat-skin); background: var(--cat-skin-bg); }
.svc-body { display: block; min-width: 0; flex: 1; }
.svc-cat { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.svc-name { display: block; margin-top: 2px; font-weight: 700; font-size: 1.02rem; color: var(--ink); padding-right: 28px; }
.svc-desc { display: block; margin-top: 4px; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.svc-meta { display: flex; gap: 12px; margin-top: 10px; font-size: .9rem; font-weight: 600; color: var(--plum); }
.svc-meta span { display: inline-flex; align-items: center; gap: 4px; }
.svc-meta .icon { width: 15px; height: 15px; }
.svc-check {
  position: absolute;
  top: 14px; right: 14px;
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  color: var(--muted);
  background: var(--white);
  transition: all .2s var(--ease);
}
.svc-check .icon { width: 14px; height: 14px; stroke-width: 2.6; }
.svc[aria-pressed="true"] .svc-check { background: var(--plum); border-color: var(--plum); color: #fff; }

/* ---------- Stylists ---------- */
.stylist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 12px;
}
.stylist {
  display: flex;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 16px;
  text-align: left;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  transition: all .2s var(--ease);
}
.stylist:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.stylist[aria-pressed="true"] { border-color: var(--plum); background: var(--blush-50); box-shadow: 0 0 0 3px var(--blush-200); }
.stylist-body { display: block; min-width: 0; }
.stylist-name { display: block; font-weight: 700; }
.stylist-role { display: block; color: var(--muted); font-size: .9rem; }
.stylist-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: var(--pill); font-size: .72rem; font-weight: 700; }

.avatar {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  flex: none;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .02em;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35);
}
.avatar svg { width: 24px; height: 24px; }
.avatar-sm { width: 34px; height: 34px; font-size: .8rem; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
.avatar-sm svg { width: 16px; height: 16px; }

.notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--blush-100);
  border: 1px solid var(--blush-200);
}
.notice .icon { color: var(--plum-700); margin-top: 2px; }
.notice h3 { font-family: var(--font-sans); font-size: 1rem; font-weight: 700; color: var(--plum); }
.notice p { margin-top: 4px; color: var(--muted); }
.notice .btn { margin-top: 12px; }
.hidden-note { margin-top: 14px; color: var(--muted); font-size: .9rem; }

/* ---------- Date & time ---------- */
.dt-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
@media (min-width: 760px) {
  .dt-layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
}
@media (min-width: 1000px) and (max-width: 1120px) {
  .dt-layout { grid-template-columns: minmax(0, 1fr); }
}
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.cal-title { font-family: var(--font-serif); font-weight: 400; font-size: 1.3rem; color: var(--plum); }
.icon-btn {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--plum);
  transition: all .2s var(--ease);
}
.icon-btn:hover:not(:disabled) { border-color: var(--plum); background: var(--blush-100); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }

.cal-grid { display: grid; gap: 4px; }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow {
  text-align: center;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 0;
}
.cal-cell { display: block; min-width: 0; }
.day {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 42px;
  aspect-ratio: 1 / 1;
  max-height: 52px;
  padding: 0;
  border: 1.5px solid transparent;
  border-radius: 14px;
  background: var(--white);
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink);
  transition: all .15s var(--ease);
}
.day:hover:not(:disabled) { border-color: var(--plum-700); }
.day:disabled { background: transparent; color: #b8a9b5; cursor: not-allowed; }
.day.is-sunday:disabled { text-decoration: line-through; text-decoration-color: rgba(108, 91, 105, .35); }
.day.is-today:not([aria-pressed="true"]) { border-color: var(--sage); }
.day.is-full:not(:disabled) { color: var(--muted); background: repeating-linear-gradient(135deg, #fff, #fff 5px, var(--blush-100) 5px, var(--blush-100) 7px); }
.day[aria-pressed="true"] { background: var(--plum); color: #fff; border-color: var(--plum); box-shadow: 0 6px 16px -8px var(--plum); }
.day .dot {
  position: absolute;
  bottom: 5px; left: 50%;
  width: 4px; height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--sage);
}
.day[aria-pressed="true"] .dot { background: var(--blush); }
.cal-cell.is-empty { visibility: hidden; }
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 12px;
  font-size: .8rem;
  color: var(--muted);
}
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 4px; }
.lg-open { background: #fff; border: 1.5px solid var(--line-strong); position: relative; }
.lg-full { background: repeating-linear-gradient(135deg, #fff, #fff 2px, var(--blush-200) 2px, var(--blush-200) 4px); border: 1px solid var(--line); }
.lg-today { border: 1.5px solid var(--sage); background: #fff; }

.slots-title { font-family: var(--font-serif); font-weight: 400; font-size: 1.3rem; color: var(--plum); }
.slots-sub { margin-top: 2px; color: var(--muted); font-size: .9rem; }
.slot-group { margin-top: 16px; }
.slot-group h4 {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sage-700);
}
.slot-group h4 .count { color: var(--muted); font-weight: 600; letter-spacing: 0; text-transform: none; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.slot {
  position: relative;
  min-height: 42px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: var(--white);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: all .15s var(--ease);
}
.slot:hover { border-color: var(--plum-700); color: var(--plum); }
.slot[aria-pressed="true"] { background: var(--plum); border-color: var(--plum); color: #fff; }
.slot.is-current::after {
  content: "";
  position: absolute;
  top: -4px; right: -4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--sage);
  border: 2px solid #fff;
}
.slots-empty, .slots-placeholder {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  padding: 24px 8px;
  color: var(--muted);
}
.slots-empty svg, .slots-placeholder svg { width: 96px; height: 72px; }
.slots-empty strong { color: var(--plum); font-size: 1.05rem; }
.slot-assign { margin-top: 14px; font-size: .88rem; color: var(--sage-700); font-weight: 600; }

/* ---------- Details form ---------- */
.details-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px 18px;
}
@media (min-width: 640px) {
  .details-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-wide { grid-column: 1 / -1; }
}
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field label { font-weight: 600; font-size: .92rem; }
.optional { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: .98rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:hover, .field textarea:hover { border-color: var(--plum-700); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--plum);
  box-shadow: 0 0 0 4px var(--blush-200);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); }
.field input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px var(--danger-100); }
.field-hint { color: var(--muted); font-size: .82rem; }
.field-error { color: var(--danger); font-size: .85rem; font-weight: 600; min-height: 0; }
.field-error:empty { display: none; }
.field-error::before { content: "! "; }
.field.is-valid label::after { content: " ✓"; color: var(--sage-700); }

.switch {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  cursor: pointer;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--sage-100);
}
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
  position: relative;
  width: 46px; height: 26px;
  flex: none;
  border-radius: var(--pill);
  background: #c8bcc4;
  transition: background .2s var(--ease);
}
.switch-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .2s var(--ease);
}
.switch input:checked + .switch-track { background: var(--sage-700); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch-text { display: grid; font-weight: 600; }
.switch-text small { font-weight: 400; color: var(--muted); font-size: .82rem; }

/* ---------- Wizard nav ---------- */
.wizard-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}
.nav-hint { flex: 1; min-width: 0; text-align: right; color: var(--muted); font-size: .9rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--pill);
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: .98rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease), box-shadow .2s var(--ease), opacity .2s;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .42; cursor: not-allowed; }
.btn-primary { background: var(--plum); color: #fff; box-shadow: 0 10px 22px -12px var(--plum); }
.btn-primary:hover:not(:disabled) { background: var(--plum-700); }
.btn-ghost { background: transparent; color: var(--plum); border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled) { background: var(--white); border-color: var(--plum); }
.btn-soft { background: var(--blush-100); color: var(--plum); border-color: var(--blush-200); }
.btn-soft:hover:not(:disabled) { background: var(--blush-200); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #8a2a3e; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .9rem; }
.btn-link {
  min-height: 40px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--plum-700);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Summary (desktop card) ---------- */
.summary { min-width: 0; }
.summary-bar { display: none; }
.summary-body {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.summary-body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, var(--blush), var(--plum-700), var(--sage));
}
.summary-title { font-size: 1.45rem; color: var(--plum); }
.sum-empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 18px 4px 6px; color: var(--muted); }
.sum-empty svg { width: 120px; height: 96px; }
.sum-services { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.sum-services li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--blush-50);
}
.sum-services .svc-icon { width: 32px; height: 32px; border-radius: 10px; }
.sum-services .svc-icon .icon { width: 17px; height: 17px; }
.sum-svc-name { flex: 1; min-width: 0; font-weight: 600; font-size: .93rem; line-height: 1.25; }
.sum-svc-name small { display: block; color: var(--muted); font-weight: 500; }
.sum-svc-price { font-weight: 700; color: var(--plum); font-variant-numeric: tabular-nums; }
.sum-remove {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}
.sum-remove:hover { background: var(--blush-200); color: var(--plum); }
.sum-remove .icon { width: 16px; height: 16px; }
.sum-rows { margin: 16px 0 0; display: grid; gap: 0; }
.sum-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px dashed var(--line);
  font-size: .93rem;
}
.sum-row dt { color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.sum-row dt .icon { width: 17px; height: 17px; color: var(--sage-700); }
.sum-row dd { margin: 0; font-weight: 600; text-align: right; min-width: 0; display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.sum-row .pending { color: #a8979f; font-weight: 500; font-style: italic; }
.sum-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1.5px solid var(--line);
}
.sum-total span { font-weight: 600; }
.sum-total strong { font-family: var(--font-serif); font-weight: 400; font-size: 2rem; color: var(--plum); font-variant-numeric: tabular-nums; }
.sum-note { margin-top: 10px; font-size: .82rem; color: var(--muted); }
.sum-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: var(--pill);
  background: var(--sage-100);
  color: var(--sage-700);
  font-weight: 700;
  font-size: .8rem;
}
.sum-status .icon { width: 14px; height: 14px; stroke-width: 3; }

@media (min-width: 1000px) {
  .summary { position: sticky; top: calc(var(--ribbon-h) + var(--header-h) + 20px); }
  .sheet-backdrop { display: none !important; }
}

/* ---------- Summary (mobile bottom sheet) ---------- */
@media (max-width: 999.98px) {
  body.sheet-active { padding-bottom: 96px; }
  body.sheet-active .wizard-nav #btn-next { display: none; }
  body.sheet-active .wizard-nav .nav-hint { text-align: left; }

  .summary {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 45;
    background: var(--white);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -12px 40px -16px rgba(46, 21, 48, .35);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  body:not(.sheet-active) .summary { display: none; }
  .summary-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
  }
  .summary-toggle {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 8px;
    align-items: center;
    min-height: 48px;
    padding: 4px 8px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    text-align: left;
  }
  .bar-label { grid-column: 1; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .bar-figures { grid-column: 1; grid-row: 2; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: .9rem; }
  .bar-figures strong { font-family: var(--font-serif); font-weight: 400; font-size: 1.35rem; color: var(--plum); margin-right: 4px; }
  .summary-toggle .chevron { grid-column: 2; grid-row: 1 / span 2; color: var(--plum); transition: transform .25s var(--ease); }
  .summary.is-open .summary-toggle .chevron { transform: rotate(180deg); }
  .summary-bar .btn { flex: none; padding: 0 20px; }

  .summary-body {
    display: none;
    max-height: min(62vh, 520px);
    overflow-y: auto;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    padding: 16px 20px 20px;
    overscroll-behavior: contain;
  }
  .summary-body::before { display: none; }
  .summary.is-open .summary-body { display: block; animation: sheetUp .28s var(--ease); }
  .summary-title { font-size: 1.2rem; }
  .sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 44;
    background: rgba(46, 21, 48, .35);
    animation: fadeIn .2s var(--ease);
  }
}
@keyframes sheetUp { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } }

/* ---------- Confirmation ---------- */
.confirm { display: grid; justify-items: center; text-align: center; gap: 6px; }
.confirm-illo { width: 150px; height: 120px; }
.confirm h2 { font-size: clamp(1.7rem, 1.3rem + 1.5vw, 2.2rem); color: var(--plum); margin-top: 4px; }
.confirm-lead { color: var(--muted); max-width: 44ch; }
.ref-box {
  display: inline-grid;
  gap: 2px;
  margin: 14px 0 6px;
  padding: 12px 26px;
  border-radius: var(--radius);
  background: var(--blush-50);
  border: 1.5px dashed var(--blush);
}
.ref-box span { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ref-box strong { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 1.6rem; letter-spacing: .08em; color: var(--plum); }
.confirm-list {
  width: 100%;
  max-width: 520px;
  margin: 14px 0 0;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 4px 18px;
}
.confirm-list .sum-row:first-child { border-top: 0; }
.confirm-list dd { overflow-wrap: anywhere; }
.confirm-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.demo-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 8px 14px;
  border-radius: var(--pill);
  background: var(--sage-100);
  color: var(--sage-700);
  font-size: .85rem;
  font-weight: 600;
  text-align: left;
}
.demo-note .icon { width: 16px; height: 16px; }

/* ---------- My bookings ---------- */
.bookings-wrap { max-width: 920px; margin: 0 auto; padding: 28px 20px 56px; }
.bookings-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.storage-note {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--danger-100);
  color: var(--danger);
  font-weight: 600;
}
.bk-section { margin-top: 28px; }
.bk-section h2 { font-size: 1.4rem; color: var(--plum); display: flex; align-items: center; gap: 10px; }
.bk-section h2 .badge { background: var(--sage-100); color: var(--sage-700); font-family: var(--font-sans); }
.bk-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 14px; }
.bk-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  animation: fadeIn .3s var(--ease);
}
.bk-card.is-past { background: rgba(255, 255, 255, .6); box-shadow: none; }
.bk-card.is-past .bk-date { background: #efe9ec; color: var(--muted); }
.bk-date {
  display: grid;
  place-items: center;
  align-content: center;
  width: 72px;
  height: 78px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--blush-100), var(--blush-200));
  color: var(--plum);
  text-align: center;
  line-height: 1.05;
}
.bk-date small { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.bk-date strong { font-family: var(--font-serif); font-weight: 400; font-size: 1.9rem; }
.bk-main { min-width: 0; }
.bk-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.bk-title { font-family: var(--font-sans); font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.bk-ref { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .78rem; padding: 2px 8px; border-radius: var(--pill); background: var(--plum-100); color: var(--plum); }
.bk-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; color: var(--muted); font-size: .92rem; }
.bk-meta span { display: inline-flex; align-items: center; gap: 6px; }
.bk-meta .icon { width: 16px; height: 16px; color: var(--sage-700); }
.bk-meta .avatar-sm { width: 22px; height: 22px; font-size: .6rem; }
.bk-price { font-weight: 700; color: var(--plum); }
.bk-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media (max-width: 520px) {
  .bk-card { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .bk-date { width: auto; height: auto; padding: 8px 14px; display: flex; gap: 8px; justify-content: flex-start; align-items: baseline; }
  .bk-date strong { font-size: 1.3rem; }
  .bk-actions .btn { flex: 1 1 auto; }
}

.empty-state {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  margin-top: 28px;
  padding: 40px 20px;
  background: var(--white);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-xl);
}
.empty-state svg { width: 180px; height: 140px; }
.empty-state h2 { font-size: 1.6rem; color: var(--plum); }
.empty-state p { color: var(--muted); max-width: 40ch; }
.empty-state .btn { margin-top: 8px; }

/* ---------- Footer ---------- */
.app-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 20px 32px;
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
}

/* ---------- Toast ---------- */
.toast-region {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 70;
  transform: translateX(-50%);
  width: min(460px, calc(100% - 24px));
  pointer-events: none;
}
body.sheet-active .toast-region { bottom: 96px; }
.toast {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 18px;
  border-radius: var(--radius);
  background: var(--plum-900);
  color: #fff;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  pointer-events: auto;
  animation: toastIn .3s var(--ease);
}
.toast p { flex: 1; min-width: 0; font-weight: 500; }
.toast .btn { min-height: 40px; padding: 0 16px; background: var(--blush); color: var(--plum-900); }
.toast .btn:hover { background: #fff; }
.toast-close { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: transparent; color: #e7d7e4; }
.toast-close:hover { background: rgba(255, 255, 255, .1); }
.toast-close .icon { width: 18px; height: 18px; }
.toast-progress {
  position: absolute;
  left: 0; bottom: 0;
  height: 3px;
  width: 100%;
  background: var(--blush);
  transform-origin: left;
  animation: shrink linear forwards;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }
@keyframes shrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ---------- Dialog ---------- */
.dialog {
  width: min(420px, calc(100% - 32px));
  padding: 26px;
  border: 0;
  border-radius: var(--radius-xl);
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.dialog::backdrop { background: rgba(46, 21, 48, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dialog[open] { animation: dialogIn .25s var(--ease); }
@keyframes dialogIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.dialog-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 18px; background: var(--danger-100); color: var(--danger); }
.dialog-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dialog h2 { font-size: 1.5rem; color: var(--plum); }
.dialog p { margin-top: 8px; color: var(--muted); }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.dialog-actions .btn { flex: 1 1 140px; }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .ribbon-long { display: none; }
  .ribbon-short { display: inline; }
  .header-inner { padding: 0 12px; }
  .brand-name { font-size: 1.2rem; }
  .brand-mark { width: 32px; height: 32px; }
  .view-tab { padding: 0 12px; font-size: .9rem; }
  .book-layout, .bookings-wrap { padding-left: 12px; padding-right: 12px; padding-top: 20px; }
  .panel { padding: 18px 14px; border-radius: var(--radius-lg); }
  .card-soft { padding: 14px 10px; }
  .panel-head h2 { font-size: 1.4rem; }
  .cal-row, .cal-grid { gap: 3px; }
  .day { border-radius: 11px; font-size: .9rem; }
  .wizard-nav .btn { padding: 0 16px; }
}
@media (max-width: 400px) {
  .panel { padding: 16px 12px; }
  .calendar.card-soft { padding: 12px 4px; }
  .cal-row, .cal-grid { gap: 2px; }
  .brand-name { font-size: 1.05rem; }
  .brand { gap: 8px; }
  .view-tab { padding: 0 10px; gap: 6px; }
  .summary-bar .btn { padding: 0 16px; }
}

/* ---------- Touch devices ---------- */
@media (pointer: coarse) {
  .field input, .field textarea { font-size: 16px; }
  .btn, .chip, .slot, .icon-btn, .step-btn, .view-tab { min-height: 44px; }
  .icon-btn { width: 44px; height: 44px; }
  .sum-remove { width: 40px; height: 40px; }
  .day { min-height: 40px; }
  .svc:hover, .stylist:hover { transform: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .toast-progress { display: none; }
}
