/*!
 * BookingWidget styles — ClinicOS.
 * Themed entirely through custom properties set by each site on :root:
 *   --bw-accent, --bw-accent-ink, --bw-accent-soft, --bw-ink, --bw-ink-soft, --bw-surface, --bw-surface-alt,
 *   --bw-line, --bw-radius, --bw-radius-lg, --bw-font, --bw-font-display, --bw-shadow, --bw-overlay
 * Optional extras: --bw-rail-bg / --bw-rail-ink (summary rail colours; default accent / accent-ink).
 * Every selector is prefixed .bw- so the widget never collides with host styles.
 */

/* ------------------------------------------------------------------ tokens */
.bw-root {
  --_accent: var(--bw-accent, #1d5c52);
  --_accent-ink: var(--bw-accent-ink, #ffffff);
  --_accent-soft: var(--bw-accent-soft, #e4efeb);
  --_ink: var(--bw-ink, #14201d);
  --_ink-soft: var(--bw-ink-soft, #56645f);
  --_surface: var(--bw-surface, #ffffff);
  --_surface-alt: var(--bw-surface-alt, #f5f3ee);
  --_line: var(--bw-line, #e5e1d8);
  --_radius: var(--bw-radius, 12px);
  --_radius-lg: var(--bw-radius-lg, 22px);
  --_font: var(--bw-font, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif);
  --_font-display: var(--bw-font-display, ui-serif, Georgia, "Times New Roman", serif);
  --_mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --_shadow: var(--bw-shadow, 0 40px 100px -30px rgb(12 26 22 / 0.5), 0 14px 34px -14px rgb(12 26 22 / 0.22));
  --_overlay: var(--bw-overlay, rgb(14 22 20 / 0.5));
  --_rail-bg: var(--bw-rail-bg, var(--_accent));
  --_rail-ink: var(--bw-rail-ink, var(--_accent-ink));
  --_line-strong: color-mix(in srgb, var(--_ink) 20%, var(--_surface));
  --_tint: color-mix(in srgb, var(--_accent) 7%, var(--_surface));
  --_tint-2: color-mix(in srgb, var(--_accent) 13%, var(--_surface));
  --_ring: color-mix(in srgb, var(--_accent) 18%, transparent);
  --_danger: #b42318;
  --_danger-ink: #a3261a;
  --_warn-ink: #7a4a00;
  --_ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --_ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 24px;
  font-family: var(--_font);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--_ink);
  text-align: left;
  letter-spacing: normal;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

/* ------------------------------------------------------------------ scoped reset (low specificity on purpose) */
.bw-root, .bw-root *, .bw-root *::before, .bw-root *::after { box-sizing: border-box; }
.bw-root[hidden], .bw-root [hidden] { display: none !important; }
.bw-root :where(h1, h2, h3, h4, p, ul, ol, li, dl, dt, dd, figure, fieldset, legend, form) { margin: 0; padding: 0; border: 0; font-size: inherit; font-weight: inherit; line-height: inherit; color: inherit; }
.bw-root :where(ul, ol) { list-style: none; }
.bw-root :where(button, input, select, textarea) { font: inherit; color: inherit; letter-spacing: inherit; margin: 0; }
.bw-root :where(button) {
  appearance: none; -webkit-appearance: none; background: none; border: 0; padding: 0; border-radius: 0; box-shadow: none;
  text-transform: none; text-decoration: none; cursor: pointer; text-align: inherit; width: auto; height: auto; min-width: 0; line-height: inherit;
}
.bw-root :where(a) { color: inherit; }
.bw-root :where(img) { display: block; max-width: 100%; }
.bw-root :where(svg) { flex-shrink: 0; display: block; }
.bw-root :where(button, a, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid var(--_accent); outline-offset: 2px; }
.bw-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.bw-num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ frame: overlay + dialog */
.bw-overlay {
  position: absolute;
  inset: 0;
  background: var(--_overlay);
  -webkit-backdrop-filter: blur(6px) saturate(115%);
  backdrop-filter: blur(6px) saturate(115%);
  opacity: 0;
  transition: opacity 0.32s ease;
}
.bw-dialog {
  position: relative;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  width: min(920px, 100%);
  height: min(720px, calc(100vh - 48px));
  height: min(720px, calc(100dvh - 48px));
  background: var(--_surface);
  border-radius: var(--_radius-lg);
  box-shadow: var(--_shadow);
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition: opacity 0.28s ease, transform 0.46s var(--_ease-out);
}
.bw-root[data-state="open"] .bw-overlay { opacity: 1; }
.bw-root[data-state="open"] .bw-dialog { opacity: 1; transform: none; }
.bw-root[data-state="closing"] .bw-overlay { transition-duration: 0.22s; }
.bw-root[data-state="closing"] .bw-dialog { transition-duration: 0.2s, 0.24s; }
.bw-root[data-mode="error"] .bw-dialog { grid-template-columns: minmax(0, 1fr); width: min(520px, 100%); height: auto; }
.bw-root[data-mode="error"] .bw-rail { display: none; }

.bw-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  container: bw-main / inline-size;
}

/* ------------------------------------------------------------------ summary rail ("visit pass") */
.bw-rail {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 26px;
  min-height: 0;
  padding: 28px 24px 24px 26px;
  overflow-y: auto;
  scrollbar-width: none;
  background: var(--_rail-bg);
  color: var(--_rail-ink);
}
.bw-rail::-webkit-scrollbar { display: none; }
.bw-rail::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 60% at 0% 0%, color-mix(in srgb, #fff 16%, transparent), transparent 62%),
    radial-gradient(90% 55% at 100% 100%, color-mix(in srgb, #000 20%, transparent), transparent 68%);
}
.bw-rail::after { /* fine paper grain: the "printed pass" texture */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bw-rail :where(button, a):focus-visible { outline-color: var(--_rail-ink); }
.bw-rail-brand { display: flex; align-items: center; gap: 12px; }
.bw-rail-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 13px;
  overflow: hidden;
  background: color-mix(in srgb, var(--_rail-ink) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--_rail-ink) 20%, transparent);
}
.bw-rail-mark img { width: 30px; height: 30px; object-fit: contain; }
.bw-rail-mark--mono { font-family: var(--_font-display); font-size: 20px; font-weight: 600; line-height: 1; }
.bw-rail-brand-text { min-width: 0; }
.bw-rail-name { font-family: var(--_font-display); font-size: 18px; font-weight: 500; line-height: 1.2; letter-spacing: -0.005em; }
.bw-rail-sub { margin-top: 2px; font-size: 12.5px; opacity: 0.74; letter-spacing: 0.02em; }

.bw-thread { position: relative; display: grid; gap: 2px; }
.bw-thread::before {
  content: "";
  position: absolute;
  left: 11.5px;
  top: 18px;
  bottom: 18px;
  width: 1px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--_rail-ink) 30%, transparent), color-mix(in srgb, var(--_rail-ink) 12%, transparent));
}
.bw-thread-item { position: relative; }
.bw-thread-btn {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  width: calc(100% + 18px);
  margin: 0 -10px 0 -8px;
  padding: 10px 10px 10px 8px;
  border-radius: 12px;
  color: inherit;
  text-align: left;
  transition: background-color 0.18s ease;
}
button.bw-thread-btn:hover { background: color-mix(in srgb, var(--_rail-ink) 9%, transparent); }
.bw-thread-dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--_rail-bg);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--_rail-ink) 38%, transparent);
  color: var(--_rail-bg);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
.bw-thread-dot svg { width: 13px; height: 13px; stroke-width: 3; }
.is-current > .bw-thread-btn .bw-thread-dot {
  box-shadow: inset 0 0 0 1.5px var(--_rail-ink), 0 0 0 5px color-mix(in srgb, var(--_rail-ink) 16%, transparent);
}
.is-current > .bw-thread-btn .bw-thread-dot::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--_rail-ink);
}
.is-done > .bw-thread-btn .bw-thread-dot { background: var(--_rail-ink); box-shadow: none; }
.is-done.is-current > .bw-thread-btn .bw-thread-dot::after { display: none; }
.bw-thread-text { display: grid; gap: 1px; min-width: 0; }
.bw-thread-k { font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.68; }
.bw-thread-v { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.bw-thread-s { font-size: 12.5px; opacity: 0.78; font-variant-numeric: tabular-nums; }
.bw-thread-empty { font-size: 14px; opacity: 0.5; }
.bw-thread-edit {
  align-self: center;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.bw-thread-btn:hover .bw-thread-edit, .bw-thread-btn:focus-visible .bw-thread-edit { opacity: 0.9; }
.is-new .bw-thread-v, .is-new .bw-thread-s { animation: bw-fill 0.55s var(--_ease-out) both; }
.is-new .bw-thread-s { animation-delay: 0.06s; }
.is-new .bw-thread-dot { animation: bw-pop 0.45s var(--_ease-out) both; }
.bw-rail-intro { display: grid; gap: 12px; font-size: 14px; line-height: 1.5; opacity: 0.92; }
.bw-rail-intro ul { display: grid; gap: 10px; }
.bw-rail-intro li { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.bw-rail-intro svg { opacity: 0.75; }
.bw-rail-ref {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--_rail-ink) 38%, transparent);
}
.bw-rail-ref span { font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.72; }
.bw-rail-ref strong { font-family: var(--_mono); font-size: 16px; letter-spacing: 0.16em; }
.bw-rail-foot {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px dashed color-mix(in srgb, var(--_rail-ink) 30%, transparent);
  font-size: 13.5px;
}
.bw-rail-loc { display: flex; gap: 10px; align-items: flex-start; }
.bw-rail-loc svg { margin-top: 2px; opacity: 0.8; }
.bw-rail-loc p { opacity: 0.92; line-height: 1.45; }
.bw-rail-link { display: inline-flex; align-items: center; gap: 10px; min-height: 32px; font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; }
.bw-rail-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.bw-rail-status { display: flex; align-items: center; gap: 10px; opacity: 0.85; }
.bw-rail-status-dot { position: relative; width: 16px; height: 8px; display: grid; place-items: center; }
.bw-rail-status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--_rail-ink) 45%, transparent); }
.bw-rail-status.is-open .bw-rail-status-dot::before { background: var(--_rail-ink); }
.bw-rail-status.is-open .bw-rail-status-dot::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--_rail-ink);
  animation: bw-ping 2.4s ease-out infinite;
}

