/* ==========================================================================
   Public booking page — one stylesheet, entirely CSS-variable driven.
   The clinic's theme sets the --bk-* tokens at load time (see theme.js);
   every colour/surface below is derived from them, so a clinic reskins the
   whole page without a single clinic-specific rule. Defaults = clean B/W.
   ========================================================================== */

:root {
  /* Theme tokens — overridden per clinic by theme.js. */
  --bk-bg: #ffffff;
  --bk-text: #111111;
  --bk-accent: #111111;
  --bk-accent-fg: #ffffff;
  --bk-primary: #111111;
  --bk-primary-fg: #ffffff;
  --bk-radius: 12px;
  --bk-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Layered surfaces — computed per clinic in theme.js from bg/text/accent. */
  --bk-page-bg: #f7f7f7;
  --bk-header-bg: #ffffff;
  --bk-surface: #ffffff;
  --bk-surface-2: #f3f3f3;
  --bk-border: #e2e2e2;
  --bk-border-strong: #c8c8c8;
  --bk-muted: #6b6b6b;
  --bk-accent-soft: #f0f0f0;
  --bk-accent-line: #8a8a8a;

  --page-bg: var(--bk-page-bg);
  --header-bg: var(--bk-header-bg);
  --surface: var(--bk-surface);
  --surface-2: var(--bk-surface-2);
  --border: var(--bk-border);
  --border-strong: var(--bk-border-strong);
  --muted: var(--bk-muted);
  --accent-soft: var(--bk-accent-soft);
  --accent-line: var(--bk-accent-line);
  --danger: #b42318;
  --danger-soft: color-mix(in srgb, #b42318 9%, var(--surface));
  --radius-lg: calc(var(--bk-radius) + 6px);
  --radius-sm: calc(var(--bk-radius) - 4px);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 6px 24px -8px rgba(16, 24, 40, 0.16);
  --maxw: 620px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--bk-font);
  color: var(--bk-text);
  background: var(--page-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   Header / footer
   -------------------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
}
.header-inner,
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
/* Back button — icon-only circle. No visible chrome until hovered, when a soft
   circular background appears. On wide viewports it detaches from the header
   column and pins to the true left edge of the screen (not just the content
   column); on narrow viewports there isn't room for that, so it stays inline
   as the header's leading item. */
.back-btn {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; width: 40px; height: 40px; margin-right: -2px;
  border-radius: 50%;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.back-btn svg { width: 20px; height: 20px; display: block; }
.back-btn:hover { background: var(--surface-2); color: var(--bk-text); }
.back-btn:active { background: var(--border); }

@media (min-width: 900px) {
  .back-btn {
    position: fixed;
    top: 18px;
    left: 24px;
    z-index: 20;
  }
}

.brand-logo { height: 44px; width: auto; max-width: 160px; object-fit: contain; display: block; }
.brand-mark {
  height: 44px; width: 44px; flex: none;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--bk-accent); color: var(--bk-accent-fg);
  font-weight: 700; font-size: 16px; letter-spacing: 0.02em;
}
.brand-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand-name { font-weight: 650; font-size: 17px; }
.brand-address { font-size: 13px; color: var(--muted); }

.site-footer { margin-top: auto; }
.footer-inner {
  justify-content: center; gap: 8px;
  padding: 22px 20px 30px;
  font-size: 13px; color: var(--muted);
  flex-wrap: wrap;
}
.foot-link { color: var(--muted); text-decoration: none; }
.foot-link:hover { color: var(--bk-text); }
.foot-sep { opacity: 0.6; }

/* --------------------------------------------------------------------------
   Flow shell
   -------------------------------------------------------------------------- */
.flow {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 20px 8px;
  flex: 1;
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 26px 24px;
  animation: card-in 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-head { margin-bottom: 20px; }
.step-title { margin: 0; font-size: 21px; font-weight: 680; letter-spacing: -0.01em; }
.step-sub { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }

/* --------------------------------------------------------------------------
   Stepper
   -------------------------------------------------------------------------- */
.stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 18px;
  padding: 0 2px;
}
.step-dot {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 0; padding: 4px 2px; margin: 0;
  font: inherit; color: var(--muted); cursor: default;
}
.step-dot .step-index {
  height: 26px; width: 26px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 650;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.step-dot .step-label { font-size: 13px; font-weight: 550; white-space: nowrap; }
.step-dot.current .step-index { background: var(--bk-accent); color: var(--bk-accent-fg); border-color: var(--bk-accent); }
.step-dot.current { color: var(--bk-text); }
.step-dot.done .step-index { background: var(--accent-soft); color: var(--bk-accent); border-color: var(--accent-line); }
.step-dot.done { cursor: pointer; color: var(--bk-text); }
.step-dot.done:hover .step-index { border-color: var(--bk-accent); }
.step-bar {
  flex: 1; height: 2px; min-width: 8px;
  background: var(--border); border-radius: 2px;
}
.step-bar.filled { background: var(--accent-line); }

/* Compact stepper on phones: numbers only. */
@media (max-width: 560px) {
  .step-dot .step-label { display: none; }
  .step-dot.current .step-label { display: inline; }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  appearance: none; border: 1px solid transparent;
  border-radius: var(--bk-radius);
  padding: 12px 18px;
  font: inherit; font-weight: 600; font-size: 15px;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--bk-accent); color: var(--bk-accent-fg); box-shadow: var(--shadow-sm); }
.btn.primary:hover:not(:disabled) { filter: brightness(0.94); }
.btn.ghost { background: var(--surface); color: var(--bk-text); border-color: var(--border-strong); }
.btn.ghost:hover:not(:disabled) { background: var(--surface-2); }

.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 24px;
}

