/* Mobile Massage Manager — app shell + components.
   Mobile-first: base rules are the phone layout; @media (min-width: 64rem) adds the desktop sidebar.
   Color: restrained. Warm paper neutrals, a deep ink side panel, one clay accent for actions/selection. */

:root {
  --paper:      oklch(97.4% .007 75);
  --surface:    oklch(99.4% .004 75);
  --line:       oklch(89% .012 70);
  --line-soft:  oklch(93.5% .009 70);
  --ink:        oklch(24% .015 55);
  --ink-2:      oklch(44% .015 55);
  --ink-3:      oklch(54% .014 55);   /* captions; 4.6:1 on paper */

  --panel:      oklch(25% .018 50);   /* sidebar / drawer */
  --panel-2:    oklch(31% .02 50);
  --panel-ink:  oklch(93% .01 70);
  --panel-ink-2:oklch(74% .015 65);

  --accent:     oklch(50% .125 42);   /* clay */
  --accent-2:   oklch(44% .12 42);
  --accent-soft:oklch(94% .03 50);
  --on-accent:  oklch(98.5% .006 75);

  --ok:         oklch(48% .1 150);
  --ok-soft:    oklch(95% .03 150);
  --danger:     oklch(50% .16 27);
  --danger-soft:oklch(95.5% .025 27);

  --radius: .5rem;
  --radius-sm: .375rem;
  --tap: 2.75rem;                       /* 44px minimum touch target */
  --side-w: 15.5rem;
  --top-h: 3.5rem;
  --ease: cubic-bezier(.22, 1, .36, 1); /* ease-out-quint */

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh;
  font: 400 1rem/1.5 var(--font);
  color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
p { margin: 0; }
a { color: var(--accent-2); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }   /* component display rules must never beat the hidden attribute */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------------------------------------------------------------- shell */

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: .5rem;
  height: var(--top-h); padding: 0 .5rem 0 .25rem;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.topbar__title { font-size: 1.0625rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__end { margin-left: auto; display: flex; gap: .25rem; }

.hamburger {
  display: grid; place-items: center;
  width: var(--tap); height: var(--tap); padding: 0;
  border: 0; border-radius: var(--radius); background: none; cursor: pointer;
}
.hamburger:hover { background: var(--line-soft); }
.hamburger svg { width: 1.375rem; height: 1.375rem; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 50;
  width: min(var(--side-w), 82vw);
  display: flex; flex-direction: column;
  background: var(--panel); color: var(--panel-ink);
  transform: translateX(-100%);
  transition: transform 240ms var(--ease), visibility 0s linear 240ms;
  visibility: hidden;
  overscroll-behavior: contain;
}
.shell--open .sidebar { transform: none; visibility: visible; transition: transform 240ms var(--ease); }

.scrim {
  position: fixed; inset: 0; z-index: 40;
  background: oklch(20% .02 50 / .42);
  opacity: 0; pointer-events: none;
  transition: opacity 240ms var(--ease);
}
.shell--open .scrim { opacity: 1; pointer-events: auto; }

.brand {
  display: flex; align-items: center; gap: .625rem;
  padding: 1rem 1rem .875rem; text-decoration: none; color: inherit;
}
.brand__mark {
  flex: none; display: grid; place-items: center;
  width: 2.375rem; height: 2.375rem; border-radius: .5rem;
  background: var(--accent); color: var(--on-accent);
  font-weight: 700; font-size: .75rem; letter-spacing: -.01em;
}
.brand__name { font-weight: 600; font-size: .9375rem; line-height: 1.2; }
.brand__name small { display: block; font-weight: 400; font-size: .75rem; color: var(--panel-ink-2); }

.nav { flex: 1; overflow-y: auto; padding: .25rem .5rem 1rem; }
.nav__group { margin: 1rem .75rem .375rem; font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--panel-ink-2); }
.nav a {
  display: flex; align-items: center; gap: .75rem;
  min-height: var(--tap); padding: 0 .75rem; border-radius: var(--radius);
  color: var(--panel-ink); text-decoration: none; font-size: .9375rem;
}
.nav a svg { flex: none; width: 1.125rem; height: 1.125rem; opacity: .8; }
.nav a:hover { background: var(--panel-2); }
.nav a[aria-current="page"] { background: var(--panel-2); color: oklch(99% .005 75); font-weight: 600; }
.nav a[aria-current="page"] svg { opacity: 1; color: oklch(78% .1 48); }
.nav__sub > summary {
  display: flex; align-items: center; gap: .75rem; list-style: none; cursor: pointer;
  min-height: var(--tap); padding: 0 .75rem; border-radius: var(--radius); color: var(--panel-ink); font-size: .9375rem;
}
.nav__sub > summary::-webkit-details-marker { display: none; }
.nav__sub > summary:hover { background: var(--panel-2); }
.nav__sub > summary svg { flex: none; width: 1.125rem; height: 1.125rem; opacity: .8; }
.nav__sub > summary span { flex: 1; }
.nav__sub > summary svg:last-child { width: 1rem; height: 1rem; transition: transform .2s; }
.nav__sub[open] > summary svg:last-child { transform: rotate(180deg); }
.nav__sub > a { padding-left: 2.625rem; font-size: .875rem; }   /* sub-items line up under the parent's label */

.me {
  display: flex; align-items: center; gap: .625rem;
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--panel-2);
}
.me__avatar {
  flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--panel-2); font-size: .8125rem; font-weight: 600;
}
.me__avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.me__who { flex: 1; min-width: 0; font-size: .875rem; line-height: 1.25; }
.me__who small { display: block; color: var(--panel-ink-2); font-size: .75rem; }
.me__out {
  min-height: var(--tap); padding: 0 .625rem; border: 0; border-radius: var(--radius);
  background: none; color: var(--panel-ink-2); font-size: .8125rem; cursor: pointer;
}
.me__out:hover { background: var(--panel-2); color: var(--panel-ink); }

.main { padding: 1rem 1rem calc(2rem + env(safe-area-inset-bottom)); max-width: 90rem; }

@media (min-width: 64rem) {
  .shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .topbar { display: none; }
  .scrim { display: none; }
  .sidebar {
    position: sticky; top: 0; height: 100dvh; width: auto;
    transform: none; visibility: visible; transition: none;
  }
  .main { padding: 1.75rem 2rem 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar, .scrim { transition: none !important; }
}

/* ---------------------------------------------------------------- page heading */

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem 1rem; margin-bottom: 1.25rem; }
.page-head h1 { font-size: 1.5rem; font-weight: 650; letter-spacing: -.01em; }
.page-head p { color: var(--ink-3); font-size: .9375rem; margin-top: .125rem; }
.page-head__actions { margin-left: auto; display: flex; gap: .5rem; }
/* on phones the topbar carries the page title */
@media (max-width: 63.99rem) { .page-head h1.desktop-only { display: none; } }
.back { display: inline-flex; align-items: center; gap: .25rem; min-height: var(--tap); margin: -.5rem 0 .25rem; color: var(--ink-2); text-decoration: none; font-size: .9375rem; }
.back:hover { color: var(--ink); }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: var(--tap); padding: 0 1rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
  font-weight: 550; font-size: .9375rem; text-decoration: none; cursor: pointer;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease);
}
.btn:hover { background: var(--line-soft); }
.btn:active { background: var(--line); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn--primary:active { background: oklch(40% .11 42); }
.btn--danger { color: var(--danger); border-color: oklch(85% .05 27); }
.btn--danger:hover { background: var(--danger-soft); }
.btn--danger.is-armed { background: var(--danger); border-color: var(--danger); color: var(--on-accent); }
.btn[disabled], .btn[aria-busy="true"] { opacity: .6; cursor: progress; }
.btn svg { width: 1.125rem; height: 1.125rem; }

/* ---------------------------------------------------------------- forms */

.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; max-width: 44rem; }   /* minmax: long nowrap summaries must not widen the page */
.fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 1rem; }
.fieldset legend { float: left; width: 100%; padding: 0; font-weight: 650; font-size: 1rem; } /* floated: no longer cuts the divider, becomes a grid item */
.fieldset + .fieldset { padding-top: 1.5rem; border-top: 1px solid var(--line); }
.row { display: grid; gap: 1rem; }
.stack { display: grid; gap: 1rem; }
@media (min-width: 40rem) {
  .row--2 { grid-template-columns: 1fr 1fr; }
  .row--3 { grid-template-columns: 2fr 1fr 1fr; }
}
.row--pair { grid-template-columns: 1fr 1fr; }   /* short values: side by side even on phones */
.field { display: grid; gap: .375rem; min-width: 0; align-content: start; } /* don't stretch rows when a sibling field is taller */
.field label, .field .label { font-size: .875rem; font-weight: 550; color: var(--ink-2); }
.hint { font-size: .8125rem; color: var(--ink-3); }
.input, .select, .textarea {
  width: 100%; min-width: 0; min-height: var(--tap);
  padding: .5rem .75rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 1rem; /* 16px stops iOS zoom-on-focus */
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.textarea { min-height: 6rem; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: oklch(80% .015 65); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px oklch(50% .125 42 / .18); }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--danger); }
.input--short { max-width: 8rem; }
.input--color { display: block; height: var(--tap); padding: .25rem; width: 4.5rem; cursor: pointer; }

.switch { display: flex; align-items: center; gap: .75rem; min-height: var(--tap); cursor: pointer; font-weight: 550; }
.switch .hint { font-weight: 400; margin-top: .125rem; }
.switch input { appearance: none; flex: none; width: 2.75rem; height: 1.625rem; margin: 0; border-radius: 1rem; background: var(--line); position: relative; cursor: pointer; transition: background-color 180ms var(--ease); }
.switch input::after { content: ""; position: absolute; top: .1875rem; left: .1875rem; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px oklch(20% .02 50 / .25); transition: transform 180ms var(--ease); }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(1.125rem); }

.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; padding-top: .25rem; }
.form-actions .notice { flex: 1 1 100%; }   /* result sits in the save bar: always in view */
@media (max-width: 39.99rem) {
  /* sticky save bar within thumb reach */
  .form-actions {
    position: sticky; bottom: 0; z-index: 5;
    margin: 0 -1rem; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
    background: color-mix(in oklch, var(--paper) 92%, transparent);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(6px);
  }
  .form-actions .btn--primary { flex: 1; }
}

.notice { padding: .75rem 1rem; border-radius: var(--radius); font-size: .9375rem; }
.notice--error { background: var(--danger-soft); color: oklch(38% .14 27); }
.notice--ok { background: var(--ok-soft); color: oklch(36% .09 150); }
.notice--warn { background: oklch(95% .06 85); color: oklch(38% .09 70); }
.notice--info { background: var(--accent-soft); color: var(--accent-2); }
.notice[hidden] { display: none; }

