html { overscroll-behavior: none; }
:root {
  --ink: #1A1A1A;
  --ink-2: #333333;
  --muted: #6B6B6B;
  --muted-2: #6B6B6B;
  --placeholder: #757575;
  --line: #E8E8E8;
  --line-2: #F0F0F0;
  --box: #D0D0D0;
  --soft: #F0F0F0;
  --hover: #F6F6F6;
  --hover-2: #FAFAFA;
  --off: #BDBDBD;
  --error: #C93A3A;
  --bg: #FFFFFF;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 150ms;
  --med: 220ms;
  --slow: 300ms;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 13px;
  line-height: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; margin: 0; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; }
svg { display: block; flex-shrink: 0; }
h1, h2, h3, p { margin: 0; font-weight: inherit; font-size: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }

[hidden] { display: none !important; }

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

.ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.label { font-size: 12px; font-weight: 500; color: var(--ink); }

.divider { height: 1px; background: var(--line); width: 100%; flex-shrink: 0; border: 0; margin: 0; }

/* ---------- Layout switch ---------- */
.desk { display: block; }
.mob { display: none; }

@media (max-width: 1023px) {
  .desk { display: none; }
  .mob { display: flex; }
}

/* ---------- Desktop ---------- */
.d-head { max-width: 1440px; margin: 0 auto; padding: 48px 48px 0; }
.d-title { font-size: 28px; font-weight: 300; letter-spacing: -1px; color: var(--ink); white-space: nowrap; }
.d-rule { height: 1px; background: var(--line); }

.d-main { max-width: 1440px; margin: 0 auto; position: relative; }

.d-body {
  display: flex; align-items: flex-start; gap: 32px;
  padding: 32px 48px 48px;
  transition: opacity var(--med) var(--ease), transform var(--med) var(--ease);
}
.d-body.is-leaving { opacity: 0; transform: translateY(-6px); }

.d-left, .d-right { width: 280px; flex-shrink: 0; display: flex; flex-direction: column; }
.d-left { gap: 10px; }
.d-right { gap: 20px; }
.d-center { flex: 1 1 0; min-width: 0; }

@media (max-width: 1199px) {
  .d-head { padding: 40px 32px 0; }
  .d-body { padding: 28px 32px 40px; gap: 24px; }
  .d-left, .d-right { width: 256px; }
  .d-center .cal-card { padding: 24px; }
}

/* ---------- Specialist dropdown ---------- */
.spec-section { display: flex; flex-direction: column; gap: 10px; }
.spec { position: relative; width: 100%; }
.spec-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  text-align: left;
  transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.spec-btn:hover { border-color: var(--box); background: var(--hover-2); }
