:root {
  --accent: #6E8CAE;
  --accent-dark: #4E6A88;
  --ink: #17251f;
  --muted: #6b7a72;
  --line: #e3eae6;
  --bg: #f6f8f7;
  --card: #ffffff;
  --danger: #b3261e;
  --hour-px: 56px; /* per hour in day view */
  --week-hour-px: 34px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink); background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--danger); font-size: 14px; }

/* ---------- shell / nav ---------- */
/* The shell sits BELOW the 56 px sticky topbar in flow, so its
   min-height is the viewport MINUS the topbar: at a plain 100dvh the
   document was always exactly 56 px taller than the screen, the
   window could scroll by that much, and focus/anchoring/restoration
   kept leaving the calendar shifted up by one topbar height with a
   gap under the card (the iPhone strip Dmytro reported; gate G8). */
#app-shell { min-height: calc(100vh - 56px); min-height: calc(100dvh - 56px); }
.nav-brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 16px; }
.nav-logo {
  width: 40px; height: 40px; border-radius: 10px; background: #fff;
  border: 1px solid var(--line); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.nav-logo img { display: block; width: 100%; height: 100%; }
.nav-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.nav-brand-text strong { font-size: 14px; }
.nav-brand-text span { font-size: 11px; color: var(--muted); }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border: 0; border-radius: 10px; background: transparent; font-size: 15px;
  color: var(--ink); cursor: pointer; text-align: left; width: 100%;
}
.nav-item:hover { background: var(--bg); }
.nav-item.active { background: #E2E8EF; color: var(--accent-dark); font-weight: 600; }
.nav-ic { display: inline-flex; align-items: center; justify-content: center; }
.nav-ic svg { width: 23px; height: 23px; display: block; }
.nav-foot { margin-top: auto; padding: 8px; font-size: 12px; color: var(--muted);
  display: flex; flex-direction: column; gap: 4px; }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer;
  font-size: 14px; padding: 0; text-align: left; }
#main { flex: 1; min-width: 0; padding: 22px 22px 90px; max-width: 1100px; margin: 0 auto; width: 100%; }
.page-head { margin-bottom: 16px; }
/* Long secondary screens keep their head — and with it the way back /
   the search — reachable: page heads stick under the topbar instead of
   scrolling away (clients list, reports, services, home). */
.view .page-head { position: sticky; top: 56px; z-index: 40; background: var(--bg); padding: 10px 0 8px; margin-bottom: 10px; }
.page-head h1 { margin: 0 0 4px; font-size: 24px; }
.page-head p { margin: 2px 0; }
.row-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }

/* ---------- cards & forms ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; margin-bottom: 14px;
}
.card h2 { margin: 0 0 12px; font-size: 16px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.card-grid .card { margin-bottom: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 9px 16px; font-size: 15px; cursor: pointer;
}
.chip.selected { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.option-list { display: flex; flex-direction: column; gap: 8px; }
.option {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border: 1px solid var(--line); background: #fff; border-radius: 12px;
  padding: 13px 14px; cursor: pointer; text-align: left; width: 100%; font-size: 15px;
}
.option .opt-meta { color: var(--muted); font-size: 13px; white-space: nowrap; }
.option .opt-dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; }
.option .opt-main { display: flex; align-items: center; gap: 10px; }
.option.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.option.static { cursor: default; }
/* Practitioner menu, Fresha language (v0-33d): a flat list — small
   monochrome icon + plain dark text, no cards, no chevrons; a
   hairline splits the view rows from the Actions section. */