.remove-zone { display: grid; gap: .75rem; justify-items: start; max-width: 44rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.remove-zone h2 { font-size: 1rem; font-weight: 650; }
.remove-zone p { color: var(--ink-3); font-size: .875rem; max-width: 60ch; }
.remove-zone[hidden] { display: none; }

.geo { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .875rem; }
.geo__status { flex: 1 1 14rem; font-size: .875rem; color: var(--ink-2); }
.geo__status a { font-weight: 600; white-space: nowrap; }
.fieldset legend .tag { margin-left: .375rem; font-weight: 600; }

/* ---------------------------------------------------------------- location picker */

.lp { display: grid; gap: .75rem; }
.lp__add { position: relative; }
.lp > .btn { justify-self: start; }
.lp__results {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + .25rem);
  margin: 0; padding: .25rem; list-style: none; max-height: min(22rem, 55vh); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 10px 28px oklch(25% .02 50 / .14);
}
.lp__results[hidden] { display: none; }
.lp__results li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .125rem .5rem; min-height: var(--tap); padding: .5rem .75rem; border-radius: var(--radius-sm); cursor: pointer; }
.lp__results li[aria-selected="true"], .lp__results li:hover { background: var(--accent-soft); }
.lp__results li.is-added { color: var(--ink-3); }
.lp__results .lp__typed { color: var(--accent-2); font-weight: 550; border-top: 1px solid var(--line-soft); }
.lp__name { font-weight: 550; }
.lp__meta { font-size: .8125rem; color: var(--ink-3); }
.lp__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 2.5rem; }
.lp__count { font-size: .875rem; color: var(--ink-2); font-weight: 550; }
.lp__clear { min-height: 2.5rem; padding: 0 .875rem; font-size: .875rem; }

.lp__list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.lp__list:empty { display: none; }
.lp__list li { display: flex; align-items: center; gap: .5rem; min-height: var(--tap); padding: 0 .25rem 0 .875rem; }
.lp__list li + li { border-top: 1px solid var(--line-soft); }
.lp__list .lp__name { flex: 1; min-width: 0; }
.lp__x { flex: none; display: grid; place-items: center; width: var(--tap); height: var(--tap); padding: 0; border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink-3); cursor: pointer; }
.lp__x:hover { background: var(--danger-soft); color: var(--danger); }
.lp__x svg { width: 1rem; height: 1rem; }
@media (min-width: 48rem) {
  .lp__list { display: grid; grid-template-columns: 1fr 1fr; }
  .lp__list li + li { border-top: 0; }
  .lp__list li { border-bottom: 1px solid var(--line-soft); }
  .lp__list li:nth-child(odd) { border-right: 1px solid var(--line-soft); }
}

.lp__suggest { border: 1px solid var(--line); border-radius: var(--radius); background: oklch(98.6% .006 75); padding: .75rem; display: grid; gap: .625rem; }
.lp__suggest[hidden] { display: none; }
.lp__sughead { font-size: .9375rem; }
.lp__checks { list-style: none; margin: 0; padding: 0; max-height: 22rem; overflow-y: auto; }
.lp__checks label { display: flex; align-items: center; gap: .625rem; min-height: var(--tap); padding: 0 .25rem; cursor: pointer; }
.lp__checks input { width: 1.25rem; height: 1.25rem; accent-color: var(--accent); flex: none; }
.lp__checks .lp__name { flex: 1; }
.lp__checks.is-towns li:not([data-town]) { display: none; }
.lp__townsonly { min-height: 2.5rem; font-size: .9375rem; flex-wrap: wrap; row-gap: 0; }
.lp__sugbar { display: flex; gap: .5rem; flex-wrap: wrap; }

.readonly-note { font-size: .875rem; color: var(--ink-2); background: var(--line-soft); padding: .625rem .75rem; border-radius: var(--radius-sm); }

/* ---------------------------------------------------------------- collapsible sections */

.section { border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }
.section > summary {
  display: flex; align-items: center; gap: .25rem .75rem; flex-wrap: wrap;
  min-height: 3.5rem; padding: .625rem 2rem .625rem 0; position: relative;
  cursor: pointer; list-style: none;
}
.section > summary::-webkit-details-marker { display: none; }
.section > summary::after {
  content: ""; position: absolute; right: .375rem; top: 50%;
  width: .5rem; height: .5rem; margin-top: -.375rem;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg); transition: transform 180ms var(--ease);
}
.section[open] > summary::after { transform: rotate(-135deg); margin-top: -.125rem; }
.section > summary:hover .section__title { color: var(--accent-2); }
.section__title { font-weight: 650; font-size: 1rem; }
.section__title .tag { margin-left: .375rem; }
.section__sum { flex: 1 1 12rem; min-width: 0; font-size: .875rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section[open] > summary .section__sum { display: none; }   /* only its own summary: nested sections keep theirs */
@media (max-width: 39.99rem) { .section__sum { flex-basis: 100%; } }   /* phones: summary always on its own line */
.section__body { display: grid; gap: 1rem; padding: .25rem 0 1.5rem; }
.form:has(.section) { gap: 0; }
.form:has(.section) .form-actions { margin-top: 1rem; }

/* hours */
.hours { display: grid; }
.hours__row + .hours__row { border-top: 1px solid var(--line-soft); }
.hours__row { padding: .625rem 0; }
.hours__row { display: grid; grid-template-columns: 6.5rem 1fr; gap: .5rem .75rem; align-items: center; }
.hours__day { font-weight: 550; }
.hours__times { grid-column: 1 / -1; display: flex; align-items: center; gap: .5rem; color: var(--ink-3); font-size: .875rem; }
.hours__times .input { flex: 1; min-width: 0; }
@media (min-width: 40rem) {
  .hours__row { grid-template-columns: 7rem 12rem 1fr; }
  .hours__times { grid-column: auto; }
}
.social { display: grid; gap: 1rem; }
@media (min-width: 40rem) { .social { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------------- states */

.statechips { display: grid; gap: .5rem; }
.statechips__list { display: flex; flex-wrap: wrap; gap: .375rem; }
.statechips__list:empty { display: none; }
.statechip { color: var(--ink); border-color: oklch(80% .015 65); gap: .375rem; }
.statechip svg { width: .875rem; height: .875rem; color: var(--ink-3); }
.statechip:hover svg { color: var(--danger); }

/* ---------------------------------------------------------------- photo field */

.pf { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .75rem 1rem; align-items: start; }
.pf__preview {
  width: 6.5rem; height: 6.5rem; border-radius: var(--radius); overflow: hidden;
  display: grid; place-items: center; text-align: center;
  background: var(--line-soft); border: 1px solid var(--line); color: var(--ink-3); font-size: .8125rem;
}
.pf__preview--round { border-radius: 50%; }
.pf__preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.pf__actions .btn { min-height: 2.5rem; padding: 0 .875rem; font-size: .875rem; }
.pf__status { font-size: .8125rem; color: var(--ink-3); margin-top: .375rem; }
.pf.is-busy .pf__preview { opacity: .5; }
.pf__lib { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; background: oklch(98.6% .006 75); }
.pf__libhead { font-size: .875rem; color: var(--ink-2); margin-bottom: .5rem; }
.pf__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: .5rem; max-height: 20rem; overflow-y: auto; }
.pf__grid button { padding: 0; border: 2px solid transparent; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1; cursor: pointer; background: var(--line-soft); }
.pf__grid button[aria-pressed="true"], .pf__grid button:hover { border-color: var(--accent); }
.pf__grid img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------------------------------------------------------------- services */

.kicker { font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-2); margin-bottom: .125rem; }

.addmenu { position: relative; }
.addmenu > summary { list-style: none; }
.addmenu > summary::-webkit-details-marker { display: none; }
.addmenu__list {
  position: absolute; right: 0; top: calc(100% + .375rem); z-index: 25; width: min(19rem, 86vw);
  padding: .375rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 10px 28px oklch(25% .02 50 / .14);
}
.addmenu__list a { display: block; padding: .625rem .75rem; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-weight: 600; }
.addmenu__list a small { display: block; font-weight: 400; font-size: .8125rem; color: var(--ink-3); }
.addmenu__list a:hover { background: var(--accent-soft); }

.seg--scroll { display: flex; overflow-x: auto; max-width: 100%; margin-bottom: 1rem; scrollbar-width: none; }
.seg--scroll::-webkit-scrollbar { display: none; }
.seg--scroll button { flex: none; min-height: var(--tap); }
.seg--scroll .num { color: var(--ink-3); font-weight: 500; margin-left: .125rem; }
/* phones: every option visible (UI audit 2026-10-11): the bar wraps into separate chips instead of scrolling out of sight */
@media (max-width: 640px) {
  .seg--scroll { flex-wrap: wrap; overflow: visible; gap: .375rem; border: 0; border-radius: 0; }
  .seg--scroll button, .seg--scroll button + button { border: 1px solid var(--line); border-radius: var(--radius); }
}

.svc-groups { display: grid; gap: 1.5rem; }
.svc-group__title { font-size: .8125rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 .5rem; }
.svc-list li { display: flex; align-items: center; }
.svc-list li > a { flex: 1; min-width: 0; }
.svc-thumb { flex: none; width: 3.5rem; height: 3.5rem; border-radius: var(--radius-sm); overflow: hidden; background: var(--line-soft); }
.svc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.svc-list .list__sub { white-space: normal; }
.svc-tags { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .25rem; }
.svc-order { flex: none; display: flex; flex-direction: column; gap: .25rem; padding-right: .5rem; }
.svc-order .icon-btn { width: 2.25rem; height: 2.25rem; }
.svc-order .icon-btn[disabled] { opacity: .3; cursor: default; }

.prices, .items { display: grid; gap: .5rem; }
.price-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) var(--tap); gap: .5rem; align-items: end; }
.price-row .field label { font-size: .8125rem; }
.price-row + .price-row .field label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.item-row { display: grid; grid-template-columns: minmax(0, 1fr) 4.5rem var(--tap); gap: .5rem; align-items: center; }
.money { position: relative; }
.money > span { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.money .input { padding-left: 1.5rem; }
.add-row { justify-self: start; }
.bundle-note { align-self: end; font-size: .875rem; color: var(--ok); font-weight: 550; padding-bottom: .625rem; }
.checks { display: grid; gap: 0; }
@media (min-width: 40rem) { .checks { grid-template-columns: 1fr 1fr; } }
.check { display: flex; align-items: center; gap: .625rem; min-height: var(--tap); cursor: pointer; }
.radios { border: 0; margin: 0; padding: 0; }
.radios--inline { display: flex; flex-wrap: wrap; column-gap: 1.5rem; }
.radios--inline legend { width: 100%; }
/* photo + calendar color share the left column; color right-justified beside the photo */
.photo-color { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1rem; row-gap: .375rem; align-items: start; }
.photo-color__color { justify-items: end; text-align: right; }
.photo-color__hint { grid-column: 1 / -1; }
.photo-color .pf { grid-template-columns: auto; }          /* buttons under the photo: no wrapping beside the color */
.pf__actions .btn { white-space: nowrap; }
.pf__preview img.is-placeholder { opacity: .9; }
.radios legend { padding: 0; margin-bottom: .25rem; }
.check .hint { margin-left: .25rem; }
.check input { width: 1.25rem; height: 1.25rem; accent-color: var(--accent); flex: none; }

/* ---------------------------------------------------------------- user: staff sections */

.btn--small { min-height: 2.25rem; padding: 0 .75rem; font-size: .8125rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.check > span .hint { display: block; margin-left: 0; }
.check:has(> span .hint) { align-items: flex-start; padding: .5rem 0; }
.check:has(> span .hint) input { margin-top: .125rem; }
.svc-checks, .perms { display: grid; }
@media (min-width: 40rem) { .perms { grid-template-columns: 1fr 1fr; column-gap: 1.5rem; } }
.svc-checks__head { font-size: .75rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: .75rem 0 .125rem; }
.svc-checks__head:first-child { margin-top: 0; }

.avail { display: grid; }
.av-day { padding: .625rem 0; outline: none; }
.av-day + .av-day { border-top: 1px solid var(--line-soft); }
.av-day:focus-visible { box-shadow: 0 0 0 2px var(--accent); border-radius: var(--radius-sm); }
.av-day__head { display: flex; align-items: center; gap: .75rem; min-height: 2.5rem; }
.av-day__name { font-weight: 600; width: 6.5rem; flex: none; }
.av-day__off { font-size: .875rem; color: var(--ink-3); flex: 1; }
.av-day__head .btn { margin-left: auto; }
.av-day__head .btn svg { width: 1rem; height: 1rem; }
.av-day__blocks { display: grid; gap: .5rem; }
.av-day__blocks:not(:empty) { margin-top: .5rem; }
.av-block { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) var(--tap); gap: .5rem; align-items: center; color: var(--ink-3); font-size: .875rem; }

/* ---------------------------------------------------------------- toast (save messages) */

.toast {
  position: fixed; z-index: 60; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom));
  max-width: min(32rem, calc(100vw - 2rem)); padding: .75rem 1rem; border-radius: var(--radius);
  background: var(--panel); color: var(--panel-ink); font-size: .9375rem; box-shadow: 0 8px 24px oklch(20% .02 50 / .25);
  transform: translate(-50%, 1rem); opacity: 0; transition: transform 220ms var(--ease), opacity 220ms var(--ease);
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* ---------------------------------------------------------------- clients */