/* ------------------------------------------------------------------ header */
.bw-head {
  position: relative;
  z-index: 2;
  padding: 14px 16px 0 22px;
  background: var(--_surface);
  border-bottom: 1px solid var(--_line);
}
.bw-head-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px; min-height: 48px; }
.bw-head-spacer { width: 0; }
.bw-head-row:last-child { margin-bottom: 12px; }
.bw-head-titles { min-width: 0; padding-left: 4px; }
.bw-head-title { font-size: 13.5px; font-weight: 600; letter-spacing: 0.01em; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw-head-meta { margin-top: 1px; font-size: 12.5px; color: var(--_ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--_ink);
  transition: background-color 0.16s ease, color 0.16s ease, opacity 0.16s ease, border-color 0.16s ease;
}
.bw-icon-btn:hover { background: var(--_surface-alt); }
.bw-icon-btn:focus-visible { outline-offset: 0; }
.bw-icon-btn--line { box-shadow: inset 0 0 0 1px var(--_line); }
.bw-icon-btn--line:hover { box-shadow: inset 0 0 0 1px var(--_line-strong); }
.bw-icon-btn[aria-disabled="true"] { opacity: 0.32; cursor: default; background: none; }
.bw-progress { display: flex; gap: 4px; padding: 10px 6px 14px 4px; }
.bw-progress-seg {
  position: relative;
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: var(--_line);
  overflow: hidden;
}
.bw-progress-seg::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--_accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s var(--_ease-out);
}
.bw-progress-seg.is-done::after { transform: scaleX(1); }
.bw-progress-seg.is-current::after { transform: scaleX(0.5); }