/* --------------------------------------------------------------------------
   Selection cards (service & doctor)
   -------------------------------------------------------------------------- */
.card-grid { display: flex; flex-direction: column; gap: 10px; }
.select-card {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--bk-radius);
  padding: 15px 16px;
  font: inherit; color: inherit; cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.06s, box-shadow 0.15s;
}
.select-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.select-card:active { transform: translateY(1px); }
.select-card.is-selected {
  border-color: var(--bk-accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--bk-accent) inset;
}
.select-card-main { flex: 1; min-width: 0; }
.select-card-title { font-weight: 620; font-size: 15.5px; }
.select-card-desc {
  color: var(--muted); font-size: 13.5px; margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.select-card-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.pill {
  font-size: 12px; font-weight: 600; color: var(--muted);
  background: var(--surface-2); border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.price { font-weight: 680; font-size: 15px; }

.doctor-card { align-items: center; }
.avatar { height: 44px; width: 44px; flex: none; border-radius: 50%; object-fit: cover; }
.avatar-fallback {
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--muted);
  font-weight: 650; font-size: 15px;
}
.avatar-fallback.any { background: var(--accent-soft); color: var(--bk-accent); }

/* --------------------------------------------------------------------------
   Date & time
   -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.date-field { margin-bottom: 20px; align-items: center; }
.text-input {
  width: 100%;
  font: inherit; font-size: 15px;
  color: var(--bk-text); background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--bk-radius);
  padding: 11px 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea.text-input { resize: vertical; min-height: 76px; }
.text-input:focus {
  outline: none; border-color: var(--bk-accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Custom calendar (replaces the native date picker) */
.calendar {
  align-self: center;
  width: 100%;
  max-width: 330px;
  border: 1.5px solid var(--border);
  border-radius: var(--bk-radius);
  padding: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-title { font-weight: 650; font-size: 15.5px; }
.cal-nav {
  height: 34px; width: 34px; flex: none;
  display: grid; place-items: center;
  font-size: 20px; line-height: 1;
  background: var(--surface); color: var(--bk-text);
  border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; transition: background 0.12s, border-color 0.12s;
}
.cal-nav:hover:not(:disabled) { background: var(--surface-2); border-color: var(--border-strong); }
.cal-nav:disabled { opacity: 0.3; cursor: not-allowed; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-weekday { text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); padding: 2px 0 8px; text-transform: uppercase; letter-spacing: 0.03em; }
.cal-day {
  aspect-ratio: 1 / 1;
  display: grid; place-items: center;
  font: inherit; font-size: 14px; font-weight: 550;
  background: var(--surface); color: var(--bk-text);
  border: 1px solid transparent; border-radius: 10px;
  cursor: pointer; transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.cal-day.empty { background: none; cursor: default; }
/* Hover only affects a selectable, not-already-selected day. */
.cal-day:hover:not(:disabled):not(.empty):not(.is-selected) { background: var(--accent-soft); }
.cal-day:disabled { color: color-mix(in srgb, var(--bk-text) 24%, var(--surface)); cursor: default; }
.cal-day.is-today:not(.is-selected) { border-color: var(--accent-line); font-weight: 700; }
.cal-day.is-selected { background: var(--bk-accent); color: var(--bk-accent-fg); border-color: var(--bk-accent); cursor: default; }

.slots-area { min-height: 60px; }
.slots-loading { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; padding: 8px 0; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 9px; }
.slot {
  font: inherit; font-weight: 600; font-size: 14.5px;
  padding: 11px 6px; text-align: center;
  background: var(--surface); color: var(--bk-text);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: border-color 0.12s, background 0.12s, transform 0.06s;
}
.slot:hover { border-color: var(--bk-accent); }
.slot:active { transform: translateY(1px); }
.slot.is-selected { background: var(--bk-accent); color: var(--bk-accent-fg); border-color: var(--bk-accent); }

/* --------------------------------------------------------------------------
   Details form
   -------------------------------------------------------------------------- */
.details-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-wide, .error-slot { grid-column: 1 / -1; }
.field.has-error .text-input { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
@media (max-width: 480px) { .details-form { grid-template-columns: 1fr; } }

/* intl-tel-input — polished to match .text-input chrome */
.field-phone .phone-iti {
  width: 100%;
  display: block;
  --iti-hover-color: var(--surface-2);
  --iti-border-color: var(--border);
  --iti-dropdown-bg: var(--surface);
  --iti-dialcode-color: var(--muted);
  --iti-arrow-color: var(--muted);
  --iti-search-icon-color: var(--muted);
  --iti-spacer-horizontal: 10px;
  --iti-arrow-padding: 6px;
  --iti-border-width: 1.5px;
}
.field-phone .phone-iti .iti__tel-input,
.field-phone .phone-iti input.text-input {
  width: 100%;
  font: inherit; font-size: 15px;
  color: var(--bk-text); background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--bk-radius);
  padding: 11px 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field-phone .phone-iti .iti__tel-input:focus,
.field-phone .phone-iti input.text-input:focus {
  outline: none; border-color: var(--bk-accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field-phone.has-error .phone-iti .iti__tel-input,
.field-phone.has-error .phone-iti input.text-input {
  border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft);
}

/* Flag chip: inset + rounded so hover/focus isn't a full-height square */
.field-phone .phone-iti .iti__country-container {
  padding: 5px;
}
.field-phone .phone-iti .iti__selected-country {
  color: var(--bk-text);
  outline: none;
  border-radius: calc(var(--bk-radius) - 4px);
}
.field-phone .phone-iti .iti__selected-country-primary {
  height: 100%;
  border-radius: calc(var(--bk-radius) - 4px);
  padding: 0 7px 0 9px;
  transition: background 0.12s;
}
.field-phone .phone-iti .iti__selected-country:hover .iti__selected-country-primary,
.field-phone .phone-iti .iti__selected-country[aria-expanded="true"] .iti__selected-country-primary,
.field-phone .phone-iti .iti__selected-country:focus-visible .iti__selected-country-primary {
  background: var(--surface-2);
}
.field-phone .phone-iti .iti__selected-country:focus-visible .iti__selected-country-primary {
  box-shadow: inset 0 0 0 1.5px var(--bk-accent);
}
.field-phone .phone-iti .iti__arrow {
  opacity: 0.7;
}

/* Country dropdown — lives on document.body, so theme here (not under .phone-iti) */
.iti--container,
.iti__dropdown-content {
  --iti-hover-color: var(--surface-2);
  --iti-border-color: var(--border);
  --iti-dropdown-bg: var(--surface);
  --iti-dialcode-color: var(--muted);
  --iti-search-icon-color: var(--muted);
  font-family: var(--bk-font);
  color: var(--bk-text);
}
.iti__dropdown-content {
  border: 1.5px solid var(--border-strong) !important;
  border-radius: var(--bk-radius) !important;
  box-shadow: var(--shadow-md) !important;
  background: var(--surface) !important;
  overflow: hidden;
}
.iti--inline-dropdown .iti__dropdown-content {
  margin-top: 6px !important;
}

/* Search: icon/clear sit inside the field, accounting for wrapper padding */
.iti__search-input-wrapper {
  --iti-search-inset: 10px;
  position: relative;
  padding: var(--iti-search-inset);
}
.iti__search-input {
  display: block !important;
  width: 100% !important;
  font: inherit !important;
  font-size: 14px !important;
  line-height: 1.3 !important;
  color: var(--bk-text) !important;
  background: var(--surface-2) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  padding: 9px 34px 9px 36px !important;
  height: 40px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}
.iti__search-input:focus {
  outline: none !important;
  border-color: var(--bk-accent) !important;
  box-shadow: 0 0 0 3px var(--accent-soft) !important;
  background: var(--surface) !important;
}
.iti__search-icon {
  left: calc(var(--iti-search-inset) + 12px) !important;
  top: 50% !important;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}
.iti__search-icon-svg {
  display: block;
  width: 14px;
  height: 14px;
  stroke: var(--muted);
  stroke-width: 2.4;
}
.iti__search-clear {
  right: calc(var(--iti-search-inset) + 8px) !important;
  top: 50% !important;
  transform: translateY(-50%);
  width: 22px !important;
  height: 22px !important;
  border-radius: 6px !important;
  padding: 0 !important;
}
.iti__search-clear:hover,
.iti__search-clear:focus-visible {
  background: var(--border) !important;
  outline: none;
}

.iti__search-input + .iti__country-list {
  border-top: 1px solid var(--border) !important;
}
.iti--inline-dropdown .iti__country-list {
  max-height: 260px !important;
  padding: 6px !important;
  scrollbar-width: thin;
}
.iti__country {
  gap: 4px;
  margin: 0 !important;
  padding: 9px 10px !important;
  border-radius: var(--radius-sm) !important;
  font-size: 14px;
  line-height: 1.35;
}
.iti__country .iti__country-name {
  font-weight: 550;
}
.iti__country .iti__dial-code {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.iti__country.iti__highlight,
.iti__country:hover {
  background: var(--accent-soft) !important;
}
.iti__divider {
  border-bottom: 1px solid var(--border) !important;
  margin: 6px 4px !important;
  padding: 0 !important;
}
.iti--fullscreen-popup.iti--container {
  background: color-mix(in srgb, var(--bk-text) 35%, transparent);
  padding: 16px;
}
.iti--fullscreen-popup .iti__dropdown-content {
  border-radius: calc(var(--bk-radius) + 4px) !important;
  max-width: 420px;
  margin: 10vh auto 0 !important;
  width: min(100%, 420px);
}
.iti__no-results {
  color: var(--muted);
  font-size: 14px;
  padding: 28px 12px !important;
}

/* --------------------------------------------------------------------------
   Review summary
   -------------------------------------------------------------------------- */
.summary {
  border: 1px solid var(--border);
  border-radius: var(--bk-radius);
  overflow: hidden;
}
.summary-row { display: flex; gap: 14px; padding: 13px 16px; align-items: baseline; }
.summary-row + .summary-row { border-top: 1px solid var(--border); }
.summary-label { flex: none; width: 108px; color: var(--muted); font-size: 13.5px; font-weight: 550; }
.summary-value { flex: 1; font-size: 15px; font-weight: 550; }
.summary-price { margin-left: 8px; font-weight: 700; }
.summary-time { display: block; color: var(--muted); font-weight: 600; }
.summary-divider { height: 1px; background: var(--border-strong); margin: 0; }
.muted { color: var(--muted); font-weight: 500; }

/* --------------------------------------------------------------------------
   Notices
   -------------------------------------------------------------------------- */
.notice {
  border-radius: var(--bk-radius);
  padding: 13px 15px; font-size: 14px;
  border: 1px solid var(--border);
}
.notice.error { color: var(--danger); background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 25%, var(--surface)); }
.notice.empty { color: var(--muted); background: var(--surface-2); }

/* --------------------------------------------------------------------------
   Patient chooser (one phone number → several people)
   -------------------------------------------------------------------------- */
.choice-block {
  border: 1.5px solid var(--accent-line); background: var(--accent-soft);
  border-radius: var(--bk-radius); padding: 18px; margin-top: 20px;
}
.choice-title { font-weight: 660; font-size: 15.5px; }
.choice-sub { margin: 5px 0 0; color: var(--muted); font-size: 13.5px; }
.choice-options { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.choice-option {
  display: flex; flex-direction: column; gap: 2px;
  width: 100%; text-align: left;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--bk-radius); padding: 13px 15px;
  font: inherit; color: inherit; cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.06s, background 0.15s;
}
.choice-option:hover:not(.is-selected) { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.choice-option:active { transform: translateY(1px); }
.choice-option.is-selected {
  border-color: var(--bk-accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--bk-accent) inset;
}
.choice-option.choice-new { border-style: dashed; }
.choice-option.choice-new.is-selected { border-style: solid; }
.choice-name { font-weight: 600; font-size: 15px; }
.choice-hint { color: var(--muted); font-size: 13px; }

/* --------------------------------------------------------------------------
   Success
   -------------------------------------------------------------------------- */
.success-step { text-align: center; padding: 8px 4px; }
.success-check { display: flex; justify-content: center; margin: 8px 0 18px; }
.success-svg { width: 84px; height: 84px; }
.success-circle {
  stroke: var(--bk-accent); stroke-width: 2.5;
  stroke-dasharray: 151; stroke-dashoffset: 151;
  animation: draw-circle 0.5s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.success-tick {
  stroke: var(--bk-accent); stroke-width: 3.5;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 40; stroke-dashoffset: 40;
  animation: draw-tick 0.32s cubic-bezier(0.65, 0, 0.45, 1) 0.44s forwards;
}
@keyframes draw-circle { to { stroke-dashoffset: 0; } }
@keyframes draw-tick { to { stroke-dashoffset: 0; } }

.success-title { margin: 0 0 6px; font-size: 23px; font-weight: 700; letter-spacing: -0.01em; animation: fade-up 0.4s 0.5s both; }
.success-sub { margin: 0 auto 20px; color: var(--muted); max-width: 380px; animation: fade-up 0.4s 0.58s both; }
.success-card {
  text-align: left; max-width: 380px; margin: 0 auto 18px;
  border: 1px solid var(--border); border-radius: var(--bk-radius);
  background: var(--surface-2);
  animation: fade-up 0.4s 0.66s both;
}
.success-line { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.success-line + .success-line { border-top: 1px solid var(--border); }
.success-line-label { font-weight: 600; }
.success-line-value { color: var(--muted); }
.success-note { color: var(--muted); font-size: 13px; margin: 0 0 20px; animation: fade-up 0.4s 0.72s both; }
.success-again { animation: fade-up 0.4s 0.78s both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* --------------------------------------------------------------------------
   Spinner, boot & fatal states
   -------------------------------------------------------------------------- */
.spinner {
  width: 16px; height: 16px; flex: none;
  border: 2px solid var(--border-strong); border-top-color: var(--bk-accent);
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
.spinner.large { width: 30px; height: 30px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.boot { flex: 1; min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); }
.boot-text { margin: 0; font-size: 14px; }

.fatal {
  flex: 1; min-height: 70vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 10px; padding: 40px 24px;
  max-width: 440px; margin: 0 auto;
}
.fatal-icon {
  height: 52px; width: 52px; border-radius: 50%;
  display: grid; place-items: center; font-size: 24px;
  background: var(--surface-2); color: var(--muted); margin-bottom: 6px;
}
.fatal-title { margin: 0; font-size: 22px; font-weight: 700; }
.fatal-message { margin: 0 0 12px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Focus & motion
   -------------------------------------------------------------------------- */
:focus-visible { outline: 2px solid var(--bk-accent); outline-offset: 2px; border-radius: 4px; }
.select-card:focus-visible, .slot:focus-visible { outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .success-circle, .success-tick { stroke-dashoffset: 0; }
}
