/* ==========================================================================
   Cart drawer + schedule editor + confirm booking
   Claude Design turn 8 (8a 8b 8c 8d desktop, 8e mobile 390)

   Scoped under #cart-modal and #checkout-modal. Both keep their ids and their
   open/close contract (openCart / openCheckout / openModal), so every existing
   caller across services.php, the header and shop.js keeps working.

   Tokens: ink #111111 · body #374151 · secondary #6b7280 · muted #9ca3af ·
   lines #e5e7eb · hairline #f3f4f6 · surface #f8f9fa · cards #f5f5f5 ·
   success #059669 · amber #f59e0b · caution #b45309.
   ========================================================================== */

/* Stacking order is load-bearing and used to come from Tailwind utilities on the
   markup (z-50 / z-[60]). It lives here now: cart < confirm < location picker
   (70) < login (1000), and all of them above the page's sticky cart bar. */
#cart-modal.xc-ov { z-index: 50; }
#checkout-modal.xc-ov { z-index: 60; }
#cart-modal.xc-ov, #checkout-modal.xc-ov {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: 'Inter', system-ui, sans-serif;
}
#cart-modal.xc-ov.hidden, #checkout-modal.xc-ov.hidden { display: none; }

#cart-modal .xc-card, #checkout-modal .xc-card {
  background: #fff;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(17, 17, 17, .22);
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  overflow: hidden;
}
#cart-modal .xc-card { max-width: 420px; }
#checkout-modal .xc-card { max-width: 520px; }

#cart-modal .xc-grab, #checkout-modal .xc-grab { display: none; }

/* ── header ─────────────────────────────────────────────────────────────── */
#cart-modal .xc-hd, #checkout-modal .xc-hd {
  padding: 18px 20px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-shrink: 0;
}
#checkout-modal .xc-hd { padding: 20px 22px; gap: 16px; }
#cart-modal .xc-htxt, #checkout-modal .xc-htxt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#cart-modal .xc-t, #checkout-modal .xc-t {
  font: 600 18px 'Manrope', system-ui, sans-serif;
  letter-spacing: -.5px;
  color: #111111;
  margin: 0;
}
#checkout-modal .xc-t { font-size: 19px; }
#cart-modal .xc-sub, #checkout-modal .xc-sub {
  font: 400 11px 'Inter', system-ui, sans-serif;
  color: #6b7280;
  margin: 0;
}
#checkout-modal .xc-sub { font-size: 11.5px; }
#cart-modal .xc-x, #checkout-modal .xc-x {
  flex: none;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 13px 'Inter', system-ui, sans-serif;
  color: #374151;
  cursor: pointer;
  padding: 0;
  transition: background .15s, color .15s;
}
#cart-modal .xc-x:hover, #checkout-modal .xc-x:hover { background: #e5e7eb; color: #111111; }

/* ── body ───────────────────────────────────────────────────────────────── */
#cart-modal .xc-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
#checkout-modal .xc-body {
  padding: 18px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* mono uppercase field label */
#cart-modal .xc-tag, #checkout-modal .xc-tag {
  font: 500 9.5px/1 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: .06em;
  color: #9ca3af;
  text-transform: uppercase;
}

/* ── cart item card (8a) ────────────────────────────────────────────────── */
#cart-modal .xc-item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#cart-modal .xc-item.off { background: #f8f9fa; }
#cart-modal .xc-irow { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
#cart-modal .xc-iname { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
#cart-modal .xc-n {
  font: 500 13.5px 'Inter', system-ui, sans-serif;
  color: #111111;
}
#cart-modal .xc-item.off .xc-n { color: #6b7280; }
#cart-modal .xc-m {
  font: 400 10.5px 'Inter', system-ui, sans-serif;
  color: #6b7280;
}
#cart-modal .xc-m.warn { color: #b45309; }
#cart-modal .xc-price { flex: none; text-align: right; }
#cart-modal .xc-p {
  font: 600 13px 'JetBrains Mono', ui-monospace, monospace;
  color: #111111;
}
#cart-modal .xc-item.off .xc-p { color: #9ca3af; }
#cart-modal .xc-pf {
  font: 400 9px 'Inter', system-ui, sans-serif;
  color: #9ca3af;
  margin-top: 2px;
}

