:root{--ink:#05070d;--ink-rgb:5,7,13;--ground:#f5f5f7;--ground-rgb:245,245,247;--brass:#0a6fae;--brass-dark:#0a6fae;--accent-rgb:10,111,174;--button-text:#ffffff;--muted-light:#6e6e73;--muted-dark:#a1a1a6;--ph-light:#e4e4e1;--ph-dark:#262626}
.preview--storm .preview__hero{background:#05070d;color:#ffffff}.preview--storm .preview__link{color:#4cc2ff}.preview--storm .preview__module{background:#182236;color:#ffffff}.preview--storm .preview__btn{background:#4cc2ff;color:#05070d}.sw-storm-ink{background:#05070d}.sw-storm-ground{background:#182236}.sw-storm-accent{background:#4cc2ff}
.preview--a .preview__hero{background:#111111;color:#ffffff}.preview--a .preview__link{color:#a8781a}.preview--a .preview__module{background:#f5f5f7;color:#111111}.preview--a .preview__btn{background:#a8781a;color:#111111}.sw-a-ink{background:#111111}.sw-a-ground{background:#f5f5f7}.sw-a-accent{background:#a8781a}
.preview--b .preview__hero{background:#10282b;color:#ffffff}.preview--b .preview__link{color:#a8781a}.preview--b .preview__module{background:#f6f3ee;color:#10282b}.preview--b .preview__btn{background:#a8781a;color:#ffffff}.sw-b-ink{background:#10282b}.sw-b-ground{background:#f6f3ee}.sw-b-accent{background:#a8781a}
.preview--c .preview__hero{background:#111111;color:#ffffff}.preview--c .preview__link{color:#1a9494}.preview--c .preview__module{background:#f5f5f7;color:#111111}.preview--c .preview__btn{background:#1a9494;color:#111111}.sw-c-ink{background:#111111}.sw-c-ground{background:#f5f5f7}.sw-c-accent{background:#1a9494}
/* bulls-office: the app's one stylesheet. The :root colour block is written
   in front of this file by /a/office.css from the theme in kennel.json, so a
   preset change restyles the office and the account pages together. The
   type scale, spacing and variable names are the public site's (style.css);
   the photo modules are not repeated here, this is an app. */
@font-face {
  font-family: "Bricolage";
  src: url("/fonts/bricolage-var.woff2") format("woff2");
  font-weight: 300 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
:root {
  --white: #ffffff;
  --ease: cubic-bezier(.2,.7,.2,1);
  --reading: 17px;
  --display: clamp(30px, 8vw, 36px);
  --pad-x: 20px;
  --pad-y: 28px;
  --radius: 10px;
  --line: rgba(var(--ink-rgb), .12);
  --line-dark: rgba(255,255,255,.14);
}
@media (min-width: 900px) {
  :root { --reading: 18px; --display: 44px; --pad-x: 48px; --pad-y: 40px; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100svh;
  font-family: "Bricolage", "Helvetica Neue", Arial, sans-serif; font-size: var(--reading); line-height: 1.45;
  color: var(--ink); background: var(--ground); font-variation-settings: "opsz" 14;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brass); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }
h1 { font-size: var(--display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 16px; font-variation-settings: "opsz" 96; }
h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 32px 0 12px; }
p { margin: 0 0 12px; }
.small, .muted { color: var(--muted-light); font-size: 15px; }
.page { max-width: 880px; margin: 0 auto; padding: var(--pad-y) var(--pad-x) 96px; }
.page--narrow { max-width: 520px; }

/* Header: brand on its own row, then the links row. Never three wrapped rows. */
.top { background: var(--ink); color: var(--white); box-shadow: inset 0 -1px 0 var(--line-dark); }
.top__brand { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 0 var(--pad-x); }
.wordmark { color: var(--white); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; white-space: nowrap; text-decoration: none; }
.wordmark:hover { text-decoration: none; }
.top__where { font-size: 14px; color: var(--muted-dark); white-space: nowrap; }
.tabs {
  display: flex; align-items: stretch; gap: 4px; min-height: 46px; padding: 0 var(--pad-x);
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; box-shadow: inset 0 1px 0 var(--line-dark);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button {
  flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 46px; padding: 0 12px; margin: 0;
  color: var(--white); font: inherit; font-size: 15px; font-weight: 600; white-space: nowrap; text-decoration: none;
  background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 0; cursor: pointer; opacity: .82;
}
.tabs a:hover, .tabs button:hover { opacity: 1; text-decoration: none; }
.tabs a[aria-current="page"] { opacity: 1; border-bottom-color: var(--brass); }
.tabs__end { margin-left: auto; display: flex; gap: 4px; }
.tabs form { display: contents; }
.tabs button.quiet { color: var(--white); background: none; border-color: transparent; border-bottom: 3px solid transparent; border-radius: 0; }
.tabs button.quiet:hover { border-color: transparent; text-decoration: underline; text-underline-offset: 6px; }
.tabs__count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 10px; background: var(--brass); color: var(--button-text); font-size: 13px; line-height: 20px; text-align: center; }
@media (min-width: 900px) {
  .top__brand { min-height: 60px; }
  .wordmark { font-size: 22px; }
  .tabs { overflow: visible; gap: 8px; }
  .tabs a, .tabs button { padding: 0 14px; font-size: 16px; }
}
/* the signed-in strip on customer pages: same row, plain links */
.bar { display: flex; gap: 4px; }

/* Cards and notices */
.card { background: var(--white); border-radius: var(--radius); padding: 18px; margin: 0 0 12px; box-shadow: 0 1px 2px rgba(var(--ink-rgb), .06); }
.note, .ok, .bad { border-radius: var(--radius); padding: 12px 16px; margin: 0 0 16px; font-size: 16px; }
.ok { background: rgba(var(--accent-rgb), .12); border-left: 4px solid var(--brass); }
.note { background: rgba(var(--ink-rgb), .06); border-left: 4px solid var(--muted-light); }
.bad { background: #f6e4e4; border-left: 4px solid #8b2020; }
.bad ul { margin: 0; padding-left: 20px; }

/* Forms: one clear form per page. */
form { margin: 0; }
label { display: block; margin: 14px 0 6px; font-weight: 600; font-size: 15px; }
label > input, label > textarea, label > select, label > span > input { margin-top: 6px; }
input, textarea, select {
  width: 100%; font: inherit; color: var(--ink); padding: 11px 14px; min-height: 48px;
  background: var(--white); border: 1px solid rgba(var(--ink-rgb), .22); border-radius: 8px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
input:focus, textarea:focus, select:focus { border-color: var(--brass); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .22); outline: none; }
textarea { min-height: 130px; resize: vertical; }
input[type="file"] { padding: 10px; background: transparent; border-style: dashed; }
input[type="color"] { width: 64px; height: 48px; padding: 4px; flex: 0 0 64px; }
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
button {
  font: inherit; font-weight: 600; font-size: 16px; color: var(--button-text); background: var(--brass);
  border: 2px solid var(--brass); border-radius: 8px; min-height: 46px; padding: 0 20px; margin: 14px 10px 0 0; cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease);
}
button:hover { box-shadow: 0 4px 14px rgba(var(--accent-rgb), .35); transform: translateY(-1px); }
button:active { transform: translateY(0); box-shadow: none; }
button.quiet { background: transparent; color: var(--ink); border-color: rgba(var(--ink-rgb), .28); }
button.quiet:hover { border-color: var(--ink); box-shadow: none; }
button.warn { background: transparent; color: #8b2020; border-color: #8b2020; }
button.warn:hover { background: #8b2020; color: var(--white); box-shadow: none; }
.row { display: flex; flex-wrap: wrap; gap: 0 14px; }
.row > * { flex: 1 1 160px; min-width: 0; }
.row > label:has(input[type="file"]) { flex-basis: 100%; }
.row--tight > * { flex: 0 0 auto; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px 16px; margin: 16px 0; background: var(--white); }
legend { font-weight: 700; padding: 0 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.actions { margin-top: 8px; }
.formcard { background: var(--white); border-radius: var(--radius); padding: 22px 20px 24px; box-shadow: 0 1px 2px rgba(var(--ink-rgb), .06); }
.formcard label:first-of-type { margin-top: 4px; }
.links { margin-top: 18px; font-size: 15px; color: var(--muted-light); }
.links a { font-weight: 600; }

/* Lists: inbox rows, conversation lists. */
.list { display: block; }
.row-item {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name meta" "line meta"; gap: 2px 12px; align-items: center;
  padding: 14px 4px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.list > .row-item:last-child { border-bottom: 1px solid var(--line); }
.row-item:hover { text-decoration: none; background: rgba(var(--ink-rgb), .03); }
.row-item > b { grid-area: name; font-weight: 700; }
.row-item__line { grid-area: line; color: var(--muted-light); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-item__meta { grid-area: meta; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 13px; color: var(--muted-light); white-space: nowrap; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 13px; font-weight: 600; line-height: 18px; background: rgba(var(--ink-rgb), .08); color: var(--ink); }
.pill--new { background: var(--brass); color: var(--button-text); }
.pill--replied { background: rgba(var(--accent-rgb), .16); color: var(--ink); }
.pill--closed { background: rgba(var(--ink-rgb), .08); color: var(--muted-light); }
.pill--held { background: #f6e4e4; color: #8b2020; }
.pill--links { background: #fff3d6; color: #7a5200; }
.pill--about { background: rgba(var(--accent-rgb), .16); color: var(--ink); font-weight: 600; }
.about { display: flex; align-items: center; gap: 12px; background: var(--white); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 16px; box-shadow: 0 1px 2px rgba(var(--ink-rgb), .06); }
.about__thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--ph-light); flex: 0 0 56px; }
.about a { font-weight: 600; }
.boxes--about { margin-top: -4px; }
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 4px 0 16px; }
@media (min-width: 700px) { .shots { grid-template-columns: repeat(4, 1fr); } }
.shot { margin: 0; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 2px rgba(var(--ink-rgb), .06); }
.shot img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--ph-light); }
.shot figcaption { padding: 8px 10px; font-size: 13px; color: var(--muted-light); }
.shot form { padding: 0 10px 10px; }
.shot button { margin: 0; width: 100%; min-height: 34px; padding: 0 8px; font-size: 13px; }
.upload--slim { padding: 12px; margin: 6px 0 0; }
.upload--slim b { font-size: 15px; }
.away { background: rgba(var(--accent-rgb), .14); border-left: 4px solid var(--brass); border-radius: var(--radius); padding: 12px 16px; margin: 0 0 16px; }
.away b { display: block; }
.state { display: inline-block; padding: 4px 12px; border-radius: 14px; font-size: 14px; font-weight: 600; background: rgba(var(--ink-rgb), .08); color: var(--muted-light); }
.state--on { background: var(--brass); color: var(--button-text); }
.boxes { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 12px; padding-bottom: 4px; }
.boxes::-webkit-scrollbar { display: none; }
.boxes a { flex: 0 0 auto; padding: 8px 14px; border-radius: 20px; background: var(--white); color: var(--ink); font-weight: 600; font-size: 15px; border: 1px solid var(--line); text-decoration: none; }
.boxes a[aria-current="page"] { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* Conversation: messages as bubbles, the reply box after them (it grew a photo box and, pinned, hid the messages on a phone). */
.meta { color: var(--muted-light); font-size: 15px; margin: 0 0 16px; }
.meta b { color: var(--ink); }
.convo { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 20px; }
.msg { max-width: 88%; padding: 12px 16px; border-radius: 16px 16px 16px 4px; background: var(--white); white-space: pre-wrap; word-wrap: break-word; box-shadow: 0 1px 2px rgba(var(--ink-rgb), .06); }
.msg.james { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: rgba(var(--accent-rgb), .14); }
.who { font-size: 13px; color: var(--muted-light); margin-bottom: 4px; white-space: normal; }
.reply { padding: 8px 0 12px; margin-top: 8px; }
.actions { margin: 20px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.actions button { margin-top: 8px; }
.reply textarea { min-height: 96px; }
.reply label { margin-top: 0; }
.crumb { font-size: 15px; margin-bottom: 8px; }
.crumb a { font-weight: 600; }

/* Numbers: stat tiles, ranked bars, responsive tables. */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 20px; }
.stat { background: var(--ink); color: var(--white); border-radius: var(--radius); padding: 16px 18px; }
.stat b { display: block; font-size: 36px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.stat span { display: block; margin-top: 6px; font-size: 14px; color: var(--muted-dark); }
.stat--accent { background: var(--brass); color: var(--button-text); }
.stat--accent span { color: inherit; opacity: .8; }
.rank { list-style: none; margin: 0 0 8px; padding: 0; }
.rank li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--line); align-items: center; }
.rank .bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: rgba(var(--ink-rgb), .08); overflow: hidden; }
.rank .bar i { display: block; height: 100%; background: var(--brass); }
.rank b { font-weight: 700; }
.b-1 { width: 10%; } .b-2 { width: 20%; } .b-3 { width: 30%; } .b-4 { width: 40%; } .b-5 { width: 50%; }
.b-6 { width: 60%; } .b-7 { width: 70%; } .b-8 { width: 80%; } .b-9 { width: 90%; } .b-10 { width: 100%; }
.tbl { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; margin: 0 0 8px; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--line); font-size: 15px; }
.tbl th { font-weight: 700; border-top: 0; background: rgba(var(--ink-rgb), .04); }
.tbl td.n, .tbl th.n { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 699px) {
  .tbl thead { display: none; }
  .tbl tr { display: block; padding: 6px 0; border-top: 1px solid var(--line); }
  .tbl td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 12px; }
  .tbl td::before { content: attr(data-l); color: var(--muted-light); font-weight: 600; }
  .tbl td.n { text-align: right; }
}
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.tabs-inline { font-size: 15px; margin: 0 0 12px; }

/* Theme presets: a mini hero and module in each preset's own colours. */
.presets { display: grid; gap: 12px; margin: 8px 0 24px; }
@media (min-width: 700px) { .presets { grid-template-columns: repeat(3, 1fr); } }
.preset { display: block; background: var(--white); border-radius: var(--radius); padding: 12px; border: 2px solid transparent; box-shadow: 0 1px 2px rgba(var(--ink-rgb), .06); }
.preset.is-current { border-color: var(--brass); }
.preset button { width: 100%; margin: 10px 0 0; }
.preset.is-current button { background: transparent; color: var(--ink); border-color: rgba(var(--ink-rgb), .28); }
.preview { border-radius: 8px; overflow: hidden; font-family: inherit; }
.preview__hero { padding: 22px 16px 18px; min-height: 96px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.preview__title { font-weight: 700; font-size: 20px; letter-spacing: -0.02em; line-height: 1.05; }
.preview__link { font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.preview__link::after { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg); }
.preview__module { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
.preview__btn { display: inline-block; padding: 6px 12px; border-radius: 6px; font-weight: 600; font-size: 12px; }
.preset__name { display: block; margin: 12px 0 2px; font-weight: 700; }
.preset__line { display: block; font-size: 14px; color: var(--muted-light); }
.swatches { display: flex; gap: 6px; margin-top: 8px; }
.swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); }
.picker { display: flex; align-items: center; gap: 12px; }
.picker code { font-family: ui-monospace, Menlo, monospace; font-size: 15px; }

/* Photos: a grid of tiles and an obvious upload zone. */
.upload { display: block; border: 2px dashed rgba(var(--ink-rgb), .3); border-radius: var(--radius); padding: 18px; background: var(--white); text-align: center; margin: 12px 0; }
.upload input[type="file"] { border: 0; padding: 8px 0 0; text-align: center; }
.upload span { display: block; font-size: 15px; color: var(--muted-light); }
.upload b { display: block; font-size: 17px; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 12px 0; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.tile { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 2px rgba(var(--ink-rgb), .06); display: flex; flex-direction: column; }
.tile img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--ph-light); }
.tile__body { padding: 10px 12px 12px; font-size: 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.tile__name { font-weight: 700; word-break: break-all; }
.tile__used { color: var(--muted-light); }
.tile button { margin: auto 0 0; min-height: 38px; padding: 0 12px; font-size: 14px; width: 100%; }
.pending { display: inline-block; padding: 2px 10px; border-radius: 12px; background: #fff3d6; color: #7a5200; font-size: 13px; font-weight: 600; }

/* Public thread page and customer pages share the same sheet. */
.lede { color: var(--muted-light); max-width: 46ch; }
.hint { font-size: 15px; color: var(--muted-light); margin: 12px 0 0; }
@media (prefers-reduced-motion: reduce) { button, input, textarea, select { transition: none; } }

/* ------------------------------------------------------------------------------------------------
   The office app: a chat list, a thread with bubbles and a compose bar, and behind a second tab the
   site edits. Phone first: a top bar, the screen, a dock along the bottom. From 900px the dock is a
   rail on the left and a thread shows beside its list. */
:root { --bar: 56px; --dock: 64px; --rail: 220px; --listpane: 340px; --bubble-mine: var(--brass); }
body.app { background: var(--ground); padding-bottom: calc(var(--dock) + env(safe-area-inset-bottom)); }
.app svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; min-height: var(--bar);
  padding: 0 12px 0 8px; background: var(--ink); color: var(--white);
}
.bar__back { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 20px; color: var(--white); flex: 0 0 auto; }
.bar__back:hover { background: rgba(255,255,255,.1); text-decoration: none; }
.bar__title { display: flex; flex-direction: column; min-width: 0; padding-left: 8px; line-height: 1.2; }
.bar__title b { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar__title span { font-size: 13px; color: var(--muted-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar__title .pill { font-size: 12px; padding: 0 8px; line-height: 18px; background: rgba(255,255,255,.14); color: var(--white); }
.menu { margin-left: auto; position: relative; }
.menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 20px; color: var(--white); }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: rgba(255,255,255,.12); }
.menu__list { position: absolute; right: 0; top: 46px; min-width: 180px; background: var(--white); color: var(--ink); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 6px; display: flex; flex-direction: column; }
.menu__list a, .menu__list button { display: block; width: 100%; text-align: left; padding: 10px 12px; margin: 0; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-weight: 600; font-size: 15px; min-height: 0; }
.menu__list a:hover, .menu__list button:hover { background: rgba(var(--ink-rgb), .06); text-decoration: none; box-shadow: none; }
.menu__list form { display: contents; }

.subtabs { display: flex; gap: 6px; padding: 10px 12px; overflow-x: auto; scrollbar-width: none; background: var(--white); box-shadow: inset 0 -1px 0 var(--line); }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs a { flex: 0 0 auto; padding: 6px 14px; border-radius: 18px; font-size: 15px; font-weight: 600; color: var(--ink); background: rgba(var(--ink-rgb), .06); }
.subtabs a[aria-current="page"] { background: var(--ink); color: var(--white); }
.subtabs a:hover { text-decoration: none; }

.screen--sheet { max-width: 880px; margin: 0 auto; padding: var(--pad-y) var(--pad-x) 40px; }
.screen--sheet h1 { font-size: clamp(26px, 6vw, 34px); }

.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: stretch; justify-content: space-around;
  min-height: var(--dock); padding-bottom: env(safe-area-inset-bottom); background: var(--white); box-shadow: 0 -1px 0 var(--line);
}
.dock__item { position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted-light); font-size: 12px; font-weight: 600; text-decoration: none; }
.dock__item:hover { text-decoration: none; }
.dock__item[aria-current="page"] { color: var(--brass); }
.dock__badge { position: absolute; top: 8px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #d1362f; color: #fff; font-size: 12px; line-height: 18px; text-align: center; }
.dock__end { display: none; }

/* Chats: the list. */
.screen--chats { padding: 0; }
.chips { display: flex; gap: 6px; padding: 10px 12px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a { flex: 0 0 auto; padding: 6px 14px; border-radius: 18px; font-size: 15px; font-weight: 600; color: var(--ink); background: rgba(var(--ink-rgb), .06); }
.chips a[aria-current="page"] { background: var(--ink); color: var(--white); }
.chips a:hover { text-decoration: none; }
.chats__list { display: flex; flex-direction: column; }
.chat { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; color: var(--ink); text-decoration: none; }
.chat:hover { background: rgba(var(--ink-rgb), .04); text-decoration: none; }
.chat--current { background: rgba(var(--accent-rgb), .12); }
.chat__avatar { width: 52px; height: 52px; border-radius: 26px; background: var(--ink); color: var(--white); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 22px; }
.chat__body { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.chat__name { font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat__name .pill { font-size: 12px; padding: 0 8px; line-height: 18px; margin-left: 6px; vertical-align: 2px; }
.chat__line { font-size: 15px; color: var(--muted-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat__about { color: var(--brass); font-weight: 600; }
.chat__about::after { content: ": "; }
.chat--unread .chat__name, .chat--unread .chat__line { font-weight: 700; color: var(--ink); }
.chat__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 13px; color: var(--muted-light); }
.chat--unread .chat__time { color: var(--brass); font-weight: 700; }
.chat__dot { width: 12px; height: 12px; border-radius: 6px; background: var(--brass); }
.hint--centre { text-align: center; padding: 40px 20px; }

.install { margin: 20px 14px; padding: 16px 18px; background: var(--white); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(var(--ink-rgb), .06); }
.install p { margin: 6px 0 0; font-size: 15px; color: var(--muted-light); }
.install__btn { margin: 12px 0 0; }

/* Thread: the bubbles, then the compose bar pinned above the dock. */
.screen--thread { display: block; padding: 0; }
.pane--list { display: none; }
.pane--thread { display: flex; flex-direction: column; min-height: calc(100svh - var(--bar) - var(--dock)); }
.info { margin: 8px 12px 0; font-size: 15px; }
.info summary { cursor: pointer; color: var(--muted-light); font-weight: 600; padding: 6px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
.info summary::-webkit-details-marker { display: none; }
.info summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); margin-right: 2px; }
.info[open] summary::before { transform: rotate(45deg); }
.info__body { padding: 8px 0 4px; }
.info .about { margin-bottom: 10px; }
.info .actions { margin: 0; padding: 0; border: 0; }
.info .actions button { margin: 6px 8px 0 0; }
.screen--thread .ok { margin: 8px 12px 0; }
.convo { flex: 1 1 auto; display: flex; flex-direction: column; gap: 6px; padding: 12px 12px 8px; margin: 0; }
.bubble { max-width: 82%; align-self: flex-start; }
.bubble--mine { align-self: flex-end; }
.bubble__text { padding: 10px 14px; border-radius: 18px 18px 18px 6px; background: var(--white); color: var(--ink); white-space: pre-wrap; word-wrap: break-word; box-shadow: 0 1px 2px rgba(var(--ink-rgb), .06); }
.bubble--mine .bubble__text { border-radius: 18px 18px 6px 18px; background: var(--bubble-mine); color: var(--white); }
.bubble__when { font-size: 12px; color: var(--muted-light); margin: 3px 6px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.bubble--mine .bubble__when { justify-content: flex-end; text-align: right; }
.bubble__mail { color: var(--muted-light); }
.bubble__mail::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 3px; background: currentColor; margin: 0 6px 1px 0; }
.bubble--photo img { max-width: 260px; border-radius: 16px; box-shadow: 0 1px 2px rgba(var(--ink-rgb), .1); }
.bubble__keep { margin: 4px 0 0; min-height: 34px; padding: 0 12px; font-size: 14px; background: transparent; color: var(--ink); border-color: rgba(var(--ink-rgb), .28); }
.compose {
  position: sticky; bottom: calc(var(--dock) + env(safe-area-inset-bottom)); z-index: 10; display: grid; grid-template-columns: 44px 1fr 44px; gap: 8px; align-items: end;
  padding: 8px 10px; background: var(--ground); box-shadow: 0 -1px 0 var(--line);
}
.compose textarea { min-height: 44px; max-height: 160px; padding: 10px 16px; border-radius: 22px; resize: none; line-height: 1.35; margin: 0; }
.compose__photo { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 22px; color: var(--brass); cursor: pointer; margin: 0; }
.compose__photo:hover { background: rgba(var(--ink-rgb), .06); }
.compose__photo input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.compose__photo:focus-within { outline: 3px solid var(--brass); outline-offset: 2px; }
.compose__send { width: 44px; height: 44px; min-height: 44px; padding: 0; margin: 0; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; }
.compose__hint { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--muted-light); text-align: center; }

.offline { max-width: 420px; margin: 60px auto; text-align: center; }
.offline b { font-size: 24px; display: block; margin-bottom: 8px; }
.cta { display: inline-block; margin-top: 12px; padding: 10px 20px; border-radius: 8px; background: var(--brass); color: var(--button-text); font-weight: 600; }

.user b { font-size: 18px; }
.user__row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 6px; }
.user__row label { flex: 1 1 200px; margin: 0; }
.user__row button { margin: 0; }

@media (min-width: 900px) {
  body.app { padding-bottom: 0; padding-left: var(--rail); }
  .bar { left: var(--rail); }
  .dock {
    top: 0; bottom: 0; right: auto; width: var(--rail); flex-direction: column; justify-content: flex-start; padding: 16px 12px;
    box-shadow: 1px 0 0 var(--line); gap: 4px;
  }
  .dock__item { flex: 0 0 auto; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 14px; border-radius: 10px; font-size: 16px; }
  .dock__item[aria-current="page"] { background: rgba(var(--accent-rgb), .12); }
  .dock__badge { position: static; margin-left: auto; }
  .dock__end { display: flex; flex-direction: column; margin-top: auto; gap: 4px; }
  .dock__item--plain { color: var(--ink); }
  .dock__end form { display: contents; }
  .dock__end button.quiet { margin: 0; text-align: left; border: 0; padding: 12px 14px; min-height: 0; color: var(--muted-light); font-weight: 600; }
  .dock__end button.quiet:hover { background: rgba(var(--ink-rgb), .06); box-shadow: none; }
  .screen--chats { max-width: 720px; }
  .screen--thread { display: grid; grid-template-columns: var(--listpane) 1fr; min-height: calc(100svh - var(--bar)); }
  .pane--list { display: block; box-shadow: 1px 0 0 var(--line); background: var(--white); overflow-y: auto; max-height: calc(100svh - var(--bar)); position: sticky; top: var(--bar); }
  .pane--list .chat:hover { background: rgba(var(--ink-rgb), .04); }
  .pane--list .chat--current { background: rgba(var(--accent-rgb), .12); }
  .pane--thread { min-height: calc(100svh - var(--bar)); }
  .convo { padding: 20px 28px 12px; max-width: 900px; }
  .bubble { max-width: 70%; }
  .compose { bottom: 0; padding: 12px 20px; }
  .compose textarea, .compose__hint { max-width: 100%; }
  .app--thread .bar__back { display: none; }
  .info { margin: 12px 28px 0; }
  .screen--thread .ok { margin: 12px 28px 0; }
  .install { max-width: 480px; }
}
@media (prefers-reduced-motion: no-preference) {
  .bar__back, .dock__item, .chat, .chips a, .subtabs a { transition: background .15s var(--ease), color .15s var(--ease); }
}

/* The install sheet: a card that slides up from the bottom of the chats screen. */
.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(5, 7, 13, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet__card {
  width: 100%; max-width: 520px; background: var(--white); color: var(--ink); border-radius: 18px 18px 0 0; padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgba(0,0,0,.25);
}
.sheet__card b { display: block; font-size: 20px; letter-spacing: -0.02em; margin-bottom: 6px; }
.sheet__card p { margin: 0 0 8px; color: var(--muted-light); font-size: 15px; }
.sheet__row { display: flex; gap: 10px; margin-top: 12px; }
.sheet__btn { flex: 1 1 0; margin: 0; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.sheet__btn--quiet { background: transparent; color: var(--ink); border-color: rgba(var(--ink-rgb), .28); }
.sheet__btn--line { width: 100%; background: transparent; color: var(--brass); border-color: var(--brass); }
.sheet__notif { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.sheet__notif p { margin: 8px 0 0; }
@media (min-width: 900px) {
  .sheet { align-items: center; }
  .sheet__card { border-radius: 18px; }
}
@media (prefers-reduced-motion: no-preference) {
  .sheet__card { animation: sheet-up .28s var(--ease); }
  @keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}
.bar__action { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 20px; color: var(--white); margin-left: auto; }
.bar__action:hover { background: rgba(255,255,255,.1); text-decoration: none; }
.bar__action + .menu { margin-left: 0; }
.menu__list [data-notif-switch][data-state="on"]::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 4px; background: #1f9d55; margin-right: 8px; }
.compose-new label { margin-top: 10px; }
.compose-new textarea { min-height: 140px; }

/* Delete, behind a confirm that opens in place; a deleted bubble reads as a muted line. */
.zap { display: inline-block; font-size: 13px; }
.zap summary { list-style: none; cursor: pointer; color: var(--muted-light); text-decoration: underline; text-underline-offset: 3px; padding: 2px 0; }
.zap summary::-webkit-details-marker { display: none; }
.zap form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; padding: 10px 12px; background: var(--white); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(var(--ink-rgb), .1); font-size: 15px; color: var(--ink); }
.zap form span { flex: 1 1 100%; }
.zap form label { flex: 1 1 100%; margin: 0; font-size: 14px; }
.zap form button { margin: 0; min-height: 40px; padding: 0 14px; font-size: 15px; }
.zap--thread { display: block; margin-top: 12px; font-size: 15px; }
.zap--thread summary { font-weight: 600; color: #b3261e; }
button.warn { background: #b3261e; border-color: #b3261e; color: #fff; }
.bubble--gone .bubble__gone { padding: 8px 14px; border-radius: 16px; background: rgba(var(--ink-rgb), .05); color: var(--muted-light); font-size: 14px; font-style: italic; }
.bubble__when .zap { margin-left: 4px; }
.compose--off textarea, .compose--off button, .compose--off .compose__photo { opacity: .35; pointer-events: none; }
.chatrow { position: relative; }
.chatrow__zap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; background: #fff3f2; box-shadow: inset 0 -1px 0 var(--line); font-size: 15px; }
.chatrow__zap[hidden] { display: none; }
.chatrow__zap span { flex: 1 1 100%; }
.chatrow__zap button { margin: 0; min-height: 40px; padding: 0 14px; font-size: 15px; }
.cust { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.cust .zap { font-size: 15px; }
.cust .zap summary { color: #b3261e; font-weight: 600; text-decoration: none; }
.cust__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 15px; }
.cust__row button { margin: 0; min-height: 40px; }
.cust__check { display: flex; align-items: center; gap: 8px; }
.cust__check input { width: auto; min-height: 0; margin: 0; }
.ban p { margin: 4px 0 8px; }

/* Pictures everywhere James picks or edits an animal: thumbnails on the lists, the current photo at the
   top of an edit screen, a plain frame with the name when there is none, and a gallery to pick from. */
.thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; background: #e4e4e1; flex: 0 0 auto; }
.thumb--empty { display: inline-flex; align-items: center; justify-content: center; text-align: center; padding: 6px; font-size: 12px; font-weight: 600; color: var(--muted-light); border: 1px dashed rgba(var(--ink-rgb), .25); }
.thumb--empty span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.thumb--big { width: 200px; height: 200px; border-radius: 16px; font-size: 15px; }
.thumb--small { width: 44px; height: 44px; border-radius: 8px; font-size: 9px; }
.row-item--photo { grid-template-columns: 72px 1fr auto; grid-template-areas: "pic name meta" "pic line meta" "pic strip meta"; gap: 4px 12px; align-items: center; }
.row-item--photo .thumb { grid-area: pic; width: 64px; height: 64px; }
.row-item--photo b { grid-area: name; }
.row-item--photo .row-item__line { grid-area: line; }
.row-item__strip { grid-area: strip; display: flex; gap: 4px; margin-top: 4px; overflow: hidden; }
.chat__avatar--photo { object-fit: cover; }
.pick { margin: 14px 0; }
.pick__label { display: block; font-weight: 600; margin-bottom: 6px; }
.pick__current { display: flex; align-items: center; gap: 12px; }
.pick__caption { font-size: 14px; color: var(--muted-light); word-break: break-all; }
.pick__more { margin-top: 8px; }
.pick__more summary { cursor: pointer; font-weight: 600; color: var(--brass); list-style: none; display: inline-block; padding: 8px 0; }
.pick__more summary::-webkit-details-marker { display: none; }
.pick__more summary::before { content: ""; display: inline-block; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); margin-right: 8px; vertical-align: 2px; }
.pick__more[open] summary::before { transform: rotate(45deg); }
.pick__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin: 8px 0; max-height: 420px; overflow-y: auto; padding: 4px; background: rgba(var(--ink-rgb), .04); border-radius: var(--radius); }
.pick__tile { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0; padding: 4px; border-radius: 12px; cursor: pointer; position: relative; }
.pick__tile input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.pick__tile .thumb { width: 96px; height: 96px; }
.pick__tile:has(input:checked) { background: var(--white); box-shadow: 0 0 0 3px var(--brass); }
.pick__tile:has(input:focus-visible) { outline: 3px solid var(--brass); outline-offset: 2px; }
.pick__name { font-size: 11px; color: var(--muted-light); max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick__upload { display: block; margin-top: 8px; font-size: 15px; }
.pick__upload input { margin-top: 4px; }
.pick--row { padding: 10px 0; border-top: 1px solid var(--line); }
.pick--row .pick__current .thumb { width: 72px; height: 72px; }
.pick__cap { margin-top: 6px; }
.pick__set { margin-top: 16px; }
.tile__open { display: block; }
.tile__size { display: block; font-size: 12px; color: var(--muted-light); }
.row-item--photo .thumb--small { width: 44px; height: 44px; }
.lit .lit__strip { display: flex; gap: 6px; margin: 8px 0; overflow-x: auto; }
.lit .lit__strip img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; flex: 0 0 auto; }
.lit form { margin-top: 6px; }
.lit form button { margin: 0; min-height: 38px; font-size: 15px; }
.bubble__tag { color: var(--brass); font-weight: 600; }
.chips--litters { padding-top: 0; }
.chips--litters a { font-size: 13px; padding: 4px 12px; }