/* ------------------------------------------------------------------ body + step scaffolding */
.bw-body {
  position: relative;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 28px 36px 36px;
  scrollbar-width: thin;
  scrollbar-color: var(--_line-strong) transparent;
}
.bw-enter { animation: bw-step-in 0.42s var(--_ease-out) both; }
.bw-enter--back { animation-name: bw-step-back; }
.bw-step-head { margin-bottom: 22px; }
.bw-step-title {
  font-family: var(--_font-display);
  font-size: clamp(24px, 2.1vw + 12px, 30px);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.012em;
  color: var(--_ink);
  text-wrap: balance;
}
.bw-step-title:focus { outline: none; }
.bw-step-sub { margin-top: 8px; max-width: 54ch; font-size: 15px; color: var(--_ink-soft); text-wrap: pretty; }
.bw-step-sub strong { color: var(--_ink); font-weight: 600; }
.bw-mini {
  display: none;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--_surface-alt);
  color: var(--_ink-soft);
  font-size: 13px;
  font-weight: 500;
}
.bw-mini svg { color: var(--_accent); }
.bw-mini > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw-mini-sep { opacity: 0.6; }
.bw-section-k { margin: 26px 0 10px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--_ink-soft); }
.bw-fine { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--_ink-soft); }
.bw-fine svg { color: var(--_accent); }

/* notices */
.bw-notice {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border-radius: var(--_radius);
  border: 1px solid transparent;
  font-size: 14px;
  animation: bw-fill 0.4s var(--_ease-out) both;
}
.bw-notice > svg { margin-top: 1px; }
.bw-notice-title { font-weight: 600; font-size: 14.5px; }
.bw-notice-text { margin-top: 2px; }
.bw-notice-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bw-notice--warn { background: #fdf6e7; border-color: #f0dfb9; color: #573a00; }
.bw-notice--warn > svg { color: #b7791f; }
.bw-notice--error { background: #fdf1ef; border-color: #f2d2cc; color: #7c1d12; }
.bw-notice--error > svg { color: var(--_danger); }
.bw-notice--info { background: var(--_tint); border-color: var(--_tint-2); color: var(--_ink); }
.bw-notice--info > svg { color: var(--_accent); }

/* empty states */
.bw-empty {
  display: grid;
  justify-items: center;
  padding: 36px 20px 32px;
  border: 1px dashed var(--_line-strong);
  border-radius: var(--_radius-lg);
  background: color-mix(in srgb, var(--_surface-alt) 55%, var(--_surface));
  text-align: center;
}
.bw-empty-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--_accent-soft); color: var(--_accent); }
.bw-empty-title { margin-top: 14px; font-family: var(--_font-display); font-size: 20px; font-weight: 500; line-height: 1.25; text-wrap: balance; }
.bw-empty-text { margin-top: 6px; max-width: 42ch; font-size: 14.5px; color: var(--_ink-soft); text-wrap: pretty; }
.bw-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.bw-empty-actions--start { justify-content: flex-start; margin-top: 20px; }

/* buttons */
.bw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--_radius);
  border: 1px solid transparent;
  font-family: var(--_font);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.2s ease, transform 0.12s ease, opacity 0.16s ease;
}
.bw-btn:active { transform: translateY(1px); }
.bw-btn--primary {
  background: var(--_accent);
  color: var(--_accent-ink);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 14%, transparent), 0 10px 22px -12px color-mix(in srgb, var(--_accent) 80%, transparent);
}
.bw-btn--primary:hover { background: color-mix(in srgb, var(--_accent) 86%, #000); }
.bw-btn--ghost { background: var(--_surface); color: var(--_ink); border-color: var(--_line-strong); }
.bw-btn--ghost:hover { background: var(--_surface-alt); }
.bw-btn--danger { background: var(--_danger); color: #fff; }
.bw-btn--danger:hover { background: #971c12; }
.bw-btn--wide { min-width: 200px; }
.bw-btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; }
.bw-btn[aria-busy="true"] { opacity: 0.88; cursor: progress; }
.bw-btn-arrow { transition: transform 0.2s var(--_ease); }
.bw-btn:not([aria-disabled="true"]):hover .bw-btn-arrow { transform: translateX(3px); }
.bw-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: bw-spin 0.7s linear infinite;
}
.bw-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
  color: var(--_accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.bw-link:hover { text-decoration-thickness: 2px; }

/* ------------------------------------------------------------------ footer */
.bw-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px 14px 36px;
  border-top: 1px solid var(--_line);
  background: color-mix(in srgb, var(--_surface) 94%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.bw-foot-info { flex: 1; min-width: 0; }
.bw-foot-info:empty { display: none; }
.bw-foot-sum { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw-foot-sum.is-muted { font-size: 13.5px; font-weight: 500; color: var(--_ink-soft); }
.bw-foot-sum.is-muted svg { color: var(--_accent); }
.bw-foot-k { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--_ink-soft); }
.bw-foot-hint { display: flex; align-items: center; gap: 8px; color: var(--_warn-ink); font-size: 13.5px; font-weight: 600; animation: bw-nudge 0.4s var(--_ease) both; }
.bw-foot-actions { display: flex; gap: 10px; flex-shrink: 0; margin-left: auto; }

/* ------------------------------------------------------------------ step 1 · services */
.bw-svc-tools { display: grid; gap: 12px; margin-bottom: 18px; }
.bw-search { position: relative; }
.bw-search > svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--_ink-soft); pointer-events: none; }
.bw-search-input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px 0 46px;
  border: 1px solid transparent;
  border-radius: var(--_radius);
  background: var(--_surface-alt);
  font-size: 16px;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
  -webkit-appearance: none;
  appearance: none;
}
.bw-search-input::placeholder { color: color-mix(in srgb, var(--_ink-soft) 80%, transparent); }
.bw-search-input:hover { border-color: var(--_line); }
.bw-search-input:focus, .bw-search-input:focus-visible { outline: none; background: var(--_surface); border-color: var(--_accent); box-shadow: 0 0 0 4px var(--_ring); }
.bw-chips { display: flex; gap: 8px; margin: 0 -2px; padding: 2px; overflow-x: auto; scrollbar-width: none; }
.bw-chips::-webkit-scrollbar { display: none; }
.bw-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--_line);
  background: var(--_surface);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.bw-chip { flex-shrink: 0; }