/* schedule strip inside an item */
#cart-modal .xc-sched {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
}
#cart-modal .xc-dot { width: 6px; height: 6px; border-radius: 50%; background: #d1d5db; flex: none; }
#cart-modal .xc-dot.on { background: #059669; }
#cart-modal .xc-dot.warn { background: #f59e0b; }
#cart-modal .xc-stxt { flex: 1; font: 400 11px 'Inter', system-ui, sans-serif; color: #6b7280; min-width: 0; }
#cart-modal .xc-stxt.set { color: #374151; }

/* text actions */
#cart-modal .xc-links { display: flex; gap: 14px; }
#cart-modal .xc-lnk {
  border: 0;
  background: transparent;
  padding: 0;
  font: 500 11px 'Inter', system-ui, sans-serif;
  color: #374151;
  cursor: pointer;
}
#cart-modal .xc-lnk.ink { color: #111111; }
#cart-modal .xc-lnk.mute { color: #6b7280; }
#cart-modal .xc-lnk:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ── cross-sell (8a) ────────────────────────────────────────────────────── */
#cart-modal .xc-cross {
  border: 1px dashed #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
#cart-modal .xc-cross p {
  flex: 1;
  font: 400 11.5px/1.45 'Inter', system-ui, sans-serif;
  color: #6b7280;
  margin: 0;
}
#cart-modal .xc-cross b { color: #111111; font-weight: 500; }

/* ── buttons ────────────────────────────────────────────────────────────── */
#cart-modal .xc-btn, #checkout-modal .xc-btn {
  width: 100%;
  border: 0;
  background: #111111;
  border-radius: 8px;
  padding: 13px;
  text-align: center;
  font: 500 13px 'Inter', system-ui, sans-serif;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .15s;
}
#checkout-modal .xc-btn { padding: 14px; }
#cart-modal .xc-btn:hover:not(:disabled), #checkout-modal .xc-btn:hover:not(:disabled) { background: #242424; }
#cart-modal .xc-btn:disabled, #checkout-modal .xc-btn:disabled { background: #f5f5f5; color: #9ca3af; cursor: default; }
#cart-modal .xc-btn.ghost, #checkout-modal .xc-btn.ghost {
  background: #fff; border: 1px solid #e5e7eb; color: #111111;
}
#cart-modal .xc-btn.ghost:hover, #checkout-modal .xc-btn.ghost:hover { background: #f8f9fa; border-color: #111111; }
#cart-modal .xc-btn.outline, #checkout-modal .xc-btn.outline {
  background: #fff; border: 1px solid #111111; color: #111111;
}
#cart-modal .xc-btn.outline:hover, #checkout-modal .xc-btn.outline:hover { background: #f8f9fa; }
#cart-modal .xc-btn.sm, #checkout-modal .xc-btn.sm { padding: 12px; font-size: 12.5px; }
#cart-modal .xc-pair, #checkout-modal .xc-pair { display: flex; gap: 9px; }
#cart-modal .xc-pair .xc-btn, #checkout-modal .xc-pair .xc-btn { flex: 1; width: auto; }
#cart-modal .xc-pair .xc-btn.none, #checkout-modal .xc-pair .xc-btn.none { flex: none; padding: 10px 13px; font-size: 11.5px; }

/* small pill button used inside rows */
#cart-modal .xc-mini, #checkout-modal .xc-mini {
  flex: none;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  font: 500 11px 'Inter', system-ui, sans-serif;
  color: #111111;
  cursor: pointer;
}
#cart-modal .xc-mini:hover, #checkout-modal .xc-mini:hover { border-color: #111111; background: #f8f9fa; }
#cart-modal .xc-mini.dark, #checkout-modal .xc-mini.dark { background: #111111; border-color: #111111; color: #fff; }
#cart-modal .xc-mini.strong, #checkout-modal .xc-mini.strong { border-color: #111111; }

/* white spinner in a dark button */
#cart-modal .xc-ld, #checkout-modal .xc-ld {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  animation: xcSpin .7s linear infinite;
  flex: none;
}
@keyframes xcSpin { to { transform: rotate(360deg); } }