.search { position: relative; margin-bottom: .75rem; }
.search__icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); display: grid; }
.search__icon svg { width: 1.125rem; height: 1.125rem; }
.search .input { padding-left: 2.5rem; }
.initials {
  flex: none; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-2); font-weight: 650; font-size: .8125rem; letter-spacing: .02em;
}
.phones { display: grid; gap: .5rem; }
.phone-row { display: grid; grid-template-columns: minmax(0, 1fr) 7.5rem var(--tap); gap: .5rem; align-items: center; }
.area-note { font-size: .875rem; padding: .625rem .75rem; border-radius: var(--radius-sm); }
.area-note--in { background: var(--ok-soft); color: oklch(36% .09 150); }
.area-note--out { background: var(--danger-soft); color: oklch(42% .14 27); }
.tagbox { display: grid; gap: .5rem; }

/* ---------------------------------------------------------------- data table (server-sorted, paged) */

.table-tools { display: flex; justify-content: flex-end; margin-bottom: .5rem; }
.mobile-sort { display: flex; align-items: center; gap: .5rem; font-size: .875rem; font-weight: 550; color: var(--ink-2); }
.mobile-sort .select { min-height: 2.5rem; width: auto; }
.dtable-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.dtable { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.dtable th, .dtable td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.dtable tbody tr:last-child > * { border-bottom: 0; }
.dtable td.num { white-space: nowrap; }
.dtable th .linklike, .dtable td .linklike { display: inline-block; padding: .5rem 0; }   /* bigger tap area */
.dtable thead th { padding: 0; background: oklch(98% .006 75); font-size: .8125rem; font-weight: 650; color: var(--ink-2); white-space: nowrap; }
.dtable thead th:not([data-sort]) { padding: .625rem 1rem; }
.th-sort { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: .375rem; width: 100%; min-height: var(--tap); padding: 0 1rem; cursor: pointer; }
.th-sort:hover { color: var(--ink); }
.th-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.th-sort__arrow { font-size: .625rem; color: var(--accent-2); }
.dtable tbody th { font-weight: 600; }
.dtable tbody th a { color: var(--ink); text-decoration: none; }
.dtable tbody tr[data-href] { cursor: pointer; }
.dtable tbody tr[data-href]:hover { background: oklch(98% .006 75); }
.dtable tbody tr[data-href]:hover th a { color: var(--accent-2); }
.who { display: inline-flex; align-items: center; gap: .625rem; }
.who__img { flex: none; width: 2rem; height: 2rem; border-radius: 50%; object-fit: cover; background: var(--line-soft); }
.notemark { display: inline-flex; align-items: center; gap: .25rem; color: var(--accent-2); font-size: .8125rem; font-weight: 600; }
.notemark svg, .flagmark svg { width: 1rem; height: 1rem; }
.flagmark { display: inline-grid; vertical-align: -.125rem; margin-left: .375rem; color: var(--danger); }
.dtable__email { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dtable__empty td { padding: 0; }
.dtable__empty .empty { border: 0; }

.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; margin-top: 1rem; }
.pager__info { font-size: .875rem; color: var(--ink-3); }
.pager__btns { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.pager__btns .btn svg { width: 1rem; height: 1rem; }
.pager__num { min-width: 2.5rem; min-height: 2.5rem; border: 1px solid transparent; border-radius: var(--radius-sm); background: none; font-weight: 550; cursor: pointer; color: var(--ink-2); }
.pager__num:hover { background: var(--line-soft); }
.pager__num[aria-current="page"] { background: var(--accent-soft); color: var(--accent-2); border-color: oklch(85% .05 45); }
.pager__gap { color: var(--ink-3); padding: 0 .25rem; }

/* phones: each row becomes a stacked block; header sort moves to the Sort by select */
@media (max-width: 47.99rem) {
  .dtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .dtable, .dtable tbody, .dtable tr, .dtable th, .dtable td { display: block; }
  .dtable tbody tr { padding: .75rem 1rem; border-bottom: 1px solid var(--line-soft); }
  .dtable tbody tr:last-child { border-bottom: 0; }
  .dtable tbody th, .dtable tbody td { padding: 0; border: 0; }
  .dtable tbody th { font-size: 1rem; margin-bottom: .125rem; }
  .dtable tbody td { font-size: .875rem; color: var(--ink-2); }
  .dtable tbody td:empty { display: none; }
  .dtable tbody td[data-label="Client since"]::before { content: "Client since "; color: var(--ink-3); }
  .dtable tbody td[data-label="Notes"] { margin-top: .25rem; }
  .dtable__email { max-width: none; }
  .pager__btns .btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (min-width: 48rem) { .table-tools { display: none; } }

/* ---------------------------------------------------------------- appointments */

.hint-link { font-size: .875rem; font-weight: 600; justify-self: start; }
.picked { display: flex; align-items: center; gap: .75rem; padding: .625rem .75rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.picked img { border-radius: 50%; object-fit: cover; flex: none; }
.picked > span { flex: 1; min-width: 0; display: grid; }
.lengths { display: flex; flex-wrap: wrap; gap: .5rem; }
.lenpick input { position: absolute; opacity: 0; pointer-events: none; }
.lenpick span { display: grid; min-width: 6rem; padding: .5rem .875rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; font-weight: 600; }
.lenpick input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); }
.lenpick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.appt-total { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; font-size: .9375rem; }
.daypick { display: grid; grid-template-columns: var(--tap) minmax(0, 1fr) var(--tap); gap: .5rem; align-items: center; max-width: 24rem; }
.daypick .icon-btn { width: var(--tap); height: var(--tap); }
.therapists { display: grid; gap: .75rem; }
.ther { padding: .75rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: grid; gap: .5rem; }
.ther.is-off { background: transparent; border-style: dashed; }
.ther__head { display: flex; align-items: center; gap: .625rem; }
.ther__head img { border-radius: 50%; object-fit: cover; }
.slots { display: flex; flex-wrap: wrap; gap: .375rem; }
.slot { min-width: 4.75rem; min-height: 2.5rem; padding: 0 .625rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); font-weight: 600; font-size: .875rem; cursor: pointer; font-variant-numeric: tabular-nums; }
.slot:hover { border-color: var(--accent); }
.slot--outside { border-style: dashed; color: var(--ink-2); background: oklch(97% .03 100); }
.linkbtn { justify-self: start; border: 0; background: none; padding: .25rem 0; color: var(--accent-2); font-weight: 600; font-size: .875rem; cursor: pointer; text-decoration: underline; }
.slot[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.fieldset[disabled] { opacity: .45; }

.client-appts { max-width: 44rem; margin-bottom: 1.5rem; display: grid; gap: .625rem; }
.client-appts__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.client-appts__head h2 { font-size: 1.0625rem; }
.client-appts__none { padding: .875rem 1rem; color: var(--ink-3); font-size: .9375rem; }
.appt { display: grid; gap: 1rem; max-width: 44rem; margin-bottom: 1.5rem; }
.appt__when { display: grid; gap: .125rem; font-size: 1.0625rem; }
.appt__status { justify-self: start; margin-bottom: .25rem; }
.tag.appt__status--booked { background: var(--accent-soft); color: var(--accent-2); }
.tag.appt__status--completed { background: oklch(95% .05 85); color: oklch(42% .1 70); }   /* done, money still owed */
.tag.appt__status--paid { background: var(--ok-soft); color: oklch(36% .09 150); }
.tag.appt__status--no_show, .tag.appt__status--cancelled { background: var(--danger-soft); color: oklch(42% .14 27); }
.appt__lines { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.appt__lines li { display: flex; justify-content: space-between; gap: 1rem; padding: .625rem .875rem; }
.appt__lines li + li { border-top: 1px solid var(--line-soft); }
.appt__lines li > span:first-child { display: grid; }
.appt__sum { font-weight: 650; }
.appt__facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .5rem 1rem; margin: 0; }
.appt__facts dt { color: var(--ink-3); font-size: .875rem; }
.appt__facts dd { margin: 0; }
.appt__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.appt__cancel { display: grid; gap: .5rem; max-width: 28rem; }

/* ---------------------------------------------------------------- action sheet (calendar) */

.sheet { position: fixed; inset: 0; z-index: 55; display: flex; align-items: flex-end; justify-content: center;
  background: oklch(20% .02 50 / 0); transition: background-color 200ms var(--ease); }
.sheet.is-on { background: oklch(20% .02 50 / .35); }
.sheet__panel { width: min(30rem, 100%); background: var(--surface); border-radius: 1rem 1rem 0 0;
  padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom)); box-shadow: 0 -8px 28px oklch(20% .02 50 / .2);
  transform: translateY(100%); transition: transform 220ms var(--ease); display: grid; gap: .875rem; }
