/* Chat Desk — an interpreter's desk: English carries the line, the original sits beneath it as a gloss. */
:root {
  --bg: #e9edf1;
  --surface: #ffffff;
  --ink: #16202b;
  --muted: #677382;
  --gloss: #7d6a52;          /* the original-language line: warm, like pencil annotation */
  --line: #d6dce3;
  --accent: #2b59c3;         /* cobalt: actions and your own words */
  --accent-ink: #ffffff;
  --out: #dfe8fb;
  --in: #ffffff;
  --warn: #b5432c;
  --warn-bg: #fbe9e4;
  --ok: #2c7a4b;
  --hold-bg: #fff4d6;
  --shadow: 0 1px 2px rgba(22, 32, 43, .08);
  --flags: "Phone Desk Flags Off";  /* .flags (Windows, which has no flag emoji) swaps in the flags-only font below */
  --sans: var(--flags), system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gloss-font: var(--flags), "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --r: 14px;
  color-scheme: light;
  --top: var(--ink);
  --stg-amber-bg: #fef3c7; --stg-amber-fg: #92400e; --stg-amber-tr: #fde68a; --stg-amber-ink: #ffffff;
  --stg-green-bg: #dcfce7; --stg-green-fg: #166534; --stg-green-tr: #bbf7d0; --stg-green-ink: #ffffff;
  --stg-blue-bg: #dbeafe; --stg-blue-fg: #1e40af; --stg-blue-tr: #bfdbfe; --stg-blue-ink: #ffffff;
  --stg-ready-bg: #16a34a; --stg-ready-fg: #ffffff; --stg-ready-tr: #15803d; --stg-ready-ink: #14532d;
  --stg-purple-bg: #ede9fe; --stg-purple-fg: #5b21b6; --stg-purple-tr: #ddd6fe; --stg-purple-ink: #ffffff;
  --stg-live-bg: #ccfbf1; --stg-live-fg: #115e59; --stg-live-tr: #99f6e4; --stg-live-ink: #ffffff;
  --bdg-new-bg: #fff7e0; --bdg-new-fg: #8a4b08; --bdg-known-bg: #eef0f3; --bdg-known-fg: #3b4250;
}
/* Dark follows the device unless this device picked one (menu › Light / Dark mode; data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f151c; --surface: #17202a; --ink: #e7ecf2; --muted: #93a0ae; --gloss: #c9b291;
    --line: #26323f; --accent: #6f95f2; --accent-ink: #0b1220; --out: #1f3156; --in: #1b2531;
    --warn: #f08a72; --warn-bg: #3a2019; --ok: #6fcf97; --hold-bg: #3a3116; color-scheme: dark;
    --top: #0a0f14;
    /* booking stages: background, text, progress track, text on a solid button (owner-approved mockup) */
    --stg-amber-bg: #3a2a0c; --stg-amber-fg: #fbbf24; --stg-amber-tr: #5a4214; --stg-amber-ink: #1a1204;
    --stg-green-bg: #0f2e1c; --stg-green-fg: #4ade80; --stg-green-tr: #1d4a30; --stg-green-ink: #06210f;
    --stg-blue-bg: #11233f; --stg-blue-fg: #7cb2ff; --stg-blue-tr: #1f3a63; --stg-blue-ink: #081426;
    --stg-ready-bg: #15803d; --stg-ready-fg: #ffffff; --stg-ready-tr: #1f9a4c; --stg-ready-ink: #0f3d21;
    --stg-purple-bg: #26193f; --stg-purple-fg: #c4a7ff; --stg-purple-tr: #3a2a5e; --stg-purple-ink: #140a26;
    --stg-live-bg: #0d2e2b; --stg-live-fg: #5eead4; --stg-live-tr: #164a45; --stg-live-ink: #04201d;
    --bdg-new-bg: #3a2a0c; --bdg-new-fg: #fbbf24; --bdg-known-bg: #262b35; --bdg-known-fg: #d5dae3;
  }
}
:root[data-theme="dark"] {
    --bg: #0f151c; --surface: #17202a; --ink: #e7ecf2; --muted: #93a0ae; --gloss: #c9b291;
    --line: #26323f; --accent: #6f95f2; --accent-ink: #0b1220; --out: #1f3156; --in: #1b2531;
    --warn: #f08a72; --warn-bg: #3a2019; --ok: #6fcf97; --hold-bg: #3a3116; color-scheme: dark;
    --top: #0a0f14;
    /* booking stages: background, text, progress track, text on a solid button (owner-approved mockup) */
    --stg-amber-bg: #3a2a0c; --stg-amber-fg: #fbbf24; --stg-amber-tr: #5a4214; --stg-amber-ink: #1a1204;
    --stg-green-bg: #0f2e1c; --stg-green-fg: #4ade80; --stg-green-tr: #1d4a30; --stg-green-ink: #06210f;
    --stg-blue-bg: #11233f; --stg-blue-fg: #7cb2ff; --stg-blue-tr: #1f3a63; --stg-blue-ink: #081426;
    --stg-ready-bg: #15803d; --stg-ready-fg: #ffffff; --stg-ready-tr: #1f9a4c; --stg-ready-ink: #0f3d21;
    --stg-purple-bg: #26193f; --stg-purple-fg: #c4a7ff; --stg-purple-tr: #3a2a5e; --stg-purple-ink: #140a26;
    --stg-live-bg: #0d2e2b; --stg-live-fg: #5eead4; --stg-live-tr: #164a45; --stg-live-ink: #04201d;
    --bdg-new-bg: #3a2a0c; --bdg-new-fg: #fbbf24; --bdg-known-bg: #262b35; --bdg-known-fg: #d5dae3;
}

/* flag emoji only (🇦🇷 in saved names): Windows draws them as two letters ("AR") without this */
@font-face { font-family: "Twemoji Country Flags"; src: url("/static/flags.woff2") format("woff2");
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
  font-display: swap; }
:root.flags { --flags: "Twemoji Country Flags"; }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.4 var(--sans); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

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