/* ── footer / estimate (8a) ─────────────────────────────────────────────── */
#cart-modal .xc-foot {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid #f3f4f6;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}
#cart-modal .xc-est { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
#cart-modal .xc-est-l { font: 500 12px 'Inter', system-ui, sans-serif; color: #374151; }
#cart-modal .xc-est-v {
  font: 600 17px 'Manrope', system-ui, sans-serif;
  letter-spacing: -.4px;
  color: #111111;
}
#cart-modal .xc-fine {
  font: 400 10.5px/1.55 'Inter', system-ui, sans-serif;
  color: #6b7280;
  margin: 0;
}

/* ── schedule editor (8b) ───────────────────────────────────────────────── */
#cart-modal .xc-ed-for { font: 400 11px 'Inter', system-ui, sans-serif; color: #6b7280; }
#cart-modal .xc-ed-name {
  font: 600 15px 'Manrope', system-ui, sans-serif;
  letter-spacing: -.4px;
  color: #111111;
}
#cart-modal .xc-group { display: flex; flex-direction: column; gap: 9px; }
#cart-modal .xc-dates {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
#cart-modal .xc-dates::-webkit-scrollbar { display: none; }
#cart-modal .xc-date {
  flex: none;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  padding: 7px 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
#cart-modal .xc-date:hover { border-color: #111111; }
#cart-modal .xc-date.on { border-color: #111111; background: #f8f9fa; }
#cart-modal .xc-date.flex { padding: 9px 12px; font: 500 11px 'Inter', system-ui, sans-serif; color: #111111; }
#cart-modal .xc-dow {
  font: 500 9px 'JetBrains Mono', ui-monospace, monospace;
  color: #6b7280;
  text-transform: uppercase;
}
#cart-modal .xc-dnum {
  font: 600 13px 'Manrope', system-ui, sans-serif;
  color: #111111;
  margin-top: 2px;
}
#cart-modal .xc-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#cart-modal .xc-slot {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  padding: 11px;
  text-align: center;
  font: 500 11.5px 'Inter', system-ui, sans-serif;
  color: #374151;
  cursor: pointer;
  transition: border-color .12s, color .12s;
}
#cart-modal .xc-slot:hover:not(:disabled) { border-color: #111111; color: #111111; }
#cart-modal .xc-slot.on { border-color: #111111; color: #111111; }
#cart-modal .xc-slot:disabled { font-weight: 400; color: #9ca3af; cursor: default; }
#cart-modal .xc-slot.wide { grid-column: 1 / -1; }
#cart-modal .xc-hint {
  font: 400 10.5px/1.5 'Inter', system-ui, sans-serif;
  color: #9ca3af;
  margin: 0;
}

/* ── empty state (8b) ───────────────────────────────────────────────────── */
#cart-modal .xc-empty {
  padding: 24px 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  text-align: center;
}
#cart-modal .xc-empty-ico {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #f8f9fa;
  display: flex; align-items: center; justify-content: center;
  color: #9ca3af;
}
#cart-modal .xc-empty-t {
  font: 600 15px 'Manrope', system-ui, sans-serif;
  letter-spacing: -.4px;
  color: #111111;
  margin: 0;
}
#cart-modal .xc-empty-s {
  font: 400 11.5px/1.55 'Inter', system-ui, sans-serif;
  color: #6b7280;
  max-width: 250px;
  margin: 0;
}
#cart-modal .xc-sugg {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
#cart-modal .xc-sugg .xc-sn { flex: 1; font: 500 12.5px 'Inter', system-ui, sans-serif; color: #111111; min-width: 0; }
#cart-modal .xc-sugg .xc-sp { font: 600 11px 'JetBrains Mono', ui-monospace, monospace; color: #6b7280; }