.bw-chip::after { content: ""; position: absolute; inset: -3px 0; } /* 46px hit area, 40px visual */
.bw-chip:hover { border-color: var(--_line-strong); }
.bw-chip-n { font-size: 12px; color: var(--_ink-soft); font-variant-numeric: tabular-nums; }
.bw-chip[aria-pressed="true"] { background: var(--_ink); border-color: var(--_ink); color: var(--_surface); }
.bw-chip[aria-pressed="true"] .bw-chip-n { color: color-mix(in srgb, var(--_surface) 72%, transparent); }

.bw-list { display: grid; gap: 10px; }
.bw-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 14px 14px 16px;
  border: 1px solid var(--_line);
  border-radius: var(--_radius);
  background: var(--_surface);
  text-align: left;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}
.bw-row:hover { border-color: var(--_line-strong); background: color-mix(in srgb, var(--_accent) 3%, var(--_surface)); }
.bw-row:active { transform: scale(0.995); }
.bw-row.is-selected { border-color: var(--_accent); background: var(--_tint); box-shadow: inset 0 0 0 1px var(--_accent); }
.bw-row[aria-disabled="true"] { cursor: not-allowed; background: var(--_surface); border-style: dashed; }
.bw-row[aria-disabled="true"] > :not(.bw-next) { opacity: 0.55; }
.bw-row-main { display: grid; gap: 3px; min-width: 0; }
.bw-row-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--_ink); }
.bw-row-desc {
  font-size: 14px;
  line-height: 1.45;
  color: var(--_ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bw-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 3px; font-size: 12.5px; font-weight: 500; color: var(--_ink-soft); }
.bw-row-meta svg { color: var(--_accent); }
.bw-meta-sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.6; margin: 0 2px; }
.bw-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--_tint-2);
  color: var(--_accent);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.bw-row-end { display: flex; align-items: center; gap: 12px; }
.bw-price { display: grid; justify-items: end; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bw-price-note { font-size: 11px; font-weight: 500; color: var(--_ink-soft); }
.bw-row-go {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--_surface-alt);
  color: var(--_ink-soft);
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.2s var(--_ease);
}
.bw-row:hover .bw-row-go { color: var(--_accent); transform: translateX(2px); }
.bw-row.is-selected .bw-row-go { background: var(--_accent); color: var(--_accent-ink); transform: none; }
.bw-svc-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: calc(var(--_radius) - 1px);
  background: var(--_accent-soft);
  color: var(--_accent);
  transition: background-color 0.18s ease, color 0.18s ease;
}
.bw-row.is-selected .bw-svc-icon { background: var(--_accent); color: var(--_accent-ink); }

