/* BCS app · same "Sunset Glass" world as the website (see DESIGN.md) */
:root {
  --canvas: #FFFFFF; --parchment: #F5F5F7; --ink: #1D1D1F; --muted: #5E5E63; --hairline: #D2D2D7;
  --tile: #111113; --accent: #F28B30; --accent-press: #E07A20; --accent-ink: #B4561A;
  --peach: #FFC4A1; --amber: #FFD48C; --sky: #A8D5FF; --danger: #C4352B;
  --font: -apple-system, "SF Pro Text", "Inter", system-ui, "Segoe UI", sans-serif;
  --r: 22px; --r-small: 14px; --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
  --surface: rgb(255 255 255 / .82); --field: #fff; --bar: rgb(255 255 255 / .72);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; font-family: var(--font); font-size: 17px; line-height: 1.45; color: var(--ink);
  background:
    radial-gradient(60vmax 40vmax at 0% 0%, rgb(255 196 161 / .55), transparent 70%),
    radial-gradient(50vmax 40vmax at 100% 0%, rgb(168 213 255 / .45), transparent 70%),
    var(--canvas) fixed;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; letter-spacing: -0.025em; line-height: 1.12; }
h1 { font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem); font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 650; }
p { margin: 0; }
a { color: var(--accent-ink); }
img { max-width: 100%; display: block; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.stack { display: grid; gap: 14px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.spread { justify-content: space-between; }

/* top bar */
.bar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: var(--bar); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgb(0 0 0 / .06);
}
.bar__brand { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: 0.04em; }
.bar__nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.bar__nav a { padding: 8px 12px; border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 0.9375rem; white-space: nowrap; }
.bar__nav a[aria-current="page"] { background: var(--ink); color: #fff; }

.view { width: min(760px, 100%); margin: 0 auto; padding: 24px 16px calc(48px + env(safe-area-inset-bottom)); outline: none; }
.view > * + * { margin-top: 18px; }

/* cards & forms */
.card { padding: 20px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .9), 0 14px 40px -22px rgb(30 20 10 / .35); }
.card--flat { background: var(--parchment); box-shadow: none; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 0.9375rem; }
input, select, textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--hairline); border-radius: var(--r-small);
  background: var(--field); color: var(--ink); font: inherit; font-weight: 400;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgb(242 139 48 / .35); border-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice label { padding: 14px; border: 1px solid var(--hairline); border-radius: var(--r-small); background: var(--field); cursor: pointer; font-weight: 600; }
.choice label:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(242 139 48 / .25); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice small { display: block; font-weight: 400; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
  border: 0; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  background: var(--accent); color: var(--ink); transition: transform .2s var(--ease), background-color .2s;
}
.btn:active { transform: scale(.96); }
.btn:hover { background: var(--accent-press); }
.btn--ghost { background: rgb(0 0 0 / .06); }
.btn--ghost:hover { background: rgb(0 0 0 / .1); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; }
.btn--danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px currentColor; }
.btn--small { min-height: 36px; padding: 0 14px; font-size: 0.9375rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.error { color: var(--danger); font-weight: 600; }

/* lists */
.list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.item { display: grid; gap: 4px; padding: 16px 18px; border-radius: var(--r); background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .9), 0 10px 30px -22px rgb(30 20 10 / .4); }
.item__top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.item__title { font-weight: 650; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.8125rem; font-weight: 650; white-space: nowrap; background: var(--parchment); }
.pill--new { background: var(--amber); }
.pill--assigned { background: var(--sky); }
.pill--in_progress { background: var(--peach); }
.pill--done { background: #CDEFD3; }
.pill--cancelled, .pill--refused, .pill--blocked { background: #F2D6D3; }
.pill--pending { background: var(--amber); }
.pill--approved { background: #CDEFD3; }
.empty { padding: 28px 20px; text-align: center; color: var(--muted); }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-small); background: var(--parchment); }
dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }

/* chat */
.chat { display: grid; gap: 8px; max-height: 55dvh; overflow-y: auto; padding: 4px 2px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 18px; background: var(--field); box-shadow: 0 1px 2px rgb(0 0 0 / .06); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg--me { justify-self: end; background: var(--accent); border-bottom-right-radius: 6px; }
.msg--them { justify-self: start; border-bottom-left-radius: 6px; }
.msg__who { display: block; font-size: 0.75rem; font-weight: 700; opacity: .7; margin-bottom: 2px; }
.msg__time { display: block; font-size: 0.6875rem; opacity: .6; margin-top: 4px; text-align: right; }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 46px; max-height: 160px; }
.composer .btn { flex: none; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { border: 0; padding: 8px 14px; border-radius: 999px; background: rgb(0 0 0 / .06); font: inherit; font-size: 0.9375rem; cursor: pointer; }
.tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; pointer-events: none; transition: opacity .3s, transform .4s var(--ease); max-width: calc(100% - 32px); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.has-link.is-on { pointer-events: auto; }
.toast__help { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; margin-left: 4px; }
[data-theme="dark"] .toast__help { color: var(--accent-ink); }
.legal h2 { margin-top: 22px; }
.legal p, .legal li { margin-top: 8px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* back to the website */
.bar__nav a.bar__site { color: var(--muted); }
.bar__nav a.bar__site::before { content: "\2190\00a0"; }
/* how-it-works guides */
.guide summary { font-weight: 650; cursor: pointer; }
.guide ol { margin: 12px 0 0; padding-left: 1.3em; display: grid; gap: 8px; color: var(--muted); }
.guide b { color: var(--ink); }
#tabHelp { margin-top: 10px; }

/* admin: wider screens for numbers */
.view:has(#dash), .view:has(.tiles) { width: min(1040px, 100%); }
.dash__h { margin-top: 26px; font-size: 1rem; color: var(--muted); font-weight: 650; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 10px; }
.tile { display: grid; gap: 2px; align-content: start; padding: 16px 18px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .9), 0 10px 30px -22px rgb(30 20 10 / .4); }
.tile__label { font-size: 0.875rem; color: var(--muted); font-weight: 600; }
.tile__value { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tile__note { font-size: 0.8125rem; color: var(--muted); }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-top: 18px; }
.chart h2 { font-size: 1.0625rem; }
.chart > .muted { margin-top: 2px; }

/* columns (one series, one hue) */
.cols { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; align-items: end; height: 190px; margin-top: 14px; }
.col { display: grid; grid-template-rows: 18px 1fr 18px; height: 100%; text-align: center; }
.col__val { font-size: 0.75rem; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.col__track { position: relative; border-bottom: 1px solid var(--hairline); }
.col__fill { position: absolute; left: 50%; bottom: 0; width: min(70%, 28px); transform: translateX(-50%); border-radius: 4px 4px 0 0; background: var(--accent); }
.col:hover .col__fill { background: var(--accent-press); }
.col__label { font-size: 0.6875rem; color: var(--muted); white-space: nowrap; overflow: hidden; }
.cols:has(.col:nth-child(9)) .col:nth-child(odd):not(:last-child) .col__label { visibility: hidden; }

/* horizontal bars */
.hbars { display: grid; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.hbars li { display: grid; grid-template-columns: minmax(80px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 0.9375rem; }
.hbars__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbars__track { height: 10px; border-radius: 0 4px 4px 0; background: var(--parchment); }
.hbars__fill { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--accent); }
.hbars__val { font-weight: 650; font-variant-numeric: tabular-nums; }

.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.qty { margin-top: 8px; }
.qty b { min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }
.qty select, .qty input { width: auto; padding: 8px 10px; }
a.item__title { color: var(--ink); }

/* faces (photo or coloured BCS avatar) */
.face { flex: none; border-radius: 50%; object-fit: cover; background: var(--parchment); }
.bar__nav a .face { width: 22px; height: 22px; margin: -3px 6px -3px -4px; vertical-align: middle; display: inline-block; }
.person { display: inline-flex; align-items: center; gap: 10px; }
.msg__who { display: flex; align-items: center; gap: 6px; }
.faces { display: flex; flex-wrap: wrap; gap: 8px; }
.faces button { padding: 3px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.faces button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--accent); }
.faces img { display: block; }

/* messages */
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #D70015; color: #fff; font-size: 0.75rem; font-weight: 700; vertical-align: 1px; }
.badge[hidden] { display: none; }
.thread { grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; }
.thread__body { display: grid; gap: 2px; min-width: 0; }
.thread__last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 0.9375rem; }
.thread.is-unread .thread__last { color: var(--ink); font-weight: 600; }
.chat__title { font-size: 1.375rem; }

/* theme button */
.theme-btn { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 999px; background: rgb(0 0 0 / .06); color: var(--ink); cursor: pointer; transition: transform .3s var(--ease), background-color .2s; }
.theme-btn:hover { transform: rotate(-14deg) scale(1.06); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn__sun { display: none; }
[data-theme="dark"] .theme-btn__sun { display: block; }
[data-theme="dark"] .theme-btn__moon { display: none; }

/* ─── Dark theme: same sunset, after dark ─────────────────── */
[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #0C0C0E; --parchment: #1A1A1D; --ink: #F5F5F7; --muted: #A1A1A6; --hairline: #2E2E33;
  --tile: #1C1C1F; --accent-ink: #FFB273; --danger: #FF6B5E;
  --peach: #7A3E22; --amber: #6B4A12; --sky: #1C3A5E;
  --surface: rgb(30 30 34 / .82); --field: #1E1E22; --bar: rgb(18 18 20 / .72);
}
[data-theme="dark"] body {
  background:
    radial-gradient(60vmax 40vmax at 0% 0%, rgb(242 139 48 / .16), transparent 70%),
    radial-gradient(50vmax 40vmax at 100% 0%, rgb(77 107 255 / .14), transparent 70%),
    var(--canvas) fixed;
}
[data-theme="dark"] .bar { border-bottom-color: rgb(255 255 255 / .06); }
[data-theme="dark"] .bar__nav a[aria-current="page"], [data-theme="dark"] .tabs button[aria-pressed="true"] { background: var(--ink); color: var(--canvas); }
[data-theme="dark"] .card, [data-theme="dark"] .item, [data-theme="dark"] .tile { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06), 0 14px 40px -22px rgb(0 0 0 / .8); }
[data-theme="dark"] .btn--ghost, [data-theme="dark"] .tabs button, [data-theme="dark"] .theme-btn { background: rgb(255 255 255 / .08); color: var(--ink); }
[data-theme="dark"] .btn--ghost:hover { background: rgb(255 255 255 / .14); }
[data-theme="dark"] .btn--dark { background: var(--ink); color: var(--canvas); }
[data-theme="dark"] .msg--me { color: #1D1D1F; }
[data-theme="dark"] .pill { color: #1D1D1F; }
[data-theme="dark"] .pill--new, [data-theme="dark"] .pill--pending { background: #FFD48C; }
[data-theme="dark"] .pill--assigned { background: #A8D5FF; }
[data-theme="dark"] .pill--in_progress { background: #FFC4A1; }
[data-theme="dark"] .pill:not([class*="pill--"]) { background: var(--parchment); color: var(--ink); }
[data-theme="dark"] .hbars__track { background: rgb(255 255 255 / .08); }
[data-theme="dark"] .bar__brand img, [data-theme="dark"] .face[src$="logo.svg"] { filter: drop-shadow(0 0 1px rgb(255 255 255 / .35)); }
[data-theme="dark"] .toast { color: var(--canvas); }

/* ─── Home button + phone navigation (2026-11-08) ─────────────
   The logo and the house both lead to the website's home (the "Hello" page).
   On a phone the tabs move to their own row, in a grid: every tab visible, nothing to scroll,
   and the BCS name keeps its room. */
.bar__brand img { border-radius: 50%; }
.home-btn { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: rgb(0 0 0 / .05); color: var(--ink); transition: transform .3s var(--ease); }
.home-btn:hover { transform: scale(1.08); }
.home-btn svg { width: 18px; height: 18px; }
[data-theme="dark"] .home-btn { background: rgb(255 255 255 / .08); }
.bar__brand { order: 0; }
.bar__nav { order: 1; }
.home-btn { order: 2; }
.theme-btn { order: 3; }
/* computer: the tabs are pills in the top bar, face before the name, count after it */
.bar__nav a { display: inline-flex; align-items: center; gap: 6px; }
.bar__nav .tab__icon { display: contents; }
.bar__nav .tab__ico { display: none; }
.bar__nav .tab__label { order: 1; }
.bar__nav .badge { order: 2; margin-left: 0; }
.bar__nav a .face { margin: -3px 0 -3px -4px; }

/* phone (2026-11-14): the one tab bar shared with the website (assets/css/tabbar.css, assets/js/tabbar.js);
   the top bar keeps the logo, the way home and the theme button */
@media (max-width: 760px) { .bar__nav { display: none; } .home-btn { display: none; } }   /* on phones "Home" is the tab bar's (one path) */
body.has-tabbar .toast { bottom: calc(76px + max(var(--tab-side, 12px), calc(env(safe-area-inset-bottom, 0px) - 12px))); }
body.has-tabbar .switch-fab { bottom: calc(76px + max(var(--tab-side, 12px), calc(env(safe-area-inset-bottom, 0px) - 12px))); }

/* phone and touch comfort: every control at least 44px, small text a little bigger */
@media (max-width: 760px) {
  .small { font-size: 0.9375rem; }
  .view { padding-top: 20px; }
  .card { padding: 18px; }
}
@media (pointer: coarse) {
  .btn--small { min-height: 44px; padding: 0 16px; }
  .linkbtn { min-height: 44px; padding: 10px 8px; }
  .theme-btn, .home-btn { width: 44px; height: 44px; }
}
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgb(242 139 48 / .35); outline-offset: 0; }
::selection { background: rgb(242 139 48 / .35); color: inherit; }

/* ─── The messenger (2026-11-10, built like Instagram's messages) ─────
   The conversation takes the whole screen. Only the messages scroll: the header and the
   composer never move, even when the keyboard opens (fitToKeyboard in app.js follows the
   visible part of the screen). Bubbles group like Instagram: tighter corners between
   messages of the same person, their face only next to their last message, the time
   between messages after a pause (tap a message to see its time). */
body.chat-mode .view { width: min(760px, 100%); padding: 16px 16px 0; }
.cv { position: relative; display: flex; flex-direction: column; height: calc(100dvh - 96px); border-radius: 28px; overflow: hidden;
  background: var(--canvas); box-shadow: inset 0 0 0 1px rgb(127 127 127 / .14), 0 20px 50px -30px rgb(30 20 10 / .4); }
.cv.is-drop { box-shadow: inset 0 0 0 2px var(--accent); }
.cv__head { flex: none; display: flex; align-items: center; gap: 4px; min-height: 60px; padding: 8px 8px 8px 4px;
  border-bottom: 1px solid rgb(127 127 127 / .16); background: var(--canvas); }
.cv__icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; color: var(--ink); }
.cv__icon:active, .cv__icon:hover { background: rgb(127 127 127 / .12); }
.cv__icon svg { width: 26px; height: 26px; }
.cv__who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 0; border-radius: 14px; color: var(--ink); text-decoration: none; }
.cv__names { min-width: 0; display: grid; line-height: 1.25; }
.cv__names b { font-size: 1rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv__names small { color: var(--muted); font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cv__list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; padding: 10px 12px 10px; }
.cv__list > :first-child { margin-top: auto; } /* a short conversation sits at the bottom, next to the composer */
.cv__empty { margin: auto; display: grid; justify-items: center; gap: 6px; max-width: 32ch; padding: 24px 0; text-align: center; color: var(--muted); }
.cv__empty b { color: var(--ink); font-size: 1.125rem; }
.cv__empty .face { margin-bottom: 6px; }
.cv__sep { align-self: center; margin: 18px 0 8px; font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.cv__from { margin: 12px 0 0 48px; font-size: 0.75rem; color: var(--muted); }

.cv__row { display: flex; align-items: flex-end; gap: 8px; max-width: 100%; margin-top: 2px; }
.cv__row:not(.is-joined) { margin-top: 8px; }
.cv__sep + .cv__row, .cv__from + .cv__row { margin-top: 4px; }
.cv__row.is-me { flex-direction: row-reverse; }
.cv__ava { flex: none; width: 28px; }
.cv__ava .face { width: 28px; height: 28px; }
.cv__row.is-cont .cv__ava { visibility: hidden; }
.cv__col { display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: min(72%, 480px); }
.is-me .cv__col { align-items: flex-end; }
.is-them .cv__col { align-items: flex-start; }
.cv__bubble { display: block; max-width: 100%; padding: 9px 14px; border-radius: 22px; font-size: 1rem; line-height: 1.35;
  overflow-wrap: anywhere; white-space: pre-wrap; text-decoration: none; }
.is-them .cv__bubble { background: var(--bubble); color: var(--ink); }
.is-me .cv__bubble { background: linear-gradient(135deg, #F8A552, #F28B30 55%, #EC7B24); color: #1D1D1F; }
/* grouped messages: the corners that touch get tighter */
.is-me.is-joined .cv__col > :first-child, .is-me .cv__col > * + * { border-top-right-radius: 6px; }
.is-me.is-cont .cv__col > :last-child, .is-me .cv__col > :not(:last-child) { border-bottom-right-radius: 6px; }
.is-them.is-joined .cv__col > :first-child, .is-them .cv__col > * + * { border-top-left-radius: 6px; }
.is-them.is-cont .cv__col > :last-child, .is-them .cv__col > :not(:last-child) { border-bottom-left-radius: 6px; }
.cv__stamp { align-self: center; flex: none; max-width: 0; overflow: hidden; opacity: 0; font-size: 0.6875rem; color: var(--muted); white-space: nowrap;
  transition: max-width .25s var(--ease), opacity .2s ease; }
.cv__row.show-time .cv__stamp { max-width: 64px; opacity: 1; }
.cv__row.is-new { animation: cv-in .32s var(--ease) both; }
.cv__row.is-sending .cv__col { opacity: .55; }
@keyframes cv-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }

/* photos: no bubble around them */
.cv__media { display: grid; gap: 2px; width: min(260px, 62vw); border-radius: 18px; overflow: hidden; }
.cv__media--2, .cv__media--3 { grid-template-columns: 1fr 1fr; }
.cv__media--3 .cv__img:first-child { grid-column: 1 / -1; }
.cv__img { display: block; padding: 0; border: 0; background: rgb(127 127 127 / .15); cursor: zoom-in; }
.cv__img img { display: block; width: 100%; max-height: 340px; min-height: 80px; object-fit: cover; }
.cv__media--2 .cv__img img, .cv__media--3 .cv__img img { aspect-ratio: 1 !important; height: auto; }
.cv__doc { display: flex; align-items: center; gap: 10px; min-width: min(240px, 58vw); white-space: normal; color: inherit; }
.cv__docicon { position: relative; flex: none; display: grid; place-items: center; width: 38px; height: 44px; }
.cv__docicon svg { width: 38px; height: 44px; opacity: .8; }
.cv__docicon i { position: absolute; bottom: 7px; font-style: normal; font-size: 0.5625rem; font-weight: 800; letter-spacing: .03em; }
.cv__docname { min-width: 0; display: grid; }
.cv__docname b { font-size: 0.875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv__docname small { font-size: 0.75rem; opacity: .7; }

/* files waiting to be sent */
.cv__tray { flex: none; display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px 2px; }
.cv__chip { position: relative; flex: none; display: grid; justify-items: center; gap: 4px; width: 76px; }
.cv__chip img, .cv__chip .cv__docicon { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: rgb(127 127 127 / .14); }
.cv__chip .cv__docicon svg { width: 30px; height: 36px; }
.cv__chipname { width: 100%; font-size: 0.6875rem; color: var(--muted); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv__chip button { position: absolute; top: -4px; right: 2px; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 999px; background: var(--ink); color: var(--canvas); cursor: pointer; }
.cv__chip button svg { width: 12px; height: 12px; }

/* the composer: camera on the left, a round field, "Send" when there is something to send */
.cv__compose { flex: none; display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--canvas); }
.kb-open .cv__compose { padding-bottom: 8px; }
.cv__cam { flex: none; display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 2px; border-radius: 999px; background: var(--accent); color: #1D1D1F; cursor: pointer; transition: transform .2s ease; }
.cv__cam:active { transform: scale(.92); }
.cv__cam svg { width: 22px; height: 22px; }
.cv__field { flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 2px; min-height: 44px; padding: 2px 4px 2px 16px;
  border: 1px solid var(--hairline); border-radius: 22px; background: var(--field); }
.cv__field textarea { flex: 1; min-width: 0; min-height: 38px; max-height: 132px; margin: 0; padding: 9px 0; border: 0; border-radius: 0;
  background: transparent; resize: none; font-size: 16px; line-height: 1.3; }
.cv__field textarea:focus { outline: none; }
.cv__clip { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; color: var(--ink); cursor: pointer; }
.cv__clip[hidden], .cv__send[hidden] { display: none; }
.cv__clip svg { width: 22px; height: 22px; }
.cv__send { flex: none; height: 38px; padding: 0 12px; border: 0; background: none; color: var(--accent-ink); font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; }
.cv__send:disabled { opacity: .5; }
.cv__closed { flex: none; padding: 14px; text-align: center; color: var(--muted); border-top: 1px solid rgb(127 127 127 / .14); }

/* the photo viewer */
.lb { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: calc(56px + env(safe-area-inset-top)) 12px calc(20px + env(safe-area-inset-bottom)); background: rgb(0 0 0 / .92); }
.lb[hidden] { display: none; }
.lb img { max-width: 100%; max-height: 100%; border-radius: 12px; object-fit: contain; animation: cv-in .3s ease both; }
.lb__bar { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: center; }
.lb__btn { display: inline-grid; place-items: center; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: rgb(255 255 255 / .14); color: #fff; font: inherit; font-size: 0.9375rem; text-decoration: none; cursor: pointer; }
.lb__close { width: 40px; padding: 0; }
.lb__close svg { width: 20px; height: 20px; }

/* link from the request page to its chat */
.chatlink { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; transition: transform .3s var(--ease); }
.chatlink:hover { transform: translateY(-2px); }
.chatlink > span:nth-child(2) { flex: 1; display: grid; gap: 2px; }
.chatlink__icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 16px; background: var(--accent); color: #1D1D1F; }
.chatlink__icon svg { width: 24px; height: 24px; }
.chatlink__go { font-size: 1.75rem; color: var(--muted); }
/* someone's profile */
.pp { justify-items: center; padding-top: 28px; }
.pp .face { box-shadow: 0 16px 40px -18px rgb(0 0 0 / .5); }
.pp h1 { margin: 0; }
.pp__actions { justify-content: center; }


@media (max-width: 760px) {
  html:has(body.chat-mode), body.chat-mode { height: 100%; overflow: hidden; overscroll-behavior: none; }
  body.chat-mode .bar { display: none; }
  body.chat-mode .view { padding: 0; width: 100%; }
  /* pinned to the visible part of the screen: the keyboard never pushes it around */
  .cv { position: fixed; z-index: 20; top: 0; left: 0; right: 0; height: var(--vvh, 100dvh); transform: translateY(var(--vvt, 0px));
    border-radius: 0; box-shadow: none; }
  .cv__head { padding-top: calc(6px + env(safe-area-inset-top)); }
  .cv__col { max-width: 78%; }
}
@media (prefers-reduced-motion: reduce) { .cv__row, .lb img, .sheet, .sheet__card { animation: none; } }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cv__tray[hidden] { display: none; }

:root { --bubble: #EFEFF1; }
[data-theme="dark"] { --bubble: #26262A; }

/* ─── Messages list, like Instagram (2026-11-10) ─────────────── */
.threads { display: grid; gap: 2px; margin: 0 -8px; padding: 0; list-style: none; }
.threads .thread { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px; border-radius: 18px;
  background: none; box-shadow: none; color: var(--ink); text-decoration: none; transition: background-color .2s ease; }
.threads .thread:hover, .threads .thread:active { background: rgb(127 127 127 / .09); }
.thread__name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.threads .thread__last { display: flex; gap: 4px; min-width: 0; color: var(--muted); font-size: 0.875rem; font-weight: 400; }
.thread__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread__ago { flex: none; }
.threads .thread.is-unread .thread__name { font-weight: 700; }
.threads .thread.is-unread .thread__last { color: var(--ink); font-weight: 600; }
.thread__dot { width: 10px; height: 10px; margin-right: 4px; border-radius: 50%; background: var(--accent); }

/* ─── Install the app / turn on notifications ───────────────── */
#setupSlot:empty { display: none; }
.setup { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px 6px 12px 12px;
  border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px rgb(127 127 127 / .12), 0 14px 40px -26px rgb(30 20 10 / .35); }
.setup__icon { width: 48px; height: 48px; border-radius: 12px; }
.setup__icon--bell { display: grid; place-items: center; background: rgb(242 139 48 / .16); color: var(--accent-ink); }
.setup__icon--bell svg { width: 26px; height: 26px; }
.setup__text { display: grid; gap: 2px; min-width: 0; }
.setup__text b { font-size: 1rem; line-height: 1.25; }
.setup__text small { color: var(--muted); font-size: 0.8125rem; line-height: 1.3; }
.setup__x { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; }
.setup__x svg { width: 16px; height: 16px; }
.setrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid rgb(127 127 127 / .14); }
#phoneBox h2 + .setrow { padding-top: 0; border-top: 0; }
.setrow .btn, .setrow .pill { flex: none; }

/* the step-by-step sheet (how to add BCS to the home screen) */
.sheet { position: fixed; inset: 0; z-index: 60; display: grid; align-items: end; justify-items: center; padding: 12px; background: rgb(0 0 0 / .42); animation: sheet-fade .2s ease both; }
.sheet__card { width: min(480px, 100%); display: grid; gap: 16px; padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 28px;
  background: var(--canvas); box-shadow: 0 30px 80px -20px rgb(0 0 0 / .5); animation: sheet-up .38s cubic-bezier(.2, .9, .3, 1.05) both; }
.sheet__steps { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.sheet__steps li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.45; }
.sheet__n { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #1D1D1F; font-size: 0.875rem; font-weight: 700; }
.sheet__ico { display: inline-block; width: 22px; height: 22px; vertical-align: -5px; color: #0A84FF; }
@keyframes sheet-up { from { opacity: 0; transform: translateY(40px); } }
@keyframes sheet-fade { from { opacity: 0; } }

/* ─── Photos & files exchanged (a grid, like a profile on Instagram) ─── */
#mediaBox h2 .muted { font-weight: 500; }
.media { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; border-radius: 18px; overflow: hidden; }
.media__tile { display: block; aspect-ratio: 1; padding: 0; border: 0; background: rgb(127 127 127 / .14); cursor: zoom-in; }
.media__tile img { width: 100%; height: 100%; object-fit: cover; }
.media__doc { display: flex; align-items: center; gap: 12px; }

/* BCS can remove a message: the button shows with the time (tap a message) */
.cv__del { display: none; align-self: center; flex: none; padding: 4px 10px; border: 0; border-radius: 999px; background: rgb(220 60 60 / .14); color: #d23c3c; font: inherit; font-size: 0.75rem; font-weight: 650; cursor: pointer; }
.cv__row.show-time .cv__del { display: inline-block; }

/* ─── Guided request (flow.js) ─────────────────────────────────── */
.flow { display: grid; gap: 16px; }
.flow h1 { margin: 4px 0 0; }
.flow h1:focus { outline: none; }
.flow__meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 0.875rem; color: var(--muted); }
.flow__meta a { color: inherit; text-decoration: none; font-weight: 600; padding: 6px 0; }
.flow__bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: -6px; }
.flow__bar span { height: 4px; border-radius: 2px; background: var(--hairline); transition: background-color .4s var(--ease); }
.flow__bar span.is-on { background: var(--accent); }
.opts { display: grid; gap: 10px; }
.opts--two { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.opt {
  display: block; width: 100%; min-height: 56px; padding: 14px 16px; text-align: left;
  border: 1px solid var(--hairline); border-radius: var(--r-small); background: var(--field); color: var(--ink);
  font: inherit; font-weight: 600; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease);
}
.opt small { display: block; margin-top: 2px; font-weight: 400; color: var(--muted); }
.opt:hover { border-color: var(--muted); }
.opt[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(242 139 48 / .25); }
.opt:active { transform: scale(.98); }
.opt--unsure { border-style: dashed; }
.qgroup { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.qgroup legend { padding: 0; margin-bottom: 10px; font-weight: 650; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 42px; padding: 8px 15px; border: 1px solid var(--hairline); border-radius: 999px;
  background: var(--field); color: var(--ink); font: inherit; font-size: 0.9375rem; cursor: pointer;
}
.chip[aria-pressed="true"] { border-color: var(--accent); background: rgb(242 139 48 / .16); }
.callout { margin: 0; padding: 12px 14px; border-radius: var(--r-small); background: rgb(242 139 48 / .1); box-shadow: inset 0 0 0 1px rgb(242 139 48 / .28); font-size: 0.9375rem; }
.callout ul { margin: 6px 0 0; padding-left: 1.2em; }
.callout--warn { border-left-color: var(--danger); }
.linkbtn { padding: 6px; border: 0; background: none; color: var(--muted); font: inherit; text-decoration: underline; cursor: pointer; }
.art { display: block; width: 100%; max-width: 360px; margin: 0 auto; color: var(--muted); }
.art .w-rear, .art .w-front, .art .w-middle, .art text { transition: stroke .2s, fill .2s; }
.art[data-pick="rear"] .w-rear, .art[data-pick="front"] .w-front, .art[data-pick="both"] .w-rear,
.art[data-pick="both"] .w-front, .art[data-pick="middle"] .w-middle { stroke: var(--accent); }
.art[data-pick="rear"] .t-rear, .art[data-pick="front"] .t-front, .art[data-pick="both"] .t-rear,
.art[data-pick="both"] .t-front, .art[data-pick="middle"] .t-middle { fill: var(--accent-ink); }
.art--tyre { max-width: 320px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumbs:empty { display: none; }
.thumbs figure { position: relative; margin: 0; }
.thumbs img { display: block; width: 76px; height: 76px; object-fit: cover; border-radius: 12px; }
.thumbs button {
  position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: var(--ink); color: var(--canvas); font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.review { display: grid; gap: 10px; }
.review h2 { margin: 0; font-size: 1.0625rem; }
.review__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.review__head a { font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .opt, .flow__bar span, .art * { transition: none; } .opt:active { transform: none; } }
.flow label .small { font-weight: 400; }
.qlabel { font-weight: 600; font-size: 0.9375rem; }
.pickbtn { display: inline-flex; justify-self: start; font-weight: 600; }
.pickbtn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
[data-theme="dark"] .pickbtn { background: rgb(255 255 255 / .1); }
.qgroup legend .small { font-weight: 400; }
/* iPhone zooms into any field under 16px and stays zoomed: keep every field at 16px */
input, select, textarea { font-size: 16px; }
/* Sprocket's bubble (guided request) */
.sprk { display: flex; align-items: flex-end; gap: 8px; }
.sprk__img { flex: none; width: 60px; height: auto; margin-bottom: -2px; }
.sprk__say {
  position: relative; margin-bottom: 10px; padding: 11px 14px; border-radius: 18px 18px 18px 6px;
  background: var(--parchment); color: var(--ink); font-size: 0.9375rem; line-height: 1.4;
  animation: sprk-pop .45s var(--ease) both;
}
.sprk__say::before { content: ""; position: absolute; left: -7px; bottom: 0; width: 14px; height: 14px; background: inherit; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
@keyframes sprk-pop { from { opacity: 0; transform: translateY(6px) scale(.97); } }
.opt--ico { display: flex; align-items: center; gap: 12px; }
.opt__ico { flex: none; width: 40px; height: 64px; color: var(--ink); }
.opt--ico[aria-pressed="true"] .opt__ico { color: var(--accent-ink); }
@media (prefers-reduced-motion: reduce) { .sprk__say { animation: none; } }
/* "Earlier messages" at the top of a long conversation */
.cv__more { display: flex; justify-content: center; padding: 8px 0 14px; }
.cv__more button { min-height: 36px; padding: 0 16px; border: 1px solid var(--hairline); border-radius: 999px; background: var(--field); color: var(--muted); font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; }

/* ─── Admin home (schema-v14.sql): to do, notifications, coming up ── */
.view:has(.dash2) { width: min(1080px, 100%); }
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hello h1 { margin-top: 2px; }
.ico { width: 18px; height: 18px; flex: none; vertical-align: -4px; margin-right: 6px; }
.hello__switch { display: inline-flex; align-items: center; }
.bar__nav a .ico { width: 16px; height: 16px; margin-right: 4px; }
.dash2 { display: grid; gap: 16px; }
.dash2 > * { min-width: 0; }
.dash2 h2 { font-size: 1.125rem; }
@media (min-width: 900px) {
  .dash2 { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); grid-template-areas: "todo notes" "agenda notes" "agenda month" "agenda tools"; align-items: start; }
  .dash2__todo { grid-area: todo; } .dash2__notes { grid-area: notes; } .dash2__agenda { grid-area: agenda; }
  .dash2__month { grid-area: month; } .dash2__tools { grid-area: tools; }
}

/* to do */
.todo { display: grid; gap: 12px; }
.todo__list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.todo__row { display: block; border-radius: var(--r-small); background: var(--parchment); color: var(--ink); text-decoration: none; }
a.todo__row, .todo__row > summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.todo__row > summary::-webkit-details-marker { display: none; }
.todo__n { display: grid; place-items: center; flex: none; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 12px; background: var(--accent); color: #1D1D1F; font-weight: 700; font-variant-numeric: tabular-nums; }
.todo__label { flex: 1; display: grid; gap: 1px; min-width: 0; }
.todo__chev { color: var(--muted); font-size: 1.25rem; transition: transform .3s var(--ease); }
details[open] > summary .todo__chev { transform: rotate(90deg); }
.todo__items { display: grid; gap: 2px; margin: 0; padding: 0 8px 10px 58px; list-style: none; }
.todo__items a { display: grid; gap: 1px; padding: 8px 6px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.todo__items a:hover { background: rgb(0 0 0 / .04); }
.todo__t { font-weight: 600; font-size: 0.9375rem; }
.todo__row .small a { margin-left: 64px; }
.todo__clear { display: flex; align-items: center; gap: 12px; }

/* notifications */
.notes { display: grid; gap: 8px; }
.notes__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.notes__head .badge { vertical-align: 2px; }
.notes__list { display: grid; margin: 0 -8px; padding: 0; list-style: none; }
.note { display: flex; align-items: flex-start; gap: 12px; padding: 10px 8px; border-radius: 14px; color: var(--ink); text-decoration: none; }
.note:hover { background: rgb(0 0 0 / .04); }
.note__icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 11px; background: var(--parchment); color: var(--muted); }
.note__icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.note__icon--accent, .note.is-new .note__icon { background: var(--accent); color: #1D1D1F; }
.note__icon--ok { background: #CDEFD3; color: #1F6B2E; }
.note__text { flex: 1; display: grid; gap: 1px; min-width: 0; }
.note__text b { font-weight: 600; font-size: 0.9375rem; }
.note:not(.is-new) .note__text b { font-weight: 500; color: var(--muted); }
.note__time { flex: none; color: var(--muted); font-size: 0.8125rem; padding-top: 2px; }
.note.is-new .note__time::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
.notes__more { justify-self: start; }

/* coming up */
.agenda { display: grid; gap: 6px; }
.agenda__day { margin-top: 10px; font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); }
.agenda__day.is-late { color: var(--danger); }
.agenda__list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.agenda__list a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-small); background: var(--parchment); color: var(--ink); text-decoration: none; }
.agenda__time { flex: none; min-width: 48px; font-weight: 700; font-variant-numeric: tabular-nums; }
.agenda__time .note__icon { width: 30px; height: 30px; }
.agenda__what { flex: 1; display: grid; gap: 1px; min-width: 0; }
.agenda__what b { font-weight: 600; font-size: 0.9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* month and tools */
.tiles--mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles--mini .tile { background: var(--parchment); box-shadow: none; padding: 12px 14px; }
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tool { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: var(--r); background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .9), 0 14px 40px -22px rgb(30 20 10 / .35); }
.tool > span:last-child { display: grid; gap: 1px; min-width: 0; }
.tool b { font-weight: 600; }

/* a request's appointment in the lists */
.item__appt { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 0.875rem; font-weight: 600; color: var(--accent-ink); }
.item__appt .note__icon { width: 24px; height: 24px; border-radius: 8px; }
.item__appt .note__icon svg { width: 14px; height: 14px; }

/* handouts */
.ho { gap: 10px; }
.ho__files { display: flex; flex-wrap: wrap; gap: 8px; }
.ho__file { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border: 0; border-radius: 14px; background: var(--parchment); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ho__file > span:last-child { display: grid; }
.ho__file.is-missing { cursor: default; opacity: .7; }
#hoSent { display: flex; align-items: center; gap: 8px; }
#hoSent .note__icon { width: 26px; height: 26px; }

[data-theme="dark"] .todo__row, [data-theme="dark"] .agenda__list a, [data-theme="dark"] .ho__file, [data-theme="dark"] .tiles--mini .tile { background: rgb(255 255 255 / .06); }
[data-theme="dark"] .note__icon { background: rgb(255 255 255 / .08); }
[data-theme="dark"] .note.is-new .note__icon, [data-theme="dark"] .note__icon--accent { background: var(--accent); color: #1D1D1F; }
[data-theme="dark"] .note:hover, [data-theme="dark"] .todo__items a:hover { background: rgb(255 255 255 / .05); }
[data-theme="dark"] .tool { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06), 0 14px 40px -22px rgb(0 0 0 / .8); }
.switch-fab { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30; display: inline-flex; align-items: center; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--canvas); font-size: 0.9375rem; font-weight: 600; text-decoration: none; box-shadow: 0 12px 30px -10px rgb(0 0 0 / .5); }
.chat-mode .switch-fab { display: none; }
[data-theme="dark"] .note__icon--ok { background: #CDEFD3; color: #1F6B2E; }

/* Materials (admin): the list, and "Send to a client" */
.mats { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mat { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; padding: 10px 12px; border-radius: var(--r-small); background: var(--parchment); }
.mat__text { flex: 1 1 160px; display: grid; gap: 1px; min-width: 0; }
.mat__text b { font-weight: 600; }
.mat__do { display: flex; gap: 8px; margin-left: auto; }
.mat.is-missing { opacity: .6; }
.chatlink > .note__icon { width: 44px; height: 44px; border-radius: 14px; }
.pick { max-height: min(640px, 88dvh); grid-template-rows: auto auto auto minmax(0, 1fr); }
.pick input[type="search"] { width: 100%; }
.pick__list { overflow-y: auto; gap: 6px; }
.pick__who { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: var(--r-small); background: var(--parchment); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pick__who > span:nth-child(2) { flex: 1; display: grid; min-width: 0; }
.pick__who .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick__go { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--accent); color: #1D1D1F; font-size: 0.875rem; font-weight: 650; }
.pick__who[disabled] { opacity: .6; }
[data-theme="dark"] .mat, [data-theme="dark"] .pick__who { background: rgb(255 255 255 / .06); }
@media (max-width: 560px) { .mat__do { width: 100%; } .mat__do .btn { flex: 1; } }
/* "Add PDFs" must look like a real button in dark mode, not a disabled one */
[data-theme="dark"] .pickbtn.btn--dark { background: var(--ink); color: var(--canvas); }
/* typing on a phone: the message field sits right on the keyboard (no home-bar gap) */
@media (pointer: coarse) { .cv__compose:focus-within { padding-bottom: 8px; } }

/* ─── Guided request: the bike drawings, "how it works", the size diagram ─── */
.opt__ico--wide { width: 84px; height: 52px; padding: 2px; }
.opt--ico:hover .opt__ico--wide { color: var(--accent-ink); }
.flow__bar span { position: relative; overflow: hidden; }
.flow__bar span i { position: absolute; inset: 0 auto 0 0; border-radius: 2px; background: var(--accent); transition: width .4s var(--ease); }
.howto { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.howto li { display: grid; justify-items: center; align-content: start; gap: 8px; padding: 12px 8px; border-radius: var(--r-small); background: var(--parchment); text-align: center; font-size: 0.8125rem; line-height: 1.35; }
.howto__ico { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--accent); color: #1D1D1F; }
.howto__ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.howto__ico b { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--canvas); font-size: 0.75rem; }
@media (max-width: 560px) {
  .howto { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .howto li { grid-template-columns: auto minmax(0, 1fr); justify-items: start; align-items: center; gap: 14px; padding: 10px 12px; text-align: left; font-size: 0.9375rem; }
}
.art--size { max-width: 340px; color: var(--ink); }
[data-theme="dark"] .howto li { background: rgb(255 255 255 / .06); }
input[type="datetime-local"] { min-height: 48px; }
.budget { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 6px; }
.budget__zone { display: grid; align-content: start; gap: 6px; font-size: 0.8125rem; line-height: 1.35; color: var(--muted); }
.budget__zone b { color: var(--ink); font-size: 0.875rem; }
.budget__bar { height: 10px; border-radius: 5px; background: var(--hairline); }
.budget__zone.is-best .budget__bar { background: var(--accent); }
.budget__zone:last-child .budget__bar { background: var(--accent-ink); opacity: .7; }
.budget__zone.is-best b { color: var(--accent-ink); }
@media (max-width: 420px) { .budget { grid-template-columns: minmax(0, 1fr); } .budget__zone { grid-template-columns: 56px minmax(0, 1fr); column-gap: 10px; } .budget__bar { grid-row: span 2; align-self: center; } }

/* ─── Personal shopper tools: Bike Check report, the 3 bikes ─── */
.rpt { display: grid; gap: 10px; }
.rpt__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-small); background: var(--canvas); }
.rpt__row input, .rpt__row textarea { grid-column: 1 / -1; }
.rpt__name { font-weight: 600; font-size: 0.9375rem; }
.seg3 { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.seg3 button { min-height: 36px; padding: 6px 12px; border: 0; border-radius: 999px; background: rgb(0 0 0 / .06); color: var(--ink); font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; }
.seg3 button[aria-pressed="true"].seg3__ok { background: #CDEFD3; color: #1F6B2E; }
.seg3 button[aria-pressed="true"].seg3__watch { background: #FFE2C7; color: #8A4A12; }
.seg3 button[aria-pressed="true"].seg3__bad { background: #F7D2CE; color: #A12A1F; }
.bikecard { display: grid; gap: 10px; margin: 0; padding: 14px; border: 0; border-radius: var(--r-small); background: var(--canvas); }
.bikecard legend { float: left; width: 100%; margin-bottom: 4px; font-weight: 700; }
.cv__text a { color: inherit; text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
[data-theme="dark"] .rpt__row, [data-theme="dark"] .bikecard { background: rgb(255 255 255 / .05); }
[data-theme="dark"] .seg3 button { background: rgb(255 255 255 / .08); }
@media (max-width: 560px) { .rpt__row { grid-template-columns: minmax(0, 1fr); } }

/* ─── Quotes ─── */
.qtable { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.qtable td { padding: 9px 0; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.qtable__split { display: block; margin-top: 2px; }
.qtable__sum { text-align: right; font-weight: 600; white-space: nowrap; padding-left: 12px; }
.qtable tfoot td { border-bottom: 0; padding-top: 12px; }
.qtable__total { font-size: 1.25rem; font-weight: 700; }
.quote--open { box-shadow: inset 0 0 0 2px var(--accent), 0 14px 40px -22px rgb(30 20 10 / .35); }
.qhist summary { cursor: pointer; color: var(--muted); }
.qhist ul { margin: 8px 0 0; padding-left: 1.2em; color: var(--muted); font-size: 0.875rem; display: grid; gap: 4px; }
.qlines { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.qline { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 76px) auto 32px; gap: 8px; align-items: end; padding: 10px; border-radius: var(--r-small); background: var(--canvas); }
.qline input, .qline textarea { width: 100%; }
.qline__n { display: grid; gap: 2px; font-size: 0.75rem; color: var(--muted); }
.qline__sum { padding-bottom: 12px; font-weight: 700; white-space: nowrap; }
.qline__rm { width: 32px; height: 40px; border: 0; border-radius: 10px; background: rgb(0 0 0 / .06); color: var(--ink); font-size: 1.25rem; cursor: pointer; }
.qtotal { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 6px; border-top: 1px solid var(--hairline); }
.qtotal b { font-size: 1.375rem; }
#qAdd { flex: 1; min-width: 0; }
.pl { gap: 10px; }
.pl.is-off { opacity: .55; }
.pl__name { font-weight: 600; }
.pl__nums { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.pl__nums label { display: grid; gap: 2px; width: 110px; font-size: 0.75rem; color: var(--muted); }
.pl__total { padding-bottom: 12px; font-weight: 700; }
.nwpick { display: grid; gap: 6px; max-height: 280px; overflow: auto; padding: 8px 0 0; }
.needs-you { box-shadow: inset 0 0 0 2px var(--accent), 0 14px 40px -22px rgb(30 20 10 / .35); }
.needs-you .todo__n { min-width: auto; padding: 0 10px; }
[data-theme="dark"] .qline { background: rgb(255 255 255 / .05); }
[data-theme="dark"] .qline__rm { background: rgb(255 255 255 / .08); }
@media (max-width: 640px) {
  .qline { grid-template-columns: repeat(3, minmax(0, 1fr)) 32px; }
  .qline__label { grid-column: 1 / -2; }
  .qline__sum { grid-column: 1 / -2; padding-bottom: 0; }
  .qline__rm { grid-column: -2 / -1; grid-row: 1; justify-self: end; }
}

#lgList, #plList, #bkList { margin-top: 16px; }

/* the job report (schema-v17) */
.rep .rep__h { margin-top: 6px; font-size: 1rem; font-weight: 650; letter-spacing: -0.01em; }
.rep .rep__list { margin: 0; padding-left: 1.2em; line-height: 1.5; }
.rep .rep__list li + li { margin-top: 2px; }
.rep .rep__p { white-space: pre-wrap; line-height: 1.5; }
label > .muted.small { font-weight: 400; margin-top: -4px; }

/* help (2026-11-13): topics as chips, the section reached from an error stands out */
.help__toc { display: flex; flex-wrap: wrap; gap: 8px; }
.help__toc a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; background: rgb(127 127 127 / .12); color: var(--ink); text-decoration: none; font-size: 0.9375rem; font-weight: 550; }
.help__sec { scroll-margin-top: 80px; }
.help__sec.is-target { box-shadow: inset 0 0 0 2px var(--accent), 0 14px 40px -22px rgb(30 20 10 / .35); }
.help__sec:focus { outline: none; }

/* mechanic profiles (schema-v18) */
.mech { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; align-items: start; }
.mech__face { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.mech__face--none { display: grid; place-items: center; background: rgb(242 139 48 / .18); color: var(--accent-ink); font-weight: 700; font-size: 1.375rem; }
.mech__text { display: grid; gap: 4px; min-width: 0; }
.mech__skills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.mech__skill { padding: 4px 10px; border-radius: 999px; background: rgb(127 127 127 / .14); font-size: 0.8125rem; font-weight: 550; }
.mech__bio { margin-top: 4px; white-space: pre-wrap; line-height: 1.5; }
.skillset { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 16px; }

/* real photos in the options (valves, 2026-11-13) */
.opt--ico .opt__photo { flex: none; width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }
.opt--ico[aria-pressed="true"] .opt__photo { box-shadow: 0 0 0 3px var(--accent); }
.opt__credit { margin-top: 8px; font-size: 0.75rem; }

/* fields that grow with the text and never leave the screen (2026-11-13, Sacha's test) */
textarea.one { min-height: 0; resize: none; overflow: hidden; line-height: 1.4; field-sizing: content; }
input, select, textarea { max-width: 100%; min-width: 0; }
/* iPhone draws date and time fields wider than their box: keep them inside it */
input[type="date"], input[type="time"], input[type="datetime-local"] {
  display: block; width: 100%; max-width: 100%; min-width: 0; -webkit-appearance: none; appearance: none; text-align: left;
}
input::-webkit-date-and-time-value { text-align: left; }
input::-webkit-datetime-edit { padding: 0; }
/* long words, links and numbers wrap instead of pushing the page sideways */
body { overflow-wrap: break-word; }
.card, .item, .mat__text, .todo__label, .item__title, .mech__text, .rep, .qgroup, label { min-width: 0; overflow-wrap: anywhere; }
.row > *, .item__top > *, .grid2 > * { min-width: 0; }

.opt--ico .opt__photo--wide { width: 96px; height: 64px; object-fit: cover; background: #fff; }
.credit { display: flex; gap: 12px; align-items: center; }
.credit img { flex: none; width: 72px; height: 48px; border-radius: 8px; object-fit: cover; background: #fff; }

/* sign-up in steps (2026-11-14) */
.signup { display: grid; gap: 16px; }
.signup .su { display: grid; gap: 14px; }
.signup .su[hidden] { display: none; }
.signup h1:focus { outline: none; }
.signup .flow__bar { display: flex; gap: 6px; }
.signup .flow__bar span { flex: 1; height: 4px; border-radius: 2px; background: rgb(127 127 127 / .25); }
.signup .flow__bar span.is-on { background: var(--accent); }
.signup #suSkip { justify-self: center; }

/* an element marked hidden stays hidden, whatever its display style (2026-11-14) */
[hidden] { display: none !important; }

/* "new version" and "offline" banners (2026-11-14) */
.appbanner { position: fixed; z-index: 70; left: 50%; top: calc(8px + env(safe-area-inset-top)); transform: translateX(-50%); width: min(560px, calc(100% - 24px));
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 16px; background: var(--ink); color: var(--canvas);
  font-size: 0.9375rem; font-weight: 550; box-shadow: 0 14px 40px -18px rgb(0 0 0 / .5); }
.appbanner span { flex: 1; min-width: 0; }
.appbanner .btn { flex: none; }

/* a new mechanic's application checklist (2026-11-14) */
.apply { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.apply__row { display: flex; align-items: center; gap: 10px; }
.apply__tick { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgb(127 127 127 / .4); font-size: 0.8125rem; font-weight: 700; }
.apply__row.is-done .apply__tick { border-color: var(--accent); background: var(--accent); color: #1D1D1F; }
.apply__tick svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* ─── Motion (2026-11-14, skill psychologie-client): short, eased, never in the way ───
   Screens: fade + 8px lift, 220ms. Steps: slide 16px in the direction you go, 220ms.
   Taps: 100–150ms. The one "peak" moment (request received): a check that draws itself.
   Reduced motion: fades only. */
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes step-fwd { from { opacity: 0; transform: translateX(16px); } }
@keyframes step-back { from { opacity: 0; transform: translateX(-16px); } }
@keyframes fade-in { from { opacity: 0; } }
.view--in { animation: view-in .22s var(--ease) both; }
.flow--fwd > :not(.flow__meta):not(.flow__bar), .su--fwd { animation: step-fwd .22s var(--ease) both; }
.flow--back > :not(.flow__meta):not(.flow__bar), .su--back { animation: step-back .22s var(--ease) both; }
.flow--in > :not(.flow__meta):not(.flow__bar), .su--in { animation: view-in .22s var(--ease) both; }
.flow__bar span, .flow__bar i, .signup .flow__bar span { transition: background-color .3s var(--ease), width .3s var(--ease); }
/* choices answer the finger at once */
.opt, .chip { transition: background-color .12s ease, border-color .12s ease, box-shadow .12s ease, transform .1s ease; }
.opt:active, .chip:active { transform: scale(.98); }
.btn { transition: transform .1s ease, background-color .15s ease, box-shadow .15s ease; }
/* request received: the check draws itself, then the three next steps appear one by one */
.sent { text-align: left; }
.drawcheck { width: 56px; height: 56px; fill: none; stroke: var(--accent); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.drawcheck circle { stroke-dasharray: 145; stroke-dashoffset: 145; animation: draw .5s .05s var(--ease) forwards; opacity: .35; }
.drawcheck path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .35s .4s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.sent__next { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; line-height: 1.45; }
.sent__next li { animation: view-in .3s var(--ease) both; }
.sent__next li:nth-child(1) { animation-delay: .55s; } .sent__next li:nth-child(2) { animation-delay: .65s; } .sent__next li:nth-child(3) { animation-delay: .75s; }
/* where my request is: received → mechanic found → in progress → done */
.tl { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tl__step { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 0.8125rem; color: var(--muted); }
.tl__step::before { content: ""; position: absolute; top: 7px; right: 50%; width: 100%; height: 2px; background: rgb(127 127 127 / .25); z-index: 0; }
.tl__step:first-child::before { display: none; }
.tl__step.is-done::before, .tl__step.is-now::before { background: var(--accent); }
.tl__dot { position: relative; z-index: 1; width: 16px; height: 16px; border-radius: 50%; background: var(--canvas); box-shadow: inset 0 0 0 2px rgb(127 127 127 / .45); }
.tl__step.is-done .tl__dot { background: var(--accent); box-shadow: none; }
.tl__step.is-now .tl__dot { background: var(--accent); box-shadow: 0 0 0 5px rgb(242 139 48 / .22); animation: pulse 2.4s ease-in-out infinite; }
.tl__step.is-now { color: var(--ink); font-weight: 650; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgb(242 139 48 / .08); } }
@media (prefers-reduced-motion: reduce) {
  .view--in, .flow--fwd > *, .flow--back > *, .flow--in > *, .su--fwd, .su--back, .su--in, .sent__next li { animation: fade-in .1s ease both; }
  .drawcheck circle, .drawcheck path { animation: none; stroke-dashoffset: 0; }
  .tl__step.is-now .tl__dot { animation: none; }
  .opt:active, .chip:active { transform: none; }
}

/* the status pill never gets cut: it keeps its size, the title wraps (2026-11-14) */
.item__top > .pill { flex: none; white-space: nowrap; }
.item__top > h1, .item__top > .item__title { min-width: 0; flex: 1 1 auto; }
.item__top > h2 { min-width: 0; }

/* ─── Reviews, before/after photos, the unfinished request (2026-11-14, skill psychologie-client) ─── */
.stars { display: inline-flex; gap: 2px; flex: none; }
.star svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linejoin: round; }
.star.is-on svg { fill: var(--accent); stroke: var(--accent); }
.rate__pick { display: flex; gap: 6px; }
.rate__star { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 14px; background: transparent; cursor: pointer;
  transition: transform .1s var(--ease), background-color .12s ease; -webkit-tap-highlight-color: transparent; }
.rate__star svg { width: 34px; height: 34px; fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linejoin: round; transition: fill .12s ease, stroke .12s ease; }
.rate__star.is-on svg { fill: var(--accent); stroke: var(--accent); }
.rate__star:active { transform: scale(.9); }
.rate__star:focus-visible { outline: 3px solid rgb(242 139 48 / .45); outline-offset: 1px; }
.rate__label { margin: 0; min-height: 1.4em; font-weight: 600; }
.rate__words { margin: 0; font-style: italic; white-space: pre-wrap; overflow-wrap: anywhere; }
.rate__sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.reviews { margin-top: 24px; }
.jobpics { display: grid; gap: 10px; }
.jobpics__h { margin: 0; }
.jobpics__row { display: grid; grid-template-columns: 56px 1fr; align-items: start; gap: 8px; }
.jobpics__row .jobpics__add { grid-column: 2; justify-self: start; }
.jobpics__k { padding-top: 6px; font-size: 0.8125rem; font-weight: 700; color: var(--muted); }
.jobpics__list { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.jobpic { position: relative; }
.jobpic img { display: block; width: 88px; height: 88px; object-fit: cover; border-radius: var(--r-small); background: var(--parchment); }
.jobpics--view .jobpic img { width: 96px; height: 96px; }
.jobpic__rm { position: absolute; top: -8px; right: -8px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%;
  background: var(--ink); color: var(--canvas); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.draftcard__text { display: grid; gap: 4px; min-width: 0; flex: 1 1 auto; }
.draftbar { display: block; height: 6px; margin-top: 4px; border-radius: 999px; background: rgb(127 127 127 / .2); overflow: hidden; }
.draftbar > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); animation: bar-grow .5s .1s var(--ease) both; transform-origin: left; }
@keyframes bar-grow { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .draftbar > span { animation: none; } .rate__star { transition: none; } }