/* ── notice + undo (8b / 8d) ────────────────────────────────────────────── */
#cart-modal .xc-notice, #checkout-modal .xc-notice {
  border-left: 3px solid #f59e0b;
  background: #f8f9fa;
  border-radius: 0 8px 8px 0;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  font: 400 11.5px/1.5 'Inter', system-ui, sans-serif;
  color: #374151;
}
#cart-modal .xc-notice .xc-ntxt, #checkout-modal .xc-notice .xc-ntxt { flex: 1; display: flex; flex-direction: column; gap: 5px; }
#cart-modal .xc-nt, #checkout-modal .xc-nt { font: 500 12.5px 'Inter', system-ui, sans-serif; color: #111111; }
#cart-modal .xc-ns, #checkout-modal .xc-ns { font: 400 11.5px/1.5 'Inter', system-ui, sans-serif; color: #6b7280; }
#cart-modal .xc-undo {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
#cart-modal .xc-undo span { flex: 1; font: 400 12px 'Inter', system-ui, sans-serif; color: #374151; }
#cart-modal .xc-undo button {
  border: 0; background: transparent; padding: 0;
  font: 500 11.5px 'Inter', system-ui, sans-serif;
  color: #111111; cursor: pointer;
}
#cart-modal .xc-undo button:hover { text-decoration: underline; text-underline-offset: 2px; }

/* address strip */
#cart-modal .xc-addr {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 11px;
}
#cart-modal .xc-addr span:not(.xc-dot) { flex: 1; font: 400 11.5px 'Inter', system-ui, sans-serif; color: #374151; min-width: 0; }

/* ══════════════════════════════════════════════════════════════════════════
   Confirm booking (8c / 8d)
   ══════════════════════════════════════════════════════════════════════════ */
#checkout-modal .xc-sec { display: flex; flex-direction: column; gap: 10px; }
#checkout-modal .xc-sec.tight { gap: 8px; }
#checkout-modal .xc-sec.field { gap: 7px; }

/* services + schedule table */
#checkout-modal .xc-table {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}
#checkout-modal .xc-trow {
  padding: 13px 14px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  gap: 12px;
}
#checkout-modal .xc-trow:last-child { border-bottom: 0; }
#checkout-modal .xc-trow.off { opacity: .55; }
#checkout-modal .xc-tinfo { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
#checkout-modal .xc-tn { font: 500 13px 'Inter', system-ui, sans-serif; color: #111111; }
#checkout-modal .xc-ts { font: 400 10.5px 'Inter', system-ui, sans-serif; color: #6b7280; }
#checkout-modal .xc-ts.set { color: #059669; }
#checkout-modal .xc-tp { font: 600 11.5px 'JetBrains Mono', ui-monospace, monospace; color: #111111; flex: none; }
#checkout-modal .xc-ta {
  border: 0; background: transparent; padding: 0; flex: none;
  font: 500 11px 'Inter', system-ui, sans-serif;
  color: #374151; cursor: pointer;
}
#checkout-modal .xc-ta:hover { color: #111111; text-decoration: underline; text-underline-offset: 2px; }

/* location row */
#checkout-modal .xc-loc {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
#checkout-modal .xc-loc.err { border-color: #b45309; }
#checkout-modal .xc-dot { width: 6px; height: 6px; border-radius: 50%; background: #059669; flex: none; }
#checkout-modal .xc-dot.warn { background: #f59e0b; }
/* :not(.xc-dot) matters — a bare `.xc-loc span` also matches the status dot and,
   being more specific than `.xc-dot`, stretched it into a bar. */
#checkout-modal .xc-loc span:not(.xc-dot) { flex: 1; font: 400 12.5px 'Inter', system-ui, sans-serif; color: #111111; min-width: 0; }
#checkout-modal .xc-loc span.mute { color: #6b7280; }
#checkout-modal .xc-chg {
  flex: none; border: 0; background: transparent; padding: 0;
  font: 500 11.5px 'Inter', system-ui, sans-serif;
  color: #111111; cursor: pointer;
}
#checkout-modal .xc-chg:hover { text-decoration: underline; text-underline-offset: 2px; }