/* ------------------------------------------------------------------ step 2 · specialists */
.bw-pro { grid-template-columns: 58px minmax(0, 1fr) auto; }
.bw-avatar {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bw-av, #44524e);
  color: #fff;
  font-family: var(--_font-display);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08), inset 0 -10px 18px -10px rgb(0 0 0 / 0.25);
}
.bw-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bw-avatar--xs { width: 22px; height: 22px; font-size: 9.5px; font-family: var(--_font); font-weight: 700; box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--_rail-ink) 55%, transparent); }
.bw-stack { display: flex; align-items: center; }
.bw-avatar--stack { width: 26px; height: 26px; font-size: 10px; font-family: var(--_font); font-weight: 700; box-shadow: 0 0 0 2px var(--_surface); }
.bw-avatar--stack + .bw-avatar--stack { margin-left: -9px; }
.bw-row.is-selected .bw-avatar--stack { box-shadow: 0 0 0 2px var(--_tint); }
.bw-pro--any .bw-row-title { font-family: var(--_font-display); font-size: 18px; font-weight: 500; }
.bw-next { display: grid; justify-items: end; gap: 1px; text-align: right; }
.bw-next-k { font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--_ink-soft); }
.bw-next-v { font-size: 13.5px; font-weight: 600; color: var(--_accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bw-next.is-none .bw-next-v { color: var(--_ink-soft); }

/* ------------------------------------------------------------------ step 3 · date & time */
.bw-quick {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  margin-bottom: 22px;
  padding: 10px 14px 10px 10px;
  border-radius: var(--_radius);
  border: 1px dashed color-mix(in srgb, var(--_accent) 45%, var(--_surface));
  background: var(--_tint);
  text-align: left;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}
.bw-quick:hover { background: var(--_tint-2); border-style: solid; }
.bw-quick-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--_accent); color: var(--_accent-ink); }
.bw-quick-k { font-size: 13px; font-weight: 600; color: var(--_accent); white-space: nowrap; }
.bw-quick-v { min-width: 0; font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw-quick-go { margin-left: auto; color: var(--_accent); transition: transform 0.2s var(--_ease); }
.bw-quick:hover .bw-quick-go { transform: translateX(3px); }
.bw-date-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.bw-month { font-family: var(--_font-display); font-size: 19px; font-weight: 500; letter-spacing: -0.005em; }
.bw-pager { display: flex; gap: 6px; }
.bw-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 64px;
  gap: 8px;
  margin: 0 -4px 22px;
  padding: 4px 32px 8px 4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 4px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
}
.bw-strip::-webkit-scrollbar { display: none; }
.bw-day { position: relative; display: block; scroll-snap-align: start; }
.bw-day input, .bw-pill input, .bw-seg-opt input, .bw-check input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.bw-day input:disabled, .bw-pill input:disabled { cursor: default; }
.bw-day-face {
  display: grid;
  justify-items: center;
  gap: 1px;
  padding: 10px 0 9px;
  border-radius: var(--_radius);
  border: 1px solid var(--_line);
  background: var(--_surface);
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s var(--_ease), box-shadow 0.18s ease;
}
.bw-day-w { font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--_ink-soft); }
.bw-day-n { font-family: var(--_font-display); font-size: 23px; font-weight: 500; line-height: 1.15; font-variant-numeric: tabular-nums lining-nums; }
.bw-day-s { font-size: 11px; font-weight: 500; color: var(--_ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bw-day.is-few .bw-day-s { color: var(--_warn-ink); font-weight: 600; }
.bw-day:not(.is-off):hover .bw-day-face { border-color: var(--_line-strong); transform: translateY(-1px); }
.bw-day input:focus-visible + .bw-day-face { outline: 2px solid var(--_accent); outline-offset: 2px; }
.bw-day.is-selected .bw-day-face {
  background: var(--_accent);
  border-color: var(--_accent);
  color: var(--_accent-ink);
  box-shadow: 0 10px 20px -12px color-mix(in srgb, var(--_accent) 90%, transparent);
}
.bw-day.is-selected .bw-day-w, .bw-day.is-selected .bw-day-s { color: color-mix(in srgb, var(--_accent-ink) 82%, transparent); }
.bw-day.is-off .bw-day-face { background: transparent; border-style: dashed; }
.bw-day.is-off .bw-day-n, .bw-day.is-off .bw-day-w { opacity: 0.42; }
.bw-slots-date {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--_line);
  font-size: 15px;
  font-weight: 600;
}
.bw-slots-date span { font-size: 13px; font-weight: 500; color: var(--_ink-soft); }
.bw-slot-group { min-width: 0; margin-bottom: 18px; }
.bw-slot-h {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--_ink-soft);
}
.bw-slot-h svg { color: var(--_accent); }
.bw-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); gap: 8px; }
.bw-pill { position: relative; display: block; }
.bw-pill-face {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 6px;
  border-radius: calc(var(--_radius) - 2px);
  border: 1px solid var(--_line);
  background: var(--_surface);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.bw-pill-t { white-space: nowrap; }
.bw-pill-face small { margin-left: 3px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.05em; color: var(--_ink-soft); }
.bw-pill:hover .bw-pill-face { border-color: var(--_accent); color: var(--_accent); }
.bw-pill input:focus-visible + .bw-pill-face { outline: 2px solid var(--_accent); outline-offset: 2px; }
.bw-pill.is-selected .bw-pill-face {
  background: var(--_accent);
  border-color: var(--_accent);
  color: var(--_accent-ink);
  box-shadow: 0 10px 20px -12px color-mix(in srgb, var(--_accent) 90%, transparent);
  animation: bw-pop 0.3s var(--_ease-out);
}
.bw-pill.is-selected .bw-pill-face small { color: color-mix(in srgb, var(--_accent-ink) 80%, transparent); }
.bw-pill.is-current .bw-pill-face { border-style: dashed; color: var(--_ink-soft); background: var(--_surface-alt); }
.bw-pill-tag { margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: var(--_ink-soft); color: var(--_surface); font-size: 10px; letter-spacing: 0.04em; }

/* ------------------------------------------------------------------ step 4 · details form */
.bw-form { display: grid; gap: 18px; }
.bw-grid-2 { display: grid; gap: 18px 14px; }
.bw-field { display: grid; align-content: start; gap: 6px; min-width: 0; }
.bw-fieldset { display: block; }
.bw-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; color: var(--_ink); }
.bw-fieldset > .bw-label { width: 100%; margin-bottom: 8px; }
.bw-opt { font-size: 12px; font-weight: 500; color: var(--_ink-soft); }
.bw-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--_line-strong);
  border-radius: calc(var(--_radius) - 2px);
  background: var(--_surface);
  color: var(--_ink);
  font-size: 16px;
  line-height: 1.35;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}