.sheet.is-on .sheet__panel { transform: none; }
@media (min-width: 48rem) { .sheet { align-items: center; } .sheet__panel { border-radius: 1rem; } }
.sheet__title { font-weight: 650; font-size: 1.0625rem; }
.sheet__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.sheet__actions .btn { flex: 1 1 auto; }
.sheet__form { display: grid; gap: .875rem; }
#sheet-body { display: grid; gap: .875rem; }
@media (prefers-reduced-motion: reduce) { .sheet, .sheet__panel { transition: none; } }

/* ---------------------------------------------------------------- lists */

.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list li + li { border-top: 1px solid var(--line-soft); }
.list a { display: flex; align-items: center; gap: .875rem; padding: .875rem 1rem; color: inherit; text-decoration: none; min-height: 4rem; }
.list a:hover { background: oklch(98% .006 75); }
.avatar { flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover; }
.list__dot { flex: none; width: .75rem; height: .75rem; border-radius: 50%; background: var(--ink-3); }
.list__body { flex: 1; min-width: 0; }
.list__title { display: block; font-weight: 600; }
.list__sub { display: block; font-size: .875rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list__chev { flex: none; color: var(--ink-3); width: 1.125rem; height: 1.125rem; }
.list .is-inactive .list__title, .list .is-inactive .list__sub { color: var(--ink-3); }

.tag { display: inline-block; padding: .0625rem .5rem; border-radius: 1rem; font-size: .75rem; font-weight: 600; background: var(--line-soft); color: var(--ink-2); vertical-align: .0625rem; }
.tag--off { background: var(--danger-soft); color: oklch(42% .14 27); }
.tag--ok { background: var(--ok-soft); color: oklch(36% .09 150); }
.tag--warn { background: oklch(94% .07 85); color: oklch(42% .1 70); }

.empty { padding: 2rem 1.25rem; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty h2 { font-size: 1.0625rem; margin-bottom: .375rem; }
.empty p { color: var(--ink-3); margin-bottom: 1rem; max-width: 40ch; margin-inline: auto; }

.skeleton { height: 4rem; border-radius: var(--radius); background: linear-gradient(90deg, var(--line-soft), var(--paper), var(--line-soft)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.skeleton + .skeleton { margin-top: .5rem; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* ---------------------------------------------------------------- dashboard */

.summary {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem;
  margin-bottom: 1rem;
}
@media (min-width: 48rem) { .summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; } }
@media (max-width: 47.99rem) { .summary .stat--wide { grid-column: span 2; } }   /* phones: email takes the full row */
.stat {
  display: block; padding: .75rem .875rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  color: inherit; text-decoration: none;
}
button.stat { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.summary .stat { display: flex; flex-direction: column; justify-content: flex-start; }   /* every card top-aligned */
/* small cards: the detail may take two lines instead of being cut */
.summary .stat__detail { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.stat > span { display: block; }
a.stat:hover, button.stat:hover { border-color: oklch(80% .015 65); }
.stat__label { font-size: .8125rem; color: var(--ink-3); }
.stat__value { font-size: 1.25rem; font-weight: 650; margin-top: .125rem; }
.stat__value.is-pending { font-size: .9375rem; font-weight: 500; color: var(--ink-3); }
.stat__detail { font-size: .8125rem; color: var(--ink-2); margin-top: .125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cal-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem; }
@media (min-width: 64rem) { .cal-wrap { padding: .875rem 1rem 1rem; } }

.cal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .25rem .25rem .625rem; }
.cal-bar__title { font-weight: 650; font-size: 1.0625rem; margin-right: auto; }
.cal-nav { display: inline-flex; gap: .375rem; align-items: center; }
.biz-filter .select { min-height: 2.5rem; width: auto; font-size: .875rem; font-weight: 550; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg button { min-height: 2.5rem; padding: 0 .75rem; border: 0; background: var(--surface); font-size: .875rem; font-weight: 550; cursor: pointer; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-2); }
.icon-btn { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.icon-btn:hover { background: var(--line-soft); }
.icon-btn svg { width: 1.125rem; height: 1.125rem; }

.chips { display: flex; flex-wrap: wrap; gap: .375rem; padding: 0 .25rem .625rem; }   /* wrap: no chip hidden off the edge */
.chips::-webkit-scrollbar { display: none; }
.chips[hidden] { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: .4rem;
  min-height: 2.25rem; padding: 0 .75rem; border-radius: 1.25rem;
  border: 1px solid var(--line); background: var(--surface);
  font-size: .875rem; font-weight: 550; color: var(--ink-3); cursor: pointer;
}
.chip i { width: .625rem; height: .625rem; border-radius: 50%; background: var(--c, var(--ink-3)); opacity: .35; }
.chip[aria-pressed="true"] { color: var(--ink); border-color: oklch(80% .015 65); }
.chip[aria-pressed="true"] i { opacity: 1; }

.cal-note { margin: 0 .25rem .625rem; padding: .625rem .75rem; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-2); font-size: .875rem; }
.cal-note[hidden] { display: none; }
.cal-note a { color: inherit; font-weight: 600; }
.cal-note button { border: 0; background: none; padding: .25rem 0; margin-left: .25rem; color: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }

/* EventCalendar theme hooks */
.ec {
  --ec-bg-color: var(--surface);
  --ec-text-color: var(--ink);
  --ec-border-color: oklch(89.5% .01 75);       /* hour lines */
  --ec-today-bg-color: var(--surface);          /* today isn't tinted: the now-line marks it */
  --ec-highlight-color: var(--accent-soft);
  --ec-now-indicator-color: var(--accent);
  --ec-event-bg-color: var(--accent);
  --ec-event-text-color: var(--on-accent);
  font-size: .875rem;
}
.ec .ec-toolbar { display: none; }            /* we render our own toolbar (.cal-bar) */
.ec-time-grid .ec-sidebar, .ec .ec-header { color: var(--ink-3); }
.ec .ec-resource, .ec .ec-day-head { font-weight: 600; color: var(--ink-2); }
.ec .ec-event { border-radius: var(--radius-sm); box-shadow: none; }
/* travel blocks: quiet diagonal stripes in the therapist's color, text in that color */
.ec .ec-event.is-travel {
  background-image: repeating-linear-gradient(135deg, color-mix(in oklch, currentColor 14%, transparent) 0 6px, transparent 6px 12px);
  border: 1px dashed color-mix(in oklch, currentColor 45%, transparent);
  font-size: .75rem; font-weight: 600;
}
.ec .ec-event.is-travel .ec-event-time { display: none; }
.ec .ec-event { cursor: pointer; }
/* not working: light yellow, see-through so the hour lines stay visible */
.ec .ec-bg-event.is-off { background-color: oklch(94% .06 100); opacity: .55; }
/* month: one count per day */
.ec .ec-event.is-count { background: var(--accent-soft) !important; color: var(--accent-2) !important; font-weight: 650; font-size: .75rem; }
.ec .ec-day-grid .ec-day { cursor: pointer; }
.ec .ec-event.is-travel { cursor: default; pointer-events: none; }
.ec .ec-event.is-travel.is-editable { cursor: pointer; pointer-events: auto; }
.ec .ec-event.is-travel.is-editable:hover { border-style: solid; }
/* drag handles on editable travel: above the title (it covered them), a clear up-down cursor, and a small grip */
.ec .ec-event.is-travel.is-editable .ec-resizer { z-index: 3; min-height: 10px; cursor: ns-resize; }
.ec .ec-event.is-travel.is-editable .ec-resizer::after {
  content: ''; position: absolute; left: 50%; width: 28px; height: 3px; margin-left: -14px; border-radius: 2px;
  background: currentColor; opacity: .35; top: 50%; transform: translateY(-50%);
}
.ec .ec-event.is-travel.is-editable:hover .ec-resizer::after { opacity: .7; }
/* only the edge that changes the drive has a handle: the top of a drive TO the client, the bottom of a drive after */
.ec .ec-event.is-travel.is-before .ec-resizer:not(.ec-start), .ec .ec-event.is-travel.is-after .ec-resizer.ec-start { display: none; }
.ec .ec-event.is-travel.is-editable.is-before .ec-event-body { padding-top: 8px; }
/* blocked / extra time the viewer may change: drag to move, a grip on both edges to resize */
.ec .ec-event.is-movable { cursor: grab; }
.ec .ec-event.is-movable .ec-resizer { z-index: 3; min-height: 10px; cursor: ns-resize; }
.ec .ec-event.is-movable .ec-resizer::after {
  content: ''; position: absolute; left: 50%; width: 24px; height: 3px; margin-left: -12px; border-radius: 2px;
  background: currentColor; opacity: .3; top: 50%; transform: translateY(-50%);
}
.ec .ec-event.is-movable:hover .ec-resizer::after { opacity: .65; }
/* the handles take the finger right away instead of scrolling the page */
.ec .ec-event.is-travel.is-editable .ec-resizer, .ec .ec-event.is-movable .ec-resizer { touch-action: none; }
/* touch: a finger-sized handle (the library's is 8px) and a grip that's always visible */
@media (pointer: coarse) {
  .ec .ec-event.is-travel.is-editable .ec-resizer, .ec .ec-event.is-movable .ec-resizer { max-block-size: none; block-size: 20px; }
  .ec .ec-event.is-travel.is-editable .ec-resizer::after, .ec .ec-event.is-movable .ec-resizer::after { opacity: .6; }
  .ec .ec-event.is-travel.is-editable.is-before .ec-event-body { padding-top: 18px; }
}
.ec .ec-event.is-completed, .ec .ec-event.is-paid { opacity: .55; }
.ec .ec-event.is-block {
  background: repeating-linear-gradient(135deg, oklch(86% .01 70) 0 6px, oklch(90% .008 70) 6px 12px) !important;
  color: var(--ink-2) !important; border: 1px solid oklch(80% .012 70); font-size: .75rem; font-weight: 600;
}
.ec .ec-event.is-extra { border: 1.5px dashed var(--ok); color: oklch(36% .09 150) !important; font-size: .75rem; font-weight: 600; background: transparent !important; }
.ec .ec-event.is-block .ec-event-time, .ec .ec-event.is-extra .ec-event-time { display: none; }
.ec .ec-event.is-google { background-image: repeating-linear-gradient(135deg, transparent 0 6px, oklch(55% .08 250 / .12) 6px 12px) !important; }
.ec .ec-event.is-no-show { opacity: .55; text-decoration: line-through; }
.ec .ec-list .ec-event { color: var(--ink); }
.ec .ec-no-events { padding: 2.5rem 1rem; color: var(--ink-3); }
#cal { min-height: 30rem; }

/* ---------------------------------------------------------------- login */

.login {
  min-height: 100dvh; display: grid; place-items: center;
  padding: 1.5rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
}
.login__box { width: 100%; max-width: 22rem; }
.login .brand { padding: 0 0 2rem; color: var(--ink); }
.login .brand__name small { color: var(--ink-3); }
.login h1 { font-size: 1.375rem; font-weight: 650; margin-bottom: 1.25rem; }
.login .form { gap: 1rem; }
.login .btn--primary { width: 100%; margin-top: .5rem; }

/* code blocks (settings: website embed code) */
.code { position: relative; margin: 0; padding: .875rem 1rem; padding-right: 5.5rem; border-radius: var(--radius); background: oklch(24% .02 50); color: oklch(93% .015 75);
  font: .8125rem/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace; white-space: pre; overflow-x: auto; }
.btn-row > .code { min-width: 0; flex: 1 1 100%; }   /* a long link scrolls inside its box, not the page */
.code .btn { position: absolute; top: .5rem; right: .5rem; background: oklch(32% .02 50); border-color: oklch(40% .02 50); color: inherit; }
.code .btn:hover { background: oklch(38% .02 50); }
.steps { display: grid; gap: 1.25rem; counter-reset: step; padding: 0; margin: 0; list-style: none; }
.steps > li { display: grid; gap: .5rem; padding-left: 2.25rem; position: relative; }
.steps > li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: .05rem; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  display: grid; place-items: center; font-size: .75rem; font-weight: 650; background: var(--accent); color: var(--on-accent); }
.steps h3 { font-size: .9375rem; font-weight: 650; }
.prose { display: grid; gap: .5rem; font-size: .9375rem; color: var(--ink-2); max-width: 65ch; }
.prose ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; }
.prose code { font: .8125rem ui-monospace, Menlo, Consolas, monospace; background: var(--line-soft); padding: .05rem .3rem; border-radius: 4px; }
.preview { border: 1px dashed var(--line); border-radius: var(--radius); padding: 1rem; }

/* settings: Google Business */
.gplace { display: grid; gap: .2rem; }
.gplace__name { font-weight: 650; }
.gplace__stars { color: oklch(55% .13 70); font-size: .9375rem; letter-spacing: .02em; }
.glist { list-style: none; margin: 0; padding: 0; display: grid; }
.glist > li { display: grid; gap: .625rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.glist > li:first-child { border-top: 0; }
.gsearch__row { display: flex; gap: .5rem; }
.gsearch__row .input { flex: 1; min-width: 0; }
.gattr { margin-top: 1.5rem; }

/* reviews */
.rv-tools { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: .75rem; }
.rv-tools .select { width: auto; min-width: 12rem; }
.seg { display: inline-flex; gap: .25rem; }
.seg [aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.rv-list { list-style: none; margin: 1rem 0 0; padding: 0; max-width: 46rem; }
.rv-item { display: grid; gap: .5rem; padding: 1.25rem 0; border-top: 1px solid var(--line); scroll-margin-top: 5rem; }
.rv-item:first-child { border-top: 0; padding-top: .25rem; }
.rv-item:target { background: linear-gradient(var(--line-soft), var(--line-soft)) no-repeat; }
.rv-item__head { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; }
.rv-item__body { max-width: 65ch; white-space: pre-line; }
.rv-stars { color: oklch(62% .14 70); letter-spacing: .05em; font-size: 1.05rem; }
.rv-stars span { color: var(--line); }
.rv-reply { margin-left: 1rem; padding: .625rem .875rem; border-radius: var(--radius); background: var(--line-soft); display: grid; gap: .25rem; }

/* email client: list + reader side by side on desktop, one pane at a time on phones */
.mail-bar { display: flex; gap: .75rem; align-items: center; margin-bottom: 1rem; }
.mail-folders { display: flex; flex-wrap: wrap; gap: .375rem; flex: 1; min-width: 0; }
.mail-folder { flex: none; min-height: 2.5rem; padding: 0 .875rem; border-radius: 999px; border: 1px solid var(--line); background: transparent;
  color: var(--ink-2); font: inherit; font-size: .875rem; cursor: pointer; }
.mail-folder[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.mail-count { display: inline-block; min-width: 1.25rem; padding: 0 .3rem; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 650; }
.mail { display: grid; gap: 1.5rem; }
.mail-list, .mail-read { min-width: 0; }
.mail[data-pane="read"] .mail-list, .mail:not([data-pane="read"]) .mail-read { display: none; }
@media (min-width: 64rem) {
  .mail { grid-template-columns: minmax(18rem, 26rem) minmax(0, 1fr); align-items: start; }
  .mail:not(#x) .mail-list, .mail:not(#x) .mail-read { display: block; }   /* both panes, whatever the phone state */
  .mail-list { position: sticky; top: 1rem; max-height: calc(100dvh - 9rem); overflow-y: auto; }
  .mail-back { display: none; }
}
.mail-items { list-style: none; margin: 0; padding: 0; }
.mail-item { width: 100%; display: grid; gap: .125rem; text-align: left; padding: .75rem .75rem; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; color: var(--ink-2); font: inherit; cursor: pointer; border-radius: 0; }
.mail-item:hover { background: var(--line-soft); }
.mail-item.is-open { background: var(--line-soft); }
.mail-item.is-unread { color: var(--ink); }
.mail-item.is-unread .mail-item__who, .mail-item.is-unread .mail-item__subj { font-weight: 650; }
.mail-item__top { display: flex; justify-content: space-between; gap: .75rem; }
.mail-item__who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item__date { flex: none; font-size: .8125rem; color: var(--ink-3); }
.mail-item__subj { font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-tag { margin-right: .3rem; font-size: .8rem; }
.mail-pager { display: flex; justify-content: space-between; align-items: center; padding: .75rem 0; }
.mail-empty { color: var(--ink-3); padding: 2rem 0; }
.mail-subj { font-size: 1.375rem; font-weight: 650; letter-spacing: -.01em; margin: .25rem 0 .75rem; overflow-wrap: anywhere; }
.mail-meta { display: grid; gap: .125rem; font-size: .9375rem; overflow-wrap: anywhere; }
.mail-actions { margin: 1rem 0; }
.mail-files { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.mail-imgs { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
.mail-body { border-top: 1px solid var(--line); padding-top: 1rem; }
.mail-frame { width: 100%; border: 0; min-height: 200px; background: oklch(99.5% .003 75); border-radius: var(--radius); }
.mail-text { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 72ch; }
.mail-compose { max-width: none; }
.mail-textarea { min-height: 16rem; font: inherit; line-height: 1.5; }

.mail-back { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.mail-back::before { content: "‹"; font-size: 1.25rem; line-height: 1; margin-right: .25rem; }
#new { flex: none; white-space: nowrap; }   /* icon + "New", always one line */
.mail-actions { align-items: center; }
.mail-move { width: auto; min-height: 2.25rem; padding-block: 0; font-size: .8125rem; }
.mail-actions [data-act="delete"] { margin-left: auto; }

/* rich text editor (email) */
.rte { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.rte:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px oklch(50% .125 42 / .18); }
.rte__bar { display: flex; flex-wrap: wrap; gap: .125rem; padding: .25rem; border-bottom: 1px solid var(--line-soft); background: var(--paper); }
.rte__btn { min-width: 2.5rem; min-height: 2.5rem; padding: 0 .5rem; border: 0; border-radius: var(--radius-sm); background: transparent;
  color: var(--ink-2); font: inherit; font-size: .875rem; cursor: pointer; }
.rte__btn:hover { background: var(--line-soft); color: var(--ink); }
.rte__btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-2); }
.rte__link { display: flex; gap: .5rem; align-items: center; padding: .5rem; border-bottom: 1px solid var(--line-soft); }
.rte__link .input { flex: 1; min-width: 0; min-height: 2.25rem; }
.rte__area { border: 0 !important; box-shadow: none !important; border-radius: 0; min-height: 16rem; max-height: 60vh; overflow-y: auto;
  padding: .75rem 1rem; line-height: 1.55; outline: none; }
.rte__area p { margin: 0 0 .75rem; }
.rte__area h3 { font-size: 1.125rem; font-weight: 650; margin: 1rem 0 .5rem; }
.rte__area ul, .rte__area ol { margin: 0 0 .75rem; padding-left: 1.4rem; }
.rte__area blockquote { margin: .75rem 0; padding-left: .75rem; border-left: 3px solid var(--line); color: var(--ink-2); }
.rte__area a { color: var(--accent-2); }
.m-steps { margin: .5rem 0 0; padding-left: 1.1rem; font-size: .8125rem; display: grid; gap: .125rem; }
#mail-ui { display: grid; gap: 1rem; }
/* mailbox picker (2+ businesses): phones = picker + New on one row, folders below; desktop = one row */
.mail-bar { flex-wrap: wrap; }
.mail-box { width: auto; flex: 1 1 10rem; min-width: 0; order: 0; }
#new { order: 1; }
.mail-folders { order: 2; flex: 1 1 100%; }
@media (min-width: 64rem) {
  .mail-box { flex: 0 1 20rem; }
  .mail-folders { order: 1; flex: 1 1 0; }
  #new { order: 2; }
}

/* settings: client messages */
.cm-modes { display: grid; gap: .5rem; }
@media (min-width: 48rem) { .cm-modes { grid-template-columns: repeat(3, 1fr); } }
.cm-mode { display: flex; gap: .625rem; align-items: flex-start; padding: .75rem .875rem; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; background: var(--surface); }
.cm-mode:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.cm-mode input { margin-top: .2rem; accent-color: var(--accent); }
.cm-mode b { display: block; }
.cm-mode small { display: block; font-size: .8125rem; color: var(--ink-3); }
.cm { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
@media (min-width: 64rem) { .cm { grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr); align-items: start; } .cm-list { position: sticky; top: 1rem; } }
.cm-head, .cm-row { display: grid; grid-template-columns: minmax(0, 1fr) 3.5rem 3.5rem; align-items: center; }
.cm-head { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 0 .5rem .5rem; }
.cm-head span:not(:first-child) { text-align: center; }
#list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.cm-row { border-top: 1px solid var(--line-soft); }
.cm-row:first-child { border-top: 0; }
.cm-row.is-open { background: var(--accent-soft); }
.cm-name { text-align: left; border: 0; background: none; font: inherit; color: inherit; padding: .75rem .875rem; cursor: pointer; min-height: var(--tap); }
.cm-name b { display: block; font-weight: 600; font-size: .9375rem; }
.cm-name small { display: block; font-size: .75rem; color: var(--ink-3); }
.cm-sw { display: grid; place-items: center; min-height: var(--tap); cursor: pointer; }
.cm-sw input { width: 1.25rem; height: 1.25rem; accent-color: var(--accent); }
.cm-title { font-size: 1.25rem; font-weight: 650; }
.cm-form { max-width: none; margin-top: 1rem; }
.cm-form legend .switch { min-height: 2rem; }
.cm-token { width: auto; min-height: 2.25rem; font-size: .8125rem; justify-self: start; }
.cm-preview { margin-top: 1.5rem; display: grid; gap: .5rem; }
.cm-ptitle { font-weight: 600; font-size: .875rem; }
.cm-frame { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); min-height: 18rem; background: #f6f3ee; }
.cm-bubble { justify-self: start; max-width: 22rem; padding: .625rem .875rem; border-radius: 1.1rem 1.1rem 1.1rem .3rem; background: var(--line-soft); font-size: .9375rem; line-height: 1.45; white-space: pre-wrap; }
.cm-flags { display: flex; flex-wrap: wrap; gap: .5rem 2rem; }

/* appointment notes thread */
.appt-notes { display: grid; gap: .75rem; margin: 1.25rem 0; padding-top: 1rem; border-top: 1px solid var(--line); }
.appt-notes__title { font-size: 1rem; font-weight: 650; }
.appt-notes__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.appt-notes__list li { padding: .625rem .75rem; border-radius: var(--radius); background: var(--line-soft); }
.appt-notes__body { white-space: pre-line; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-2); text-decoration: underline; cursor: pointer; }
.linklike.is-armed { color: var(--danger); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* form designer */
.fd { display: grid; gap: 1.5rem; margin-top: 1rem; }
@media (min-width: 64rem) { .fd { grid-template-columns: minmax(0, 1fr) 17rem; align-items: start; } .fd-palette { position: sticky; top: 1rem; } }
.fd-pages { display: flex; flex-wrap: wrap; gap: .375rem; margin-bottom: .75rem; }
.fd-tab { min-height: 2.5rem; padding: 0 .875rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font: inherit; font-size: .875rem; cursor: pointer; color: var(--ink-2); }
.fd-tab small { color: var(--ink-3); margin-left: .25rem; }
.fd-tab.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.fd-tab.is-on small { color: var(--panel-ink-2); }
.fd-tab--add { border-style: dashed; }
.fd-ptitle { margin-bottom: .75rem; }
.fd-prow { display: flex; gap: .375rem; flex-wrap: wrap; }
.fd-prow .input { flex: 1 1 12rem; }
.fd-items { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.fd-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.fd-item.is-open { border-color: var(--accent); box-shadow: 0 0 0 3px oklch(50% .125 42 / .12); }
.fd-row { display: flex; gap: .5rem; align-items: center; padding: .375rem .5rem .375rem .25rem; }
.fd-name { flex: 1; min-width: 0; display: grid; gap: .125rem; text-align: left; border: 0; background: none; font: inherit; color: inherit; padding: .375rem .5rem; cursor: pointer; }
.fd-name .tag { justify-self: start; }
.fd-label { font-weight: 550; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fd-name .hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-acts { display: flex; gap: .25rem; flex: none; }
.fd-acts .btn { min-width: 2.25rem; padding: 0 .5rem; }
.fd-edit { display: grid; gap: .875rem; padding: .75rem 1rem 1rem; border-top: 1px solid var(--line-soft); }
.fd-merge { width: auto; justify-self: start; min-height: 2.25rem; font-size: .8125rem; }
.fd-empty { padding: 1rem; border: 1px dashed var(--line); border-radius: var(--radius); }
.fd-palette { display: grid; gap: .5rem; align-content: start; }
.fd-ptitle2 { font-weight: 650; }
.fd-gname { font-size: .6875rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-top: .5rem; }
.fd-add { display: flex; flex-wrap: wrap; gap: .375rem; }
.fd-biz { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
#merge code { display: inline-block; margin: .125rem .125rem 0 0; font-size: .75rem; }
.cf-send { display: flex; gap: .375rem; align-items: center; }
.cf-send .select { width: auto; min-height: 2.25rem; font-size: .8125rem; }
.cf-open { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; }

/* AI Assistant & API */
.api-tools { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.api-tools li { padding-bottom: .75rem; border-bottom: 1px solid var(--line-soft); }
.api-tools p { font-size: .875rem; color: var(--ink-2); margin-top: .25rem; max-width: 70ch; }

/* ---------------------------------------------------------------- waitlist */
.wl-times { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .375rem; max-width: 34rem; }
.wl-times li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .375rem 0; border-top: 1px solid var(--line-soft); }

/* upsell panel on an appointment */
.upsell { display: grid; gap: .75rem; margin: .75rem 0 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.upsell__sum { font-size: 1rem; }
.upsell__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; }
.upsell__title { font-size: 1.0625rem; font-weight: 650; }
.upsell .check.is-off { opacity: .5; cursor: not-allowed; }
.upsell__part { display: grid; gap: .625rem; }
.upsell__part + .upsell__part { padding-top: .875rem; border-top: 1px solid var(--line); }
.upsell__head .btn, .upsell__head .linklike { margin-left: auto; }
.upsell .linklike { padding: .625rem 0; margin-block: -.625rem; }   /* 44px tap area, same look */

/* ---------------------------------------------------------------- payment processors */
.pp-list { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; gap: .75rem; max-width: 46rem; }
.pp { display: grid; gap: .875rem; padding: 1rem 1.125rem 1.125rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pp__head { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem .5rem; }
.pp__name { font-size: 1.0625rem; font-weight: 650; margin-right: .25rem; }
.pp__facts { display: grid; grid-template-columns: max-content 1fr; gap: .375rem 1rem; margin: 0; font-size: .9375rem; }
.pp__facts dt { color: var(--ink-3); }
.pp__facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.pp__acct { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8125rem; color: var(--ink-3); }
.pp__actions { display: flex; flex-wrap: wrap; gap: .5rem; padding-top: .875rem; border-top: 1px solid var(--line-soft, var(--line)); }
.pp__remove { margin-left: auto; }
.pp__panel:empty { display: none; }
.pp__panel form { display: grid; gap: .875rem; padding-top: .25rem; }
.pp-empty { list-style: none; }
.pp-add { display: grid; gap: 1rem; max-width: 46rem; }
#platform { max-width: 46rem; margin-bottom: 1rem; }
@media (max-width: 30rem) {
  .pp__facts { grid-template-columns: 1fr; gap: .125rem; }
  .pp__facts dd { margin-bottom: .375rem; }
  .pp__actions .btn { flex: 1 1 auto; }
  .pp__remove { margin-left: 0; }
}
.btn--quiet { background: transparent; border-color: transparent; color: var(--ink-3); }
.btn--quiet:hover, .btn--quiet.is-armed { color: var(--danger); border-color: var(--line); }
.pp__facts .hint { font-size: inherit; }
#add-sec { max-width: 46rem; }

/* payment section on an appointment */
.pay__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.pay__list li { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.pay__right { display: flex; align-items: center; gap: .375rem; flex: none; }
.pay__methods { display: flex; flex-wrap: wrap; gap: .5rem; }
.appt__disc { color: var(--ok, #2f6b3f); }
.rebook { display: grid; gap: .375rem; margin: .25rem 0 1rem; }
.rebook .btn { justify-self: start; }
.pay__gift { margin: .25rem 0 .5rem; }
.pay__gift .pay__offline { grid-template-columns: 1fr auto auto; }
.pay__series { display: grid; gap: .375rem; margin: .5rem 0 .25rem; }
.pay__series .btn { justify-content: center; }
.sr-row { display: flex; gap: .75rem; align-items: center; justify-content: space-between; padding: .75rem 1rem; }
.sr-li .list__sub { white-space: normal; }
.sr-actions { display: flex; gap: .25rem; flex-shrink: 0; }
.sr-sell { display: grid; gap: .75rem; padding: .75rem; margin-bottom: .75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pay__offline { display: grid; grid-template-columns: auto 1fr auto; gap: .5rem; align-items: center; }
.pay__tip { width: 6rem; min-width: 6rem; flex: none; display: inline-block; margin-left: .25rem; }
@media (max-width: 30rem) {
  .pay__methods .btn { flex: 1 1 100%; }
  .pay__offline { grid-template-columns: 1fr; }
}

.unpaid { display: grid; gap: .75rem; margin-top: .75rem; }
.pay + .upsell { margin-top: 0; }   /* payment card directly above the service card: one gap, not two */
.pay__who { display: grid; gap: .5rem; }
.pay__who-opts { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.pay__opt { min-height: 2.75rem; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.pay__opt:hover { border-color: oklch(80% .015 65); }
.pay__opt[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.pay__opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Accounting (section 45): a ledger, not dashboard tiles. Tables stay tabular on a phone. */
.acct-tools { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1.5rem; }
.acct-tools .select { width: auto; min-width: 12rem; }
.acct-tools .seg--scroll { margin-bottom: 0; }
.acct-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 11rem)); gap: .75rem; }
.acct-dates label { display: grid; gap: .25rem; font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
.acct-dates .input { width: 100%; min-width: 0; }
.acct-dates[hidden] { display: none; }
.acct-block { margin-bottom: 2.25rem; max-width: 48rem; }
.acct-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; margin-bottom: .625rem; }
.acct-head h2 { font-size: 1.125rem; font-weight: 650; }
.acct-span { color: var(--ink-3); font-size: .875rem; }
.acct-net { font-size: 1.0625rem; color: var(--ink-2); margin-bottom: .875rem; }
.acct-net .num { font-size: 1.75rem; font-weight: 650; color: var(--ink); letter-spacing: -.01em; margin-right: .25rem; }
.acct-sub { display: block; font-size: .8125rem; font-weight: 400; color: var(--ink-3); }
.acct-net .acct-sub { font-size: .875rem; }
.acct-zero { color: var(--line); }
.acct-none { color: var(--ink-3); padding: .875rem 1rem; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.acct-block > .hint { margin-top: .5rem; }
.acct-block > .hint + .acct-owed, .acct-block > .hint + .acct-none { margin-top: .625rem; }
.acct-table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.ledger { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.ledger th, .ledger td { padding: .625rem .875rem; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.ledger .num, .ledger td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ledger thead th { background: oklch(98% .006 75); font-size: .8125rem; font-weight: 650; color: var(--ink-2); white-space: nowrap; }
.ledger tbody th { font-weight: 600; }
.ledger tbody tr:last-child > * { border-bottom: 0; }
.ledger tfoot > tr > * { border-top: 1px solid var(--line); border-bottom: 0; font-weight: 650; }
.acct-owed { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.acct-owed li + li { border-top: 1px solid var(--line-soft); }
.acct-owed a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: var(--tap); padding: .625rem .875rem; color: var(--ink); text-decoration: none; }
.acct-owed a:hover { background: oklch(98% .006 75); }
.acct-owed a:hover strong { color: var(--accent-2); }
.acct-owed__amt { font-weight: 650; color: oklch(42% .1 70); white-space: nowrap; }
#out[aria-busy="true"] { opacity: .55; transition: opacity 150ms var(--ease); }
@media (max-width: 30rem) {
  .ledger { font-size: .8125rem; }
  .ledger th, .ledger td { padding: .5rem .5rem; }
  .ledger th:first-child, .ledger td:first-child { padding-left: .75rem; }
  .ledger th:last-child, .ledger td:last-child { padding-right: .75rem; }
  .acct-tools .select { flex: 1 1 100%; }
}
/* calendar: appointment status icon, top-right (time is top-left). A light chip so it reads on any therapist color. */
.ec .ec-event .ev-status {
  position: absolute; top: 3px; right: 3px; z-index: 2; display: grid; place-items: center;
  width: 18px; height: 18px; border-radius: 50%; background: oklch(99% .004 75 / .92); color: var(--ink); pointer-events: none;
}
.ec .ec-event .ev-status svg { width: 12px; height: 12px; }
/* white chip = not done yet (booked; prepaid = green $); filled chip = visit done: amber owed, green paid, red no-show */
.ec .ec-event .ev-status--prepaid { color: oklch(42% .1 150); }
.ec .ec-event .ev-status--completed { background: oklch(72% .15 70); color: oklch(99% .004 75); }
.ec .ec-event .ev-status--paid { background: oklch(52% .12 150); color: oklch(99% .004 75); }
.ec .ec-event .ev-status--no_show { background: oklch(52% .17 27); color: oklch(99% .004 75); }
.ec .ec-event .ev-status--completed, .ec .ec-event .ev-status--paid, .ec .ec-event .ev-status--no_show { box-shadow: 0 0 0 1.5px oklch(99% .004 75 / .9); }
.ec .ec-event:has(.ev-status) .ec-event-body { padding-right: 20px; }
.ec .ec-list .ec-event .ev-status { position: static; display: inline-grid; margin-left: .375rem; vertical-align: -3px; }
.ec .ec-list .ec-event:has(.ev-status) .ec-event-body { padding-right: 0; }
/* calendar: tap the date for a month picker (section 47) */
.cal-bar { position: relative; }
.cal-date { display: inline-flex; align-items: center; gap: .375rem; min-height: var(--tap); margin: 0 0 0 -.5rem; padding: 0 .5rem;
  border: 0; border-radius: var(--radius-sm); background: none; font: inherit; color: inherit; cursor: pointer; }
.cal-date::after { content: ''; width: .4rem; height: .4rem; border: solid currentColor; border-width: 0 1.75px 1.75px 0; transform: translateY(-2px) rotate(45deg); opacity: .55; }
.cal-date:hover { background: var(--line-soft); }
.cal-date[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent-2); }
.minical {
  position: absolute; z-index: 30; top: calc(var(--tap) + .25rem); left: .25rem; width: min(20rem, calc(100vw - 2rem));
  padding: .75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 10px 30px oklch(25% .02 50 / .14), 0 2px 6px oklch(25% .02 50 / .08);
}
.minical[hidden] { display: none; }
.minical__head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .25rem; margin-bottom: .5rem; }
.minical__label { justify-self: center; display: inline-flex; align-items: center; gap: .25rem; min-height: 2.5rem; padding: 0 .625rem;
  border: 0; border-radius: var(--radius-sm); background: none; font: inherit; font-weight: 650; color: var(--ink); cursor: pointer; }
button.minical__label:hover { background: var(--line-soft); }
.minical__label svg { width: 1rem; height: 1rem; opacity: .6; }
.minical__dow, .minical__days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.minical__dow span { font-size: .75rem; font-weight: 600; color: var(--ink-3); padding-bottom: .25rem; }
.minical__days button, .minical__months button {
  min-height: 2.5rem; border: 0; border-radius: var(--radius-sm); background: none; font: inherit; font-size: .9375rem;
  font-variant-numeric: tabular-nums; color: var(--ink); cursor: pointer; transition: background-color 150ms var(--ease);
}
.minical__days button:hover, .minical__months button:hover { background: var(--line-soft); }
.minical__days .is-out { color: var(--ink-3); }
.minical__days .is-today, .minical__months .is-today { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent-2); font-weight: 650; }
.minical__days [aria-current="date"], .minical__months [aria-current="date"] { background: var(--accent); color: var(--on-accent); font-weight: 650; }
.minical__days [aria-current="date"]:hover, .minical__months [aria-current="date"]:hover { background: var(--accent-2); }
.minical__months { display: grid; grid-template-columns: repeat(3, 1fr); gap: .375rem; }
.minical__months button { min-height: 3rem; font-weight: 550; }
.minical__foot { display: flex; justify-content: flex-end; margin-top: .5rem; padding-top: .5rem; border-top: 1px solid var(--line-soft); }
.minical button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* payment methods grouped: Saved card / Or a new card / Other (section 49) */
.pay__group { flex-basis: 100%; margin-top: .375rem; font-size: .8125rem; font-weight: 600; color: var(--ink-3); }
.pay__group:first-child { margin-top: 0; }
/* Businesses › Therapist pay (section 50) */
.payrates { display: grid; gap: .5rem; max-width: 40rem; }
.payrates__head, .payrates__row { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(0, 9rem) minmax(0, 11rem); gap: .5rem .75rem; align-items: center; }
.payrates__head span { font-size: .8125rem; font-weight: 600; color: var(--ink-3); }
.payrates__kind { font-weight: 600; }
.payrates__ov { display: block; font-size: .8125rem; font-weight: 400; color: var(--ink-3); }
.payrates__ov .linklike { font-size: inherit; }
.payrates__f { display: block; min-width: 0; }
.payrates__cap { display: none; font-size: .75rem; font-weight: 600; color: var(--ink-3); margin-bottom: .125rem; }
@media (max-width: 30rem) {
  .payrates__head { display: none; }
  .payrates__row { grid-template-columns: 1fr 1fr; padding-bottom: .5rem; border-bottom: 1px solid var(--line-soft); }
  .payrates__kind { grid-column: 1 / -1; }
  .payrates__cap { display: block; }
}
/* My pay (section 50): one block per visit, its items as price × rate = pay */
.paylist { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.paylist__visit + .paylist__visit { border-top: 1px solid var(--line); }
.paylist__visit { padding: .75rem .875rem; }
.paylist__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.paylist__head a { color: var(--ink); text-decoration: none; }
.paylist__head a:hover strong { color: var(--accent-2); }
.paylist__total { font-weight: 650; white-space: nowrap; }
.paylist__lines { list-style: none; margin: .5rem 0 0; padding: 0; font-size: .875rem; color: var(--ink-2); }
.paylist__lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto 5.25rem; gap: .25rem .75rem; padding: .25rem 0; }
.paylist__lines li + li { border-top: 1px dashed var(--line-soft); }
.paylist__lines .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.paylist__lines .tag { font-size: .6875rem; vertical-align: 1px; }
@media (max-width: 30rem) {
  .paylist__lines li { grid-template-columns: minmax(0, 1fr) auto; }
  .paylist__lines li > span:first-child { grid-column: 1 / -1; }
}
/* offline (section 52): pages answered from the copy saved on this phone */
.offline-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: .625rem 1rem;
  padding-bottom: max(.625rem, env(safe-area-inset-bottom));
  background: oklch(32% .03 60); color: oklch(96% .01 75); font-size: .8125rem; font-weight: 550; text-align: center;
  box-shadow: 0 -4px 16px oklch(25% .02 50 / .18); }
body:has(.offline-bar:not([hidden])) { padding-bottom: 3.5rem; }
.offline-bar[hidden] { display: none; }
/* My locations: a therapist's business, read-only (section 52) */
.biz-fixed { display: grid; gap: .125rem; }
.biz-fixed strong { font-size: 1.0625rem; font-weight: 650; }
.biz-fixed[hidden] { display: none; }
/* sign-in: Install as app (section 53) */
.install { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line-soft); text-align: center; }
.install[hidden] { display: none; }
.install__btn { font-weight: 600; text-decoration: none; padding: .5rem .25rem; min-height: var(--tap); }
.install__btn:hover { text-decoration: underline; }
.install__how { margin-top: .375rem; font-size: .875rem; color: var(--ink-2); }
.install__how svg { vertical-align: -3px; }
.install__how[hidden] { display: none; }
/* calendar: one therapist per column = nothing really overlaps, so full-width blocks (section 54) */
.cal--solo .ec-time-grid .ec-event:not(.ec-bg-event) { inset-inline-start: 0 !important; inline-size: calc(100% - var(--ec-event-col-gap, 0px)) !important; }
.cal--solo .ec-time-grid .ec-event.is-extra, .cal--solo .ec-time-grid .ec-event.is-block { z-index: 1 !important; }
.cal--solo .ec-time-grid .ec-event:not(.is-extra):not(.is-block):not(.ec-bg-event) { z-index: 2 !important; }
/* checkout: Show QR code (section 56) */
.pay__qr { display: grid; justify-items: center; gap: .625rem; padding: 1rem; margin: .5rem 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; }
.pay__qr-code { width: min(16rem, 70vw); aspect-ratio: 1; padding: .5rem; background: #fff; border-radius: var(--radius-sm); }
.pay__qr-code svg { display: block; width: 100%; height: 100%; }
.pay__qr-say { display: grid; gap: .125rem; }
.pay__qr-say strong { font-size: 1.125rem; }
.pay__qr-say span { font-size: .875rem; color: var(--ink-2); }
.pay__qr-wait { color: var(--ink-2); }
/* Client messages: one Save for the page, always in reach (section 57) */
.cm-actions { position: sticky; bottom: 0; z-index: 5; margin-top: 1.5rem; padding: .75rem 0; padding-bottom: max(.75rem, env(safe-area-inset-bottom));
  background: var(--paper); border-top: 1px solid var(--line); align-items: center; }
.cm-actions #dirty-note { color: var(--accent-2); font-weight: 600; }
/* My pay: getting paid through Stripe (section 62) */
.stripe-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.25rem; max-width: 48rem;
  margin-bottom: 1.75rem; padding: 1rem 1.125rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stripe-card[hidden] { display: none; }
.stripe-card > div { flex: 1 1 18rem; }
.stripe-card h2 { font-size: 1.0625rem; font-weight: 650; margin-bottom: .25rem; }
.stripe-card p { color: var(--ink-2); font-size: .9375rem; }
/* Payroll (section 62) */
.payroll { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.payroll__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem 1rem; padding: .875rem 1rem; }
.payroll__row + .payroll__row { border-top: 1px solid var(--line); }
.payroll__owed { text-align: right; }
.payroll__owed strong { font-size: 1.0625rem; }
.payroll__act { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .5rem; }
.payroll__act:empty { display: none; }
.payroll__mark { grid-column: 1 / -1; display: grid; gap: .5rem; max-width: 26rem; padding: .75rem; background: var(--paper); border-radius: var(--radius-sm); }
.payroll__visits { grid-column: 1 / -1; font-size: .875rem; }
.payroll__visits summary { cursor: pointer; color: var(--ink-2); font-weight: 550; }
.payroll__visits ul { list-style: none; margin: .5rem 0 0; padding: 0; }
.payroll__visits li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 .75rem; padding: .375rem 0; border-top: 1px dashed var(--line-soft); }
.payroll__visits li .acct-sub { grid-column: 1; }
.payroll__visits li .num { grid-column: 2; grid-row: 1; }
.payroll__owes { color: oklch(46% .12 50); }
.stripe-card__owes { flex-basis: 100%; padding: .625rem .75rem; background: oklch(96% .04 80); border-radius: var(--radius-sm); color: oklch(36% .08 65) !important; }
.payroll__owed { max-width: 15rem; }
.payroll__owed .acct-sub { white-space: normal; }
.payroll__who strong { white-space: nowrap; }
/* ---------- SOAP notes (section 64) */
.soap { margin: 1.5rem 0; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.soap[hidden] { display: none; }
.soap.is-due { border-color: oklch(75% .1 70); box-shadow: 0 0 0 3px oklch(95% .05 80); }
.soap-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.soap-title { font-size: 1.125rem; font-weight: 650; }
.soap-sub { font-size: 1rem; font-weight: 650; margin: 1.25rem 0 .5rem; }
.soap-copy { margin: .5rem 0; }
.soap-ctx { margin: .5rem 0; padding: .5rem .75rem; background: var(--paper); border-radius: var(--radius-sm); font-size: .875rem; color: var(--ink-2); }
.soap-part { border: 0; border-top: 1px solid var(--line-soft); margin: 1rem 0 0; padding: .875rem 0 0; display: grid; gap: .75rem; min-width: 0; }
.soap-part legend { display: flex; align-items: center; gap: .5rem; font-weight: 650; font-size: 1rem; padding: 0; }
.soap-part legend .hint { font-weight: 400; }
.soap-letter { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent-2); font-weight: 700; font-size: .875rem; flex: none; }
.soap-pain { display: flex; align-items: center; gap: .75rem; }
.soap-pain input { flex: 1; accent-color: var(--accent); min-height: var(--tap); }
.soap-pain input[data-unset] { opacity: .45; }
.soap-pain output { min-width: 1.5rem; font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
.soap-chips { display: flex; flex-wrap: wrap; gap: .375rem; }
.soap-brush { display: flex; flex-wrap: wrap; gap: .375rem; }
.soap-key-btn i { width: .75rem; height: .75rem; border-radius: 3px; background: var(--k); }
.soap-key-btn[aria-checked="true"] { border-color: var(--k); box-shadow: inset 0 0 0 1.5px var(--k); color: var(--ink); }
.is-focus { --k: oklch(58% .13 42); } .is-tension { --k: oklch(75% .14 75); } .is-pain { --k: oklch(55% .19 27); } .is-avoid { --k: oklch(55% .02 60); }
.soap-chart { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; max-width: 22rem; margin: 0 auto; }
.soap-chart--small { max-width: 13rem; margin: 0; }
.soap-fig { margin: 0; text-align: center; }
.soap-fig svg { width: 100%; height: auto; display: block; touch-action: manipulation; }
.soap-fig figcaption { font-size: .75rem; font-weight: 600; color: var(--ink-3); }
.soap-area { fill: oklch(94% .012 70); stroke: oklch(80% .015 65); stroke-width: .8; cursor: pointer; transition: fill 120ms var(--ease); }
.soap-area:hover { fill: oklch(90% .02 60); }
.soap-area:focus-visible { outline: none; stroke: var(--accent); stroke-width: 2; }
.soap-area.is-focus, .soap-area.is-tension, .soap-area.is-pain { fill: var(--k); stroke: var(--k); }
.soap-area.is-avoid { fill: oklch(70% .01 60); stroke: oklch(45% .01 60); stroke-dasharray: 2 1.5; }
.soap-chart--small .soap-area, .soap-note .soap-area { cursor: default; }
.soap-lr { font-size: 9px; font-weight: 700; fill: var(--ink-3); }
.soap-keys { font-size: .8125rem; color: var(--ink-2); line-height: 1.6; }
.soap-key { display: inline-block; padding: 0 .375rem; border-radius: 3px; background: var(--k); color: oklch(99% .004 75); font-size: .6875rem; font-weight: 700; }
.soap-key.is-tension { color: oklch(25% .03 60); }
.soap-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line-soft); }
.soap-actions .is-armed { border-color: var(--accent); color: var(--accent-2); }
.soap-add { margin-top: 1rem; }
/* read-only note */
.soap-note { padding: .875rem 0; border-top: 1px solid var(--line-soft); }
.soap-note:first-of-type { border-top: 0; }
.soap-note__head { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; margin-bottom: .5rem; }
.soap-sec { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .5rem; margin: .5rem 0 0; }
.soap-sec > dd { margin: 0; }
.soap-row { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .5rem; padding: .125rem 0; font-size: .9375rem; }
.soap-row dt { color: var(--ink-3); font-size: .8125rem; font-weight: 600; padding-top: .125rem; }
.soap-row dd { margin: 0; white-space: pre-line; }
.soap-addendum { margin-top: .5rem; padding: .5rem .75rem; background: var(--paper); border-radius: var(--radius-sm); font-size: .875rem; }
.soap-addendum p { white-space: pre-line; margin-top: .25rem; }
@media (max-width: 30rem) { .soap-row { grid-template-columns: 1fr; gap: 0; } }
.appt-soapbar { display: flex; justify-content: flex-end; padding: 0 1rem .625rem; margin-top: -.25rem; }
.appt-soap.is-due { border-color: oklch(75% .1 70); color: oklch(42% .1 60); background: oklch(97% .03 80); }
.soap-due { margin: 0 0 1rem; padding: .75rem 1rem; background: oklch(97% .03 80); border: 1px solid oklch(85% .07 75); border-radius: var(--radius); }
.soap-due[hidden] { display: none; }
.soap-due ul { list-style: none; margin: .375rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .375rem; }
@media print {
  body.print-soap .sidebar, body.print-soap .topbar, body.print-soap main > *:not(#csoap):not(.page-head), body.print-soap #soap-print { display: none !important; }
  body.print-soap .app, body.print-soap main { display: block; margin: 0; padding: 0; }
}
/* Profile: services I perform, read only (grouped like the user record) */
.svc-view { display: grid; gap: .125rem; padding: .5rem 0; border-bottom: 1px solid var(--line-soft); }
.svc-view:last-child { border-bottom: 0; }
.svc-view__name { font-weight: 600; }
.svc-view__lens { list-style: none; margin: .125rem 0 0; padding: 0; display: grid; gap: .125rem; }
.svc-view__lens li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .75rem; font-size: .9375rem; }
.svc-view__lens li > span:first-child { color: var(--ink-2); }
.svc-cut { text-align: right; }
.svc-cut strong { color: oklch(36% .09 150); font-weight: 650; }
.svc-sold { flex-basis: 100%; text-align: right; margin-top: -.125rem; }
/* My appointments (section 66) */
.ma-tools { display: grid; gap: .75rem; margin-bottom: 1rem; max-width: 48rem; }
.ma-search .input { width: 100%; }
.ma-tools .seg { justify-self: start; max-width: 100%; overflow-x: auto; }
.ma-count { margin-left: .25rem; font-variant-numeric: tabular-nums; color: oklch(46% .12 50); font-weight: 700; }
.ma-issues { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .25rem; }
#out > .list { max-width: 48rem; }
.stat--attention .stat__value { color: oklch(46% .12 50); }
/* the SOAP button under a list row stays a small button (the row's own link styles are for the whole row) */
.list .appt-soapbar a.btn { display: inline-flex; width: auto; min-height: 2.25rem; padding: .375rem .875rem; border-radius: var(--radius); }

/* appointment: call / text / directions as real buttons (therapists tap them in the car; UI audit 2026-10-11) */
.appt-acts { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: .375rem; }
/* grid cells may shrink below their longest word: a long link / code wraps or scrolls instead of widening the page */
.section__body > *, .field > *, .form > * { min-width: 0; }
.prose code, .hint code { overflow-wrap: anywhere; }
/* phones: a 5-column money table fits without scrolling (UI audit 2026-10-11) */
@media (max-width: 480px) {
  .ledger { font-size: .8125rem; }
  .ledger th, .ledger td { padding: .5rem .375rem; }
  .ledger th:first-child, .ledger td:first-child { padding-left: .625rem; }
  .ledger th:last-child, .ledger td:last-child { padding-right: .625rem; }
}

/* ---- live notices (section 77): what changed on the calendar elsewhere, stacked in the upper-right corner */
.lnotes { position: fixed; z-index: 60; top: calc(var(--top-h) + .75rem + env(safe-area-inset-top)); right: .75rem; left: .75rem;
  display: grid; justify-items: end; gap: .5rem; pointer-events: none; }
@media (min-width: 64rem) { .lnotes { top: 1rem; right: 1.25rem; left: auto; } }
.lnote { pointer-events: auto; position: relative; width: min(22rem, 100%); display: grid; grid-template-columns: auto 1fr auto; gap: .125rem .75rem;
  padding: .75rem .5rem .875rem .875rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 1px 2px oklch(30% .02 50 / .08), 0 10px 28px -10px oklch(30% .03 50 / .28); overflow: hidden;
  transform: translateX(calc(100% + 1.5rem)); transition: transform .42s cubic-bezier(.22, 1, .36, 1), opacity .3s; }
.lnote.is-on { transform: none; }
.lnote.is-off { transform: translateX(calc(100% + 1.5rem)); opacity: 0; }
.lnote__mark { grid-row: span 2; width: .625rem; height: .625rem; margin-top: .375rem; border-radius: 50%; background: var(--accent); }
.lnote--new .lnote__mark, .lnote--paid .lnote__mark, .lnote--completed .lnote__mark { background: var(--ok); }
.lnote--cancelled .lnote__mark, .lnote--no_show .lnote__mark, .lnote--deleted .lnote__mark { background: var(--danger); }
.lnote--block .lnote__mark, .lnote--open .lnote__mark, .lnote--removed .lnote__mark { background: var(--ink-3); }
.lnote__title { font-weight: 650; font-size: .9375rem; line-height: 1.3; }
.lnote__title small { font-weight: 550; color: var(--ink-3); margin-left: .375rem; font-size: .75rem; letter-spacing: .02em; }
.lnote__body { grid-column: 2; font-size: .875rem; color: var(--ink-2); line-height: 1.4; overflow-wrap: anywhere; }
.lnote__x { grid-row: 1; grid-column: 3; align-self: start; width: 2.25rem; height: 2.25rem; margin: -.375rem 0 0; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--ink-3); font-size: 1.25rem; line-height: 1; cursor: pointer; }
.lnote__x:hover { background: var(--line-soft); color: var(--ink); }
.lnote__open { grid-column: 2; justify-self: start; margin-top: .375rem; }
.lnote__time { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--accent-soft); transform-origin: left;
  animation: lnote-time var(--life, 9s) linear forwards; }
.lnote:hover .lnote__time, .lnote:focus-within .lnote__time { animation-play-state: paused; }
@keyframes lnote-time { to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .lnote, .lnote.is-off { transition: opacity .2s; transform: none; } }