/* two-up name / mobile */
#checkout-modal .xc-2up { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#checkout-modal .xc-in {
  width: 100%;
  height: 44px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0 13px;
  font: 400 12.5px 'Inter', system-ui, sans-serif;
  color: #111111;
  background: #fff;
  outline: none;
  transition: border-color .15s;
}
#checkout-modal .xc-in::placeholder { color: #9ca3af; }
#checkout-modal .xc-in:focus { border-color: #111111; }
#checkout-modal .xc-in.err { border-color: #b45309; }
#checkout-modal .xc-static {
  height: 44px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font: 400 12.5px 'Inter', system-ui, sans-serif;
  color: #111111;
}
#checkout-modal .xc-ok {
  width: 15px; height: 15px; flex: none;
  border-radius: 50%;
  background: #059669;
  color: #fff;
  font: 9px 'Inter', system-ui, sans-serif;
  display: flex; align-items: center; justify-content: center;
}
#checkout-modal textarea.xc-in {
  height: 84px;
  padding: 12px 13px;
  resize: vertical;
  line-height: 1.5;
}

/* quick chips under the description */
#checkout-modal .xc-chips { display: flex; flex-wrap: wrap; gap: 7px; }
#checkout-modal .xc-chip {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 999px;
  padding: 6px 11px;
  font: 500 10.5px 'Inter', system-ui, sans-serif;
  color: #374151;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
#checkout-modal .xc-chip:hover { border-color: #111111; color: #111111; }
#checkout-modal .xc-chip.on { border-color: #111111; background: #111111; color: #fff; }

/* estimate block */
#checkout-modal .xc-total {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 15px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
#checkout-modal .xc-tl { display: flex; flex-direction: column; gap: 4px; }
#checkout-modal .xc-tl b { font: 500 12px 'Inter', system-ui, sans-serif; color: #374151; }
#checkout-modal .xc-tl span { font: 400 10px 'Inter', system-ui, sans-serif; color: #9ca3af; }
#checkout-modal .xc-tv {
  font: 600 18px 'Manrope', system-ui, sans-serif;
  letter-spacing: -.5px;
  color: #111111;
}

#checkout-modal .xc-consent {
  font: 400 10.5px/1.6 'Inter', system-ui, sans-serif;
  color: #9ca3af;
  margin: 0;
}
#checkout-modal .xc-consent a { color: #6b7280; text-decoration: underline; text-underline-offset: 2px; }
#checkout-modal .xc-consent a:hover { color: #111111; }

#checkout-modal .xc-warn, #cart-modal .xc-warn {
  font: 400 11.5px 'Inter', system-ui, sans-serif;
  color: #b45309;
  margin: 0;
}
#checkout-modal .xc-warn:empty, #cart-modal .xc-warn:empty { display: none; }
#checkout-modal .xc-lock { font: 400 10.5px 'Inter', system-ui, sans-serif; color: #9ca3af; margin: 0; }

/* verify-to-post block (8d) */
#checkout-modal .xc-vt {
  font: 600 16px 'Manrope', system-ui, sans-serif;
  letter-spacing: -.4px;
  color: #111111;
  margin: 0;
}
#checkout-modal .xc-vs { font: 400 11.5px/1.5 'Inter', system-ui, sans-serif; color: #6b7280; margin: 0; }
#checkout-modal .xc-phone {
  display: flex;
  height: 46px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .15s;
}
#checkout-modal .xc-phone.on { border-color: #111111; }
#checkout-modal .xc-phone.err { border-color: #b45309; }
#checkout-modal .xc-cc {
  flex: none; width: 56px;
  background: #f8f9fa;
  border-right: 1px solid #e5e7eb;
  display: flex; align-items: center; justify-content: center;
  font: 500 13px 'Inter', system-ui, sans-serif;
  color: #374151;
}
#checkout-modal .xc-phone input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  padding: 0 13px;
  font: 400 13.5px 'Inter', system-ui, sans-serif;
  color: #111111;
}
#checkout-modal .xc-phone input::placeholder { color: #9ca3af; }

/* ==========================================================================
   Font guard — index.php forces Plus Jakarta Sans with !important on a broad
   element list, which outranks any specificity. Re-assert the design's faces.
   ========================================================================== */