.bw-input::placeholder { color: color-mix(in srgb, var(--_ink-soft) 70%, transparent); }
.bw-input:hover { border-color: color-mix(in srgb, var(--_ink) 38%, var(--_surface)); }
.bw-input:focus, .bw-input:focus-visible { outline: none; border-color: var(--_accent); box-shadow: 0 0 0 4px var(--_ring); }
.bw-field.is-invalid .bw-input { border-color: var(--_danger); }
.bw-field.is-invalid .bw-input:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--_danger) 16%, transparent); }
.bw-input--ref { font-family: var(--_mono); font-size: 19px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; }
.bw-input--ref::placeholder { letter-spacing: 0.04em; font-family: var(--_font); font-size: 16px; font-weight: 400; text-transform: none; }
.bw-textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.bw-select { position: relative; }
.bw-select select { padding-right: 44px; cursor: pointer; }
.bw-select > svg { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--_ink-soft); pointer-events: none; }
.bw-hint { font-size: 13px; color: var(--_ink-soft); }
.bw-hint--row { display: flex; justify-content: space-between; gap: 12px; }
.bw-count { font-variant-numeric: tabular-nums; }
.bw-err { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--_danger-ink); animation: bw-fill 0.25s var(--_ease-out) both; }
.bw-err:empty { display: none; }
.bw-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bw-seg-opt { position: relative; display: block; }
.bw-seg-face {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  height: 100%;
  padding: 12px 14px;
  border-radius: var(--_radius);
  border: 1px solid var(--_line-strong);
  background: var(--_surface);
  color: var(--_ink-soft);
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}
.bw-seg-text { display: grid; gap: 1px; }
.bw-seg-text strong { font-size: 14.5px; font-weight: 600; color: var(--_ink); }
.bw-seg-text small { font-size: 12.5px; color: var(--_ink-soft); }
.bw-seg-opt:hover .bw-seg-face { border-color: color-mix(in srgb, var(--_ink) 38%, var(--_surface)); }
.bw-seg-opt input:checked + .bw-seg-face { border-color: var(--_accent); background: var(--_tint); box-shadow: inset 0 0 0 1px var(--_accent); color: var(--_accent); }
.bw-seg-opt input:focus-visible + .bw-seg-face { outline: 2px solid var(--_accent); outline-offset: 2px; }
.bw-fieldset.is-invalid .bw-seg-face { border-color: color-mix(in srgb, var(--_danger) 60%, var(--_surface)); }
.bw-fieldset .bw-err { margin-top: 8px; }
.bw-note { display: flex; gap: 10px; margin-top: 10px; padding: 12px 14px; border-radius: var(--_radius); background: var(--_tint); font-size: 14px; animation: bw-fill 0.3s var(--_ease-out) both; }
.bw-note svg { margin-top: 2px; color: var(--_accent); }
.bw-check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--_radius);
  border: 1px solid var(--_line);
  background: var(--_surface-alt);
  cursor: pointer;
}
.bw-check-box {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1.5px solid var(--_line-strong);
  background: var(--_surface);
  color: transparent;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.bw-check-box svg { stroke-width: 3; }
.bw-check input:checked + .bw-check-box { background: var(--_accent); border-color: var(--_accent); color: var(--_accent-ink); }
.bw-check input:focus-visible + .bw-check-box { outline: 2px solid var(--_accent); outline-offset: 2px; }
.bw-check-text { display: grid; gap: 2px; }
.bw-check-text strong { font-size: 14.5px; font-weight: 600; }
.bw-check-text span { font-size: 13px; color: var(--_ink-soft); }

/* ------------------------------------------------------------------ step 5 · review */
.bw-review { border: 1px solid var(--_line); border-radius: var(--_radius-lg); background: var(--_surface); overflow: hidden; }
.bw-review-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 12px 16px 18px; }
.bw-review-row + .bw-review-row { border-top: 1px solid var(--_line); }
.bw-review-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--_accent-soft); color: var(--_accent); }
.bw-review-k { margin-bottom: 3px; font-size: 11px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--_ink-soft); }
.bw-review-v { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.bw-review-v strong { font-size: 15.5px; font-weight: 600; }
.bw-review-v span { font-size: 14px; color: var(--_ink-soft); }
.bw-review-v em { font-style: normal; font-size: 12px; opacity: 0.85; }
.bw-review-v .bw-review-quote { margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--_line-strong); color: var(--_ink); font-style: italic; }
.bw-review-row .bw-link { margin: -6px 0 0; }
.bw-policy { display: flex; gap: 12px; margin-top: 16px; padding: 14px 16px; border-radius: var(--_radius); background: var(--_surface-alt); font-size: 13.5px; color: var(--_ink-soft); }
.bw-policy svg { margin-top: 1px; color: var(--_accent); }