/* ---- top bar: one tab per number */
.top { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  background: var(--top); color: #fff; }
.phones { display: flex; gap: 6px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.phone-tab { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; border: 0;
  background: rgba(255,255,255,.08); color: #cfd8e3; white-space: nowrap; font-size: 15px; }
.phone-tab.on { background: #fff; color: #16202b; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #4cc38a; flex: none; }
.dot.off { background: #f06b52; }
.dot.warn { background: #f2b33d; }
.badge { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 700; text-align: center; }
.icon-btn { border: 0; background: transparent; font-size: 20px; width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; flex: none; }
.top .icon-btn { color: #fff; }
.icon-btn:hover { background: rgba(127,127,127,.12); }

/* ---- banners */
.banner { padding: 10px 14px; font-size: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); }
.banner.off { background: var(--warn-bg); color: var(--warn); }
.banner.hold { background: var(--hold-bg); }
.banner .spacer { flex: 1; }
.banner button { border: 1px solid currentColor; background: transparent; border-radius: 8px; padding: 4px 10px; font-size: 13px; }

/* ---- panes */
.panes { flex: 1; display: flex; min-height: 0; }
.list-pane { width: 100%; display: flex; flex-direction: column; background: var(--surface); position: relative; min-height: 0; }
.chat-pane { display: none; flex: 1; min-width: 0; flex-direction: column; min-height: 0; }
body.in-chat .list-pane { display: none; }
body.in-chat .chat-pane { display: flex; }
@media (min-width: 900px) {
  .list-pane { width: 360px; flex: none; border-right: 1px solid var(--line); }
  .chat-pane, body.in-chat .chat-pane { display: flex; }
  body.in-chat .list-pane { display: flex; }
  .back { display: none !important; }
}

.seg { display: flex; margin: 10px 12px 0; background: var(--bg); border-radius: 10px; padding: 3px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 7px; border-radius: 8px; font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.search { padding: 10px 12px; }
.search input { width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg);
  color: var(--ink); font-size: 15px; }
.list { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.filters { display: flex; gap: 6px; padding: 0 12px 8px; overflow-x: auto; scrollbar-width: none; }
.filters:empty { display: none; }
.fchip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 11px; font-size: 13px;
  white-space: nowrap; color: var(--muted); }
.fchip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.lab { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; margin-right: 4px;
  --lab: var(--accent); background: color-mix(in srgb, var(--lab) 16%, transparent); color: var(--lab); }
.row-labels { margin-top: 3px; }
.section-head { padding: 10px 14px 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.hit mark { background: color-mix(in srgb, #f2b33d 45%, transparent); color: inherit; border-radius: 3px; }
.note-bar { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line);
  background: var(--hold-bg); padding: 7px 14px; font-size: 14px; }
.reply-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--surface); border-top: 1px solid var(--line); }
.reply-quote { flex: 1; min-width: 0; border-left: 3px solid var(--accent); padding: 2px 8px; font-size: 13px; }
.reply-quote div:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.reply-who { font-weight: 600; color: var(--accent); font-size: 12px; }
.proof-warn { background: var(--hold-bg); padding: 8px 14px; font-size: 14px; border-top: 1px solid var(--line); }
.msg .quote { border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--ink) 5%, transparent);
  border-radius: 6px; padding: 4px 8px; margin-bottom: 5px; font-size: 13px; color: var(--muted); }
.msg .quote b { display: block; color: var(--accent); font-size: 12px; }
.msg .reply-btn { border: 0; background: none; color: var(--muted); font-size: 13px; padding: 0 2px; cursor: pointer; }
.msg.flash { outline: 3px solid #f2b33d; outline-offset: 2px; }
.row { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 11px 14px; border-bottom: 1px solid var(--line); }
.row:hover, .row.on { background: var(--bg); }
.avatar { width: 50px; height: 50px; flex: none; border-radius: 50%; background: var(--bg); color: var(--muted); display: grid;
  place-items: center; font-weight: 600; flex: none; font-size: 15px; }
.row-main { flex: 1; min-width: 0; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar { overflow: hidden; }
.head-avatar { width: 44px; height: 44px; font-size: 14px; cursor: zoom-in; }
.row-top { display: flex; gap: 8px; align-items: baseline; }
.row-name { font-weight: 600; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-name .tilde { color: var(--muted); font-weight: 400; }
.row-time { color: var(--muted); font-size: 12px; flex: none; }
.row.unread .row-time { color: var(--accent); font-weight: 600; }
.row-bottom { display: flex; gap: 8px; align-items: center; margin-top: 2px; }
.row-preview { flex: 1; min-width: 0; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.unread .row-preview { color: var(--ink); }
.wa { color: var(--ok); font-size: 12px; flex: none; }
.list-note { padding: 18px 16px; color: var(--muted); font-size: 14px; }
.row.archived-entry .avatar { background: transparent; font-size: 20px; }
.row.archived-entry .row-name { font-weight: 600; }
.list-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--line);
  font-weight: 650; }
.fab { position: absolute; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 52px; height: 52px;
  border-radius: 16px; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 24px;
  box-shadow: 0 4px 14px rgba(43, 89, 195, .35); }

/* ---- conversation */
.empty-chat { flex: 1; display: grid; place-items: center; padding: 24px; color: var(--muted); text-align: center; }
.empty-chat p { max-width: 300px; }
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--surface);
  border-bottom: 1px solid var(--line); }
.who { flex: 1; min-width: 0; }
.who-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-sub { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 440px) { #lang-chip { display: none; } }  /* language stays in the chat ⋯ menu */
.chip { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 4px 10px; font-size: 13px;
  font-weight: 600; letter-spacing: .04em; flex: none; }

.msgs { flex: 1; overflow-y: auto; padding: 12px 12px 16px; display: flex; flex-direction: column; gap: 6px;
  overscroll-behavior: contain; }
.day { align-self: center; color: var(--muted); font-size: 12px; padding: 8px 0 2px; }
.msg { max-width: min(78%, 560px); padding: 8px 11px 6px; border-radius: var(--r); box-shadow: var(--shadow);
  position: relative; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.in { align-self: flex-start; background: var(--in); border-top-left-radius: 4px; }
.msg.out { align-self: flex-end; background: var(--out); border-top-right-radius: 4px; }
.msg .primary-line { white-space: pre-wrap; }
/* the signature: the original language as an interlinear gloss */
.msg .gloss { white-space: pre-wrap; font-family: var(--gloss-font); font-style: italic; color: var(--gloss);
  font-size: 14px; margin-top: 3px; padding-top: 3px; border-top: 1px dashed color-mix(in srgb, var(--gloss) 35%, transparent); }
.msg.swapped .primary-line { font-family: var(--gloss-font); font-style: italic; }
.msg.swapped .gloss { font-family: var(--sans); font-style: normal; color: var(--muted); }
.msg .meta { display: flex; gap: 6px; justify-content: flex-end; align-items: center; color: var(--muted); font-size: 11px; margin-top: 3px; }
.msg .lang { text-transform: uppercase; letter-spacing: .06em; }
.msg .pending { color: var(--muted); font-size: 13px; }
.msg .pending::after { content: "…"; animation: blink 1.2s steps(3) infinite; }
@keyframes blink { 50% { opacity: .3; } }
.msg img.photo, .msg video.video { display: block; width: min(340px, 68vw); max-width: 100%; height: auto; max-height: 460px;
  object-fit: cover; border-radius: 10px; margin: 2px 0 4px; cursor: zoom-in; background: var(--bg); }
.msg video.video { cursor: default; object-fit: contain; background: #000; }
.lightbox img { width: auto; height: auto; min-width: min(92vw, 520px); object-fit: contain; }
.msg audio { width: 240px; max-width: 100%; height: 36px; display: block; margin: 2px 0 4px; }
.msg .kind { color: var(--muted); font-size: 14px; }
.msg .err { color: var(--warn); font-size: 13px; }
.link { border: 0; background: none; padding: 0; color: var(--accent); text-decoration: underline; font-size: inherit; }
.msg.out.failed { background: var(--warn-bg); }
.status { font-size: 11px; }
.status.sent { color: var(--ok); }
.status.failed { color: var(--warn); font-weight: 600; }
.fail-box { margin-top: 4px; font-size: 13px; color: var(--warn); }
.fail-box .acts { display: flex; gap: 12px; margin-top: 4px; }

/* ---- proof panel: what will actually go out */
/* ---- Suggest: the bot's draft above the box (purple, the owner's mockup); the bot never sends it */
.sug { margin: 0 8px 6px; padding: 8px 10px; border-radius: var(--r); background: var(--surface);
  border: 1px solid var(--stg-purple-tr); display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.sug.collapsed { margin: 0 10px 6px; padding: 0; border: 0; background: none; box-shadow: none; align-items: flex-start; }
.sug-chip { border: 1px solid var(--stg-purple-tr); background: var(--stg-purple-bg); color: var(--stg-purple-fg);
  border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.sug-title { flex: 1; min-width: 0; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--stg-purple-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sug-x { width: 30px; height: 30px; border-radius: 15px; border: 0; background: var(--bg); color: var(--muted);
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
/* up to about 6 lines (a quarter of the screen at most), then it scrolls inside with its own scrollbar */
.sug-body { font-size: 14px; line-height: 1.4; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere;
  max-height: min(calc(6 * 1.4em), 25dvh); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--stg-purple-tr) transparent; }
.sug-body::-webkit-scrollbar { width: 4px; }
.sug-body::-webkit-scrollbar-thumb { background: var(--stg-purple-tr); border-radius: 2px; }
.sug-body.note { font-size: 13px; color: var(--muted); }
.sug-gap { background: var(--stg-amber-bg); color: var(--stg-amber-fg); border-radius: 4px; padding: 0 3px; }
.sug-acts { display: flex; align-items: center; gap: 6px; }
.sug-use { min-height: 32px; padding: 0 14px; border-radius: 8px; border: 0; background: var(--stg-purple-fg);
  color: var(--stg-purple-ink); font-weight: 600; font-size: 14px; cursor: pointer; flex: none; }
.sug-more { min-height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--stg-purple-tr); background: var(--surface);
  color: var(--stg-purple-fg); font-weight: 600; font-size: 13px; cursor: pointer; flex: none; }
.proof { background: var(--surface); border-top: 1px solid var(--line); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.proof-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.proof textarea { width: 100%; resize: none; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px;
  font: 16px/1.4 var(--gloss-font); font-style: italic; color: var(--ink); background: var(--bg); max-height: 30vh; }
.means { font-size: 14px; color: var(--ink); }
.means-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: 4px; }
.proof.stale .means #proof-back { color: var(--muted); text-decoration: line-through; }
.proof-actions { display: flex; justify-content: flex-end; gap: 8px; }

.composer { display: flex; align-items: flex-end; gap: 6px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line); }
.composer textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 20px; padding: 9px 14px;
  font: 16px/1.4 var(--sans); background: var(--bg); color: var(--ink); max-height: 30vh; min-height: 40px; }
.primary { border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 600; border-radius: 20px;
  padding: 0 16px; height: 40px; flex: none; }
.primary:disabled { opacity: .5; cursor: default; }
.ghost { border: 1px solid var(--line); background: transparent; border-radius: 20px; padding: 0 14px; height: 38px; }
.danger { color: var(--warn); }

/* ---- sheets, lightbox, toast */
.sheet-wrap { position: fixed; inset: 0; background: rgba(10, 15, 20, .45); display: flex; align-items: flex-end;
  justify-content: center; z-index: 20; }
.sheet { background: var(--surface); width: 100%; max-width: 520px; max-height: 85dvh; overflow-y: auto;
  border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
@media (min-width: 600px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 18px; } }
.sheet h2 { font-size: 18px; margin: 0 0 12px; }
.sheet label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.sheet input, .sheet textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font: 16px var(--sans); }
.sheet .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.sheet .note { color: var(--muted); font-size: 14px; }
.sheet .note.danger { color: var(--warn); font-weight: 600; }   /* a refusal in a sheet (.sheet .note outranked .danger) */
.menu-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 13px 4px;
  border-bottom: 1px solid var(--line); font-size: 16px; }
.qr { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.qr button.use { flex: 1; text-align: left; border: 0; background: transparent; padding: 12px 4px; }
.photo-preview { width: 100%; max-height: 40dvh; object-fit: contain; border-radius: 10px; background: var(--bg); }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 30; display: grid; place-items: center; }
.lightbox img { max-width: 100vw; max-height: 100dvh; }
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 40; font-size: 14px;
  max-width: calc(100vw - 32px); }

/* ---- login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login form { background: var(--surface); padding: 28px 22px; border-radius: 18px; width: 100%; max-width: 360px; box-shadow: var(--shadow); }
.login h1 { margin: 0 0 4px; font-size: 22px; }
.login p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.login .gloss-demo { font-family: var(--gloss-font); font-style: italic; color: var(--gloss); }
.login label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
.login input { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 16px; }
.login .primary { width: 100%; margin-top: 20px; }
.login .error { color: var(--warn); font-size: 14px; margin-top: 12px; min-height: 1.2em; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.note-line { margin-top: 4px; font-size: 12px; color: var(--muted, #888); }
.row.failed-row { background: var(--warn-bg); }
.failed-why { font-size: 12px; color: var(--warn); margin-top: 2px; }
.row.failed-row { cursor: pointer; align-items: flex-start; }
.row-preview.wrap { white-space: normal; overflow: visible; display: block; margin-top: 2px; color: var(--ink); }
.failed-acts { display: flex; gap: 8px; margin-top: 8px; }
.fchip.fail { color: var(--warn); border-color: var(--warn); font-weight: 600; }
.fchip.fail.on { background: var(--warn); border-color: var(--warn); color: #fff; }
.fchip .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.fchip.ghost-chip { border-style: dashed; }
.fchip.primary-chip { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; padding: 6px 14px; }
.fchip.danger-chip { color: var(--warn); border-color: var(--warn); padding: 6px 14px; }
.label-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.label-pick .fchip.on { background: color-mix(in srgb, var(--lab) 18%, var(--surface)); border-color: var(--lab); color: var(--ink); }
.row-input { display: flex; gap: 8px; align-items: center; }
.row-input input { flex: 1; min-width: 0; }
.label-manage { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.label-line { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
button.label-line { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 0; }
.label-dot { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.label-edit { font-size: 13px; opacity: .7; flex: none; }
.label-preview { margin: 6px 0 10px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 12px; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; position: relative; }
.swatch.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface) inset; }
.swatch.custom { display: flex; align-items: center; justify-content: center; background: var(--line); font-size: 18px; overflow: hidden; }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.label-name { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.label-count { color: var(--muted); font-size: 13px; }
.once-row { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; cursor: pointer; }
.once-row input { width: 20px; height: 20px; flex: none; }
.once-badge { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px dashed var(--accent); color: var(--accent);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.once-row .note { display: inline; }
.msg .kind.once { font-weight: 600; }
.msg img.sticker { display: block; width: 160px; height: 160px; object-fit: contain; }
.msg .doc-card { display: block; padding: 8px 10px; border-radius: 8px; background: var(--bg); color: inherit; text-decoration: none; word-break: break-word; }
.row.new-chat .row-name { font-weight: 600; }
.row.new-chat .avatar { font-size: 20px; }
.new-sugg { display: flex; flex-direction: column; margin: 4px -4px 0; max-height: 40dvh; overflow: auto; }
.qr-headline { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qr-body { max-height: 52dvh; overflow: auto; margin: 4px 0 8px; }
.qr-sec { display: flex; align-items: center; gap: 4px; margin: 12px 0 4px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.qr-sec-name { flex: 1; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.qr.editing { display: flex; flex-direction: column; gap: 4px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.qr-text { font-size: 14px; }
.qr-tools { display: flex; align-items: center; gap: 4px; }
.qr-tools .icon-btn:disabled, .qr-sec .icon-btn:disabled { opacity: .3; }
.qr-move { max-width: 140px; font-size: 13px; padding: 4px 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.qr.used .use { color: var(--ok, #1f9d6b); font-weight: 600; background: color-mix(in srgb, var(--ok, #1f9d6b) 9%, transparent); border-radius: 8px; }
.qr-tick { font-weight: 700; }
.pick-list { display: flex; flex-direction: column; gap: 4px; max-height: 40dvh; overflow: auto; margin: 4px 0 8px; }
.pick-list .check { display: flex; align-items: center; gap: 10px; padding: 8px 4px; font-size: 15px; }
.pick-list .check input { width: 20px; height: 20px; }
/* 🗑 Remove phone and ↕ Phone order */
.remove-list { margin: 4px 0 12px; padding-left: 18px; }
.remove-list li { margin: 4px 0; }
.sheet .primary.remove-go:not(:disabled) { background: var(--warn); color: #fff; }
.order-list { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 8px; }
.order-row { display: flex; align-items: center; gap: 8px; padding: 4px; border-bottom: 1px solid var(--line); }
.order-name { flex: 1; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet .order-btn { min-width: 44px; min-height: 40px; padding: 0; font-size: 18px; }
.sheet .order-btn:disabled { opacity: .3; cursor: default; }
.secret { font: 600 20px/1.3 ui-monospace, Menlo, monospace; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; text-align: center; letter-spacing: .04em; user-select: all; }
.menu-item .note { margin: 2px 0 0; }
.team { display: flex; align-items: center; gap: -4px; background: none; border: 0; padding: 0 4px; cursor: pointer; }
.mate { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700;
  background: var(--accent); color: var(--accent-ink); border: 2px solid var(--surface); margin-left: -6px; }
.mate:first-child { margin-left: 0; }
.mate.typing { background: #f2b33d; color: #1d1405; }
.mate.more { background: var(--bg); color: var(--muted); }
.mate.mini { width: 18px; height: 18px; font-size: 8px; margin-left: 4px; border-width: 1px; }
.team-note { padding: 6px 14px; font-size: 13px; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--ink); border-bottom: 1px solid var(--line); }
.team-note.typing { background: color-mix(in srgb, #f2b33d 22%, transparent); font-weight: 600; }
.meta .by { font-weight: 600; color: var(--accent); margin-right: 4px; }
.gal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; max-height: 55dvh; overflow: auto; margin: 6px 0; }
.gal-item { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 8px; overflow: hidden; background: var(--bg); cursor: pointer; }
.gal-item img, .gal-item video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.gal-tag { position: absolute; left: 4px; bottom: 4px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(0,0,0,.6); border-radius: 6px; padding: 1px 6px; }
.gal-add { display: inline-grid; place-items: center; min-height: 36px; padding: 0 12px; border-radius: 10px; cursor: pointer; font-size: 14px; width: auto; }
.banner.bot { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--ink); }
.banner.silent { background: color-mix(in srgb, var(--ink) 7%, var(--surface)); color: var(--ink); font-size: 0.92em; }
.banner.pin { width: 100%; border: 0; text-align: left; cursor: pointer; background: color-mix(in srgb, #f2b33d 18%, var(--surface)); color: var(--ink); font: inherit; }

/* bookings panel */
  /* ---------- bookings panel ---------- */
  #bk { --panel: var(--surface); --text: var(--ink); --ok: #1d8a55; position: fixed; inset: 0; z-index: 40; background: var(--panel); display: none; flex-direction: column; }
  #bk.open { display: flex; }
  #bk .bk-top { display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 12px) 14px 10px; border-bottom: 1px solid var(--line); }
  #bk .bk-top h2 { flex: 1; margin: 0; font-size: 19px; min-width: 0; }
  #bk .bk-top h2 small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; }
  #bk .ib { flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); color: var(--text); display: grid; place-items: center; font-size: 18px; }
  #bk .bk-body { flex: 1; overflow-y: auto; padding: 12px 14px 20px; -webkit-overflow-scrolling: touch; }
  #bk .bk-foot { padding: 12px 14px calc(env(safe-area-inset-bottom) + 14px); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
  #bk .lbl { font-size: 13px; color: var(--muted); margin: 14px 2px 6px; }
  #bk .lbl:first-child { margin-top: 0; }
  #bk input, #bk select, #bk textarea { width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 16px; padding: 0 12px; font-family: inherit; }
  #bk textarea { height: 76px; padding: 10px 12px; resize: none; }
  #bk .big { width: 100%; min-height: 52px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font-size: 16px; font-weight: 700; }
  #bk .big:disabled { opacity: .45; }
  #bk .ghost { width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--text); font-size: 15px; }
  #bk .ghost.danger { color: var(--warn); }
  #bk .hint { font-size: 12px; color: var(--muted); margin: 6px 2px 0; line-height: 1.4; }
  #bk .err { color: var(--warn); font-size: 14px; margin: 8px 2px 0; min-height: 1.2em; }
  #bk .seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
  #bk .seg button, #bk .tabs button { min-height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 15px; }
  #bk .seg button.on, #bk .tabs button.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
  #bk .seg button.busy { color: var(--muted); text-decoration: line-through; }
  #bk .sug { border: 1px dashed var(--accent); border-radius: 12px; padding: 10px 12px; margin-bottom: 4px; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
  #bk .sugchips { display: flex; flex-wrap: wrap; gap: 6px; }
  #bk .sugchips button { min-height: 36px; border-radius: 999px; border: 1px solid var(--accent); background: var(--surface); color: var(--ink); padding: 0 12px; font-size: 14px; }
  #bk .sugchips button.on { background: var(--accent); color: #fff; }
  #bk .sugchips button.all { border-style: dashed; color: var(--accent); font-weight: 600; }
  #bk .sugmark { color: var(--accent); font-weight: 600; font-size: 12px; margin-left: 4px; }
  #bk input.filled { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
  #bk .tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; }
  #bk .tabs button { flex: none; min-height: 36px; border-radius: 999px; padding: 0 13px; font-size: 13px; }
  #bk .switch2 { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 12px; padding: 3px; background: var(--bg); }
  #bk .switch2 button { min-height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 14px; }
  #bk .switch2 button.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
  #bk .bkrow { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--text); margin-bottom: 8px; font-size: 15px; }
  #bk .bkrow.past { opacity: .55; }
  #bk .bkrow.now { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
  #bk .bkrow .t { flex: none; width: 56px; text-align: center; display: flex; flex-direction: column; }
  #bk .bkrow .t b { font-size: 17px; } #bk .bkrow .t span { font-size: 12px; color: var(--muted); }
  #bk .bkrow .m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
  #bk .bkrow .m b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #bk .bkrow .m span { font-size: 12px; color: var(--muted); }
  #bk .st { flex: none; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 9px; }
  #bk .st.ok { color: #22c55e; background: rgba(34,197,94,.12); } #bk .st.live { color: var(--accent); background: rgba(59,130,246,.16); }
  #bk .st.wait { color: #f59e0b; background: rgba(245,158,11,.14); } #bk .st.off { color: var(--muted); background: var(--bg); }
  #bk .clist { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 8px; }
  #bk .cl { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: var(--text); text-align: left; }
  #bk .cl:last-child { border-bottom: 0; }
  #bk .cl.on { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); box-shadow: inset 0 0 0 2px var(--accent); }
  #bk .cl .av { flex: none; width: 34px; height: 34px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
  #bk .cl .m { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  #bk .cl .m span { font-size: 12px; color: var(--muted); } #bk .cl .m span.hl { color: var(--accent); }
  #bk .warnbox { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(245,158,11,.10); border: 1px solid rgba(245,158,11,.35); margin-top: 8px; font-size: 13px; color: #a86400; }
  #bk .warnbox button { flex: none; min-height: 34px; border-radius: 9px; border: 0; background: #f59e0b; color: #1a1205; font-weight: 700; padding: 0 12px; }
  #bk .card2 { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
  #bk .card2 .kv { display: flex; justify-content: space-between; gap: 10px; } #bk .card2 .kv span:first-child { color: var(--muted); font-size: 13px; }
  #bk .can { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-top: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--ink); }
  #bk .can b.y { color: #22c55e; } #bk .can b.n { color: var(--muted); }
  #bk .toggle { display: flex; align-items: center; gap: 10px; min-height: 46px; font-size: 15px; }
  #bk .toggle input { width: 22px; height: 22px; flex: none; accent-color: var(--accent); }
  #bk .modal { position: absolute; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; z-index: 2; }
  #bk .modal .mc { width: 100%; background: var(--panel); border-top-left-radius: 18px; border-top-right-radius: 18px; border-top: 1px solid var(--line); padding: 18px 16px calc(env(safe-area-inset-bottom) + 18px); display: flex; flex-direction: column; gap: 10px; }
  #bk .modal h3 { margin: 0; font-size: 20px; }
  #bk .pushes { display: flex; flex-direction: column; gap: 6px; }
  #bk .pushes .ghost { min-height: 44px; text-align: left; padding: 0 14px; }
  #bk .stages { display: flex; flex-wrap: wrap; gap: 6px; }
  #bk .stages button { min-height: 38px; border-radius: 999px; padding: 0 13px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 14px; }
  #bk .stages button.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
  #bk .grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  #bk .stars { display: flex; gap: 4px; }
  #bk .stars button { width: 44px; height: 44px; border: 0; background: transparent; color: var(--line); font-size: 30px; line-height: 1; }
  #bk .stars button.on { color: #f59e0b; }
  #bk .thread { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
  #bk .bub { max-width: 85%; padding: 8px 11px; border-radius: 12px; font-size: 14px; background: var(--bg); border: 1px solid var(--line); }
  #bk .bub.me { align-self: flex-end; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border-color: var(--accent); }
  #bk .bub small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
  #bk .spin { width: 22px; height: 22px; border: 3px solid #333; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto; }

.card-line { padding: 8px 0; }
.rota { display: flex; flex-direction: column; gap: 12px; margin: 8px 0; }
.rota-slot { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.rota-slot .days { display: flex; flex-wrap: wrap; gap: 4px; }
.rota-slot input[type=time] { width: auto; flex: 1; }
.lang-offer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 14px; font-size: 14px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-bottom: 1px solid var(--line); }
.lang-offer button { padding: 6px 12px; font-size: 14px; }
.bk-pill { border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.12); color: #fff; border-radius: 999px;
  padding: 7px 12px; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.bk-pill:hover { background: rgba(255,255,255,.22); }
/* phone tabs: readable at a glance; the open phone stands out */
.phone-tab { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; font-size: 16px; padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.22); }
.phone-tab:hover { background: rgba(255,255,255,.22); }
.phone-tab.on { background: #fff; color: #16202b; border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
@media (max-width: 520px) { .bk-pill { padding: 6px 10px; font-size: 13px; } }
.bot-pill.on { background: #2f9e6b; border-color: #2f9e6b; }
.bot-pill.none { opacity: .75; font-weight: 500; }
.bot-pill.suggest { background: var(--stg-purple-fg); border-color: var(--stg-purple-fg); color: var(--stg-purple-ink); }
.top .bk-pill + .bk-pill { margin-left: -2px; }
.bot-pill .short { display: none; }
@media (max-width: 520px) { .bot-pill .long { display: none; } .bot-pill .short { display: inline; } }

/* quick replies keep their line breaks */
.qr button.use, .qr-text { white-space: pre-wrap; }
textarea.qr-new { width: 100%; resize: vertical; min-height: 64px; font: inherit; }
.qr-add-row { justify-content: flex-end; margin-top: 6px; }

textarea.qr-new { min-height: 110px; max-height: 60vh; line-height: 1.4; }
.qr-preview { margin: 8px 0 4px; padding: 10px; border-radius: 12px; background: var(--bg); display: flex; flex-direction: column; }
.qr-preview-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.qr-preview .msg.out { white-space: pre-wrap; max-width: 85%; align-self: flex-end; }
button.qr-text { text-align: left; border: 0; background: transparent; padding: 4px 0; white-space: pre-wrap; color: inherit; font: inherit; cursor: pointer; }
.qr-edit-hint { color: var(--muted); }

/* gallery collections */
.gal-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.gal-tabs .fchip { white-space: nowrap; }
.gal-count { opacity: .6; font-weight: 500; }
.gal-coltools { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.gal-item { position: relative; }
.gal-col { position: absolute; left: 4px; bottom: 4px; max-width: calc(100% - 8px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 6px; }
.gal-move { margin-top: 8px; }
.gal-add { white-space: nowrap; display: inline-flex; align-items: center; height: auto; padding: 8px 14px; }

/* locations */
.loc-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); text-decoration: none; min-width: 220px; }
.loc-pin { font-size: 26px; line-height: 1; }
.loc-body { display: flex; flex-direction: column; gap: 2px; }
.loc-status { font-size: 13px; }
.loc-open { font-size: 13px; color: var(--accent); font-weight: 600; margin-top: 2px; }

/* team colours */
.mate { background: var(--mate, var(--accent)); color: #fff; }
.mate.typing { background: var(--mate, var(--accent)); color: #fff; box-shadow: 0 0 0 2px #f2b33d; }
.cpick { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.cswatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.cswatch.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface) inset; }
.cdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
#archive-btn.on, #block-btn.on { background: color-mix(in srgb, var(--warn) 18%, transparent); border-radius: 50%; }
/* phone-width chat header: the name keeps its room; Save to phone stays in the chat's ⋯ menu */
@media (max-width: 560px) {
  .chat-head { gap: 2px; padding: 6px 4px; }
  .chat-head .icon-btn { width: 34px; height: 36px; font-size: 18px; flex: none; }
  .chat-head .head-avatar { width: 34px; height: 34px; flex: none; }
  .chat-head #save-contact { padding: 4px 7px; flex: none; }
  .chat-head #save-contact .chip-word { display: none; }
  .chat-head .who { min-width: 80px; }
  .chat-head #lang-chip { padding: 4px 8px; font-size: 12px; flex: none; }
}
.menu-info { padding: 10px 12px; font-size: 13px; color: var(--muted); }

/* ticks */
.status.tick { font-weight: 700; letter-spacing: -2px; margin-left: 4px; }
.status.tick.sent, .status.tick.delivered { color: var(--muted); }
.status.tick.read { color: #34b7f1; }
.status.tick.waiting { letter-spacing: 0; }
.row-preview .status.tick { margin: 0 2px 0 0; }

/* select several chats */
.selbar { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--line); padding: 6px 10px; display: flex; flex-direction: column; gap: 6px; }
.selhead { display: flex; align-items: center; gap: 8px; }
.selacts { display: flex; flex-wrap: wrap; gap: 6px; }
.selbtn { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.selbtn:disabled { opacity: .45; cursor: default; }
.selbtn.on { background: var(--accent); color: var(--accent-ink, #fff); border-color: var(--accent); }
.selbtn.danger { color: #c2412d; border-color: color-mix(in srgb, #c2412d 40%, var(--line)); }
.row.selecting { position: relative; padding-left: 44px; }
.row .pick { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--muted); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; }
.row.picked .pick { background: var(--accent); border-color: var(--accent); }
.row.picked { background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* holding a chat selects it: keep the phone's own text-selection / callout out of the way */
.row { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* app lock */
.lockscreen { position: fixed; inset: 0; z-index: 9999; background: var(--ink); color: #fff; display: grid; place-items: center;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; }
.lk-card { width: 100%; max-width: 340px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.lk-card h2 { margin: 4px 0 0; font-size: 20px; color: #fff; }
.lk-card .note { color: #b8c4d1; }
.lk-icon { width: 64px; height: 64px; border-radius: 16px; }
.lk-dots { display: flex; gap: 12px; margin: 10px 0 2px; }
.lk-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #b8c4d1; }
.lk-dot.on { background: #fff; border-color: #fff; }
.lk-dots.shake { animation: lkshake .35s; }
@keyframes lkshake { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }
.lk-msg { min-height: 20px; font-size: 14px; color: #b8c4d1; }
.lk-msg.bad { color: #ffb4a6; }
.lk-pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px; justify-content: center; }
.lk-key { width: 72px; height: 72px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 28px; font-weight: 500; cursor: pointer; }
.lk-key:active { background: rgba(255,255,255,.28); }
.lk-key.lk-face, .lk-key.lk-del { background: transparent; font-size: 15px; }
.lk-key.lk-del { font-size: 24px; }
.lk-ok { margin-top: 6px; min-width: 200px; }
.lockscreen .link { color: #b8c4d1; background: none; border: 0; font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .lk-dots.shake { animation: none; } }

/* pull to refresh */
.ptr { height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted);
  font-size: 13px; transition: height .15s ease; flex: none; }
.ptr .ptr-ico { font-size: 16px; display: inline-block; }
.ptr.spin .ptr-ico { animation: ptrspin 0.8s linear infinite; }
@keyframes ptrspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ptr { transition: none; } .ptr.spin .ptr-ico { animation: none; } }

/* bookings: search + status filter */
#bk .bk-find { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 4px; }
#bk .bk-find input { height: 42px; }
#bk .tabs.small { display: flex; gap: 6px; flex-wrap: wrap; }
#bk .tabs.small button { min-height: 34px; font-size: 13px; padding: 0 12px; }
/* the bot: level ladder, handed-over chats ("Needs you", amber), ticked photos */
.bot-ladder { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 8px; }
.bot-step { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.bot-step.on { border-color: #2f9e6b; background: color-mix(in srgb, #2f9e6b 12%, var(--surface)); }
.bot-step:disabled { opacity: .55; }
.banner.needs { background: color-mix(in srgb, #f2a33d 22%, var(--surface)); color: var(--ink); }
.chip.needs { border-color: #d98a1f; color: #b86e0b; background: color-mix(in srgb, #f2a33d 16%, transparent); font-weight: 600; white-space: nowrap; }
.badge.needs { background: #e0901f; margin-left: 4px; }
.gal-tick { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff;
  background: rgba(0,0,0,.35); color: #fff; font-weight: 700; font-size: 13px; line-height: 18px; text-align: center; }
.gal-item.bot-ok .gal-tick { background: #2f9e6b; }
.gal-number { width: 100%; min-height: 44px; margin: 8px 0 2px; }
.gal-item .gal-tick { display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700; z-index: 1; }
.bot-pill.warn { background: #c2410c; border-color: #c2410c; }

/* client rating + bookings next to the name */
.cstat { margin-left: 6px; font-size: 12px; font-weight: 600; color: #a86a00; white-space: nowrap; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cstat { color: #f2b33d; } }
:root[data-theme="dark"] .cstat { color: #f2b33d; }
/* Bot sheet: one fact per row, label above a full-width select */
.bot-fact { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.bot-fact select { width: 100%; box-sizing: border-box; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; font-size: 15px; }
.bot-fact select:disabled { opacity: .6; }
.cstat.blocked { color: #c2412d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cstat.blocked { color: #ff8a73; } }
:root[data-theme="dark"] .cstat.blocked { color: #ff8a73; }

/* bot sheet: the order the bot sends ticked photos/videos in */
.bot-order { display: grid; gap: 6px; }
.bot-order-row { display: grid; grid-template-columns: 48px 1fr 72px; gap: 8px; align-items: center; }
.bot-order-row img, .bot-order-row video { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.bot-order-pick { min-height: 40px; }
.bot-per-ask { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bot-per-ask button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* top bar: bot + bookings as icon buttons */
.top .bk-pill { padding: 6px 9px; font-size: 18px; line-height: 1; min-width: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.top .bot-pill.none { opacity: .6; }
.top .bk-pill .badge { font-size: 11px; }
.chip.needs.tap { cursor: pointer; }

/* ✏️ next to the contact's name: save or edit it in one tap */
.who-name .name-edit { border: 0; background: transparent; padding: 2px 4px; margin-left: 4px; font-size: 14px; line-height: 1; cursor: pointer; opacity: .8; vertical-align: middle; }
.who-name .name-edit:hover { opacity: 1; }
/* contact note (follows the number): strip under the header, folds to a slim line */
.note-bar { display: flex !important; gap: 8px; align-items: baseline; background: #fff4c7; color: #6b4d00; border-bottom: 1px solid #e8cf73; padding: 8px 12px; font-size: 14px; line-height: 1.4; cursor: pointer; }
.note-bar[hidden] { display: none !important; }
.note-bar .nb-text { flex: 1; min-width: 0; white-space: pre-wrap; }
.note-bar .nb-meta { font-size: 11.5px; opacity: .8; white-space: nowrap; flex: none; }
.note-bar.folded { padding: 4px 12px; font-size: 12.5px; }
.note-bar.folded .nb-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip.has-note { background: #fff4c7; color: #6b4d00; border-color: #e8cf73; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .note-bar, :root:not([data-theme="light"]) .chip.has-note { background: #3a3115; color: #f3d77a; border-color: #5c4d1d; } }
:root[data-theme="dark"] .note-bar, :root[data-theme="dark"] .chip.has-note { background: #3a3115; color: #f3d77a; border-color: #5c4d1d; }

/* ---- booking stages: one colour set per stage, light and dark (tokens on :root) */
.stg-pending { --sbg: var(--stg-amber-bg); --sfg: var(--stg-amber-fg); --str: var(--stg-amber-tr); --sink: var(--stg-amber-ink); }
.stg-accepted { --sbg: var(--stg-green-bg); --sfg: var(--stg-green-fg); --str: var(--stg-green-tr); --sink: var(--stg-green-ink); }
.stg-arrived { --sbg: var(--stg-blue-bg); --sfg: var(--stg-blue-fg); --str: var(--stg-blue-tr); --sink: var(--stg-blue-ink); }
.stg-ready { --sbg: var(--stg-ready-bg); --sfg: var(--stg-ready-fg); --str: var(--stg-ready-tr); --sink: var(--stg-ready-ink); }
.stg-with_client { --sbg: var(--stg-purple-bg); --sfg: var(--stg-purple-fg); --str: var(--stg-purple-tr); --sink: var(--stg-purple-ink); }
.stg-started { --sbg: var(--stg-live-bg); --sfg: var(--stg-live-fg); --str: var(--stg-live-tr); --sink: var(--stg-live-ink); }
.stg-off { --sbg: var(--bg); --sfg: var(--muted); --str: var(--line); --sink: var(--surface); }
.bdg { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; white-space: nowrap; vertical-align: middle; }
.bdg.new { background: var(--bdg-new-bg); color: var(--bdg-new-fg); }
.bdg.known { background: var(--bdg-known-bg); color: var(--bdg-known-fg); }

/* the booking strip in a chat: under the header, above the note strip */
.bk-strip { margin: 8px 10px 4px; border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px;
  background: var(--sbg); color: var(--sfg); cursor: pointer; flex: none; }
.bk-strip .bs-top { display: flex; align-items: center; gap: 8px; }
.bk-strip .bs-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sfg); flex: none; }
.bk-strip .bs-label { font-size: 14px; font-weight: 700; flex: 1; min-width: 0; }
.bk-strip .bs-step { font-size: 12px; font-weight: 600; opacity: .85; white-space: nowrap; }
.bk-strip .bs-when { font-size: 14px; font-weight: 500; }
.bk-strip .bs-who { font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bk-strip .bs-left { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.1; }
.bk-strip .bs-left small { font-size: 13px; font-weight: 600; }
.bk-strip .bs-bar { height: 7px; border-radius: 4px; background: var(--str); overflow: hidden; }
.bk-strip .bs-bar i { display: block; height: 100%; border-radius: 4px; background: var(--sfg); }
.bk-strip .bs-btn { min-height: 44px; border: 0; border-radius: 10px; font-size: 15px; font-weight: 600; background: var(--sfg); color: var(--sink); }
.bk-strip .bs-btn:disabled { opacity: .6; }

/* bookings page: header tabs, light/dark, groups and one row per booking */
#bk .bk-top .newb { flex: none; min-height: 38px; padding: 0 14px; border-radius: 10px; border: 0; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px; }
#bk .rtabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; border: 1px solid var(--line); border-radius: 12px; padding: 3px; margin-bottom: 10px; }
#bk .rtabs button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font-size: 14px; font-weight: 600; }
#bk .rtabs button.on { background: var(--ink); color: var(--bg); }
#bk .ghead { display: flex; align-items: baseline; gap: 10px; margin: 16px 2px 8px; }
#bk .ghead h3 { margin: 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
#bk .ghead span { font-size: 13px; color: var(--muted); }
#bk .glist { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); }
#bk .bkr { display: grid; grid-template-columns: 64px minmax(0, 2.2fr) minmax(0, 1.1fr) minmax(0, 1.4fr) 180px; align-items: center; gap: 12px;
  padding: 12px 14px; border-top: 1px solid var(--line); cursor: pointer; }
#bk .bkr:first-child { border-top: 0; }
#bk .bkr.past { opacity: .6; }
#bk .bkr .r-t b { display: block; font-size: 19px; font-variant-numeric: tabular-nums; }
#bk .bkr .r-t span, #bk .bkr .r-c > span, #bk .bkr .r-w span { font-size: 13px; color: var(--muted); }
#bk .bkr .r-c { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
#bk .bkr .r-c div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
#bk .bkr .r-c b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#bk .bkr .r-w { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
#bk .pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 10px; background: var(--sbg); color: var(--sfg);
  font-size: 13px; font-weight: 700; white-space: nowrap; justify-self: start; }
#bk .pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--sfg); flex: none; }
#bk .bkr .r-a { display: flex; justify-content: flex-end; }
#bk .bkr .r-a button { min-height: 40px; padding: 0 14px; border-radius: 10px; font-size: 14px; font-weight: 600; white-space: nowrap; }
#bk .bkr .r-a .go { border: 0; background: var(--sfg); color: var(--sink); }
#bk .bkr .r-a .oc { border: 1px solid var(--line); background: transparent; color: var(--ink); }
#bk .findrow { display: flex; gap: 6px; margin-bottom: 4px; }
#bk .findrow input[type=search] { flex: 1; min-width: 0; }
#bk .findrow button { flex: none; min-height: 46px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 14px; }
#bk .findrow button.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }
#bk details.more { margin-top: 16px; border: 1px solid var(--line); border-radius: 14px; padding: 0 12px; }
#bk details.more > summary { min-height: 48px; display: flex; align-items: center; font-weight: 600; cursor: pointer; list-style: none; }
#bk details.more > summary::-webkit-details-marker { display: none; }
#bk details.more > summary::after { content: "▾"; margin-left: auto; color: var(--muted); }
#bk details.more[open] > summary::after { content: "▴"; }
#bk details.more[open] { padding-bottom: 12px; }
#bk .nextact { width: 100%; min-height: 50px; border: 0; border-radius: 12px; font-size: 16px; font-weight: 700; margin-top: 10px; background: var(--sfg); color: var(--sink); }
/* phone width: each row stacks (time + stage on top, then client, then type and the button) */
@media (max-width: 640px) {
  #bk .bkr { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "t c c" "t p p" "t w a"; gap: 6px 10px; }
  #bk .bkr .r-t { grid-area: t; align-self: start; }
  #bk .bkr .r-c { grid-area: c; }
  #bk .bkr .r-w { grid-area: w; flex-direction: row; gap: 6px; align-items: baseline; flex-wrap: wrap; }
  #bk .bkr .pill { grid-area: p; justify-self: start; }
  #bk .bkr .r-a { grid-area: a; }
  #bk .bkr .r-a button { min-height: 38px; padding: 0 12px; font-size: 13px; }
}

/* Her status bar (under the phones): the girl on this phone, as her app shows her. Hue in the dot and a tint; text stays --ink. */
/* her status, design B: the tab says it ("Mila / Offline · should be on"), the Ask button sits in the top bar, and a
   thin "Today" line under it lists her bookings and hours */
.phone-tab.her-on { --her: #7fa8ff; } .phone-tab.her-off { --her: #f06b52; } .phone-tab.her-brk { --her: #f2b33d; } .phone-tab.her-out { --her: #f08a78; }
.phone-tab.on.her-on { --her: #2b59c3; } .phone-tab.on.her-off { --her: #c0352b; } .phone-tab.on.her-brk { --her: #b26f00; } .phone-tab.on.her-out { --her: #b5503f; }
/* a phone not linked to her, connected: the phone is up, nothing said about her. Neutral grey, no wash */
.phone-tab.her-dev { --her: #b3bfcc; } .phone-tab.on.her-dev { --her: #677382; }
/* a faint wash of her colour on the tab: offline (in her hours or not) red, online blue */
.phone-tab.her-on, .phone-tab.her-off, .phone-tab.her-out { background: color-mix(in srgb, var(--her) 22%, rgba(255,255,255,.08)); border-color: color-mix(in srgb, var(--her) 45%, transparent); }
.phone-tab.on.her-on, .phone-tab.on.her-off, .phone-tab.on.her-out { background: color-mix(in srgb, var(--her) 9%, #fff); border-color: color-mix(in srgb, var(--her) 30%, #fff); }
.phone-tab { border-radius: 12px; padding: 6px 12px 6px 10px; }
.phone-tab .dot { background: var(--her, #4cc38a); }
.phone-tab.on.her-off .dot, .phone-tab.on.her-brk .dot { box-shadow: 0 0 0 3px color-mix(in srgb, var(--her) 22%, transparent); }
.tab-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.tab-name { font-weight: 700; }
.tab-sub { font-size: 12px; font-weight: 600; color: color-mix(in srgb, var(--her) 75%, #fff); }
.phone-tab.on .tab-sub { color: var(--her); }
.tab-sub .short, .her-st .short { display: none; }
.tab-sub .her-cd { font-variant-numeric: tabular-nums; }
.her-ask-top { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 0; border-radius: 999px;
  background: #c0352b; color: #fff; font: inherit; font-size: 14px; font-weight: 650; white-space: nowrap; cursor: pointer; flex: none; }
.her-ask-top[hidden] { display: none; }
.her-ask-top:disabled { background: rgba(255,255,255,.12); color: #cfd8e3; cursor: default; }
/* Set offline: in Ask's place while she's online or on a break; quieter than Ask (a fix, not a call to act) */
.her-off-top { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.1); color: #fff; font: inherit; font-size: 14px;
  font-weight: 600; white-space: nowrap; cursor: pointer; flex: none; }
.her-off-top:hover { background: rgba(255,255,255,.2); }
.her-off-top[hidden] { display: none; }
.sheet .primary.her-off-go { background: #c0352b; color: #fff; }   /* as Ask: white on it reads in both themes */
.herbar { display: flex; align-items: center; gap: 10px; min-height: 40px; box-sizing: border-box; padding: 6px 14px; font-size: 13px;
  background: color-mix(in srgb, var(--bg) 55%, var(--surface)); border-bottom: 1px solid var(--line); color: var(--ink);
  overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.herbar[hidden] { display: none; }
.herbar .spacer { flex: 1; }
.her-cal, .her-today, .her-hours, .her-none { color: var(--muted); }
.her-cal { display: inline-flex; }
.her-bks { display: inline-flex; align-items: center; gap: 10px; }
.her-bk { border: 0; background: none; padding: 4px 2px; font: inherit; color: var(--ink); cursor: pointer; border-radius: 6px; }
.her-bk:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.her-sep { color: var(--line); }
.her-st { font-weight: 650; }
.her-st.ok { color: var(--ok); } .her-st.wait { color: #a36a00; } .her-st.now { color: var(--accent); }
.her-note { color: var(--muted); font-weight: 600; }
@media (max-width: 560px) {
  .tab-sub .long, .her-st .long { display: none; } .tab-sub .short, .her-st .short { display: inline; }
  .phone-tab { padding: 5px 10px 5px 8px; gap: 6px; font-size: 15px; }
  .her-ask-top, .her-off-top { width: 40px; height: 40px; padding: 0; justify-content: center; }
  .her-ask-top .long, .her-off-top .long { display: none; }
  .herbar { padding: 6px 12px; }
  .her-hours, .her-cal, .her-today { display: none; }
}
.rvw { padding: 6px 0; border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.rvw b { color: #c98a00; letter-spacing: 1px; }
.rvwtxt { margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bk-strip .bs-sent { font-size: 13px; opacity: .8; text-align: center; margin-top: -2px; }
.bk-strip .bs-sent.bad, #bk .r-sent.bad { color: #c0392b; opacity: 1; font-weight: 600; }
#bk .bkr .r-a { flex-direction: column; align-items: flex-end; gap: 3px; }
#bk .r-sent { font-size: 12px; color: var(--muted); }
.bk-strip .bs-btn.sent-ok, #bk .sent-ok { background: #1f8a4c !important; color: #fff !important; }
.bk-strip .bs-btn.sent-bad, #bk .sent-bad { background: #c0392b !important; color: #fff !important; }
.toast { z-index: 1000; }
.toast.ok { background: #1f8a4c; color: #fff; }
.toast.bad { background: #c0392b; color: #fff; }
#bk .herchat .bub { max-width: 92%; }
#bk .herchat .orig { color: var(--muted); font-size: 12px; margin-top: 4px; white-space: pre-wrap; }
#bk .herchat .btns { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
#bk .herchat .btns span { font-size: 12px; padding: 3px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
#bk .herchat .btns span.on { background: var(--accent); border-color: var(--accent); color: #fff; }
#bk .herchat .tap { font-size: 12px; font-weight: 600; margin-top: 4px; }
#bk .herchat { max-height: 420px; }
.pp-wrap { display: flex; justify-content: center; margin: 8px 0; }
.pp-img { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; background: var(--line, #ddd); }
.gal-grid[hidden] { display: none; }
.pp-gallery { max-height: 40dvh; }
.sheet .acts .spacer { flex: 1; }

/* the client's next booking, after their stars: green when accepted, dashed amber while it waits */
.row-top .row-time { margin-left: auto; }
.bkchip { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 999px; flex: none;
  align-self: center; margin-left: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; vertical-align: middle;
  background: #e3f3e9; color: #1f6b3f; border: 1px solid transparent; }
.bkchip.wait { background: #fff8ea; color: #7a5000; border: 1px dashed #c9a24a; }
.row-top .bkchip { margin-left: 0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bkchip { background: #173726; color: #8fe0ad; }
  :root:not([data-theme="light"]) .bkchip.wait { background: #3a2c10; color: #f2c46b; border-color: #8a6a26; }
}
:root[data-theme="dark"] .bkchip { background: #173726; color: #8fe0ad; }
:root[data-theme="dark"] .bkchip.wait { background: #3a2c10; color: #f2c46b; border-color: #8a6a26; }
/* a long name gives way first: the stars and the booking stay readable */
.row-name { display: flex; align-items: baseline; }
.row-name .rn-text { min-width: 2em; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; }
.row-name .cstat, .row-name .tilde { flex: none; }

/* ---- a teammate in a chat: the row glows in their colour (owner-approved mockup, 2026-11-06). --g1 / --g2 are their
   colours (set by paintGlow); typing pulses; two or more = nested rings. Rows nobody is in stay exactly as they were. */
.row.glow { --rowbg: color-mix(in srgb, var(--g1) 7%, var(--surface)); --ring: 0 0 0 2px var(--g1);
  margin: 5px 8px; width: calc(100% - 16px); padding: 9px 10px; border-radius: 12px; border-bottom-color: transparent;
  background: var(--rowbg); box-shadow: var(--ring), 0 0 16px color-mix(in srgb, var(--g1) 35%, transparent);
  position: relative; }   /* positioned: its glow paints over the plain rows around it (still under the ✏️ button) */
.row.glow2 { --rowbg: color-mix(in srgb, color-mix(in srgb, var(--g1) 50%, var(--g2)) 7%, var(--surface));
  --ring: 0 0 0 2px var(--g1), 0 0 0 4px var(--g2); margin: 7px 10px; width: calc(100% - 20px);
  box-shadow: var(--ring), 0 0 18px color-mix(in srgb, var(--g2) 30%, transparent); }
.row.glow:hover { background: color-mix(in srgb, var(--g1) 12%, var(--surface)); }
.row.glow.on { background: var(--bg); }            /* your open chat keeps its look; the ring says who else is in it */
.row.glow.selecting { padding-left: 40px; }
.row.glow.picked { background: color-mix(in srgb, var(--accent) 10%, var(--rowbg)); }
.row.glow .row-top { align-items: center; }
.row.glow-typing { animation: glowPulse 1.6s ease-in-out infinite; }
@keyframes glowPulse {
  0%, 100% { box-shadow: var(--ring), 0 0 6px color-mix(in srgb, var(--g1) 25%, transparent); }
  50% { box-shadow: var(--ring), 0 0 22px color-mix(in srgb, var(--g1) 65%, transparent); }
}
.row-top .glow-mates { display: inline-flex; flex: none; margin-left: auto; }
.row-top .glow-mates + .row-time { margin-left: 0; }
.glow-mates .mate { width: 22px; height: 22px; font-size: 9px; margin-left: -5px; border: 1.5px solid var(--rowbg, var(--surface)); }
.glow-mates .mate:first-child { margin-left: 0; }
.glow-cap { margin-top: 2px; font-size: 12px; font-weight: 600; color: color-mix(in srgb, var(--g1) 70%, var(--ink));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.glow2 .glow-cap { color: color-mix(in srgb, color-mix(in srgb, var(--g1) 50%, var(--g2)) 70%, var(--ink)); }
.glow-dots i { display: inline-block; width: 4px; height: 4px; margin-left: 3px; border-radius: 50%; background: currentColor;
  vertical-align: middle; animation: glowDot 1.2s infinite; }
.glow-dots i:first-child { margin-left: 5px; }
.glow-dots i:nth-child(2) { animation-delay: .2s; } .glow-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes glowDot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ---- quick booking: 📅 in the message box opens a small card above it (owner-approved mockup, 2026-11-06) */
#qb-btn.on { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); box-shadow: 0 0 0 2px var(--accent); }
@media (max-width: 440px) {   /* one more button in the message box: the icons close up a little so the text box keeps its room */
  .composer:has(#qb-btn:not([hidden])) { gap: 4px; padding-left: 6px; padding-right: 6px; }
  .composer:has(#qb-btn:not([hidden])) .icon-btn { width: 36px; }
}
.qb-anchor { position: relative; height: 0; flex: none; z-index: 6; }
.qb-dim { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(10, 15, 20, .28); }
.qb { position: absolute; left: 8px; bottom: 8px; width: 424px; max-width: calc(100% - 16px); display: flex; flex-direction: column;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 13px;
  box-shadow: 0 12px 32px rgba(10, 15, 20, .18), 0 1px 2px rgba(10, 15, 20, .08); }
.qb:focus { outline: none; }
.qb.narrow { right: 8px; width: auto; max-width: none; font-size: 14px; box-shadow: 0 10px 30px rgba(10, 15, 20, .24); }
.qb-arrow { position: absolute; bottom: 2px; width: 12px; height: 12px; z-index: 1; transform: rotate(45deg);
  background: color-mix(in srgb, var(--bg) 40%, var(--surface)); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.qb-head { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.qb-head b { font-size: 14px; }
.qb-prov { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-sp { flex: 1; }
.qb-full { border: 0; background: none; color: var(--accent); font-size: 12px; font-weight: 600; padding: 4px 6px; border-radius: 6px; white-space: nowrap; }
.qb-full:hover { text-decoration: underline; }
.qb-x { width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 13px; flex: none; }
.qb-x:hover { background: var(--bg); color: var(--ink); }
.qb-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.qb-signin { display: flex; align-items: center; gap: 10px; padding: 12px 8px 12px 14px; color: var(--ink); }
.qb-signin span { flex: 1; min-width: 0; }
.qb-client { display: flex; align-items: center; gap: 10px; padding: 10px 14px 2px; }
.qb-av { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px;
  background: color-mix(in srgb, var(--accent) 15%, var(--surface)); color: var(--accent); }
.qb-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; }
.qb-name { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.qb-num { color: var(--muted); flex: none; }
.qb .bdg { font-size: 11px; border-radius: 999px; padding: 2px 7px; flex: none; }
.qb-grid { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 8px; padding: 10px 14px 12px; }
.qb-lbl { display: flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
.qb-spark { font-size: 10px; display: none; }
.qb-spark.on { display: inline; }
.qb-spark.wait { display: inline; opacity: .3; animation: qbWait 1.2s ease-in-out infinite; }
@keyframes qbWait { 0%, 100% { opacity: .15; } 50% { opacity: .55; } }
.qb-seg { display: flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--bg); min-width: 0; }
.qb-seg > button, .qb-pick { flex: 1; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--muted);
  font-size: 13px; padding: 0 10px; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; }
.qb-seg > button:hover, .qb-pick:hover { color: var(--ink); }
.qb-seg > .on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.qb-pick { position: relative; cursor: pointer; }
.qb-pick:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.qb-date { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; cursor: pointer; }
.qb-time { display: flex; align-items: center; gap: 4px; min-width: 0; }
.qb-t, .qb-in { height: 28px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); font: inherit; }
.qb-t { width: 34px; padding: 0; text-align: center; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.qb-in { padding: 0 8px; min-width: 0; }
.qb-t:focus, .qb-in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.qb-t.bad { border-color: var(--warn); color: var(--warn); }
.qb-colon { font-size: 15px; }
.qb-div { width: 1px; height: 18px; background: var(--line); margin: 0 6px; flex: none; }
.qb-pills { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.qb-pill { height: 26px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); flex: none;
  font-size: 12px; padding: 0 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qb-pill:hover { border-color: var(--accent); }
.qb-pill.on { background: color-mix(in srgb, var(--accent) 15%, var(--surface)); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.qb-pill.busy { color: var(--muted); text-decoration: line-through; }
.qb-where { display: flex; align-items: center; gap: 8px; min-width: 0; }
.qb-where .qb-seg { flex: none; }
.qb-pc { width: 92px; flex: 0 1 auto; text-transform: uppercase; }
.qb-pc::placeholder { text-transform: none; }
.qb-pc.filled { background: var(--stg-purple-bg); border-color: var(--stg-purple-tr); }
.qb-name-in { width: 150px; flex: 0 1 auto; }
.qb-warn, .qb-err { margin: -4px 14px 10px; font-size: 12px; font-weight: 600; border-radius: 8px; padding: 6px 10px; }
.qb-warn { color: var(--stg-amber-fg); background: var(--stg-amber-bg); }
.qb-err { color: var(--warn); background: var(--warn-bg); }
.qb-foot { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px;
  border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); background: color-mix(in srgb, var(--bg) 40%, var(--surface)); }
.qb-her { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.qb-hertxt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--stg-amber-fg); flex: none; }
.qb-book { height: 32px; border: 0; border-radius: 8px; padding: 0 14px; background: var(--accent); color: var(--accent-ink);
  font-size: 13px; font-weight: 600; white-space: nowrap; flex: none; }
.qb-book:disabled { opacity: .5; cursor: default; }
/* phone: bigger targets, and the time is a wheel (hours, then minutes in 5s; three rows show, the middle one is it) */
.qb.narrow .qb-head { padding: 6px 6px 6px 14px; }
.qb.narrow .qb-head b { font-size: 15px; }
.qb.narrow .qb-full { font-size: 13px; padding: 8px 6px; }
.qb.narrow .qb-x { width: 32px; height: 32px; font-size: 14px; }
.qb.narrow .qb-grid { grid-template-columns: 50px minmax(0, 1fr); row-gap: 10px; }
.qb.narrow .qb-seg { border-radius: 9px; }
.qb.narrow .qb-seg > button, .qb.narrow .qb-pick { height: 34px; font-size: 14px; border-radius: 7px; }
.qb.narrow .qb-in { height: 34px; font-size: 16px; }   /* 16px: phones don't zoom into it */
.qb.narrow .qb-book { height: 40px; border-radius: 9px; padding: 0 16px; font-size: 14px; }
.qb.narrow .qb-time { gap: 12px; }
.qb.narrow .qb-hertxt { white-space: normal; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.qb-wheels { position: relative; display: flex; align-items: center; gap: 2px; padding: 0 6px; border-radius: 10px;
  background: color-mix(in srgb, var(--bg) 40%, var(--surface)); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); flex: none; }
.qb-band { position: absolute; left: 4px; right: 4px; top: 50%; height: 36px; transform: translateY(-50%); border-radius: 8px; background: var(--bg); }
.qb-wheel { position: relative; z-index: 1; height: 108px; width: 52px; overflow-y: auto; scroll-snap-type: y mandatory; padding-block: 36px;
  scrollbar-width: none; overscroll-behavior: contain; outline-offset: -2px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 30%, #000 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 30%, #000 70%, transparent 100%); }
.qb-wheel::-webkit-scrollbar { display: none; }
.qb-wi { height: 36px; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 17px; color: var(--muted); font-variant-numeric: tabular-nums; cursor: pointer; }
.qb-wi.on { color: var(--ink); font-weight: 700; font-size: 19px; }
.qb-wi.bk::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--stg-amber-fg); }
.qb-wheels .qb-colon { position: relative; z-index: 1; font-size: 17px; }
.qb-hint { font-size: 12px; color: var(--muted); line-height: 1.4; }
/* 🔗 Link to profile (phone menu) */
.link-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.link-row .link-now { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.link-row .ghost { height: 34px; font-size: 14px; }
.sheet .link-search { margin-bottom: 8px; }
.link-list { display: flex; flex-direction: column; max-height: 50dvh; overflow-y: auto; }
.link-pick { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; width: 100%; text-align: left; border: 0;
  border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); padding: 11px 4px; font-size: 16px; }
.link-pick:not(:disabled):hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.link-pick .link-user { color: var(--muted); font-size: 14px; }
.link-pick .link-why { flex-basis: 100%; color: var(--muted); font-size: 13px; }
.link-pick.taken { cursor: default; }
.link-pick.taken .link-name { color: var(--muted); }
/* 📱 Connect to a different phone (phone menu) */
.sw-list { max-height: 50dvh; }
.sw-list .sw-pick { align-items: flex-start; border-bottom: 1px solid var(--line); padding: 10px 4px; }
.sw-list .sw-pick input { flex: none; margin-top: 2px; }
.sw-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.sw-name { overflow-wrap: anywhere; }
.sw-code { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.sw-why { flex-basis: 100%; color: var(--muted); font-size: 13px; }
.sw-pick.taken .sw-name { color: var(--muted); }
.sw-wa { margin-top: 4px; }
.sw-wa .pick-list { margin-top: 2px; }

/* ✨ Fill from bloe profile (fillSheet) */
.fill-btn { width: 100%; min-height: 42px; margin: 8px 0; }
.fill-body { display: flex; flex-direction: column; gap: 10px; }
.fill-part { display: flex; flex-direction: column; gap: 4px; }
.fill-head { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.fill-bubble { align-self: flex-start; max-width: 100%; box-sizing: border-box; background: var(--out); color: var(--ink);
  border-radius: 12px; border-top-right-radius: 4px; padding: 8px 11px; white-space: pre-wrap; overflow-wrap: anywhere;
  font-size: 15px; line-height: 1.35; }
.fill-where { margin: 0; font-size: 12px; }
.fill-lengths { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.fill-len { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }
.sheet .fill-len input { width: 18px; height: 18px; padding: 0; margin: 0; flex: none; accent-color: var(--accent); }
.fill-after { margin: 6px 0 0; font-size: 12px; }
.sheet .fill-retry { margin-top: 6px; }

/* how far an outcall is by car: the tag by a client's postcode (blue = close, amber = a long drive) */
.dist { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; padding: 1px 9px; border-radius: 999px;
  background: var(--stg-blue-bg); color: var(--stg-blue-fg); font-family: var(--sans); font-style: normal; font-size: 13px;
  font-weight: 600; line-height: 1.5; white-space: nowrap; vertical-align: baseline; }
.dist.far { background: var(--stg-amber-bg); color: var(--stg-amber-fg); }
.dist[hidden] { display: none; }
.dist svg { flex: none; }
#bk .pcrow { display: flex; align-items: center; gap: 10px; }
#bk .pcrow input { flex: 1; min-width: 0; }
#bk .pcrow .dist { margin-left: 0; padding: 5px 12px; font-size: 14px; flex: none; }
.qb-where { flex-wrap: wrap; row-gap: 6px; }   /* the tag drops under the postcode when the box is narrow */
.qb-where .qb-pc { flex: none; }
.qb-where .dist { margin-left: 0; flex: none; }

/* ---------- bookings panel, in the booking admin panel's own design (owner 2026-11-22) ----------
   Its own palette (slate and indigo, white cards on a pale page), kept to #bk so the chat desk around it is as it was.
   Everything below is laid over the older bookings rules above: the same ids, classes and data-a hooks. */
#bk {
  --panel: #f8fafd; --bg: #ffffff; --surface: #ffffff; --ink: #0f172a; --text: #0f172a; --muted: #5a647c; --line: #d2d8e4;
  --accent: #4338ca; --bk-fill: #4f46e5; --bk-fill2: #3730a3;
  --bk-soft: #eef2ff; --bk-softink: #312e81; --bk-line2: #e5e7eb; --bk-line3: #f1f5f9; --bk-past: #f3f4f6;
  --bk-chip: #e0e7ff; --bk-chipline: #c7d2fe; --bk-chipink: #3730a3;
  --bk-tabline: #cbd5e1; --bk-tabink: #334155; --bk-count: #e5e7eb; --bk-countink: #374151; --bk-go: #e2e8f0;
  --bk-in: #d1fae5; --bk-inline: #a7f3d0; --bk-inink: #065f46; --bk-out: #ffedd5; --bk-outline: #fed7aa; --bk-outink: #9a3412;
  font-size: 14px; color: var(--ink);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #bk {
    --panel: #0b1220; --bg: #141d30; --surface: #141d30; --ink: #e6eaf2; --text: #e6eaf2; --muted: #9aa6bd; --line: #2b3852;
    --accent: #a5b4fc; --bk-soft: #1e2547; --bk-softink: #c7d2fe; --bk-line2: #253049; --bk-line3: #1f2940; --bk-past: #0f1728;
    --bk-chip: #283163; --bk-chipline: #3b4687; --bk-chipink: #c7d2fe;
    --bk-tabline: #37445f; --bk-tabink: #cbd5e1; --bk-count: #2b3852; --bk-countink: #d5dbe7; --bk-go: #2b3852;
    --bk-in: #0f3a2c; --bk-inline: #1c5a45; --bk-inink: #86efc5; --bk-out: #40240f; --bk-outline: #6b3a14; --bk-outink: #fdba74;
  }
}
:root[data-theme="dark"] #bk {
  --panel: #0b1220; --bg: #141d30; --surface: #141d30; --ink: #e6eaf2; --text: #e6eaf2; --muted: #9aa6bd; --line: #2b3852;
  --accent: #a5b4fc; --bk-soft: #1e2547; --bk-softink: #c7d2fe; --bk-line2: #253049; --bk-line3: #1f2940; --bk-past: #0f1728;
  --bk-chip: #283163; --bk-chipline: #3b4687; --bk-chipink: #c7d2fe;
  --bk-tabline: #37445f; --bk-tabink: #cbd5e1; --bk-count: #2b3852; --bk-countink: #d5dbe7; --bk-go: #2b3852;
  --bk-in: #0f3a2c; --bk-inline: #1c5a45; --bk-inink: #86efc5; --bk-out: #40240f; --bk-outline: #6b3a14; --bk-outink: #fdba74;
}
#bk .ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
#bk .bk-top { background: var(--surface); gap: 12px; padding: calc(env(safe-area-inset-top) + 14px) 16px 14px; }
#bk .bk-top h2 { font-size: 20px; font-weight: 700; }
#bk .bk-top h2 small { font-size: 13px; }
#bk .ib { width: 44px; height: 44px; background: var(--surface); }
#bk .bk-body { padding: 16px; }
#bk .bk-foot { background: var(--surface); }
#bk input, #bk select, #bk textarea { border-radius: 8px; font-size: 15px; }
#bk input, #bk select { height: 44px; }
#bk .big { background: var(--bk-fill); border-radius: 10px; }
#bk .ghost { border-radius: 10px; background: var(--surface); font-weight: 600; }
#bk #bkPhone { margin-bottom: 14px; }

/* the menu: search and Filters, the status tabs, the days, the cards */
#bk .findrow { gap: 8px; margin-bottom: 14px; }
#bk .findrow button { min-height: 44px; padding: 0 14px; border-radius: 8px; background: var(--surface); font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
#bk .findrow button.on { border-color: var(--bk-fill); color: var(--accent); }
#bk .filt { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 12px 14px; margin-bottom: 14px; }
#bk .filt[hidden] { display: none; }
#bk .perrow, #bk .sttabs { display: flex; flex-wrap: wrap; gap: 8px; }
#bk .sttabs { margin-bottom: 14px; }
#bk .perrow button, #bk .sttabs button { min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--bk-tabline); background: var(--surface); color: var(--bk-tabink);
  font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
#bk .perrow button.on, #bk .sttabs button.on { background: var(--bk-fill); border-color: var(--bk-fill); color: #fff; }
#bk .sttabs button span { padding: 1px 8px; border-radius: 999px; background: var(--bk-count); color: var(--bk-countink); font-size: 12px; font-weight: 700; }
#bk .sttabs button.on span { background: var(--bk-fill2); color: #fff; }
#bk .chk { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 8px; font-size: 14px; cursor: pointer; }
#bk .chk input { width: 18px; height: 18px; flex: none; padding: 0; }
#bk .dgrp { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); margin-bottom: 14px; }
#bk .dgh { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 0; background: var(--surface); color: var(--ink); font-size: 14px; text-align: left; }
#bk .dgrp.today .dgh { background: var(--bk-soft); color: var(--bk-softink); }
#bk .dgh .t { flex: 1; min-width: 0; }
#bk .dgh b { display: block; font-weight: 700; }
#bk .dgh small { display: block; font-size: 13px; color: var(--muted); }
#bk .dgrp .glist { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; overflow: visible; padding: 12px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
#bk .glist .bkr { display: block; min-width: 0; padding: 14px; border: 1px solid var(--bk-line2); border-radius: 10px; background: var(--surface); opacity: 1; cursor: pointer; }
#bk .glist .bkr.past { background: var(--bk-past); }
#bk .bkr .c-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
#bk .bkr .c-id { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
#bk .bkr .c-nums { display: flex; flex-wrap: wrap; gap: 6px; font-family: ui-monospace, Menlo, Consolas, monospace; }
#bk .bkr .n-w { padding: 3px 8px; border-radius: 6px; background: #047857; border: 2px solid #6ee7b7; color: #fff; font-size: 13px; font-weight: 700; }
#bk .bkr .n-d, #bk .bkr .n-r { padding: 4px 8px; border-radius: 6px; background: var(--bk-chip); border: 1px solid var(--bk-chipline); color: var(--bk-chipink); font-size: 12px; font-weight: 600; }
#bk .bkr .n-r { font-weight: 700; }
#bk .bkr .c-name { margin: 0; font-size: 16px; font-weight: 600; }
#bk .glist .bkr .pill { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; flex: none; }
#bk .glist .bkr .pill i { display: none; }
#bk .bkr .c-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
#bk .bkr .c-chips > span { padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
#bk .bkr .ty.in { background: var(--bk-in); border: 1px solid var(--bk-inline); color: var(--bk-inink); }
#bk .bkr .ty.out { background: var(--bk-out); border: 1px solid var(--bk-outline); color: var(--bk-outink); }
#bk .bkr .pc { background: var(--stg-blue-bg); color: var(--stg-blue-fg); }
#bk .bkr .pc .dist { margin-left: 4px; padding: 0; background: none; color: inherit; font-size: inherit; }
/* the client's average rating, who made the booking, her status beside her name, and the timeline (2026-11-25) */
#bk .rt { background: var(--bdg-new-bg); color: var(--bdg-new-fg); white-space: nowrap; }
#bk .rt small, #bk .bcard.info .kv .rt small { font-weight: 500; opacity: .85; font-size: inherit; color: inherit; }
#bk .by { background: var(--stg-blue-bg); color: var(--stg-blue-fg); white-space: nowrap; }
#bk .bcard.info .kv .rt { padding: 3px 10px; border-radius: 999px; font-size: 14px; font-weight: 600; }
#bk .hst { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; vertical-align: middle; background: var(--bdg-known-bg); color: var(--bdg-known-fg); }
#bk .hst i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
#bk .hst.on { background: var(--stg-green-bg); color: var(--stg-green-fg); }
#bk .hst.brk { background: var(--stg-amber-bg); color: var(--stg-amber-fg); }
#bk .hst.off { background: var(--warn-bg); color: var(--warn); }
#bk .tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
#bk .tl li { display: flex; gap: 12px; align-items: baseline; }
#bk .tl time { flex: none; width: 46px; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--muted); }
#bk .tl li.tl-day { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
#bk .tl li.tl-day:first-child { margin-top: 0; }
#bk .bkr .c-rows { display: flex; flex-direction: column; gap: 8px; }
#bk .bkr .c-rows > div { display: flex; justify-content: space-between; gap: 12px; }
#bk .bkr .c-rows > div > span:first-child { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; flex: none; }
#bk .bkr .c-rows > div > span:last-child { text-align: right; min-width: 0; overflow-wrap: anywhere; }
#bk .bkr .c-rows small { color: var(--muted); font-size: 12px; }
#bk .bkr .c-acts { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--bk-line3); }
#bk .bkr.past .c-acts { border-top-color: var(--bk-line2); }
#bk .bkr .c-acts button { flex: 1; min-width: 0; min-height: 44px; padding: 0 10px; border-radius: 8px; font-size: 14px; font-weight: 600; }
#bk .bkr .c-acts .vd, #bk .bkr .c-acts .oc { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
#bk .bkr .c-acts .go { border: 0; background: var(--bk-go); color: var(--ink); }
#bk .bkr .r-sent { display: block; margin-top: 6px; text-align: right; }
#bk .hint.empty { font-size: 14px; text-align: center; padding: 28px 0; }
#bk .hint.foot { font-size: 13px; text-align: center; margin: 2px 0 14px; }
#bk .newb.fab { position: sticky; bottom: 4px; margin-left: auto; width: max-content; height: 56px; padding: 0 20px; display: flex; align-items: center; gap: 8px;
  border: 0; border-radius: 999px; background: var(--bk-fill); color: #fff; font-size: 15px; font-weight: 700; box-shadow: 0 6px 16px rgba(49, 46, 129, .35); }

/* an opened booking and the new booking form: a heading, chips and the next step, then white cards */
#bk .bhead { margin-bottom: 16px; }
#bk .bhead h3 { margin: 0; font-size: 24px; font-weight: 700; }
#bk .bhead p { margin: 4px 0 10px; color: var(--muted); }
#bk .bhead .chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#bk .bhead .chips > span { padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; margin: 0; }
#bk .bhead .ty.in { background: var(--bk-in); border: 1px solid var(--bk-inline); color: var(--bk-inink); }
#bk .bhead .ty.out { background: var(--bk-out); border: 1px solid var(--bk-outline); color: var(--bk-outink); }
#bk .bhead .ok { background: var(--stg-green-bg); color: var(--stg-green-fg); }
#bk .bhead .ol { border: 1px solid var(--bk-tabline); color: var(--bk-tabink); }
#bk .bacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#bk .bacts > span { flex: 1 1 180px; display: flex; }
#bk .bacts .nextact { margin: 0; min-height: 44px; border-radius: 10px; font-size: 15px; background: var(--bk-fill); color: #fff; }
#bk .bacts .danger { flex: 1 1 140px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: #dc2626; color: #fff; font-size: 15px; font-weight: 600; }
#bk .bcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; display: block; }
#bk .bcard > h3 { margin: 0 0 12px; font-size: 18px; font-weight: 700; }
#bk .bcard > h3 + .sub { margin: -8px 0 12px; color: var(--muted); }
#bk .bcard .lbl { font-size: 13px; font-weight: 600; color: var(--bk-tabink); margin: 14px 0 6px; }
#bk .bcard > h3 + .lbl, #bk .bcard > .sub + .lbl { margin-top: 0; }
#bk .bcard.info { display: flex; flex-direction: column; gap: 14px; }
#bk .bcard.info > h3 { margin-bottom: 0; }
#bk .bcard.info .kv { display: block; }
#bk .bcard.info .kv > span:first-child { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
#bk .bcard.info .kv > b { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 2px; font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
#bk .bcard.info .kv small { font-size: 13px; font-weight: 500; color: var(--muted); }
#bk .bcard.info .pill { padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; }
#bk .bcard.info .pill i { display: none; }
#bk .seg { gap: 8px; }
#bk .seg button, #bk .tabs button { min-height: 44px; border-radius: 8px; border-color: var(--bk-tabline); background: var(--surface); color: var(--bk-tabink); font-weight: 600; }
#bk .seg button.on, #bk .tabs button.on { background: var(--bk-fill); border-color: var(--bk-fill); color: #fff; }
#bk .card2 { background: var(--surface); }
#bk details.more { background: var(--surface); border-radius: 14px; padding: 0 18px; margin: 0 0 16px; }
#bk details.more > summary { font-size: 16px; font-weight: 700; min-height: 56px; }
#bk details.more[open] { padding-bottom: 18px; }
#bk .bsteps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
#bk .bsteps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
#bk .bsteps li + li::before { content: ""; position: absolute; top: 15px; right: calc(50% + 20px); width: calc(100% - 40px); height: 2px; background: var(--line); }
#bk .bsteps li.ok + li::before { background: var(--bk-fill); }
#bk .bsteps span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line); color: var(--muted); font-weight: 700; }
#bk .bsteps li.ok span { background: var(--bk-fill); border-color: var(--bk-fill); color: #fff; }
#bk .bsteps small { font-size: 12px; color: var(--muted); }
#bk .bsteps li.ok small { color: var(--accent); font-weight: 700; }
#bk .bsteps small i { position: absolute; left: -9999px; }
#bk .bcard.srv { display: flex; align-items: center; gap: 12px; padding: 16px 18px; flex-wrap: wrap; }
#bk .bcard.srv .av { width: 40px; height: 40px; border-radius: 50%; background: var(--bk-soft); color: var(--bk-softink); display: grid; place-items: center; font-weight: 700; flex: none; }
#bk .bcard.srv .who { flex: 1; min-width: 0; }
#bk .bcard.srv .who small { display: block; font-size: 13px; color: var(--muted); }
#bk .bcard.srv .who b { font-size: 16px; }
#bk .bcard.srv .here { font-size: 13px; color: var(--muted); }
#bk .bcard.srv select { width: auto; min-width: 110px; }
#bk .seg.tall button { min-height: 60px; padding: 10px 12px; text-align: left; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
#bk .seg.tall button b { font-weight: 700; color: var(--ink); }
#bk .seg.tall button small { font-size: 12px; color: var(--muted); font-weight: 500; }
#bk .seg.tall button.on { background: var(--bk-soft); border: 2px solid var(--bk-fill); color: var(--bk-softink); }
#bk .seg.tall button.on b { color: var(--bk-softink); }
#bk #bkCard .card2 { margin-top: 12px; border-color: var(--bk-line2); border-radius: 8px; background: var(--bk-past); padding: 12px; }
#bk .bcard .toggle { min-height: 44px; margin-top: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
#bk .switch2 { gap: 8px; border: 0; padding: 0; background: none; }
#bk .switch2 button { min-height: 44px; border: 1px solid var(--bk-tabline); border-radius: 8px; background: var(--surface); color: var(--bk-tabink); font-weight: 600; }
#bk .switch2 button.on { background: var(--bk-fill); border-color: var(--bk-fill); color: #fff; }
#bk .bcard .seg { margin: 0; }
#bk .bacts > span, #bk .bacts .danger { flex: 0 1 240px; }
#bk .bacts .nextact { width: 100%; }
#bk .bcard.info { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px 18px; }
#bk .bcard.info > h3 { grid-column: 1 / -1; }
#bk .sug { margin: 0 0 16px; }
@media (max-width: 560px) { #bk .bacts > span, #bk .bacts .danger { flex: 1 1 140px; } }
/* older selected states inside the panel keep white on the solid indigo (the panel's own --accent is a text colour) */
#bk .sugchips button.on, #bk .stages button.on, #bk .herchat .btns span.on { background: var(--bk-fill); border-color: var(--bk-fill); color: #fff; }
#bk .perrow button, #bk .sttabs button { min-height: 44px; }
#bk .sttabs button { flex: none; }
@media (max-width: 560px) { #bk .sttabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; } }
#bk .hint.foot { margin-bottom: 72px; }   /* room for the Create button to rest clear of the last card */
#bk .bacts .danger { background: var(--surface); border: 1px solid #dc2626; color: #dc2626; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #bk .bacts .danger { border-color: #f87171; color: #fca5a5; } }
:root[data-theme="dark"] #bk .bacts .danger { border-color: #f87171; color: #fca5a5; }