#cart-modal, #checkout-modal,
#cart-modal div, #cart-modal span, #cart-modal p, #cart-modal a, #cart-modal b,
#cart-modal button, #cart-modal input, #cart-modal label,
#checkout-modal div, #checkout-modal span, #checkout-modal p, #checkout-modal a,
#checkout-modal b, #checkout-modal button, #checkout-modal input,
#checkout-modal textarea, #checkout-modal label {
  font-family: 'Inter', system-ui, sans-serif !important;
}
#cart-modal .xc-t, #cart-modal .xc-est-v, #cart-modal .xc-ed-name,
#cart-modal .xc-empty-t, #cart-modal .xc-dnum,
#checkout-modal .xc-t, #checkout-modal .xc-tv, #checkout-modal .xc-vt {
  font-family: 'Manrope', system-ui, sans-serif !important;
}
#cart-modal .xc-tag, #cart-modal .xc-p, #cart-modal .xc-dow, #cart-modal .xc-sugg .xc-sp,
#checkout-modal .xc-tag, #checkout-modal .xc-tp {
  font-family: 'JetBrains Mono', ui-monospace, monospace !important;
}

/* ==========================================================================
   8e — mobile 390: bottom sheets
   ========================================================================== */
@media (max-width: 639px) {
  #cart-modal.xc-ov, #checkout-modal.xc-ov { align-items: flex-end; padding: 0; }
  #cart-modal .xc-card, #checkout-modal .xc-card {
    max-width: none;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, .08);
    max-height: calc(100vh - 70px);
  }
  #cart-modal .xc-grab, #checkout-modal .xc-grab {
    display: flex; justify-content: center; padding: 14px 0 0; flex: none;
  }
  #cart-modal .xc-grab span, #checkout-modal .xc-grab span {
    display: block; width: 36px; height: 4px; border-radius: 999px; background: #e5e7eb;
  }
  #cart-modal .xc-hd, #checkout-modal .xc-hd { padding: 13px 16px; border-bottom: 0; }
  #cart-modal .xc-t, #checkout-modal .xc-t { font-size: 17px; letter-spacing: -.4px; }
  #cart-modal .xc-sub, #checkout-modal .xc-sub { font-size: 10.5px; }
  #cart-modal .xc-htxt, #checkout-modal .xc-htxt { gap: 3px; }
  #cart-modal .xc-x, #checkout-modal .xc-x { width: 26px; height: 26px; }
  #cart-modal .xc-body { padding: 0 16px 16px; gap: 13px; }
  #checkout-modal .xc-body { padding: 0 16px 16px; gap: 14px; }
  #cart-modal .xc-item { padding: 14px; gap: 9px; }
  #cart-modal .xc-n { font-size: 13px; }
  #cart-modal .xc-m { font-size: 10px; }
  #cart-modal .xc-p { font-size: 12px; }
  #cart-modal .xc-sched { padding: 9px 10px; }
  #cart-modal .xc-stxt { font-size: 10.5px; }
  #cart-modal .xc-lnk { font-size: 10.5px; }
  #cart-modal .xc-foot { padding: 14px 16px; gap: 10px; }
  #cart-modal .xc-est-l { font-size: 11.5px; }
  #cart-modal .xc-est-v { font-size: 16px; letter-spacing: -.4px; }
  #cart-modal .xc-fine { font-size: 10px; line-height: 1.5; }
  #cart-modal .xc-btn, #checkout-modal .xc-btn { padding: 14px; }
  /* Confirm keeps its CTA reachable without scrolling to the bottom of a long form */
  #checkout-modal .xc-foot {
    position: sticky; bottom: 0;
    margin: 0 -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid #f3f4f6; background: #fff;
  }
  #checkout-modal .xc-2up { grid-template-columns: 1fr; gap: 14px; }
  #checkout-modal textarea.xc-in { height: 76px; padding: 12px; }
  #checkout-modal .xc-trow { padding: 12px 13px; gap: 10px; }
  #checkout-modal .xc-tn { font-size: 12.5px; }
  #checkout-modal .xc-ts { font-size: 10px; }
  #checkout-modal .xc-loc { padding: 12px; gap: 10px; }
  #checkout-modal .xc-loc span { font-size: 11.5px; line-height: 1.4; }
}

@media (prefers-reduced-motion: reduce) {
  #cart-modal .xc-ld, #checkout-modal .xc-ld { animation: none; }
}