/* ------------------------------------------------------------------ step 6 · success */
.bw-success { display: grid; justify-items: center; padding-top: 6px; text-align: center; }
.bw-success .bw-step-sub { margin-inline: auto; font-variant-numeric: tabular-nums; }
.bw-success-title { max-width: 22ch; }
.bw-success-mark { margin-bottom: 18px; }
.bw-success-mark svg { overflow: visible; }
.bw-draw-disc { fill: var(--_accent-soft); transform-box: fill-box; transform-origin: center; }
.bw-draw-ring { fill: none; stroke: var(--_accent); stroke-width: 2.5; stroke-dasharray: 184; stroke-dashoffset: 0; transform: rotate(-90deg); transform-box: fill-box; transform-origin: center; }
.bw-draw-check { fill: none; stroke: var(--_accent); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 0; }
.bw-enter .bw-draw-ring { animation: bw-draw-ring 0.75s var(--_ease-out) 0.05s both; }
.bw-enter .bw-draw-disc { animation: bw-disc 0.6s var(--_ease-out) 0.15s both; }
.bw-enter .bw-draw-check { animation: bw-draw-check 0.42s var(--_ease-out) 0.55s both; }
.bw-cancel-mark { display: grid; place-items: center; width: 68px; height: 68px; margin-bottom: 18px; border-radius: 50%; background: var(--_surface-alt); color: var(--_ink-soft); box-shadow: inset 0 0 0 1px var(--_line); }
.bw-ref {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 7px 7px 7px 18px;
  border-radius: 999px;
  border: 1px dashed color-mix(in srgb, var(--_accent) 50%, var(--_surface));
  background: var(--_tint);
  transition: background-color 0.16s ease, border-color 0.16s ease;
}
.bw-ref:hover { background: var(--_tint-2); border-style: solid; }
.bw-ref-k { font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--_ink-soft); }
.bw-ref-v { -webkit-user-select: all; user-select: all; font-family: var(--_mono); font-size: 19px; font-weight: 700; letter-spacing: 0.18em; color: var(--_ink); }
.bw-ref-copy { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; background: var(--_surface); color: var(--_accent); font-size: 12.5px; font-weight: 600; box-shadow: 0 1px 2px rgb(0 0 0 / 0.06); }
.bw-status-note {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: var(--_radius);
  border: 1px solid transparent;
  font-size: 14px;
  text-align: left;
}
.bw-status-note svg { margin-top: 1px; }
.bw-status-note + .bw-notice, .bw-notice + .bw-status-note { margin-top: 12px; }
.bw-status-note--pending { background: #fdf6e8; border-color: #f1e0ba; color: #573c00; }
.bw-status-note--pending svg { color: #b7791f; }
.bw-status-note--confirmed { background: var(--_tint); border-color: var(--_tint-2); color: var(--_ink); }
.bw-status-note--confirmed svg { color: var(--_accent); }
.bw-ticket { width: 100%; margin-top: 14px; padding: 4px 18px; border: 1px solid var(--_line); border-radius: var(--_radius-lg); background: var(--_surface); text-align: left; }
.bw-ticket-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 11px 0; }
.bw-ticket-row + .bw-ticket-row { border-top: 1px dashed var(--_line); }
.bw-ticket-row dt { padding-top: 2px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--_ink-soft); }
.bw-ticket-row dd { font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bw-actions { display: grid; gap: 10px; width: 100%; margin-top: 14px; }
.bw-action {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: var(--_radius);
  border: 1px solid var(--_line);
  background: var(--_surface);
  color: var(--_ink);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}
.bw-action svg { color: var(--_accent); }
.bw-action:hover { border-color: var(--_accent); color: var(--_accent); background: var(--_tint); }
.bw-success-foot { margin-top: 14px; font-size: 14px; color: var(--_ink-soft); }
.bw-success .bw-empty-actions { margin-top: 18px; }

/* ------------------------------------------------------------------ manage booking */
.bw-status { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--_surface-alt); color: var(--_ink-soft); }
.bw-status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.bw-status--pending { background: #fdf3dc; color: #6f4400; }
.bw-status--confirmed { background: #e2f3e9; color: #155c36; }
.bw-status--checked-in { background: #e4edfb; color: #1c4a8a; }
.bw-status--cancelled, .bw-status--no-show { background: #f7e6e3; color: #8c2619; }
.bw-mcard {
  padding: 20px 20px 18px;
  border: 1px solid var(--_line);
  border-radius: var(--_radius-lg);
  background: linear-gradient(180deg, var(--_tint), var(--_surface) 70%);
}
.bw-mcard-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bw-mcard-ref { font-size: 12.5px; color: var(--_ink-soft); }
.bw-mcard-ref strong { font-family: var(--_mono); font-size: 14px; letter-spacing: 0.14em; color: var(--_ink); }
.bw-mcard-title { margin-top: 16px; font-family: var(--_font-display); font-size: 24px; font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; }
.bw-mcard-sub { margin-top: 2px; font-size: 14.5px; color: var(--_ink-soft); }
.bw-mcard-dl { display: grid; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--_line); }
.bw-mcard-dl > div { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; }
.bw-mcard-dl dt { padding-top: 2px; color: var(--_accent); }
.bw-mcard-dl dd { font-size: 14.5px; font-weight: 500; }
.bw-mactions { display: grid; gap: 10px; margin-top: 18px; }
.bw-maction {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--_radius);
  border: 1px solid var(--_line);
  background: var(--_surface);
  text-align: left;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}
.bw-maction:hover { border-color: var(--_line-strong); background: var(--_surface-alt); }
.bw-maction-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--_accent-soft); color: var(--_accent); }
.bw-maction-go { color: var(--_ink-soft); }
.bw-maction--danger .bw-maction-ic { background: #fbeae7; color: var(--_danger); }
.bw-maction--danger:hover { border-color: color-mix(in srgb, var(--_danger) 40%, var(--_surface)); }
.bw-help { display: flex; gap: 12px; margin-top: 22px; padding: 14px 16px; border-radius: var(--_radius); background: var(--_surface-alt); font-size: 13.5px; color: var(--_ink-soft); }
.bw-help svg { margin-top: 1px; color: var(--_accent); }
.bw-help a { color: var(--_accent); font-weight: 600; white-space: nowrap; text-underline-offset: 3px; }

/* ------------------------------------------------------------------ "leave?" confirm */
.bw-confirm-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
  background: color-mix(in srgb, var(--_surface) 64%, transparent);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: bw-fade 0.2s ease both;
}
.bw-confirm {
  width: min(390px, 100%);
  padding: 24px;
  border-radius: var(--_radius-lg);
  border: 1px solid var(--_line);
  background: var(--_surface);
  box-shadow: var(--_shadow);
  animation: bw-rise 0.32s var(--_ease-out) both;
}
.bw-confirm-t { font-family: var(--_font-display); font-size: 22px; font-weight: 500; line-height: 1.2; }
.bw-confirm-d { margin-top: 8px; font-size: 14.5px; color: var(--_ink-soft); }
.bw-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ------------------------------------------------------------------ container-driven layout inside the step pane */
@container bw-main (min-width: 480px) {
  .bw-grid-2 { grid-template-columns: 1fr 1fr; }
  .bw-actions { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .bw-actions .bw-action { flex-direction: column; justify-content: center; gap: 8px; min-height: 86px; text-align: center; font-size: 13.5px; }
}
@container bw-main (max-width: 459px) {
  .bw-pro { grid-template-columns: 50px minmax(0, 1fr); row-gap: 8px; }
  .bw-avatar--stack { width: 22px; height: 22px; font-size: 8.5px; }
  .bw-avatar--stack + .bw-avatar--stack { margin-left: -8px; }
  .bw-pro .bw-next { grid-column: 2; justify-items: start; text-align: left; display: flex; align-items: baseline; gap: 8px; }
  .bw-row-go { display: none; }
  .bw-row { padding: 14px; gap: 12px; }
  .bw-svc-icon { width: 42px; height: 42px; }
  .bw-seg { grid-template-columns: 1fr; }
  .bw-ref { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; width: 100%; padding: 12px 12px 12px 18px; border-radius: var(--_radius); text-align: left; }
  .bw-ref-k { grid-column: 1; }
  .bw-ref-v { grid-column: 1; grid-row: 2; }
  .bw-ref-copy { grid-column: 2; grid-row: 1 / span 2; align-self: center; min-height: 40px; }
  .bw-review-row { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 8px 14px 16px; }
  .bw-review-ic { display: none; }
  .bw-ticket-row { grid-template-columns: 1fr; gap: 2px; }
}

/* ------------------------------------------------------------------ mobile: full-height bottom sheet */
@media (max-width: 719.98px) {
  .bw-root { padding: 0; place-items: end stretch; font-size: 15px; }
  .bw-dialog {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    height: calc(100vh - 12px);
    height: calc(100dvh - 12px - env(safe-area-inset-top, 0px));
    border-radius: 22px 22px 0 0;
    opacity: 1;
    transform: translateY(100%);
    transition: transform 0.46s var(--_ease-out);
  }
  .bw-root[data-state="closing"] .bw-dialog { transition-duration: 0.28s; transition-timing-function: cubic-bezier(0.4, 0, 1, 1); }
  .bw-root[data-mode="error"] .bw-dialog { width: 100%; height: auto; }
  .bw-rail { display: none; }
  .bw-head { padding: 6px 6px 0; }
  .bw-head-row { grid-template-columns: 44px minmax(0, 1fr) 44px; text-align: center; }
  .bw-head-spacer { width: 44px; }
  .bw-head-titles { padding: 0; }
  .bw-progress { padding: 8px 12px 12px; }
  .bw-body { padding: 20px 16px 28px; scroll-padding-bottom: 96px; }
  .bw-mini { display: flex; }
  .bw-step-head { margin-bottom: 18px; }
  .bw-step-sub { font-size: 14.5px; }
  .bw-foot { flex-wrap: wrap; gap: 8px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .bw-foot-info { flex-basis: 100%; }
  .bw-foot-sum, .bw-foot-hint { justify-content: center; }
  .bw-foot-actions { flex: 1; }
  .bw-foot-actions .bw-btn { flex: 1; min-height: 52px; padding: 0 16px; }
  .bw-btn--wide { min-width: 0; }
  .bw-confirm-actions .bw-btn { flex: 1; }
  .bw-strip { margin-right: -16px; }
}

/* ------------------------------------------------------------------ motion */
@keyframes bw-step-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes bw-step-back { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes bw-fill { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes bw-pop { 0% { transform: scale(0.9); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes bw-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bw-rise { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes bw-nudge { 0% { transform: translateX(0); } 30% { transform: translateX(-3px); } 60% { transform: translateX(3px); } 100% { transform: translateX(0); } }
@keyframes bw-spin { to { transform: rotate(360deg); } }
@keyframes bw-ping { 0% { transform: scale(1); opacity: 0.6; } 80%, 100% { transform: scale(2.6); opacity: 0; } }
@keyframes bw-draw-ring { from { stroke-dashoffset: 184; } to { stroke-dashoffset: 0; } }
@keyframes bw-draw-check { from { stroke-dashoffset: 40; } to { stroke-dashoffset: 0; } }
@keyframes bw-disc { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .bw-root *, .bw-root *::before, .bw-root *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .bw-dialog { transform: none !important; }
  .bw-spinner { border-right-color: currentColor; opacity: 0.6; }
}

@media (forced-colors: active) {
  .bw-row.is-selected, .bw-day.is-selected .bw-day-face, .bw-pill.is-selected .bw-pill-face,
  .bw-seg-opt input:checked + .bw-seg-face, .bw-chip[aria-pressed="true"] { outline: 3px solid Highlight; outline-offset: 1px; }
  .bw-progress-seg.is-done::after { background: Highlight; }
  .bw-dialog { border: 1px solid CanvasText; }
}
