/* Marketplace-booking look: white canvas, soft grey sections, black pill actions, one violet accent for selection.
   Single light theme by choice, set explicitly so it reads the same on any device setting. */
:root {
  --bg: #ffffff;
  --bg-soft: #f2f2f2;
  --surface: #ffffff;
  --surface-2: #f5f5f5;
  --ink: #0d0d0d;
  --muted: #767676;
  --faint: #808080;
  --line: #e5e5e5;
  --line-strong: #d3d3d3;
  --bar: #0d0d0d;
  --bar-2: #262626;
  --bar-ink: #ffffff;
  --bar-muted: #b3b3b3;
  --bar-line: rgb(255 255 255 / .12);
  --accent: #6950f3;
  --accent-hover: #5a40ea;
  --star: #ffc00a;
  --accent-ink: #ffffff;
  --accent-soft: #f0f0ff;
  --accent-line: #dbddff;
  --ok: #1f8900;  --ok-soft: #ecf8e3;  --ok-dot: #78d240;
  --warn: #a35a00; --warn-soft: #fdf0dc;
  --bad: #d1352b; --bad-soft: #fde8e6;
  --info: #6950f3; --info-soft: #f0f0ff;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 4px 16px rgb(0 0 0 / .06);
  --shadow-lg: 0 2px 6px rgb(0 0 0 / .05), 0 16px 40px rgb(0 0 0 / .12);
  --display: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Sans", system-ui, sans-serif;
  --r-sm: 8px; --r: 12px; --r-lg: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --z-sticky: 10; --z-bar: 20; --z-flow: 40; --z-toast: 60;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; letter-spacing: -.02em; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 3rem); line-height: 1.08; font-weight: 700; }
h2 { font-size: 1.5rem; line-height: 1.2; font-weight: 600; }
h3 { font-size: 1.05rem; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; text-wrap: pretty; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-variant-numeric: tabular-nums; }
.eyebrow { font: 500 .85rem/1.2 var(--body); color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spread { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.wrap { max-width: 1200px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .wrap { padding-inline: 32px; } }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 999px; z-index: var(--z-toast); }
.skip:focus { left: 8px; }

/* ---------- top nav ---------- */
.bar { background: var(--bg); color: var(--ink); position: sticky; top: env(safe-area-inset-top, 0px); z-index: var(--z-bar); border-bottom: 1px solid var(--line); }
.bar .inner { max-width: 1200px; margin-inline: auto; padding: 12px 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; min-height: 64px; }
@media (min-width: 768px) { .bar .inner { padding-inline: 32px; } }
.brand { display: flex; align-items: center; gap: 10px; font: 700 1.1rem/1 var(--display); letter-spacing: -.02em; text-decoration: none; min-width: 0; }
.brand > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 18px; height: 18px; }
.bar-btn { background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font: 600 .9rem/1 var(--body);
  display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; flex: none; transition: background .2s var(--ease), border-color .2s; }
.bar-btn:hover { background: var(--surface-2); border-color: var(--line-strong); }
.bar-btn svg { width: 17px; height: 17px; }
@media (max-width: 480px) { .bar-btn .long { display: none; } }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }

/* ---------- form controls ---------- */
label { font-weight: 600; font-size: .9rem; display: flex; flex-direction: column; gap: 6px; }
label .hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); padding: 12px 14px; width: 100%; min-width: 0; min-height: 48px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--bad); }
input[type="checkbox"] { min-height: 0; accent-color: var(--accent); }
textarea { min-height: 112px; resize: vertical; }
::placeholder { color: var(--faint); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

/* ---------- buttons ---------- */
button { font: inherit; cursor: pointer; color: inherit; }
.btn { border: 1px solid transparent; border-radius: 999px; padding: 0 22px; min-height: 48px; font-weight: 600; font-size: 1rem; background: var(--ink); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  transition: transform .15s var(--ease), background .2s var(--ease), border-color .2s, opacity .2s; }
.btn:hover { background: #333; }
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { background: var(--ink); color: #fff; }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.accent:hover { background: var(--accent-hover); }
.btn.ghost { background: var(--bg); color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--bg); color: var(--bad); border-color: var(--line-strong); }
.btn.danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn.ok { background: var(--ok); color: #fff; }
.btn.ok:hover { background: #187000; }
.btn.block { width: 100%; min-height: 52px; }
.btn.sm { min-height: 38px; padding: 0 16px; font-size: .9rem; }
.btn:disabled { background: var(--line); color: var(--faint); border-color: transparent; cursor: not-allowed; transform: none; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; }
button.link:hover { text-decoration: underline; }

/* pills / chips */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 0 16px; min-height: 40px; font-weight: 500; font-size: .92rem;
  transition: background .2s var(--ease), border-color .2s, color .2s; }
.chip:hover { border-color: var(--line-strong); background: var(--surface-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* status tags */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font: 600 .75rem/1.6 var(--body); white-space: nowrap; }
.s-assigned { background: var(--accent-soft); color: var(--accent); }
.s-accepted { background: var(--ok-soft); color: var(--ok); }
.s-on_the_way, .s-working { background: var(--warn-soft); color: var(--warn); }
.s-done { background: var(--bg-soft); color: var(--muted); }
.s-cancelled, .s-declined { background: var(--bad-soft); color: var(--bad); }
.u-emergency { background: var(--bad); color: #fff; }
.u-today { background: var(--warn-soft); color: var(--warn); }

/* ---------- feedback ---------- */
.error { background: var(--bad-soft); color: var(--bad); border-radius: var(--r-sm); padding: 12px 14px; font-weight: 500; font-size: .92rem; }
.notice { background: var(--accent-soft); color: var(--ink); border-radius: var(--r); padding: 12px 16px; font-size: .92rem; }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 12px 20px; border-radius: 999px; font-weight: 500; z-index: var(--z-toast); max-width: calc(100% - 32px); box-shadow: var(--shadow-lg); animation: toast-in .3s var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }
.skeleton { background: linear-gradient(90deg, var(--bg-soft) 0%, var(--line) 50%, var(--bg-soft) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: var(--r); }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 24px; background: var(--surface-2); border-radius: var(--r); color: var(--muted); }
.empty b { color: var(--ink); font-weight: 600; }

/* ---------- tabs & tables (admin) ---------- */
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: none; background: var(--bg); border: 1px solid var(--line); padding: 0 18px; min-height: 40px; font-weight: 500; border-radius: 999px; white-space: nowrap; transition: background .2s, border-color .2s; }
.tabs button:hover { background: var(--surface-2); }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.list th { text-align: left; font: 500 .82rem/1 var(--body); color: var(--muted); padding: 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 14px 10px; border-bottom: 1px solid var(--line); vertical-align: top; transition: background .15s; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr:hover td { background: var(--surface-2); }
table.list input, table.list select { min-height: 40px; padding: 8px 10px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- marketplace (home + search) ---------- */
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a.txt { text-decoration: none; font-weight: 600; font-size: .92rem; padding: 8px 12px; border-radius: 999px; }
.nav-links a.txt:hover { background: var(--surface-2); }
@media (max-width: 640px) { .nav-links a.txt { display: none; } }

.searchbar { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; align-items: center; background: var(--bg); border: 1px solid var(--line);
  border-radius: 999px; box-shadow: var(--shadow-lg); padding: 6px 6px 6px 8px; max-width: 760px; width: 100%; }
.searchbar .seg { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 10px; padding: 0 16px; min-width: 0; }
.searchbar .seg + .seg { border-left: 1px solid var(--line); }
.searchbar .seg svg { width: 20px; height: 20px; color: var(--muted); }
.searchbar select { border: 0; background: transparent; padding: 0; min-height: 52px; font-weight: 600; font-size: 1rem; box-shadow: none; cursor: pointer;
  appearance: none; -webkit-appearance: none; text-overflow: ellipsis; }
.searchbar select:focus { box-shadow: none; }
.searchbar .seg:focus-within { background: var(--surface-2); border-radius: 999px; }
.searchbar .btn { min-height: 52px; padding: 0 28px; }
@media (max-width: 680px) {
  .searchbar { grid-template-columns: 1fr; border-radius: var(--r-lg); padding: 8px; gap: 4px; }
  .searchbar .seg + .seg { border-left: 0; border-top: 1px solid var(--line); }
  .searchbar .seg:focus-within { border-radius: var(--r); }
  .searchbar .btn { width: 100%; margin-top: 4px; }
}

.sec-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sec-hd a { color: var(--accent); font-weight: 600; text-decoration: none; font-size: .95rem; white-space: nowrap; }
.sec-hd a:hover { text-decoration: underline; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(290px, 340px); gap: 16px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 12px; scroll-snap-type: x proximity; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

.pro { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; transition: box-shadow .2s, border-color .2s; }
.pro:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
.pro-hd { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 1.15rem; flex: none; }
.pro-hd h3 { font-size: 1.1rem; }
.pro-hd .tr { color: var(--muted); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); white-space: nowrap; }
.badge.new { background: var(--accent-soft); color: var(--accent); }
.pro .bio { color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pro .lbl { font-size: .82rem; color: var(--muted); font-weight: 500; }
.tchips { display: flex; flex-wrap: wrap; gap: 8px; }
.tchip { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--bg); font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums; transition: border-color .2s, background .2s, color .2s; }
.tchip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.tchip small { font-weight: 500; color: var(--muted); margin-right: 5px; }
.tchip:hover small { color: var(--accent); }
.pro .more { color: var(--accent); font-weight: 600; font-size: .9rem; text-decoration: none; align-self: flex-start; }
.pro .more:hover { text-decoration: underline; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
@media (max-width: 560px) { .cat-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .cat { padding: 14px; gap: 8px; } .cat .ic { width: 40px; height: 40px; } .cat b { font-size: .95rem; } .cat span { font-size: .8rem; } }
.cat { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: var(--r-lg); background: var(--surface-2); text-decoration: none; transition: background .2s, transform .15s var(--ease); }
.cat:hover { background: var(--accent-soft); }
.cat:active { transform: scale(.98); }
.cat .ic { width: 48px; height: 48px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; color: var(--accent); }
.cat .ic svg { width: 24px; height: 24px; }
.cat b { font-size: 1.05rem; }
.cat span { color: var(--muted); font-size: .88rem; }

.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.svc-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.svc-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.svc-card b { font-weight: 600; }
.svc-card span { color: var(--muted); font-size: .88rem; }
.svc-card strong { font-weight: 600; margin-top: 6px; }

.foot { border-top: 1px solid var(--line); margin-top: 24px; }
.foot .wrap { padding-block: 28px 40px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; color: var(--muted); font-size: .9rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- booking flow (shared by /book and /plan) ---------- */
.flow { position: fixed; inset: 0; z-index: var(--z-flow); background: var(--bg); overflow-y: auto; animation: flow-in .28s var(--ease); }
@keyframes flow-in { from { opacity: 0; transform: translateY(16px); } }
.flow-top { position: sticky; top: 0; background: var(--bg); z-index: 2; }
.flow-top .inner { max-width: 1200px; margin-inline: auto; padding: 14px 16px; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; }
@media (min-width: 768px) { .flow-top .inner { padding-inline: 32px; } }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); display: grid; place-items: center; transition: background .2s; }
.iconbtn:hover { background: var(--surface-2); }
.iconbtn svg { width: 20px; height: 20px; }
.iconbtn:disabled { visibility: hidden; }
.trail { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; font-size: .9rem; color: var(--faint); }
.trail span { display: inline-flex; align-items: center; gap: 6px; }
.trail span.on { color: var(--ink); font-weight: 600; }
.trail span.done { color: var(--muted); }
.trail svg { width: 14px; height: 14px; color: var(--faint); }
@media (max-width: 560px) { .trail span:not(.on), .trail svg { display: none; } }
.flow-body { max-width: 1200px; margin-inline: auto; padding: 8px 16px 140px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; align-items: start; }
@media (min-width: 768px) { .flow-body { padding-inline: 32px; } }
@media (max-width: 960px) { .flow-body { grid-template-columns: minmax(0, 1fr); } .flow-body .summary { display: none; } }
.pane { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.pane h1 { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.5rem); }

.urg { display: flex; flex-direction: column; gap: 10px; }
.urg button { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; transition: border-color .2s, box-shadow .2s; }
.urg button:hover { border-color: var(--line-strong); }
.urg .ic { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; }
.urg .ic svg { width: 20px; height: 20px; }
.urg b { display: block; font-weight: 600; }
.urg small { color: var(--muted); font-size: .88rem; }
.urg .tag { font-weight: 600; font-size: .9rem; }
.urg button[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.urg button[aria-checked="true"] .ic { background: var(--accent); color: #fff; }

.month { display: flex; align-items: center; justify-content: space-between; }
.month h3 { font-size: 1.1rem; }
.dates { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px; scroll-behavior: smooth; }
.dates::-webkit-scrollbar { display: none; }
.date { flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; background: none; border: 0; padding: 0; width: 64px; }
.date .c { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 1.35rem; font-weight: 600; transition: background .2s, border-color .2s, color .2s; }
.date .w { font-size: .85rem; color: var(--muted); }
.date:hover:not(:disabled) .c { border-color: var(--ink); }
.date[aria-pressed="true"] .c { background: var(--accent); border-color: var(--accent); color: #fff; }
.date[aria-pressed="true"] .w { color: var(--ink); font-weight: 600; }
.date:disabled { cursor: not-allowed; }
.date:disabled .c { color: var(--faint); background: var(--surface-2); border-color: transparent; text-decoration: line-through; }
.times { display: flex; flex-direction: column; gap: 10px; }
.time { text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 0 18px; min-height: 56px; font-weight: 600; font-size: 1rem; display: flex; align-items: center; justify-content: space-between; transition: border-color .2s, box-shadow .2s; }
.time:hover { border-color: var(--line-strong); }
.time small { font-weight: 400; color: var(--muted); font-size: .85rem; }
.time[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.times .skeleton { height: 56px; }

.summary { position: sticky; top: 84px; }
.summary .card { padding: 24px; display: flex; flex-direction: column; gap: 18px; box-shadow: var(--shadow); }
.sum-hd { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; }
.sum-hd .logo { width: 56px; height: 56px; border-radius: var(--r); background: var(--ink); color: #fff; display: grid; place-items: center; }
.sum-hd .logo svg { width: 26px; height: 26px; }
.sum-rows { display: flex; flex-direction: column; gap: 10px; font-size: .92rem; }
.sum-row { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; color: var(--muted); }
.sum-row svg { width: 18px; height: 18px; margin-top: 2px; }
.sum-row b { color: var(--ink); font-weight: 500; }
.lines { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .95rem; }
.lines div { display: flex; justify-content: space-between; gap: 12px; }
.lines small { display: block; color: var(--muted); font-size: .85rem; }
.lines .tot { padding-top: 14px; border-top: 1px solid var(--line); font-weight: 700; font-size: 1.05rem; }
.fine { font-size: .82rem; color: var(--muted); }

.fbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; background: var(--bg); border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); display: none; gap: 12px; align-items: center; justify-content: space-between; }
.fbar .btn { min-width: 150px; }
@media (max-width: 960px) { .fbar { display: flex; } }

.done-hd { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.tick { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; animation: pop .45s var(--ease); }
.tick svg { width: 32px; height: 32px; stroke-width: 2.4; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.code { font-size: 2rem; font-weight: 700; letter-spacing: .14em; }

dialog.sheet { border: 0; border-radius: 20px; padding: 0; width: min(460px, calc(100% - 32px)); box-shadow: var(--shadow-lg); color: var(--ink); }
dialog.sheet::backdrop { background: rgb(0 0 0 / .4); }
.sheet-in { padding: 24px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- floating WhatsApp button (client pages) ---------- */
.wa-fab { position: fixed; right: max(20px, env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 35;
  display: flex; align-items: center; gap: 10px; text-decoration: none; animation: wa-in .4s var(--ease) .6s both; }
.wa-dot { width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 20px rgb(37 211 102 / .35), 0 2px 6px rgb(0 0 0 / .12); transition: transform .2s var(--ease), box-shadow .2s; }
.wa-dot svg { width: 32px; height: 32px; }
.wa-label { background: var(--bg); color: var(--ink); font-weight: 600; font-size: .92rem; padding: 9px 14px; border-radius: 999px; box-shadow: var(--shadow-lg);
  white-space: nowrap; opacity: 0; transform: translateX(8px); pointer-events: none; transition: opacity .2s, transform .2s var(--ease); }
.wa-fab:hover .wa-dot, .wa-fab:focus-visible .wa-dot { transform: scale(1.06); box-shadow: 0 8px 26px rgb(37 211 102 / .45), 0 2px 6px rgb(0 0 0 / .14); }
.wa-fab:hover .wa-label, .wa-fab:focus-visible .wa-label { opacity: 1; transform: none; }
.wa-fab:active .wa-dot { transform: scale(.96); }
.wa-fab:focus-visible { outline: none; }
.wa-fab:focus-visible .wa-dot { outline: 3px solid var(--accent); outline-offset: 3px; }
@keyframes wa-in { from { opacity: 0; transform: translateY(12px) scale(.9); } }
/* sit above the phone "Book now" bar on the services page */
@media (max-width: 960px) { body:has(.mbar) .wa-fab { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); } }
@media (max-width: 480px) { .wa-dot { width: 54px; height: 54px; } .wa-dot svg { width: 30px; height: 30px; } }

/* ---------- AI assistant (client pages) ---------- */
.ai-fab { position: fixed; right: max(20px, env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 36;
  display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; animation: wa-in .4s var(--ease) .4s both; }
.has-wa .ai-fab { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 960px) {
  body:has(.mbar) .ai-fab { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  body.has-wa:has(.mbar) .ai-fab { bottom: calc(164px + env(safe-area-inset-bottom, 0px)); }
}
.ai-fab-dot { width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 20px rgb(105 80 243 / .35), 0 2px 6px rgb(0 0 0 / .12); transition: transform .2s var(--ease); }
.ai-fab-dot svg { width: 28px; height: 28px; }
.ai-fab-label { background: var(--bg); color: var(--ink); font-weight: 600; font-size: .92rem; padding: 9px 14px; border-radius: 999px; box-shadow: var(--shadow-lg);
  white-space: nowrap; opacity: 0; transform: translateX(8px); pointer-events: none; transition: opacity .2s, transform .2s var(--ease); }
.ai-fab:hover .ai-fab-dot { transform: scale(1.06); }
.ai-fab:hover .ai-fab-label, .ai-fab:focus-visible .ai-fab-label { opacity: 1; transform: none; }
.ai-fab:focus-visible { outline: none; }
.ai-fab:focus-visible .ai-fab-dot { outline: 3px solid var(--accent); outline-offset: 3px; }
.ai-open .ai-fab, .ai-open .wa-fab { display: none; }
@media (max-width: 480px) { .ai-fab-dot { width: 54px; height: 54px; } .has-wa .ai-fab { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); } }

.ai-panel { position: fixed; right: 20px; bottom: 20px; z-index: 50; width: min(400px, calc(100vw - 40px)); height: min(620px, calc(100dvh - 40px));
  background: var(--bg); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden;
  animation: ai-in .25s var(--ease); }
@keyframes ai-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@media (max-width: 560px) {
  .ai-panel { inset: 0; width: 100%; height: 100%; border-radius: 0; border: 0;
    padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
}
.ai-hd { display: grid; grid-template-columns: 40px 1fr 40px; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ai-av { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.ai-av svg { width: 22px; height: 22px; }
.ai-ttl { display: flex; flex-direction: column; line-height: 1.25; }
.ai-ttl span { color: var(--muted); font-size: .82rem; }
.ai-x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); display: grid; place-items: center; }
.ai-x:hover { background: var(--surface-2); }
.ai-x svg { width: 18px; height: 18px; }
.ai-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.ai-msg { max-width: 86%; padding: 10px 14px; border-radius: 18px; font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere; }
.ai-msg p { margin: 0; } .ai-msg p + p, .ai-msg p + ul, .ai-msg ul + p { margin-top: 8px; }
.ai-msg ul { margin: 6px 0 0; padding-left: 18px; } .ai-msg li + li { margin-top: 4px; }
.ai-bot { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 6px; }
.ai-bot a { color: var(--accent); font-weight: 600; }
.ai-user { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.ai-err { background: var(--bad-soft); color: var(--bad); }
.ai-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-chips button { border: 1px solid var(--accent-line); background: var(--bg); color: var(--accent); border-radius: 999px; padding: 7px 12px; font-size: .88rem; font-weight: 500; transition: background .2s; }
.ai-chips button:hover { background: var(--accent-soft); }
.ai-dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.ai-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: ai-dot 1s infinite ease-in-out; }
.ai-dots i:nth-child(2) { animation-delay: .15s; } .ai-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ai-form { display: flex; gap: 8px; align-items: flex-end; padding: 12px 12px 6px; border-top: 1px solid var(--line); }
.ai-in { flex: 1; min-height: 44px; max-height: 120px; resize: none; border-radius: 22px; padding: 11px 16px; font-size: 16px; line-height: 1.4; }
.ai-send { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; transition: background .2s; }
.ai-send:hover { background: #333; } .ai-send:disabled { background: var(--line); color: var(--faint); }
.ai-send svg { width: 20px; height: 20px; }
.ai-foot { margin: 0; padding: 4px 16px 12px; font-size: .78rem; color: var(--muted); text-align: center; }
.ai-foot a { color: var(--accent); font-weight: 600; }

/* address fieldset (booking + plan sign-up) */
fieldset.addr { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.addr legend { padding: 0; margin-bottom: 10px; font-weight: 700; font-size: 1rem; }