.spec-btn:active { transform: scale(0.99); }
.spec-btn[aria-expanded="true"] { border-color: var(--ink); }
.spec-btn:focus-visible { border-radius: 8px; }
.spec-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.spec-text { font-size: 13px; font-weight: 400; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spec-chev { width: 16px; height: 16px; color: var(--muted-2); transition: transform var(--med) var(--ease); }
.spec-btn[aria-expanded="true"] .spec-chev { transform: rotate(180deg); }

.avatar {
  width: 28px; height: 28px; border-radius: 100px; background: var(--soft);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.2px;
}
.avatar .ico { width: 14px; height: 14px; stroke-width: 1.75; }
.avatar.is-person { color: var(--muted-2); }

.spec-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 4px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  opacity: 0; transform: translateY(-4px) scale(0.98); transform-origin: top center;
  pointer-events: none; visibility: hidden;
  transition: opacity var(--fast) var(--ease), transform var(--med) var(--ease), visibility 0s linear var(--med);
}
.spec.is-open .spec-list {
  opacity: 1; transform: none; pointer-events: auto; visibility: visible;
  transition: opacity var(--fast) var(--ease), transform var(--med) var(--ease), visibility 0s;
}
.spec-opt {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer;
  transition: background-color var(--fast) var(--ease);
}
.spec-opt.is-active { background: #F2F2F2; }
.spec-opt-text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.spec-opt-name { font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spec-opt-role { font-size: 11px; color: var(--muted); }
.spec-opt-check { width: 14px; height: 14px; color: var(--ink); opacity: 0; transform: scale(0.6); transition: opacity var(--fast) var(--ease), transform var(--med) var(--ease); }
.spec-opt[aria-selected="true"] .spec-opt-check { opacity: 1; transform: none; }
.spec-list:focus-visible { outline: none; }

/* ---------- Desktop categories ---------- */
.cats { display: flex; flex-direction: column; gap: 10px; }
.cat-head {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: left;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease), background-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.cat-head:hover { border-color: var(--box); background: var(--hover-2); }
.cat-head:active { transform: scale(0.99); }
.cat-head:focus-visible { border-radius: 8px; }
.cat-head[aria-expanded="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #fff; }
.cat-icon { width: 22px; height: 22px; color: var(--muted-2); stroke-width: 1.6; transition: color var(--fast) var(--ease); }
.cat-head[aria-expanded="true"] .cat-icon { color: var(--ink); }
.cat-name { flex: 1 1 0; font-size: 13px; font-weight: 500; color: var(--ink); }
.cat-head[aria-expanded="true"] .cat-name { font-weight: 600; }
.cat-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 100px; background: var(--ink); color: #fff;
  font-size: 10px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
  transition: opacity var(--fast) var(--ease), transform var(--med) var(--ease);
}
.cat-count[data-n="0"] { opacity: 0; transform: scale(0.5); }
.cat-chev { width: 16px; height: 16px; color: var(--muted); transition: transform var(--med) var(--ease), color var(--fast) var(--ease); }
.cat-head[aria-expanded="true"] .cat-chev { transform: rotate(90deg); color: var(--ink); }

.cat-panel {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows var(--slow) var(--ease);
}
.cat-panel.is-open { grid-template-rows: 1fr; }
.cat-panel-clip { min-height: 0; overflow: hidden; }
.cat-panel-inner {
  padding: 10px 0 0 12px; opacity: 0; transform: translateY(-4px);
  transition: opacity var(--med) var(--ease), transform var(--slow) var(--ease);
}
.cat-panel.is-open .cat-panel-inner { opacity: 1; transform: none; }

.svc-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 6px; cursor: pointer; position: relative;
  transition: background-color var(--fast) var(--ease);
}
.svc-item:hover { background: var(--hover-2); }
.svc-item:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: -2px; }
.svc-item input, .m-svc input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.svc-info { flex: 1 1 0; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.svc-name { font-size: 12px; font-weight: 500; color: var(--ink); }
.svc-meta { font-size: 11px; color: var(--muted); }

.box {
  width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--box); background: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.box .ico { width: 11px; height: 11px; color: #fff; stroke-width: 3; opacity: 0; transform: scale(0.4); transition: opacity var(--fast) var(--ease), transform var(--med) var(--ease); }
.svc-item:hover .box, .m-svc:hover .box { border-color: #A8A8A8; }
input:checked + .box { background: var(--ink); border-color: var(--ink); }
input:checked + .box .ico { opacity: 1; transform: none; }
.svc-item:active .box, .m-svc:active .box { transform: scale(0.9); }

/* ---------- Calendar ---------- */
.cal-card { border: 1px solid var(--line); border-radius: 8px; padding: 32px; display: flex; flex-direction: column; gap: 24px; width: 100%; }
.cal { display: flex; flex-direction: column; gap: 24px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-month { font-size: 20px; font-weight: 500; color: var(--ink); }
.cal-month span { display: inline-block; }
.cal-month.anim-next span { animation: slideInR var(--med) var(--ease); }
.cal-month.anim-prev span { animation: slideInL var(--med) var(--ease); }
.cal-navs { display: flex; gap: 8px; }
.icon-btn {
  width: 28px; height: 28px; margin: -4px; display: flex; align-items: center; justify-content: center; border-radius: 6px; color: var(--muted-2);
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.icon-btn .ico { width: 20px; height: 20px; stroke-width: 1.75; }
.icon-btn:hover:not(:disabled) { background: var(--hover); color: var(--ink); }
.icon-btn:active:not(:disabled) { transform: scale(0.92); }
.icon-btn:disabled { color: #D6D6D6; }
.cal-navs .icon-btn { margin: -4px 0; }
.cal-navs { margin-right: -4px; }

.cal-grid { display: flex; flex-direction: column; gap: 24px; }
.cal-dow { display: flex; }
.cal-dow > div { flex: 1 1 0; text-align: center; font-size: 13px; font-weight: 500; color: var(--muted); }
.cal-days { display: flex; flex-direction: column; gap: 6px; }
.cal-days.anim-next { animation: fadeR var(--med) var(--ease); }
.cal-days.anim-prev { animation: fadeL var(--med) var(--ease); }
.cal-row { display: flex; }
.cal-cell { flex: 1 1 0; min-width: 0; display: flex; }
.day {
  position: relative; width: 100%; height: 48px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 400; color: var(--ink);
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.day:hover:not([aria-disabled="true"]):not([aria-pressed="true"]) { background: var(--hover); }
.day:active:not([aria-disabled="true"]) { transform: scale(0.94); }
.day[aria-disabled="true"] { color: #A3A3A3; cursor: default; }
.day[aria-pressed="true"] { background: var(--ink); color: #fff; font-weight: 600; }
.day.is-today::after {
  content: ""; position: absolute; left: 50%; bottom: 8px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--ink); transition: background-color var(--fast) var(--ease);
}
.day.is-today[aria-pressed="true"]::after { background: #fff; }
.day.is-today[aria-disabled="true"]::after { background: #C8C8C8; }
.day:focus-visible { outline-offset: 1px; }
.day-empty { width: 100%; height: 48px; }

/* ---------- Time slots ---------- */
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.slot {
  height: 36px; border-radius: 6px; border: 1px solid var(--line); background: #fff;
  font-size: 13px; font-weight: 400; color: var(--ink); white-space: nowrap;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.slot:hover:not(:disabled):not([aria-pressed="true"]) { border-color: #BDBDBD; background: var(--hover-2); }
.slot:active:not(:disabled) { transform: scale(0.96); }
.slot[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 500; }
.slot:disabled { color: var(--off); background: var(--hover-2); border-color: var(--line-2); }
.slots.anim-in .slot { animation: fadeUp var(--med) var(--ease) both; }
.slots-empty {
  height: 80px; display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 12px; color: var(--placeholder); border: 1px dashed var(--line); border-radius: 6px;
  animation: fadeIn var(--med) var(--ease);
}

.tz {
  position: relative; display: inline-flex; align-items: center; gap: 6px; color: var(--placeholder); font-size: 12px;
  border-radius: 6px; padding: 2px 4px; margin: -2px -4px; cursor: pointer;
  transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
.tz:hover { color: var(--muted-2); background: var(--hover-2); }
.tz .ico { width: 14px; height: 14px; stroke-width: 1.5; }
.tz .tz-chev { width: 12px; height: 12px; stroke-width: 1.75; }
.tz select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.tz:has(select:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.tz-row { display: flex; justify-content: center; }

/* ---------- Form ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-size: 12px; font-weight: 500; color: var(--ink); }
.field-label .opt { color: var(--placeholder); font-weight: 400; }
.input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff;
  font-size: 13px; font-weight: 400; line-height: 16px; color: var(--ink);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.input::placeholder { color: var(--placeholder); opacity: 1; }
.input:hover { border-color: var(--box); }
.input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.07); outline: none; }
.input:focus-visible { outline: none; }
textarea.input { height: 80px; padding: 12px 16px; resize: none; display: block; line-height: 18px; }
.field.is-invalid .input { border-color: var(--error); }
.field.is-invalid .input:focus { box-shadow: 0 0 0 3px rgba(201, 58, 58, 0.1); }
.field-error { font-size: 11px; color: var(--error); display: none; }
.field.is-invalid .field-error { display: block; animation: fadeIn var(--fast) var(--ease); }
.notes { display: flex; flex-direction: column; gap: 6px; }
.notes .field-label { font-size: 13px; }

/* ---------- Summary ---------- */
.summary { border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: #fff; }
.sum-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.sum-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sum-label { font-size: 12px; color: var(--muted); }
.sum-value { font-size: 12px; font-weight: 500; color: var(--ink); text-align: right; }
.sum-value.is-empty { color: var(--placeholder); font-weight: 400; }
.sum-list { display: flex; flex-direction: column; gap: 6px; }
.sum-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; animation: fadeIn var(--med) var(--ease); }
.sum-item-name { font-size: 11px; color: var(--muted-2); }
.sum-item-price { font-size: 11px; font-weight: 500; color: var(--ink); }
.sum-none { font-size: 11px; color: var(--placeholder); }
.sum-total-label { font-size: 13px; font-weight: 500; color: var(--ink); }
.sum-total { font-size: 13px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.bump { animation: bump var(--med) var(--ease); }

/* ---------- Buttons ---------- */
.btn {
  height: 48px; width: 100%; border-radius: 8px; background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 15px; font-weight: 500;
  transition: background-color var(--fast) var(--ease), opacity var(--med) var(--ease), transform var(--fast) var(--ease);
}
.btn .arrow { font-weight: 400; display: inline-block; transition: transform var(--med) var(--ease); }
.btn:hover:not(:disabled) { background: var(--ink-2); }
.btn:hover:not(:disabled) .arrow { transform: translateX(3px); }
.btn:active:not(:disabled) { transform: scale(0.985); }
.btn:disabled { opacity: 0.28; }
.btn:focus-visible { border-radius: 8px; }
.btn-ghost {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.btn-ghost .ico { width: 18px; height: 18px; stroke-width: 1.75; }
.btn-ghost:hover { background: var(--hover-2); border-color: var(--box); }
.btn-ghost:active { transform: scale(0.95); }
.btn-ghost:focus-visible { border-radius: 12px; }
.confirm-wrap { display: flex; flex-direction: column; gap: 10px; }
.hint { font-size: 11px; color: var(--muted); text-align: center; min-height: 14px; transition: opacity var(--fast) var(--ease); }
.hint:empty { opacity: 0; }

/* ---------- Success ---------- */
.success {
  max-width: 420px; margin: 0 auto; padding: 56px 24px 72px; display: flex; flex-direction: column; align-items: center; text-align: center;
  animation: riseIn 360ms var(--ease) both;
}
.success[hidden] { display: none; }
.check-badge { width: 64px; height: 64px; margin-bottom: 24px; }
.check-badge circle { fill: var(--ink); transform-origin: 50% 50%; animation: pop 420ms var(--ease) both; }
.check-badge path {
  fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw 360ms var(--ease) 240ms forwards;
}
.success-title { font-size: 28px; font-weight: 300; letter-spacing: -1px; color: var(--ink); }
.success-sub { margin-top: 8px; font-size: 13px; color: var(--muted-2); line-height: 1.5; max-width: 340px; }
.success .summary { width: 100%; margin-top: 28px; text-align: left; }
.success .btn { margin-top: 20px; }
.demo-note { margin-top: 14px; font-size: 12px; color: var(--muted); }
.success > * { animation: fadeUp 360ms var(--ease) both; }
.success > :nth-child(2) { animation-delay: 120ms; }
.success > :nth-child(3) { animation-delay: 160ms; }
.success > :nth-child(4) { animation-delay: 200ms; }
.success > :nth-child(5) { animation-delay: 240ms; }
.success > :nth-child(6) { animation-delay: 280ms; }
.success > .check-badge { animation: none; }

/* ---------- Mobile ---------- */
.mob {
  flex-direction: column; width: 100%; height: 100vh; height: 100dvh; background: #fff; overflow: hidden; position: relative;
}
.m-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; position: relative; flex-shrink: 0; }
.m-progress { display: flex; align-items: center; gap: 8px; flex: 1 1 0; }
.seg { width: 28px; height: 3px; border-radius: 1.5px; background: var(--line); overflow: hidden; position: relative; }
.seg-fill {
  position: absolute; inset: 0; background: var(--ink); border-radius: inherit;
  transform: scaleX(0); transform-origin: left center; transition: transform var(--slow) var(--ease);
}
.seg.is-on .seg-fill { transform: scaleX(1); }
.m-menu-btn { width: 32px; height: 32px; margin: -6px; color: var(--ink); }
.m-menu-btn .ico { width: 20px; height: 20px; stroke-width: 1.75; }
.m-menu {
  position: absolute; right: 16px; top: 46px; z-index: 40; min-width: 200px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 4px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  opacity: 0; transform: translateY(-4px) scale(0.98); transform-origin: top right; visibility: hidden; pointer-events: none;
  transition: opacity var(--fast) var(--ease), transform var(--med) var(--ease), visibility 0s linear var(--med);
}
.m-menu.is-open { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity var(--fast) var(--ease), transform var(--med) var(--ease), visibility 0s; }
.m-menu-item {
  display: flex; align-items: center; width: 100%; padding: 10px 12px; border-radius: 6px; font-size: 13px; color: var(--ink); text-decoration: none; text-align: left;
  transition: background-color var(--fast) var(--ease);
}
.m-menu-item:hover, .m-menu-item:focus-visible { background: var(--hover); outline: none; }

.m-stage { flex: 1 1 0; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.m-step { will-change: transform, opacity; }
.m-step.leave-fwd { animation: leaveL 140ms var(--ease) forwards; }
.m-step.leave-back { animation: leaveR 140ms var(--ease) forwards; }
.m-step.enter-fwd { animation: enterR 260ms var(--ease) both; }
.m-step.enter-back { animation: enterL 260ms var(--ease) both; }

.m-header { padding: 24px 24px 20px; }
.m-title { font-size: 24px; font-weight: 300; letter-spacing: -0.5px; color: var(--ink); }
.m-title:focus-visible { outline: none; }
.m-content { padding: 0 24px 24px; display: flex; flex-direction: column; gap: 12px; }

.m-cat {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: left;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease), background-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.m-cat:hover { border-color: var(--box); background: var(--hover-2); }
.m-cat:active { transform: scale(0.985); }
.m-cat:focus-visible { border-radius: 8px; }
.m-cat[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #fff; }
.m-cat .cat-icon { width: 20px; height: 20px; }
.m-cat[aria-checked="true"] .cat-icon { color: var(--ink); }
.m-cat .cat-name { font-size: 13px; }
.m-cat[aria-checked="true"] .cat-name { font-weight: 600; }
.m-cat-count { font-size: 12px; color: var(--muted); }
.m-tick {
  width: 20px; height: 20px; border-radius: 100px; background: var(--ink); display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.5); transition: opacity var(--fast) var(--ease), transform var(--med) var(--ease);
}
.m-tick .ico { width: 12px; height: 12px; color: #fff; stroke-width: 2.5; }
.m-cat[aria-checked="true"] .m-tick { opacity: 1; transform: none; }

.m-svc-content { gap: 10px; }
.m-svc-cat { font-size: 14px; font-weight: 600; color: var(--ink); }
.m-svc-list { display: flex; flex-direction: column; }
.m-svc {
  display: flex; align-items: center; gap: 12px; padding: 14px 0; cursor: pointer; position: relative; border-bottom: 1px solid var(--line-2);
  transition: background-color var(--fast) var(--ease);
}
.m-svc:last-child { border-bottom: 0; }
.m-svc:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.m-svc .box { width: 20px; height: 20px; border-radius: 5px; }
.m-svc .box .ico { width: 12px; height: 12px; }
.m-svc .svc-name { font-size: 14px; }
.m-svc .svc-meta { font-size: 12px; }
.m-svc .svc-info { gap: 2px; }
.m-svc-price { font-size: 14px; font-weight: 600; color: var(--ink); }
.m-other { font-size: 12px; color: var(--muted); padding-top: 4px; }

.m-step .cal-card { padding: 20px; gap: 20px; }
.m-step .cal, .m-step .cal-grid { gap: 20px; }
.m-step .cal-month { font-size: 18px; }
.m-step .cal-dow > div { font-size: 12px; }
.m-step .cal-days { gap: 4px; }
.m-step .day, .m-step .day-empty { height: 40px; font-size: 13px; }
.m-step .day.is-today::after { bottom: 5px; }
.m-step .tz-row { justify-content: flex-start; }
.m-step .slot { font-size: 13px; }

.m-form { gap: 16px; }
.m-form .notes .field-label { font-size: 12px; }

.m-foot {
  flex-shrink: 0; border-top: 1px solid var(--line-2); padding: 16px 24px 40px; display: flex; flex-direction: column; gap: 20px; background: #fff;
}
.m-foot .summary { animation: fadeIn var(--med) var(--ease); }
.m-btns { display: flex; align-items: center; gap: 10px; }
.m-btns .btn { flex: 1 1 0; border-radius: 12px; }
.m-btns .btn:focus-visible { border-radius: 12px; }
.m-back { transition: opacity var(--med) var(--ease), transform var(--med) var(--ease), background-color var(--fast) var(--ease), border-color var(--fast) var(--ease); }
.m-back[hidden] { display: none; }

.m-step .success { padding: 32px 0 24px; }
.m-step .success-title { font-size: 24px; letter-spacing: -0.5px; }

/* Tablet: stepper in a centred card */
@media (min-width: 768px) and (max-width: 1023px) {
  body { background: #FAFAFA; }
  .mob {
    width: 440px; height: min(860px, calc(100dvh - 64px)); margin: 32px auto;
    border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.06);
  }
  .m-foot { padding-bottom: 28px; }
}
@media (min-width: 768px) and (max-width: 1023px) and (max-height: 720px) {
  .mob { margin: 16px auto; height: calc(100dvh - 32px); }
}

/* ---------- Demo pill ---------- */
.demo-pill {
  position: fixed; left: 16px; bottom: 16px; z-index: 60;
  display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 12px; line-height: 16px; color: #1A1A1A; text-decoration: none;
  transition: background-color var(--fast) var(--ease), transform var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.demo-pill:hover { background: rgba(255, 255, 255, 1); border-color: rgba(0, 0, 0, 0.16); }
.demo-pill:active { transform: scale(0.97); }
.demo-pill:focus-visible { border-radius: 999px; }
@media (max-width: 767px) {
  .demo-pill { left: 12px; bottom: 8px; padding: 4px 10px; font-size: 11px; }
}

/* ---------- Keyframes ---------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeR { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
@keyframes fadeL { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
@keyframes slideInR { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
@keyframes slideInL { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes leaveL { to { opacity: 0; transform: translateX(-16px); } }
@keyframes leaveR { to { opacity: 0; transform: translateX(16px); } }
@keyframes enterR { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes enterL { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: none; } }
@keyframes bump { 0% { opacity: 0.2; transform: translateY(3px); } 100% { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(0.4); opacity: 0; } 60% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important;
    transition-duration: 1ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important;
  }
}

.cat-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cat-count[data-n="0"] { display: none; }
.cat-count { animation: pop var(--med) var(--ease); }
@media (max-width: 359px) {
  .slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .m-header, .m-top { padding-left: 20px; padding-right: 20px; }
  .m-content { padding-left: 20px; padding-right: 20px; }
  .m-step .cal-card { padding: 16px; }
}
@media (min-width: 1024px) and (max-width: 1199px) {
  .cat-head { padding: 14px; gap: 12px; }
}