.pm-list { display: flex; flex-direction: column; }
.pm-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: none; padding: 12px 2px; cursor: pointer;
  font-size: 15px; color: var(--ink); text-align: left;
}
.pm-row svg { width: 20px; height: 20px; flex: 0 0 20px; color: var(--muted); }
.pm-row:active { opacity: .6; }
.pm-sep { border-top: 1px solid var(--line); margin: 8px 0 2px; }
.pm-label { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 8px 0 2px; }
.date-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 10px; }
.date-cell {
  flex: 0 0 58px; border: 1px solid var(--line); background: #fff; border-radius: 12px;
  padding: 8px 0; text-align: center; cursor: pointer;
}
.date-cell .dow { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.date-cell .dom { font-size: 18px; font-weight: 600; }
.date-cell .mon { font-size: 11px; color: var(--muted); }
.date-cell.selected { background: var(--accent); border-color: var(--accent); color: #fff; }
.date-cell.selected .dow, .date-cell.selected .mon { color: #D8E3EE; }
.date-cell.closed { opacity: .55; cursor: pointer; }
.date-cell .dclosed { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.date-cell.selected .dclosed { color: #D8E3EE; }
.slot-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.slot-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 10px 14px; font-size: 15px; cursor: pointer; min-width: 84px;
}
.slot-btn .slot-pract { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.slot-btn.selected .slot-pract { color: #D8E3EE; }
.slot-btn.selected { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
form input, form textarea, form select, input[type="search"] {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  font-size: 16px; color: var(--ink); background: #fff; width: 100%;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.btn-primary {
  background: var(--accent); color: #fff; border: 0; border-radius: 12px;
  padding: 13px 18px; font-size: 16px; font-weight: 600; cursor: pointer; width: 100%;
}
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); }
.btn-secondary {
  background: #fff; color: var(--accent-dark); border: 1px solid var(--accent);
  border-radius: 12px; padding: 12px 18px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn-danger {
  background: #fff; color: var(--danger); border: 1px solid var(--danger);
  border-radius: 12px; padding: 12px 18px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.small-btn { width: auto; padding: 10px 14px; font-size: 14px; }
.summary-line { font-size: 14px; color: var(--accent-dark); min-height: 18px; }
.success { text-align: center; }
.success-mark {
  width: 56px; height: 56px; margin: 6px auto 10px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 30px;
  display: flex; align-items: center; justify-content: center;
}
#book-done-details { text-align: left; max-width: 420px; margin: 0 auto 16px; }
#book-done-details .row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
#book-done-details .row span:first-child { color: var(--muted); }

/* ---------- calendar ---------- */
.cal-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.seg-btn { border: 0; background: #fff; padding: 9px 16px; font-size: 14px; cursor: pointer; }
.seg-btn.active { background: var(--accent); color: #fff; font-weight: 600; }
.cal-nav { display: inline-flex; gap: 6px; align-items: center; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 20px; cursor: pointer; }
#cal-title { font-size: 16px; }
#cal-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; flex: 1 1 auto; min-height: 0; touch-action: none; overscroll-behavior: none; }
/* day-pager surface: no scroll chaining from the calendar view to the
   page (an unconsumed horizontal drag must stay the pager's, not turn
   into a browser/OS navigation gesture) */
#view-calendar { overscroll-behavior: none; }
/* The week bar is part of the pager surface, so it needs the same
   gesture protection as the grid: with the default touch-action the
   browser latches a horizontal drag after the first move and fires
   pointercancel, and the pager never engages (measured: pointerdown,
   one pointermove, pointercancel — no paging from the strip).
   v0-19: the whole surface is touch-action:none — the gesture
   coordinator owns every touch on the calendar (paging AND vertical
   scrolling, which it drives itself with momentum). With pan-y a
   swipe whose first pixels ran steep (a natural thumb arc) was
   latched by the browser as a scroll and cancelled before the pager
   could ever claim it — paging FORWARD died on Dmytro's iPhone while
   his flatter backward swipes survived. */
#cal-weekbar, #cal-weekbar button { touch-action: none; }
#cal-grid { position: relative; min-width: 340px; min-height: 100%; display: flex; flex-direction: column; }
/* pager neighbour page (same layout as the grid, no id-based rules) */
.cal-grid-x { position: relative; display: flex; flex-direction: column; }
/* day pager: current + neighbour pages ride one track under the finger */
.cal-track { display: flex; align-items: stretch; will-change: transform; }
.cal-track > * { flex: 0 0 auto; }
/* long-press lift: the block rises before it starts following the finger */
.appt.drag-lift { transform: scale(1.05); box-shadow: 0 14px 24px rgba(23,37,31,.30), inset 0 1px 0 rgba(255,255,255,.55), inset 0 0 0 1px rgba(255,255,255,.38); z-index: 7;
  transition: transform .12s ease, box-shadow .12s ease; }
/* practitioner filter: tappable heads (pills), selected state, All reset */
.cal-col-head.pract-head { cursor: pointer; }
.pract-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg); white-space: nowrap; }
.cal-col-head.sel .pract-pill { border-color: var(--accent); background: #E2E8EF; font-weight: 700; }
.cal-head .gutter { display: flex; align-items: center; justify-content: center; }
.team-head[data-pract-head] { cursor: pointer; }
.team-head.sel strong { color: var(--accent-dark); }
.all-pill { border: 1px solid var(--accent); background: var(--accent); color: #fff;
  border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 700; cursor: pointer; }
.tl-filter { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 13px; color: var(--muted); }
.cal-head { display: flex; position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid var(--line); }
.cal-head .gutter { flex: 0 0 52px; }
.cal-col-head { flex: 1; text-align: center; padding: 8px 2px; font-size: 13px; border-left: 1px solid var(--line); }
.cal-col-head .pdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.cal-body { display: flex; position: relative; flex: 1 0 auto; }
.cal-gutter { flex: 0 0 52px; position: relative; }
.cal-gutter .hour-label { position: absolute; right: 6px; transform: translateY(-50%); font-size: 11px; color: var(--muted); }
.cal-col { flex: 1; position: relative; border-left: 1px solid var(--line);
  /* Fresha grid (v0-32): the working area is WHITE; the lines are
     drawn, not filled — a 1px #DCE4EC line on the hour over a lighter
     #EEF2F6 line on every quarter hour. Gradients keep the lines going
     when the column is stretched past 21:00. */
  background-color: #fff;
  background-image:
    repeating-linear-gradient(to bottom, #DCE4EC 0, #DCE4EC 1px, transparent 1px, transparent var(--col-hour, 56px)),
    repeating-linear-gradient(to bottom, #EEF2F6 0, #EEF2F6 1px, transparent 1px, transparent calc(var(--col-hour, 56px) / 4)); }
.cal-col.off { background: repeating-linear-gradient(45deg, #fafafa, #fafafa 10px, #f3f5f4 10px, #f3f5f4 20px); }
.hour-line { position: absolute; left: 0; right: 0; border-top: 1px solid #DCE4EC; }
.work-band { position: absolute; left: 0; right: 0; background: transparent; border-top: 1px dashed #CFDCE8; border-bottom: 1px dashed #CFDCE8; }
.appt {
  position: absolute; left: 3px; right: 3px; border-radius: 8px; padding: 4px 6px;
  color: var(--ink); font-size: 12px; line-height: 1.25; overflow: hidden; cursor: grab;
  /* matte glass (v0-30): NO gradient on the face — one flat tint from
     paintApptBlock (app.js); the glass edges live here: soft drop shadow
     + 1px top edge + inset ring; stronger blur for the matte read */
  box-shadow: 0 4px 9px rgba(23,37,31,.18), inset 0 1px 0 rgba(255,255,255,.55), inset 0 0 0 1px rgba(255,255,255,.38);
  backdrop-filter: blur(3px) saturate(1.03); -webkit-backdrop-filter: blur(3px) saturate(1.03);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.appt .a-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt .a-meta { opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Pinch-zoom content tiers (2026-11-11, ClinicSense model): the font
   never scales; lines are shed by the block's own height instead —
   data-lines is stamped by apptBlock from the rendered height. */
.appt[data-lines="1"] .a-line2, .appt[data-lines="1"] .a-line3,
.appt[data-lines="2"] .a-line3 { display: none; }
.appt.cancelled { opacity: .45; text-decoration: line-through; cursor: pointer; }
/* v0-33d paid tile (Dmytro's final formula): the SAME muting as a
   cancelled tile (opacity .45, no shadow) but NO strike-through, and
   the word Paid rides on the tile. Bright = unpaid; muted + "✓ Paid"
   = paid; muted + struck = cancelled. The badge is absolute — it
   reserves no layout space. */
.appt.paid { opacity: .45; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.appt.paid .a-name { padding-right: 44px; }
.appt .a-paid { position: absolute; top: 3px; right: 5px; font-size: 10px; font-weight: 700; letter-spacing: .02em; pointer-events: none; }
/* v0-40: the blue word NEW before a new client's name on calendar
   tiles (day / 3-day / week and the Team track) — Dmytro's reference
   reads "NEW <Name>"; Ocean accent in both themes. */
.appt .a-new, .team-track .tt-appt .a-new { color: var(--accent); font-weight: 800; letter-spacing: .03em; }
.team-track .tt-appt.paid { opacity: .45; box-shadow: none; }
.team-track .tt-appt .tt-paid { font-size: 10px; font-weight: 700; }
.appt.drag-src { opacity: .35; }
.appt.drag-ghost {
  position: fixed; z-index: 200; pointer-events: none; cursor: grabbing;
  box-shadow: 0 14px 24px rgba(23,37,31,.30), inset 0 1px 0 rgba(255,255,255,.55), inset 0 0 0 1px rgba(255,255,255,.38); right: auto;
  /* dragged glass reads clearer than the resting tile: flatter alpha in
     paintApptBlock (drag) + a touch more blur here */
  backdrop-filter: blur(4px) saturate(1.03); -webkit-backdrop-filter: blur(4px) saturate(1.03);
}
.drop-hint { position: absolute; left: 3px; right: 3px; border-radius: 8px; border: 2px dashed var(--accent); background: rgba(110,140,174,.12); z-index: 3; pointer-events: none; }
.drop-hint.bad { border-color: var(--danger); background: rgba(179,38,30,.10); }
.now-line { position: absolute; left: 0; right: 0; border-top: 2px solid #0E7CC4; z-index: 4; pointer-events: none; }

/* ---------- instant tap feedback + skeletons (speed wave 2026-11-07) ----------
   ClinicSense-style light flash on pointerdown: the element lightens for
   ~180 ms in the same frame, before any data loads. Not a grey press. */
* { -webkit-tap-highlight-color: transparent; }
@keyframes tapflash {
  0% { filter: brightness(1.5); box-shadow: inset 0 0 0 999px rgba(255,255,255,.40); }
  100% { filter: brightness(1); box-shadow: inset 0 0 0 999px rgba(255,255,255,0); }
}
.tap-flash { animation: tapflash .18s ease-out; }
.skl-line { height: 14px; border-radius: 7px; margin: 12px 0;
  background: linear-gradient(90deg, rgba(31,42,51,.06), rgba(31,42,51,.14), rgba(31,42,51,.06));
  background-size: 200% 100%; animation: sklshimmer 1.1s linear infinite; }
.skl-line.w40 { width: 40%; } .skl-line.w60 { width: 60%; }
.skl-line.w70 { width: 70%; } .skl-line.w80 { width: 80%; }
.skl-card { height: 68px; border-radius: 14px;
  background: linear-gradient(90deg, rgba(31,42,51,.06), rgba(31,42,51,.14), rgba(31,42,51,.06));
  background-size: 200% 100%; animation: sklshimmer 1.1s linear infinite; }
@keyframes sklshimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- clients ---------- */
#client-search { margin-top: 10px; }
.client-list { display: flex; flex-direction: column; gap: 8px; }
.client-foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.client-foot #client-more { margin-left: auto; }
#client-sentinel { width: 1px; height: 1px; }
/* Client card sticky exit bar: back chevron + name + close, pinned
   under the topbar at any scroll depth of the long card. */
.cc-sticky { position: sticky; top: 56px; z-index: 45; display: flex; align-items: center; gap: 8px;
  background: var(--bg); padding: 6px 0; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.cc-sticky strong { flex: 1; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-sticky .icon-btn { flex: 0 0 38px; }
/* Sheet sticky close: the ✕ bar sticks inside the sheet's scroller. */
.sheet-topbar { position: sticky; top: -20px; z-index: 6; display: flex; justify-content: flex-end;
  margin: -20px -20px 2px; padding: 12px 12px 2px; background: #fff; border-radius: 18px 18px 0 0; }
.sheet-x { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font-size: 15px; cursor: pointer; line-height: 1; }
/* Home hub floating return pill: bottom-left, above the safe area;
   the bottom-right corner stays free for the calendar's grid FAB. */
.back-fab { position: fixed; left: 14px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 65;
  display: inline-flex; align-items: center; gap: 5px; padding: 10px 16px 10px 11px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 6px 20px rgba(16,28,22,.18); }
.back-fab svg { width: 19px; height: 19px; display: block; }
.back-fab.hidden { display: none; }
.client-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 14px; cursor: pointer; width: 100%; text-align: left; font-size: 15px;
}
.client-row .c-meta { color: var(--muted); font-size: 13px; text-align: right; white-space: nowrap; }
.hist-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.hist-row:last-child { border-bottom: 0; }
.hist-row .h-meta { color: var(--muted); font-size: 13px; text-align: right; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #E2E8EF; color: var(--accent-dark); font-weight: 600; }
.badge.cancelled { background: #f6e3e1; color: var(--danger); }
.badge.completed { background: #e8eef7; color: #2b4a77; }

/* ---------- overlays / sheets / toast ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(16, 28, 22, .45); z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  border-radius: 18px 18px 0 0; padding: 20px; animation: rise .18s ease-out;
}
@keyframes rise { from { transform: translateY(16px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet h2 { margin: 0 0 6px; font-size: 19px; }
.sheet .sheet-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.sheet .sheet-actions .btn-primary, .sheet .sheet-actions .btn-secondary, .sheet .sheet-actions .btn-danger { width: 100%; }
.pin-input { text-align: center; font-size: 22px !important; letter-spacing: 6px; margin-bottom: 12px; }
.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); z-index: 300;
  pointer-events: none; /* a notification must never swallow taps (found by the forms-wave smoke, 2026-11-09) */
  background: #17251f; color: #fff; padding: 11px 18px; border-radius: 999px;
  font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.25); max-width: 92vw; text-align: center;
}
.detail-rows .row { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.detail-rows .row span:first-child { color: var(--muted); }

/* ---------- phone layout ---------- */
@media (max-width: 760px) {
  #main { padding: 16px 12px 40px; }
  .form-grid { grid-template-columns: 1fr; }
  .sheet { border-radius: 18px 18px 0 0; }
  .stat-grid { gap: 6px; }
  .stat strong { font-size: 16px; }
}
@media (min-width: 761px) {
  .overlay { align-items: center; }
  .sheet { border-radius: 18px; }
}

/* ---------- wave 2026-11-07b: topbar, drawer, home, pick mode, views ---------- */
#topbar {
  position: sticky; top: 0; z-index: 60; height: 56px;
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-btn {
  width: 42px; height: 42px; border: 0; border-radius: 12px; background: transparent;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink);
  flex: 0 0 42px;
}
.topbar-btn:hover { background: var(--bg); }
.topbar-btn svg { width: 25px; height: 25px; display: block; }
.topbar-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.small-logo { width: 34px !important; height: 34px !important; border-radius: 9px !important; font-size: 13px; }
.topbar-title { display: flex; flex-direction: column; line-height: 1.12; min-width: 0; }
.topbar-title strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title span { font-size: 11px; color: var(--muted); }
.topbar-auth { margin-left: auto; font-size: 11px; color: var(--muted); border: 1px solid var(--line);
  padding: 4px 9px; border-radius: 999px; background: #fff; white-space: nowrap; }
.scrim { position: fixed; inset: 0; background: rgba(16, 28, 22, .45); z-index: 110; }
#drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 292px; max-width: 86vw; z-index: 120;
  background: var(--card); box-shadow: 8px 0 30px rgba(16,28,22,.18);
  transform: translateX(-105%); transition: transform .22s ease-out;
  display: flex; flex-direction: column; padding: 14px 12px calc(14px + env(safe-area-inset-bottom));
  overflow-y: auto;
}
#drawer.open { transform: none; }
.drawer-brand { display: flex; gap: 10px; align-items: center; padding: 2px 6px 14px; }
.drawer-x { margin-left: auto; }
.nav-chev { margin-left: auto; color: var(--muted); font-size: 18px; transition: transform .15s; }
.nav-chev.open { transform: rotate(90deg); }
.drawer-sub { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 6px 44px; align-items: flex-start; }
.sub-item {
  border: 0; background: transparent; text-align: left; cursor: pointer;
  font-size: 14px; color: var(--ink); padding: 8px 12px; border-radius: 999px;
}
.sub-item:hover { background: var(--bg); }
.sub-item.pill { background: var(--accent); color: #fff; font-weight: 600; }
.drawer-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.drawer-account-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 8px 6px; }

/* home hub */
.money-card {
  border-radius: 18px; padding: 20px; margin-bottom: 16px; color: #fff;
  background: linear-gradient(120deg, var(--accent) 0%, #64819F 55%, #AEC6D8 100%);
  box-shadow: 0 10px 26px rgba(110,140,174,.28);
}
.money-label { font-size: 13px; opacity: .85; text-transform: uppercase; letter-spacing: .05em; }
.money-big { font-size: 40px; font-weight: 800; margin: 4px 0 2px; }
.money-sub { font-size: 14px; opacity: .95; }
.money-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 13px; opacity: .95; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 14px;
  display: flex; flex-direction: column; gap: 12px; align-items: flex-start;
  font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left;
  min-height: 108px;
}
.tile:hover { border-color: var(--accent); }
.tile-ic { color: var(--accent-dark); display: inline-flex; }
.tile-ic svg { width: 28px; height: 28px; display: block; }

/* calendar extras */
.seg-scroll { overflow-x: auto; max-width: 100%; }
.seg-btn { white-space: nowrap; }
#cal-grid.wide { min-width: 880px; }
.cal-col-head .ch-sub { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-col-head .ch-day { display: block; font-weight: 700; }
.shade {
  position: absolute; left: 0; right: 0; pointer-events: none;
  background: repeating-linear-gradient(45deg, rgba(240,243,241,.65), rgba(240,243,241,.65) 8px, rgba(232,237,234,.65) 8px, rgba(232,237,234,.65) 16px);
}
.appt.no_show { opacity: .6; }
.appt.src-highlight { outline: 3px solid var(--accent-dark); outline-offset: 1px; box-shadow: 0 0 0 5px rgba(110,140,174,.25); z-index: 3; }
.press-plaque {
  position: absolute; left: 3px; right: 3px; z-index: 6; pointer-events: none;
  border-radius: 8px; border: 2px solid var(--accent); background: rgba(110,140,174,.25);
}
.press-time {
  position: fixed; z-index: 210; pointer-events: none; transform: translate(-110%, -50%);
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 700;
  padding: 5px 9px; border-radius: 8px; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
#pickbar {
  display: flex; align-items: center; gap: 10px; border-radius: 12px;
  background: var(--accent); color: #fff; padding: 11px 14px; margin-bottom: 12px;
  box-shadow: 0 6px 18px rgba(110,140,174,.3);
}
.pickbar-text { display: flex; flex-direction: column; line-height: 1.2; }
.pickbar-text strong { font-size: 15px; }
.pickbar-text span { font-size: 12px; opacity: .9; }
.pickbar-x { margin-left: auto; width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: rgba(255,255,255,.16); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; }
.pickbar-x svg { width: 20px; height: 20px; display: block; }
body.picking #cal-scroll { outline: 2px solid var(--accent); outline-offset: 2px; }
.fab {
  position: fixed; right: 18px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 70;
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(110,140,174,.4);
}
.fab svg { width: 26px; height: 26px; display: block; }
.fab:hover { background: var(--accent-dark); }

/* clean calendar top (2026-11-07c): on the calendar screen the topbar is
   only the hamburger + the date menu (month dropdown, today jump) */
#topbar.cal-top .topbar-brand, #topbar.cal-top .topbar-auth { display: none; }
#topbar-cal { display: flex; align-items: center; gap: 8px; min-width: 0; }
#cal-month-btn { border: 0; background: transparent; font: inherit; font-size: 17px; font-weight: 600;
  color: var(--ink); cursor: pointer; max-width: 58vw; padding: 6px 2px;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
#cal-month-btn::after { content: ""; width: 8px; height: 8px; flex: 0 0 auto;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px); }

/* full-height calendar (2026-11-07f): the time grid runs to the very
   bottom of the viewport — no empty strip under it; the sections FAB
   and toasts keep floating over the grid. */
#main.on-calendar { padding-bottom: 0; }
/* Desktop calendar runs edge to edge (Dmytro, 2026-11-08): the generic
   1100px content cap left 170–314px of dead space on each side of the
   grid and squeezed the day columns; on the calendar the cap is off
   and only a minimal technical margin remains. Other views keep it. */
#main.on-calendar { max-width: none; padding-left: 10px; padding-right: 10px; }
#cal-scroll { user-select: none; -webkit-user-select: none; }
#view-calendar { display: flex; flex-direction: column;
  height: calc(100vh - 78px); height: calc(100dvh - 78px); }
@media (max-width: 760px) {
  #view-calendar { height: calc(100vh - 72px); height: calc(100dvh - 72px); }
}

/* Fresha-style date picker sheet (2026-11-07f): quick-jump chips, then
   vertically scrolling month sections with a day grid. */
.dp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 6px; }
.dp-chip { border: 1px solid var(--line); background: var(--bg); border-radius: 999px;
  padding: 9px 14px; font: inherit; font-size: 14px; cursor: pointer; color: var(--ink); }
.dp-chip:active { background: #E2E8EF; }
.dp-months { position: relative; max-height: 56vh; overflow-y: auto; }
.dp-month h3 { margin: 16px 0 8px; font-size: 15px; }
.dp-week, .dp-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dp-week span { text-align: center; font-size: 11px; color: var(--muted); padding: 2px 0; }
.dp-day { border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink);
  aspect-ratio: 1; border-radius: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; }
.dp-day.today { box-shadow: inset 0 0 0 1.6px var(--accent); }
.dp-day.sel { background: var(--accent); color: #fff; font-weight: 700; box-shadow: none; }
#cal-today-btn { width: 34px; height: 34px; flex: 0 0 34px; border: 1.6px solid var(--ink); border-radius: 9px;
  background: #fff; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink); }
#cal-weekbar { display: flex; align-items: center; gap: 2px; margin-bottom: 10px; }
/* Date-strip viewport (2026-11-11): the strip drags pixel-wise under
   the finger. The inner row holds 11 cells — 2 hidden on each side
   feed the slide; it rests translated by exactly 2 cells so the
   visible 7 align with the old space-between layout. touch-action
   none: the strip drag handler owns the gesture. */
#cal-stripview { flex: 1; overflow: hidden; touch-action: none; border-radius: 10px; }
/* The row is exactly 11/7 of the viewport wide (v0-32, part F): each of
   the 11 cells is then precisely viewport/7 — the width stripCellW()
   computes — so every rest transform (-2 cells) and every drag step
   lands on whole-date boundaries at ANY screen width. Before this the
   row took the viewport's own width, the 11 cells shared it (121.8px
   on a desktop where the code assumed 191.4px), shifts landed
   mid-cell, dates hung half-cut at the edges and a 383px gap trailed
   the last date on wide screens. min-width: 0 on the cells for the
   same reason (a 40px floor broke the equality on narrow phones). */
#cal-weekstrip { display: flex; flex: none; width: calc(1100% / 7); justify-content: flex-start; will-change: transform; }
.ws-cell { display: flex; flex-direction: column; align-items: center; gap: 1px; border: 0; background: transparent;
  cursor: pointer; padding: 4px 0; min-width: 0; color: var(--muted); font: inherit; flex: 1 0 0; }
.ws-cell span { font-size: 11px; }
.ws-cell strong { font-size: 16px; color: var(--ink); width: 34px; height: 34px; display: flex;
  align-items: center; justify-content: center; border-radius: 50%; }
.ws-cell.today strong { box-shadow: inset 0 0 0 1.6px var(--accent); }
.ws-cell.active strong { background: var(--accent); color: #fff; box-shadow: none; }

/* timeline + team views */
.tl-list { padding: 6px 0; }
.tl-empty { padding: 26px 16px; text-align: center; color: var(--muted); }
.tl-row { display: flex; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; align-items: stretch; }
.tl-row:last-child { border-bottom: 0; }
.tl-time { flex: 0 0 86px; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; }
.tl-time strong { color: var(--ink); font-size: 14px; }
.tl-bar { flex: 0 0 5px; border-radius: 3px; }
.tl-main { flex: 1; min-width: 0; }
.tl-main .tl-name { font-weight: 700; }
.tl-main .tl-meta { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-wrap { padding: 8px 0; }
.team-row { border-bottom: 1px solid var(--line); padding: 10px 12px 14px; }
.team-row:last-child { border-bottom: 0; }
.team-head { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 8px; }
.team-head .pdot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.team-head .team-win { margin-left: auto; font-size: 12px; color: var(--muted); }
.team-track { position: relative; height: 62px; border-radius: 10px; background: #fbfcfb; border: 1px solid #eef2f0; overflow: hidden; }
.team-track .tt-shade { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, rgba(240,243,241,.85), rgba(240,243,241,.85) 8px, rgba(233,238,235,.85) 8px, rgba(233,238,235,.85) 16px); }
.team-track .tt-appt { position: absolute; top: 5px; bottom: 5px; border-radius: 7px; color: var(--ink); font-size: 11px; padding: 3px 5px; overflow: hidden; cursor: pointer; line-height: 1.2; z-index: 2;
  box-shadow: 0 4px 9px rgba(23,37,31,.18), inset 0 1px 0 rgba(255,255,255,.55), inset 0 0 0 1px rgba(255,255,255,.38);
  backdrop-filter: blur(3px) saturate(1.03); -webkit-backdrop-filter: blur(3px) saturate(1.03); }
.team-track .tt-appt .a-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-track .tt-appt.cancelled { opacity: .45; text-decoration: line-through; }
.team-track .tt-now { position: absolute; top: 0; bottom: 0; border-left: 2px solid #0E7CC4; z-index: 3; }

/* badges */
.badge.no_show { background: #f6e8d8; color: #8a5a13; }
.badge.first { background: var(--accent); color: #fff; }
.badge.new { background: var(--accent); color: #fff; }
.badge.due { background: #f6e8d8; color: #8a5a13; }
.badge.paid { background: #E2E8EF; color: var(--accent-dark); }
.badge.void { background: #eef2f0; color: var(--muted); }
.badge.draft { background: #fdf3d7; color: #8a6d13; }

/* client card (Fresha layout) */
.c-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: #E2E8EF; color: var(--accent-dark);
  font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px;
}
.cc-head {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 20px 16px 8px; text-align: center; margin: 10px 0 12px;
}
.cc-avatar {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 8px;
  background: #E2E8EF; color: var(--accent-dark); font-size: 30px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.cc-head h1 { margin: 0; font-size: 22px; }
.cc-head p { margin: 2px 0 0; }
.cc-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; margin: 10px 0 4px; }
.tag-chip { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: #eef2f0; color: var(--ink); font-weight: 600; }
.tag-add { border: 1px dashed var(--line); background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--accent-dark); cursor: pointer; }
.cc-booknow { margin: 12px 0 6px; }
.cc-info { text-align: left; margin-top: 10px; }
.cc-info-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; border-top: 1px solid var(--line); font-size: 14px; }
.cc-info-row span { color: var(--muted); }
.menu-list { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 12px; }
.menu-row {
  display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: #fff;
  padding: 15px 16px; font-size: 15px; color: var(--ink); cursor: pointer; text-align: left;
  border-bottom: 1px solid var(--line);
}
.menu-row:last-child { border-bottom: 0; }
.menu-row .chev { margin-left: auto; color: var(--muted); font-size: 18px; }
.menu-row.active { color: var(--accent-dark); font-weight: 700; }
.menu-row.sub { padding-left: 32px; font-size: 14px; }
.menu-badge { font-size: 11px; background: #eef2f0; border-radius: 999px; padding: 2px 8px; color: var(--muted); font-weight: 700; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.stat strong { display: block; font-size: 19px; }
.stat span { font-size: 11px; color: var(--muted); }

/* appointment card (sheet) */
.appt-client-row {
  display: flex; align-items: center; gap: 11px; width: 100%; border: 1px solid var(--line);
  background: #fff; border-radius: 12px; padding: 11px 12px; cursor: pointer; text-align: left; margin: 10px 0;
}
.appt-client-row .acr-name { font-weight: 700; font-size: 15px; }
.appt-client-row .acr-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.appt-client-row .chev { margin-left: auto; color: var(--muted); font-size: 18px; }
.count-row {
  display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-bottom: 1px solid var(--line);
  background: #fff; padding: 13px 2px; font-size: 15px; cursor: pointer; text-align: left; color: var(--ink);
}
.count-row .cr-sub { display: block; font-size: 12px; color: var(--muted); }
.count-row .chev { margin-left: auto; color: var(--muted); font-size: 18px; }
.count-row .cr-ic { color: var(--accent-dark); display: inline-flex; }
.count-row .cr-ic svg { width: 21px; height: 21px; display: block; }
.mini-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.mini-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; cursor: pointer; text-align: left; width: 100%;
}
.mini-card .mc-title { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.mini-card .mc-title svg { width: 19px; height: 19px; color: var(--accent-dark); }
.mini-card .mc-sub { font-size: 13px; color: var(--muted); display: block; margin-bottom: 6px; }
.sheet-sec-title { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 0 4px; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.action-grid .btn-primary, .action-grid .btn-secondary, .action-grid .btn-danger { width: 100%; padding: 12px 10px; font-size: 14px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.file-row:last-child { border-bottom: 0; }
.file-row .f-meta { color: var(--muted); font-size: 12px; display: block; }
.file-row .f-actions { margin-left: auto; display: flex; gap: 6px; flex: 0 0 auto; }
.mini-btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; color: var(--accent-dark); font-weight: 600; }
.mini-btn.danger { color: var(--danger); }
.sheet label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.sheet input, .sheet textarea, .sheet select {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  font-size: 16px; color: var(--ink); background: #fff; width: 100%;
}
.picker-search { position: sticky; top: -20px; background: #fff; padding: 16px 0 8px; margin-top: -16px; z-index: 2; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rep-table td, .rep-table th { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.rep-table td:last-child, .rep-table th:last-child { text-align: right; }

/* ---------- invoice screen + add payment (2026-11-07 wave) ---------- */
.badge.partial { background: #fdf3d7; color: #8a6d13; }
.inv-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
  position: sticky; top: 56px; z-index: 40; background: var(--bg); padding: 8px 0 6px; }
.inv-head h1 { font-size: 20px; margin: 0; flex: 1; }
.inv-head-btns { display: flex; gap: 6px; }
.inv-mail { background: none; border: 1px solid var(--line); border-radius: 10px; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--accent-dark); }
.inv-mail svg { width: 20px; height: 20px; }
/* v0-38c: instant feedback while the invoice PDF generates */
.inv-mail.busy { opacity: .45; pointer-events: none; }
.inv-big { font-size: 34px; font-weight: 700; margin-top: 10px; }
.inv-status { margin: 6px 0 4px; }
.inv-status .badge { font-size: 12px; padding: 4px 10px; }
.inv-to { margin: 4px 0 0; }
.inv-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.inv-item-main { display: flex; flex-direction: column; gap: 2px; }
.inv-addrow { display: flex; gap: 8px; margin: 12px 0 4px; flex-wrap: wrap; }
/* v0-39: manual discount — applied state reads as a chip, settled
   invoices get an honest disabled button, sheet errors in red. */
#inv-discount-btn.disc-on { border-color: var(--accent); color: var(--accent-dark); font-weight: 700; }
#inv-discount-btn:disabled { opacity: .45; cursor: default; }
.disc-err { color: #C0392B !important; }
.inv-due-row { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.sig-box { display: flex; flex-direction: column; gap: 2px; border: 1px dashed var(--line); border-radius: 12px; padding: 12px 14px; }
.sig-script { font-family: "Snell Roundhand", "Segoe Script", cursive; font-size: 24px; }
.inv-sticky { position: sticky; bottom: 0; background: var(--bg, #f7faf8); padding: 12px 0 calc(10px + env(safe-area-inset-bottom)); margin-top: 18px; }
.inv-sticky .btn-primary { width: 100%; }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.pay-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px 13px; border: 1.5px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.65); cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink); text-align: center; }
.pay-tile svg { width: 30px; height: 30px; color: var(--accent-dark); }
.pay-tile.sel { border-color: var(--accent); background: #E2E8EF; box-shadow: 0 0 0 2px rgba(110, 140, 174, 0.18); }

/* ---- boot skeleton + back navigation + practitioner cards (2026-11-07) ---- */
#boot-skel { padding: 14px 16px; }
#cal-skel { padding: 6px 2px; }
.skel-strip { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.skel-strip .skl-line { margin: 6px 0; }
.skel-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.skel-col { display: flex; flex-direction: column; }
.skl-line.w20 { width: 20%; }
.skl-card { height: 64px; border-radius: 12px; margin: 6px 0;
  background: linear-gradient(100deg, rgba(20, 40, 35, 0.06) 40%, rgba(20, 40, 35, 0.12) 50%, rgba(20, 40, 35, 0.06) 60%);
  background-size: 200% 100%; animation: skl-shimmer 1.2s infinite; }
#topbar-back { margin-right: 2px; }
.pract-row { cursor: pointer; align-items: center; }
.pract-ava { display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; overflow: hidden;
  background: #E2E8EF; color: var(--accent-dark); font-weight: 700; font-size: 14px; }
.pract-ava.big { width: 64px; height: 64px; font-size: 20px; }
.pract-ava img { width: 100%; height: 100%; object-fit: cover; }
.pract-photo-row { display: flex; align-items: center; gap: 14px; margin: 6px 0 12px; }
.pract-photo-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.pract-hint { margin: -6px 0 8px; }
.card-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 14px; }
.ctab { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.65);
  border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink); }
.ctab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.sig-preview { display: flex; align-items: center; justify-content: center; min-height: 74px;
  border: 1px dashed var(--line); border-radius: 12px; padding: 10px;
  background: repeating-conic-gradient(#f4f6f5 0% 25%, #ffffff 0% 50%) 0 0 / 18px 18px; }
.sig-img { max-width: 240px; max-height: 84px; object-fit: contain; }
.sig-box .sig-img { align-self: flex-start; }
/* v0-38: the pad reads as a paper slip — dashed frame, near-white in
   both themes so the dark ink stays legible at night too. */
#sig-pad { width: 100%; height: 220px; border: 1.5px dashed #9DB8CF; border-radius: 12px;
  background: #FBFDFE; touch-action: none; cursor: crosshair; }
.sigp-under { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.sigp-under .muted { margin-left: 2px; }
/* v0-38: iOS-style toggle (Email Invoice dialog) — a real checkbox
   under a pill track; the accent flips day/night with the theme var. */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  font-weight: 600; padding: 10px 0; cursor: pointer; }
.toggle { position: relative; flex: 0 0 auto; width: 48px; height: 28px; }
.toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.toggle-track { position: absolute; inset: 0; border-radius: 999px; background: #C9D9E8;
  transition: background .18s ease; pointer-events: none; }
.toggle-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(14, 42, 71, .35);
  transition: transform .18s ease; }
.toggle input:checked + .toggle-track { background: var(--accent); }
.toggle input:checked + .toggle-track::after { transform: translateX(20px); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  font-weight: 600; padding: 8px 0; }
.switch-row input { width: 22px; height: 22px; accent-color: var(--accent); }

/* ---------- intake forms (wave 2026-11-09: full content + e-signature) ---------- */
.frm-list { padding: 6px 16px; }
.frm-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 0; border-bottom: 1px solid var(--line); background: #fff;
  padding: 15px 2px; font-size: 15px; color: var(--ink); cursor: pointer; text-align: left;
}
.frm-row:last-child { border-bottom: 0; }
.frm-row-title { font-weight: 600; }
.frm-row-meta { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.frm-row .chev { color: var(--muted); font-size: 18px; }
.frm-back { margin-bottom: 10px; font-size: 15px; }
.frm-field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.frm-label { font-size: 13px; color: var(--muted); }
#frm-form input[type="text"], #frm-form input[type="email"], #frm-form input[type="tel"],
#frm-form input[type="date"], #frm-form textarea, #frm-form select {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  font-size: 16px; color: var(--ink); background: #fff; width: 100%;
}
.frm-note {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 14px; font-size: 14px; line-height: 1.5; color: var(--ink);
}
.frm-note p { margin: 0 0 10px; }
.frm-note p:last-child { margin-bottom: 0; }
.frm-choice-group { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 2px; }
.frm-check {
  display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 9px;
  font-size: 15px !important; color: var(--ink) !important; margin-bottom: 10px; cursor: pointer;
}
.frm-check input[type="checkbox"], .frm-check input[type="radio"] {
  width: 20px !important; height: 20px; flex: 0 0 20px; margin: 1px 0 0;
  accent-color: var(--accent);
}
.frm-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 2px; }
.frm-chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 9px 14px; font-size: 14px; cursor: pointer; color: var(--ink);
}
.frm-chip.selected { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.frm-sig { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.frm-sig .frm-check { margin-bottom: 0; }
.frm-sig-text {
  font-family: "Snell Roundhand", "Segoe Script", cursive;
  font-size: 28px; color: var(--ink); min-height: 58px;
}
.frm-sig-script { font-family: "Snell Roundhand", "Segoe Script", cursive; font-size: 28px; }
.frm-signed-line { font-size: 15px; }
.frm-link-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: 14px;
}
.frm-link-url { word-break: break-all; color: var(--muted); }
.frm-bookdone { margin: 14px auto 4px; max-width: 420px; }
.frm-bookdone p { margin: 0 0 10px; }
.frm-bookdone a.btn-secondary { display: inline-block; text-decoration: none; width: 100%; }
#frm-error { margin-top: 10px; }

/* Settings -> Forms builder (v0-31) */
.formset-row { align-items: flex-start; gap: 10px; }
.formset-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.formset-ctl .frm-check { margin: 0; font-size: 13px; }
.formset-field { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.formset-frow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.formset-frow input[type="text"] { flex: 1 1 140px; }
.formset-frow select { flex: 0 1 auto; }
.formset-fbtns { margin-left: auto; display: flex; gap: 6px; }
.formset-sub { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.formset-sub textarea { width: 100%; margin-top: 4px; }

/* ================= wave v0-32: availability, services, client card ======== */
/* Blocked time inside a day column: a hatched closed zone, never an
   appointment (no drag affordances, its own sheet on tap). */
.cal-block { position: absolute; left: 3px; right: 3px; border-radius: 8px; padding: 3px 6px;
  font-size: 11px; line-height: 1.3; color: #5a6a61; overflow: hidden; cursor: pointer; z-index: 1;
  background: repeating-linear-gradient(45deg, rgba(226,232,236,.92), rgba(226,232,236,.92) 7px, rgba(214,222,228,.92) 7px, rgba(214,222,228,.92) 14px);
  box-shadow: inset 0 0 0 1px rgba(148,164,175,.45); }
.cal-block .cal-block-t { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 10px; }
.cal-block .cal-block-l { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-off-label { position: absolute; top: 38%; left: 0; right: 0; text-align: center;
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #93a29a; pointer-events: none; }
.team-track .tt-block { position: absolute; top: 5px; bottom: 5px; border-radius: 7px; z-index: 1; cursor: pointer;
  background: repeating-linear-gradient(45deg, rgba(226,232,236,.92), rgba(226,232,236,.92) 7px, rgba(214,222,228,.92) 7px, rgba(214,222,228,.92) 14px);
  box-shadow: inset 0 0 0 1px rgba(148,164,175,.45); }
.sheet-subhead { margin: 18px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted); }
.check-row, .radio-row { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 4px 0; }
.check-row input, .radio-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.hrs-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.hrs-row .hrs-day { flex: 0 0 92px; font-weight: 600; font-size: 14px; }
.hrs-row input[type="time"] { flex: 1; min-width: 0; }
.hrs-row .check-row { padding: 0; }
/* Service colour swatches (part E) */
.swatches { display: flex; flex-wrap: wrap; gap: 9px; margin: 6px 0 12px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(23,37,31,.12);
  cursor: pointer; padding: 0; }
.swatch.sel { border-color: var(--ink); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.svc-preview { margin: 4px 0 14px; }
.svc-sample { position: relative; border-radius: 10px; padding: 8px 10px; font-size: 12px;
  line-height: 1.3; color: var(--ink); max-width: 280px; }
.svc-sample .a-name { font-weight: 700; }
/* Client card, ClinicSense layout (part G) */
.cc-head { position: relative; }
.cc-edit-btn { position: absolute; top: 2px; right: 2px; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--accent-dark); cursor: pointer;
  display: flex; align-items: center; justify-content: center; }
.cc-edit-btn svg { width: 17px; height: 17px; }
.cc-quick { display: flex; justify-content: center; gap: 16px; margin: 14px 0 4px; }
.cc-qbtn { width: 46px; height: 46px; border-radius: 50%; border: 1.6px solid var(--line);
  background: #fff; color: var(--accent-dark); display: flex; align-items: center; justify-content: center; }
.cc-qbtn svg { width: 20px; height: 20px; }
.cc-qbtn:active { background: #eef3f6; }
.cc-remind, .cc-since-line { text-align: center; margin: 6px 0 0; }
.cc-sec-title { margin: 20px 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); }
.cc-appt-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cc-appt-card { border-radius: 14px; padding: 12px; min-height: 92px; cursor: pointer;
  display: flex; flex-direction: column; gap: 3px; font-size: 13px; line-height: 1.35; color: var(--ink);
  box-shadow: 0 4px 9px rgba(23,37,31,.14), inset 0 1px 0 rgba(255,255,255,.55), inset 0 0 0 1px rgba(255,255,255,.38); }
.cc-appt-card .cc-appt-k { font-size: 10px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; opacity: .75; }
.cc-appt-card strong { font-size: 14px; }
.cc-appt-card.empty { background: #F2F5F3; color: var(--muted); cursor: default; box-shadow: none;
  align-items: flex-start; justify-content: center; }
.cc-wide { width: 100%; margin-top: 10px; }
.ccp-back { margin-bottom: 8px; }
/* Appointments & Notes timeline (part G, clarification 2) */
.tl-month { background: var(--accent); color: #fff; font-weight: 700; font-size: 14px;
  padding: 7px 12px; border-radius: 9px; margin: 16px 0 10px; }
.tl-row2 { display: flex; gap: 10px; margin-bottom: 8px; }
.tl-rail { flex: 0 0 42px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 4px; }
.tl-dow { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.tl-daynum { font-size: 15px; font-weight: 700; width: 30px; height: 30px; display: flex;
  align-items: center; justify-content: center; border-radius: 50%; }
.tl-daynum.today { background: var(--accent); color: #fff; }
.tl-card { flex: 1; min-width: 0; border-radius: 12px; padding: 10px 12px; display: flex;
  align-items: center; gap: 10px; cursor: pointer; font-size: 13px; line-height: 1.35; color: var(--ink);
  box-shadow: 0 3px 8px rgba(23,37,31,.13), inset 0 1px 0 rgba(255,255,255,.55), inset 0 0 0 1px rgba(255,255,255,.38); }
.tl-card .tl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tl-card .tl-main span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-card.cancelled { opacity: .5; box-shadow: none; }
.tl-card.tl-today { background: #EDF0F2; color: var(--muted); cursor: default; box-shadow: none; font-weight: 600; }
.tl-card.tl-note { background: #F7F9FA; box-shadow: none; border: 1px solid var(--line); }
.tl-chip { flex: none; font-size: 10px; font-weight: 800; letter-spacing: .05em; padding: 3px 8px;
  border-radius: 999px; background: rgba(255,255,255,.65); color: var(--muted); }
.tl-chip.paid { color: #1E7A46; }
.tl-chip.due { color: #9A6B12; }
.tl-ava { flex: none; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.75);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--ink); }
/* Memos list (part G, clarification 4) */
.memo-row { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.memo-row:last-child { border-bottom: 0; }
.memo-main { flex: 1; min-width: 0; }
.memo-main strong { font-size: 15px; }
.memo-prev { margin: 2px 0 0; color: var(--muted); font-size: 13px; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.memo-more { padding: 0; margin-top: 2px; }
.cc-fab { position: fixed; right: 18px; bottom: 84px; width: 54px; height: 54px; border-radius: 50%;
  border: 0; background: var(--accent); color: #fff; font-size: 28px; line-height: 1; cursor: pointer;
  box-shadow: 0 8px 20px rgba(23,37,31,.30); z-index: 40; display: flex; align-items: center; justify-content: center; }
/* Email Forms (part G, clarification 3) */
.ef-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.ef-row:last-child { border-bottom: 0; }
.ef-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.ef-row .ef-name { flex: 1; }
/* Uploads grouped by date (part G, clarification 5) */
.file-date { margin: 16px 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); }
.file-date:first-child { margin-top: 2px; }

/* ---------- v0-33 «Океан» (решение Дмитрия 12.11.2026) ----------
   Клиентские экраны (публичная запись + формы по ссылке) и адженда
   (календарь) — в палитре «Океан», день и ночь (ночь — по системной
   теме устройства, prefers-color-scheme). Остальные staff-экраны,
   акцент #6E8CAE и матовое стекло плиток приёмов — без изменений:
   все правила ниже намеренно ограничены #view-book / #view-forms /
   #view-calendar. */
#view-book, #view-forms {
  --oc-grad: linear-gradient(135deg, #0E7CC4, #0A5FA8);
  --oc-accent: #0E7CC4; --oc-deep: #0A5FA8; --oc-ink: #0E2A47;
  --oc-tint: #D9EEFD; --oc-line: #C7E0F4; --oc-surface: #FFFFFF;
  --oc-raised: #FFFFFF; --oc-muted: #57748E; --oc-note: #F2F9FF;
  color: var(--oc-ink);
}
html[data-boot="book"] body, html[data-boot="forms"] body {
  background: linear-gradient(180deg, #DCEEFF 0%, #F2F9FF 100%);
  background-attachment: fixed;
}
#view-book .page-head h1, #view-forms .page-head h1 { color: var(--oc-ink); }
#view-book .muted, #view-forms .muted { color: var(--oc-muted); }
#view-book .card, #view-forms .card {
  background: var(--oc-surface); border-color: var(--oc-line); border-radius: 18px;
  box-shadow: 0 10px 26px rgba(14, 42, 71, .08);
}
#view-book .chip, #view-forms .frm-chip {
  border-color: var(--oc-line); background: var(--oc-raised); color: var(--oc-ink);
}
#view-book .chip.selected, #view-forms .frm-chip.selected {
  background: var(--oc-grad); border-color: transparent; color: #fff;
}
#view-book .option {
  border-color: var(--oc-line); background: var(--oc-raised); color: var(--oc-ink);
}
#view-book .option .opt-meta { color: var(--oc-muted); }
#view-book .option.selected {
  border-color: var(--oc-accent); background: var(--oc-note);
  box-shadow: 0 0 0 1px var(--oc-accent) inset;
}
#view-book .date-cell {
  border-color: var(--oc-line); background: var(--oc-raised); color: var(--oc-ink);
}
#view-book .date-cell .dow, #view-book .date-cell .mon, #view-book .date-cell .dclosed { color: var(--oc-muted); }
#view-book .date-cell.selected { background: var(--oc-grad); border-color: transparent; color: #fff; }
#view-book .date-cell.selected .dow, #view-book .date-cell.selected .mon,
#view-book .date-cell.selected .dclosed { color: var(--oc-tint); }
#view-book .slot-btn {
  border-color: var(--oc-line); background: var(--oc-raised); color: var(--oc-ink);
}
#view-book .slot-btn .slot-pract { color: var(--oc-muted); }
#view-book .slot-btn.selected { background: var(--oc-grad); border-color: transparent; color: #fff; }
#view-book .slot-btn.selected .slot-pract { color: var(--oc-tint); }
#view-book form label, #view-forms .frm-field, #view-forms .frm-label { color: var(--oc-muted); }
#view-book form input, #view-book form textarea, #view-book form select,
#view-forms #frm-form input[type="text"], #view-forms #frm-form input[type="email"],
#view-forms #frm-form input[type="tel"], #view-forms #frm-form input[type="date"],
#view-forms #frm-form textarea, #view-forms #frm-form select {
  background: var(--oc-raised); border-color: var(--oc-line); color: var(--oc-ink);
}
#view-book .btn-primary, #view-forms .btn-primary {
  background: var(--oc-grad); box-shadow: 0 8px 20px rgba(14, 124, 196, .28);
}
#view-book .btn-primary:hover:not(:disabled), #view-forms .btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0B6CB2, #084E8C);
}
#view-book .btn-secondary, #view-forms .btn-secondary {
  background: var(--oc-raised); color: var(--oc-deep); border-color: var(--oc-accent);
}
#view-book .summary-line { color: var(--oc-deep); }
#view-book .success-mark { background: var(--oc-grad); }
#view-book #book-done-details .row { border-color: var(--oc-line); }
#view-book #book-done-details .row span:first-child { color: var(--oc-muted); }
#view-forms .frm-row { background: transparent; border-color: var(--oc-line); color: var(--oc-ink); }
#view-forms .frm-row .chev { color: var(--oc-muted); }
#view-forms .frm-note { background: var(--oc-note); border-color: var(--oc-line); color: var(--oc-ink); }
#view-forms .frm-check input[type="checkbox"], #view-forms .frm-check input[type="radio"] { accent-color: var(--oc-accent); }

/* адженда: фон-градиент вокруг белого полотна, полоса времени, линия «сейчас» */
#main.on-calendar { background: linear-gradient(180deg, #DCEEFF 0%, #F2F9FF 100%); }
#view-calendar .cal-head { background: #F2F9FF; }
#view-calendar .cal-gutter { background: #EFF7FE; }
#view-calendar .cal-gutter .hour-label { color: #33526E; font-weight: 600; }
.now-dot {
  position: absolute; right: -5px; transform: translateY(-50%);
  width: 10px; height: 10px; border-radius: 50%; background: #0E7CC4;
  box-shadow: 0 0 0 3px rgba(14, 124, 196, .18); z-index: 6; pointer-events: none;
}
#view-calendar .ws-cell.active strong { background: linear-gradient(135deg, #0E7CC4, #0A5FA8); color: #fff; }
#view-calendar .ws-cell.today strong { box-shadow: inset 0 0 0 1.6px #0E7CC4; }
#view-calendar .ws-cell.active.today strong { box-shadow: none; }
#view-calendar #pickbar { background: linear-gradient(135deg, #0E7CC4, #0A5FA8); }
#view-calendar .fab { background: linear-gradient(135deg, #0E7CC4, #0A5FA8); }
#view-calendar .tl-time strong { color: #0E2A47; }
.tl-now {
  display: flex; align-items: center; gap: 8px; padding: 7px 14px;
  color: #0A5FA8; font-size: 12px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
}
.tl-now::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #0E7CC4; flex: 0 0 9px; }
.tl-now::after { content: ""; flex: 1; border-top: 2px solid #0E7CC4; }

/* ночь «Океана» — по системной теме устройства */
@media (prefers-color-scheme: dark) {
  #view-book, #view-forms {
    --oc-grad: linear-gradient(135deg, #38B2E0, #2E9BE6);
    --oc-accent: #2E9BE6; --oc-deep: #38B2E0; --oc-ink: #EAF4FD;
    --oc-tint: #173A5C; --oc-line: #1E3E5C; --oc-surface: #122A44;
    --oc-raised: #173A5C; --oc-muted: #8FB0CC; --oc-note: #173A5C;
  }
  html[data-boot="book"] body, html[data-boot="forms"] body {
    background: linear-gradient(180deg, #081527 0%, #0C2138 100%);
  }
  #view-book .card, #view-forms .card { box-shadow: 0 10px 26px rgba(0, 0, 0, .35); }
  #view-book .btn-primary, #view-forms .btn-primary { box-shadow: 0 8px 20px rgba(46, 155, 230, .30); }
  #view-book .btn-primary:hover:not(:disabled), #view-forms .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2E9BE6, #1E7CC4);
  }
  #view-book .date-cell.selected .dow, #view-book .date-cell.selected .mon,
  #view-book .date-cell.selected .dclosed, #view-book .slot-btn.selected .slot-pract { color: #EAF4FD; }

  #main.on-calendar { background: linear-gradient(180deg, #081527 0%, #0C2138 100%); }
  #view-calendar #cal-scroll { background: #122A44; border-color: #1E3E5C; }
  #view-calendar .cal-head { background: #122A44; border-color: #1E3E5C; color: #EAF4FD; }
  #view-calendar .cal-col-head { border-color: #1E3E5C; }
  #view-calendar .cal-gutter { background: #0C2138; }
  #view-calendar .cal-gutter .hour-label { color: #8FB0CC; }
  #view-calendar .cal-col {
    background-color: #122A44;
    background-image:
      repeating-linear-gradient(to bottom, rgba(56, 178, 224, .20) 0, rgba(56, 178, 224, .20) 1px, transparent 1px, transparent var(--col-hour, 56px)),
      repeating-linear-gradient(to bottom, rgba(56, 178, 224, .07) 0, rgba(56, 178, 224, .07) 1px, transparent 1px, transparent calc(var(--col-hour, 56px) / 4));
  }
  #view-calendar .hour-line { border-top-color: rgba(56, 178, 224, .20); }
  #view-calendar .cal-col.off { background: repeating-linear-gradient(45deg, #0C2138, #0C2138 10px, #10283F 10px, #10283F 20px); }
  #view-calendar .shade { background: repeating-linear-gradient(45deg, rgba(8, 21, 39, .55), rgba(8, 21, 39, .55) 8px, rgba(12, 33, 56, .55) 8px, rgba(12, 33, 56, .55) 16px); }
  #view-calendar .work-band { border-top-color: rgba(56, 178, 224, .35); border-bottom-color: rgba(56, 178, 224, .35); }
  #view-calendar .now-line { border-top-color: #2E9BE6; }
  #view-calendar .team-track .tt-now { border-left-color: #2E9BE6; }
  #view-calendar .now-dot { background: #2E9BE6; box-shadow: 0 0 0 3px rgba(46, 155, 230, .25); }
  #view-calendar .appt, #view-calendar .team-track .tt-appt { color: #EAF4FD; }
  #view-calendar .team-track { background: #0C2138; border-color: #1E3E5C; }
  #view-calendar .team-row, #view-calendar .tl-row { border-color: #1E3E5C; }
  #view-calendar .tl-time strong { color: #EAF4FD; }
  #view-calendar .tl-now { color: #38B2E0; }
  #view-calendar .tl-now::before { background: #2E9BE6; }
  #view-calendar .tl-now::after { border-top-color: #2E9BE6; }
  #view-calendar .ws-cell { color: #8FB0CC; }
  #view-calendar .ws-cell strong { color: #EAF4FD; }
}

/* ---------- v0-33, полный дизайн-проход (Дмитрий 12.11.2026, 22:59:
   «И тут. Пересмотри все») ----------
   ВСЯ оболочка — единая гамма «Океан» день/ночь: staff-экраны (Home,
   Clients, карточка клиента, шиты, Services, Team, Reports, Settings)
   переведены со стали #6E8CAE и серо-зелёной базы на океанские
   переменные; ночная тема затемняет ВСЕ элементы оболочки (топбар,
   шапка календаря, пилюли практиков, шиты, карточки), а не только
   полотно. Плитки приёмов: цветовой код услуг (палитра 15) сохранён,
   подача освежена — краска плотнее (paintApptBlock в app.js), кромки и
   тени переведены на океанский чернильный rgba(14,42,71,…), радиусы
   крупнее. Логика, структура и тексты не тронуты. */
:root {
  --accent: #0E7CC4;
  --accent-dark: #0A5FA8;
  --ink: #0E2A47;
  --muted: #57748E;
  --line: #D3E4F2;
  --bg: #EFF6FC;
  color-scheme: light;
}
body {
  background: linear-gradient(180deg, #DCEEFF 0%, #F2F9FF 100%);
  background-attachment: fixed;
}
/* дневные остатки старой гаммы → «Океан» */
.money-card {
  background: linear-gradient(120deg, #0E7CC4 0%, #0A5FA8 55%, #2E9BE6 125%);
  box-shadow: 0 10px 26px rgba(14, 124, 196, .30);
}
.nav-item.active { background: #D9EEFD; }
.cal-col-head.sel .pract-pill { background: #D9EEFD; }
.badge { background: #D9EEFD; }
.badge.void { background: #EAF3FA; }
.badge.completed { background: #E3EFFA; color: #0A5FA8; }
.badge.paid { background: #D9EEFD; }
.c-avatar, .cc-avatar, .pract-ava { background: #D9EEFD; }
.tag-chip, .menu-badge { background: #EAF3FA; }
.dp-chip:active { background: #D9EEFD; }
.pay-tile.sel { background: #D9EEFD; box-shadow: 0 0 0 2px rgba(14, 124, 196, .18); }
.fab { box-shadow: 0 10px 24px rgba(14, 124, 196, .40); }
#pickbar { box-shadow: 0 6px 18px rgba(14, 124, 196, .30); }
.cc-fab { box-shadow: 0 8px 20px rgba(14, 42, 71, .30); }
.drop-hint { background: rgba(14, 124, 196, .12); }
.appt.src-highlight { box-shadow: 0 0 0 5px rgba(14, 124, 196, .25); }
.press-plaque { background: rgba(14, 124, 196, .22); }
.team-track { background: #F2F9FF; border-color: #E1EEF8; }
.tl-card.tl-today { background: #EAF3FA; }
.tl-card.tl-note { background: #F2F9FF; }
.cc-appt-card.empty { background: #EFF6FC; }
.shade {
  background: repeating-linear-gradient(45deg, rgba(220, 238, 255, .50), rgba(220, 238, 255, .50) 8px, rgba(199, 224, 244, .50) 8px, rgba(199, 224, 244, .50) 16px);
}
.cal-block {
  color: #57748E;
  background: repeating-linear-gradient(45deg, rgba(211, 228, 242, .92), rgba(211, 228, 242, .92) 7px, rgba(195, 216, 234, .92) 7px, rgba(195, 216, 234, .92) 14px);
  box-shadow: inset 0 0 0 1px rgba(14, 124, 196, .22);
}
.team-track .tt-block {
  background: repeating-linear-gradient(45deg, rgba(211, 228, 242, .92), rgba(211, 228, 242, .92) 7px, rgba(195, 216, 234, .92) 7px, rgba(195, 216, 234, .92) 14px);
  box-shadow: inset 0 0 0 1px rgba(14, 124, 196, .22);
}
.toast { background: #0E2A47; }
/* плитки приёмов — свежая подача при том же цветовом коде услуг:
   океанские тени вместо серо-зелёных, радиус крупнее, кольцо и кромка
   прежние стеклянные (краска — paintApptBlock, app.js) */
.appt {
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(14, 42, 71, .18), inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 1px rgba(255, 255, 255, .38);
}
.appt.drag-lift {
  box-shadow: 0 14px 24px rgba(14, 42, 71, .30), inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 1px rgba(255, 255, 255, .38);
}
.appt.drag-ghost {
  box-shadow: 0 14px 24px rgba(14, 42, 71, .30), inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 1px rgba(255, 255, 255, .38);
}
.team-track .tt-appt {
  border-radius: 9px;
  box-shadow: 0 4px 10px rgba(14, 42, 71, .18), inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 1px rgba(255, 255, 255, .38);
}
.tl-card {
  box-shadow: 0 3px 9px rgba(14, 42, 71, .13), inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 1px rgba(255, 255, 255, .38);
}
.cc-appt-card {
  box-shadow: 0 4px 10px rgba(14, 42, 71, .14), inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 1px rgba(255, 255, 255, .38);
}

/* ночь «Океана» — вся оболочка, не только полотно календаря */
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #2E9BE6;
    --accent-dark: #38B2E0;
    --ink: #EAF4FD;
    --muted: #8FB0CC;
    --line: #1E3E5C;
    --bg: #0C2138;
    --card: #122A44;
    color-scheme: dark;
  }
  body {
    background: linear-gradient(180deg, #081527 0%, #0C2138 100%);
    background-attachment: fixed;
  }
  /* хром: топбар, выдвижное меню, плавающие кнопки */
  #topbar { background: rgba(8, 21, 39, .92); border-bottom-color: #1E3E5C; }
  .topbar-auth { background: #173A5C; }
  .topbar-btn:hover { background: #173A5C; }
  .nav-item:hover, .sub-item:hover { background: #173A5C; }
  .nav-item.active { background: #173A5C; }
  #drawer { box-shadow: 8px 0 30px rgba(0, 0, 0, .45); }
  .scrim, .overlay { background: rgba(3, 10, 18, .60); }
  .back-fab { background: #173A5C; box-shadow: 0 6px 20px rgba(0, 0, 0, .40); }
  .toast { background: #173A5C; color: #EAF4FD; border: 1px solid #1E3E5C; box-shadow: 0 6px 20px rgba(0, 0, 0, .45); }
  .press-time { background: #EAF4FD; color: #0E2A47; }
  /* поверхности: карточки, списки, шиты, формы */
  .sheet { background: #122A44; }
  .sheet-topbar { background: #122A44; }
  .sheet-x { background: #173A5C; }
  .picker-search { background: #122A44; }
  .tile, .client-row, .stat, .cc-head, .mini-card, .menu-list, .menu-row { background: #122A44; }
  .appt-client-row, .mini-btn, .icon-btn, .btn-secondary, .btn-danger,
  .cc-edit-btn, .cc-qbtn, #cal-today-btn { background: #173A5C; }
  .count-row, .frm-row { background: transparent; }
  .tag-add { background: #122A44; }
  .ctab { background: #173A5C; }
  .pay-tile { background: #173A5C; }
  .pay-tile.sel { background: #1E3E5C; box-shadow: 0 0 0 2px rgba(46, 155, 230, .25); }
  form input, form textarea, form select, input[type="search"],
  .sheet input, .sheet textarea, .sheet select { background: #173A5C; }
  .seg, .seg-btn { background: #122A44; }
  .seg-btn { color: #EAF4FD; }
  #sig-pad { background: #EAF4FD; border-color: #57748E; }
  .toggle-track { background: #1E3E5C; }
  /* Home */
  .money-card {
    background: linear-gradient(120deg, #2E9BE6 0%, #1668AC 55%, #38B2E0 125%);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .40);
  }
  /* календарная оболочка: шапка месяца, полоса дат, пилюли практиков */
  .pract-pill { background: #0C2138; }
  .cal-col-head.sel .pract-pill { background: #173A5C; }
  .dp-chip:active { background: #173A5C; }
  /* бейджи и мелкие плашки */
  .badge { background: #173A5C; color: #8FB0CC; }
  .badge.completed { background: rgba(46, 155, 230, .22); color: #9CD0F5; }
  .badge.cancelled { background: rgba(179, 38, 30, .28); color: #F0A49E; }
  .badge.no_show, .badge.due, .badge.draft, .badge.partial { background: rgba(214, 164, 60, .20); color: #EBCB8B; }
  .badge.paid { background: #173A5C; color: #8FB0CC; }
  .badge.new { background: rgba(46, 155, 230, .28); color: #9CD0F5; }
  .badge.void { background: #122A44; color: #8FB0CC; }
  .tag-chip, .menu-badge { background: #173A5C; }
  .c-avatar, .cc-avatar, .pract-ava { background: #173A5C; }
  .tl-card.tl-today { background: #173A5C; }
  .tl-card.tl-note { background: #122A44; }
  .cc-appt-card.empty { background: #0C2138; }
  .tl-chip { background: rgba(8, 21, 39, .45); color: #8FB0CC; }
  .tl-ava { background: rgba(8, 21, 39, .40); }
  /* блоки закрытого времени */
  .cal-block {
    color: #8FB0CC;
    background: repeating-linear-gradient(45deg, rgba(12, 33, 56, .92), rgba(12, 33, 56, .92) 7px, rgba(18, 42, 68, .92) 7px, rgba(18, 42, 68, .92) 14px);
    box-shadow: inset 0 0 0 1px rgba(56, 178, 224, .25);
  }
  .team-track .tt-block {
    background: repeating-linear-gradient(45deg, rgba(12, 33, 56, .92), rgba(12, 33, 56, .92) 7px, rgba(18, 42, 68, .92) 7px, rgba(18, 42, 68, .92) 14px);
    box-shadow: inset 0 0 0 1px rgba(56, 178, 224, .25);
  }
  .col-off-label { color: #57748E; }
  /* плитки приёмов ночью: глубокая тень, светлое кольцо вместо белого */
  .appt, .team-track .tt-appt, .tl-card, .cc-appt-card {
    box-shadow: 0 4px 10px rgba(0, 0, 0, .40), inset 0 1px 0 rgba(234, 244, 253, .14), inset 0 0 0 1px rgba(234, 244, 253, .14);
  }
  .appt.drag-lift, .appt.drag-ghost {
    box-shadow: 0 14px 24px rgba(0, 0, 0, .50), inset 0 1px 0 rgba(234, 244, 253, .14), inset 0 0 0 1px rgba(234, 244, 253, .14);
  }
  .tl-card, .cc-appt-card { color: #EAF4FD; }
  /* скелетоны загрузки на тёмном */
  .skl-line, .skl-card {
    background: linear-gradient(90deg, rgba(143, 176, 204, .10), rgba(143, 176, 204, .22), rgba(143, 176, 204, .10));
    background-size: 200% 100%;
  }
  .drop-hint { background: rgba(46, 155, 230, .14); }
  .press-plaque { background: rgba(46, 155, 230, .25); }
}

/* ---------- v0-33c hotfix (Дмитрий 12.11.2026, 23:37–23:43) ----------
   Плитки приёмов: шаг 33b на живом телефоне не было видно («Плитки не
   обновились», «Сам цвет плиток» — блёклые, с серым налётом). Эталон —
   одобренный Дмитрием мокап a10-ocean: чистые пастельные заливки по
   услугам, округлые углы, мягкая тень вниз. Краска в paintApptBlock
   (app.js) рисует саму пастель мокапа (оттенок/hue палитры 15
   сохранён), а не полупрозрачную размывку сырого цвета по сетке.
   Кромка — СТЕКЛО (финальное слово Дмитрия 23:43 по крупным планам
   края плитки): светлый полупрозрачный кант + лёгкий внутренний блик
   по периметру (inset-кольцо и верхняя кромка), а НЕ цветная линия.
   Тень — маленькая, мягкая, строго вниз («тень маленькая»). Ночью
   кант приглушён по тёмной гамме. Отменённые — без тени и блика,
   плоские и приглушённые, как прежде. Лицо по-прежнему плоское
   матовое, без градиента; левой цветной полосы нет. */
.appt, .team-track .tt-appt, .tl-card, .cc-appt-card, .svc-sample {
  border: 1.5px solid rgba(255, 255, 255, .45); /* стеклянный кант */
}
.appt { border-radius: 12px; box-shadow: 0 3px 7px rgba(14, 42, 71, .13), inset 0 1px 0 rgba(255, 255, 255, .75), inset 0 0 0 1px rgba(255, 255, 255, .35); }
.team-track .tt-appt { border-radius: 12px; box-shadow: 0 3px 7px rgba(14, 42, 71, .13), inset 0 1px 0 rgba(255, 255, 255, .75), inset 0 0 0 1px rgba(255, 255, 255, .35); }
.tl-card { box-shadow: 0 3px 7px rgba(14, 42, 71, .11), inset 0 1px 0 rgba(255, 255, 255, .70), inset 0 0 0 1px rgba(255, 255, 255, .30); }
.cc-appt-card { border-radius: 12px; box-shadow: 0 3px 7px rgba(14, 42, 71, .12), inset 0 1px 0 rgba(255, 255, 255, .70), inset 0 0 0 1px rgba(255, 255, 255, .30); }
.svc-sample { border-radius: 12px; box-shadow: 0 3px 7px rgba(14, 42, 71, .12), inset 0 1px 0 rgba(255, 255, 255, .70), inset 0 0 0 1px rgba(255, 255, 255, .30); }
.appt.drag-lift, .appt.drag-ghost { box-shadow: 0 12px 22px rgba(14, 42, 71, .26), inset 0 1px 0 rgba(255, 255, 255, .75), inset 0 0 0 1px rgba(255, 255, 255, .35); }
/* отменённые не «парят» и не бликуют — остаются плоскими */
.appt.cancelled, .team-track .tt-appt.cancelled, .tl-card.cancelled { box-shadow: none; }
/* парящие липкие шапки (Дмитрий 23:44, крупный план шапки календаря:
   «под верхней белой полосой тень тоже, как будто она над полосой с
   датами») — тот же приём, что у плиток: верхняя полоса лежит выше и
   отбрасывает маленькую мягкую тень вниз на полосу дат / контент.
   В меру: главная полоса приложения, шапка сетки календаря и липкая
   полоса карточки клиента. */
#topbar { box-shadow: 0 2px 8px rgba(14, 42, 71, .10); }
.cal-head { box-shadow: 0 2px 6px rgba(14, 42, 71, .08); }
.cc-sticky { box-shadow: 0 2px 8px rgba(14, 42, 71, .08); }
@media (prefers-color-scheme: dark) {
  #topbar { box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
  .cal-head { box-shadow: 0 2px 6px rgba(0, 0, 0, .30); }
  .cc-sticky { box-shadow: 0 2px 8px rgba(0, 0, 0, .30); }
  .appt, .team-track .tt-appt, .tl-card, .cc-appt-card, .svc-sample {
    border-color: rgba(234, 244, 253, .26); /* стеклянный кант, приглушённо */
  }
  .appt, .team-track .tt-appt { box-shadow: 0 4px 10px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(234, 244, 253, .22), inset 0 0 0 1px rgba(234, 244, 253, .12); }
  .tl-card { box-shadow: 0 4px 10px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(234, 244, 253, .20), inset 0 0 0 1px rgba(234, 244, 253, .10); }
  .cc-appt-card, .svc-sample { box-shadow: 0 4px 10px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(234, 244, 253, .20), inset 0 0 0 1px rgba(234, 244, 253, .10); }
  .appt.drag-lift, .appt.drag-ghost { box-shadow: 0 12px 22px rgba(0, 0, 0, .50), inset 0 1px 0 rgba(234, 244, 253, .22), inset 0 0 0 1px rgba(234, 244, 253, .12); }
  .appt.cancelled, .team-track .tt-appt.cancelled, .tl-card.cancelled { box-shadow: none; }
}

/* ================= v0-36: auth screen + account actions =================
   Registration / sign-in live on a full-screen card over the Ocean
   gradient. Inputs inherit the platform form styling (incl. the dark
   sheet fields); only layout lives here. */
.auth-screen {
  position: fixed; inset: 0; z-index: 150; overflow-y: auto;
  background: linear-gradient(160deg, #DCEEFF, #F2F9FF);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 26px 14px calc(26px + env(safe-area-inset-bottom));
}
.auth-card {
  background: #fff; border-radius: 18px; width: 100%; max-width: 430px;
  padding: 20px; box-shadow: 0 18px 44px rgba(14, 42, 71, .18);
}
.auth-brand { display: flex; align-items: center; gap: 10px; }
.auth-brand .nav-brand-text strong { font-size: 19px; }
.auth-x { margin-left: auto; flex: none; }
.auth-tabs {
  display: flex; gap: 6px; margin: 16px 0 4px; padding: 4px;
  background: var(--bg); border-radius: 999px;
}
.auth-tab {
  flex: 1; border: 0; background: transparent; padding: 8px 6px;
  border-radius: 999px; font: inherit; font-weight: 600;
  color: var(--muted); cursor: pointer;
}
.auth-tab.selected { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(14, 42, 71, .12); }
.auth-form label { display: block; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--ink); }
.auth-form input, .auth-form select { width: 100%; margin-top: 5px; }
.auth-submit { width: 100%; margin-top: 16px; }
.auth-alt { display: block; margin: 12px auto 0; }
.auth-err { color: #B3261E; font-size: 13.5px; margin: 12px 0 0; }
.nav-acct-actions { display: flex; gap: 16px; padding: 2px 2px 0; }
@media (prefers-color-scheme: dark) {
  .auth-screen { background: linear-gradient(160deg, #081527, #0C2138); }
  .auth-card { background: #122A44; box-shadow: 0 18px 44px rgba(0, 0, 0, .5); }
  .auth-tab.selected { background: #173A5C; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
}

/* ================= v0-37: client lists — Fresha pattern =================
   Flat compact rows instead of white cards: initials avatar in the
   Ocean tint, ink semibold name (never a blue link), grey phone · email
   sub-line, muted visit count on the right, hairline dividers between
   rows. One pattern for the Clients page and the booking client
   pickers — both render .client-row inside .client-list. */
.client-list { gap: 0; }
.client-row {
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0; padding: 10px 2px; justify-content: flex-start;
}
.client-list .client-row:last-child { border-bottom: 0; }
.crow-ava {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 40px;
  background: #D9EEFD; color: var(--accent-dark);
  font-size: 14px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.crow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.crow-name {
  color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.crow-sub {
  color: var(--muted); font-size: 13px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.client-row .c-meta { flex: 0 0 auto; }
.crow-last { font-size: 12px; }
@media (prefers-color-scheme: dark) {
  .crow-ava { background: #173A5C; }
}

/* ================= v0-37: calendar time rail + now indicator =================
   Fresha-compact rail: 46px (was 52), two-line hour labels, and the
   current-time indicator in Fresha's form and colour — a RED line
   across the day and a RED pill with the live time in the gutter.
   This replaces the v0-33 rule of a blue now-line (#0E7CC4 day /
   #2E9BE6 night): from v0-37 on, "now" is always red. */
/* compact rail (head cell and body gutter share the width) */
.cal-head .gutter { flex-basis: 46px; }
.cal-gutter { flex: 0 0 46px; }
.cal-gutter .hour-label { right: 4px; line-height: 1.15; text-align: right; }
.cal-gutter .hour-label .hl-t { display: block; }
.cal-gutter .hour-label .hl-ap { display: block; font-size: 9.5px; }
/* the first label sits below its hour line instead of sliding under
   the sticky head */
.cal-gutter .hour-label:first-child { transform: none; margin-top: 3px; }
/* red now-line (day + the scoped calendar surface) */
.now-line { border-top: 2px solid #E93B32; }
#view-calendar .now-line { border-top-color: #E93B32; }
/* red time pill in the gutter; never intercepts taps or drags */
.now-pill {
  position: absolute; left: 50%; transform: translate(-50%, -50%);
  background: #E93B32; color: #fff; font-size: 11px; font-weight: 700;
  padding: 2px 6px; border-radius: 999px; z-index: 7; pointer-events: none;
  white-space: nowrap; box-shadow: 0 1px 4px rgba(180, 20, 10, .35);
  font-variant-numeric: tabular-nums;
}
/* the other "now" surfaces follow the same red rule */
#view-calendar .tl-now { color: #C62F27; }
#view-calendar .tl-now::before { background: #E93B32; }
#view-calendar .tl-now::after { border-top-color: #E93B32; }
#view-calendar .team-track .tt-now { border-left-color: #E93B32; }
@media (prefers-color-scheme: dark) {
  /* same red at night, a touch brighter for contrast */
  #view-calendar .now-line { border-top-color: #FF5147; }
  .now-pill { background: #FF5147; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
  #view-calendar .tl-now { color: #FF8A80; }
  #view-calendar .tl-now::before { background: #FF5147; }
  #view-calendar .tl-now::after { border-top-color: #FF5147; }
  #view-calendar .team-track .tt-now { border-left-color: #FF5147; }
}

/* ================= v0-38: lighter now indicator =================
   Dmytro, after seeing v0-37 live on his phone: the pill must be an
   OUTLINE, not a solid red oval — white fill by day, surface fill at
   night, a 1.5px red border and red digits. And the red line must
   REACH the pill: a bridge segment on the pill's right edge closes
   the gutter gap and touches the line wherever the column adjacent
   to the gutter is today's (JS adds .bridged and sizes --bridge-w
   from the real geometry). The rule going forward: red stays, the
   pill is contoured, never filled. */
.now-pill {
  background: #fff; color: #E93B32; border: 1.5px solid #E93B32;
  box-shadow: 0 1px 3px rgba(14, 42, 71, .14);
}
.now-pill.bridged::after {
  content: ""; position: absolute; left: 100%; top: 50%; height: 2px;
  width: var(--bridge-w, 10px); background: #E93B32;
}
/* agenda: the now marker is a ring now, not a filled dot */
#view-calendar .tl-now::before { background: transparent; border: 1.5px solid #E93B32; }
@media (prefers-color-scheme: dark) {
  .now-pill { background: #122A44; color: #FF5147; border-color: #FF5147;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .45); }
  .now-pill.bridged::after { background: #FF5147; }
  #view-calendar .tl-now::before { background: transparent; border-color: #FF5147; }
}
