:root {
  /* Design tokens. Every company's theme (companies.settings.theme) overrides
     these at runtime via theme.js, so screens never hard-code colors or fonts. */
  --primary: #14301c;
  --primary-hover: #1f5c2e;
  --link: #2f7d3f;
  --accent: #e8b931;
  --bg: #f7f4ea;
  --card: #ffffff;
  --text: #24291f;
  --text-soft: #5b6156;
  --border: #e3dfd3;
  --error: #b3452f;
  --error-bg: #fbeae5;
  --ok-bg: #e7f2e4;
  --radius: 14px;
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Work Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1, h2 { font-family: var(--font-heading); font-weight: 600; margin: 0; line-height: 1.15; }
h1 { font-size: 28px; }
h2 { font-size: 21px; }
.wrap { max-width: 480px; margin: 0 auto; padding: 20px 16px 48px; }
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.top img { height: 46px; width: auto; max-width: 130px; object-fit: contain; }
.top .who { margin-left: auto; font-size: 13px; color: var(--text-soft); text-align: right; }
.sub { color: var(--text-soft); margin: 6px 0 20px; font-size: 15px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; margin-bottom: 14px;
}
label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 6px; }
.hint { font-weight: 400; color: var(--text-soft); font-size: 13px; }
input, select {
  width: 100%; font: inherit; font-size: 16px; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text);
}
input:focus, select:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 18%, transparent); }
.code-input { letter-spacing: 8px; font-size: 24px; text-align: center; font-variant-numeric: tabular-nums; }
button { font: inherit; cursor: pointer; }
.btn {
  display: block; width: 100%; padding: 13px 16px; margin-top: 16px; border: 0; border-radius: 10px;
  background: var(--primary); color: var(--on-primary, #fff); font-weight: 600; font-size: 16px;
}
.btn:hover { background: var(--primary-hover); }
.btn[disabled] { opacity: .6; cursor: default; }
.btn.secondary { background: var(--card); color: var(--text); border: 1.5px solid var(--border); }
.btn.secondary:hover { border-color: var(--text-soft); }
.btn.google { display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn.google svg { width: 18px; height: 18px; }
.link { background: none; border: 0; color: var(--link); font-weight: 600; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; font-size: 14px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--text-soft); font-size: 13px; margin: 18px 0 2px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.msg { padding: 11px 14px; border-radius: 10px; font-size: 14px; margin-top: 14px; }
.msg:not(:last-child) { margin-bottom: 14px; } /* never touch the box under a notice */
.msg.error { background: color-mix(in srgb, var(--error) 13%, var(--card)); color: var(--text); border-left: 4px solid var(--error); }
.msg.ok { background: color-mix(in srgb, var(--link) 13%, var(--card)); color: var(--text); border-left: 4px solid var(--link); }
.back { background: none; border: 0; color: var(--text-soft); font-weight: 600; padding: 4px 0; margin-bottom: 12px; }
.menu { display: grid; gap: 12px; }
.menu-card {
  display: block; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; color: var(--text);
}
.menu-card:hover { border-color: var(--link); }
.menu-card .t { font-weight: 600; font-size: 17px; }
.menu-card .d { color: var(--text-soft); font-size: 14px; margin-top: 3px; }
.menu-card.soon { opacity: .55; cursor: default; }
.menu-card.soon:hover { border-color: var(--border); }
.pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 99px; background: var(--bg); color: var(--text-soft); margin-left: 6px; vertical-align: 2px; }
.pill.owner { background: #fdf3d6; color: #7a5a00; }
.person { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.person:first-child { border-top: 0; padding-top: 0; }
.person .n { font-weight: 600; }
.person .m { color: var(--text-soft); font-size: 13px; margin-top: 2px; word-break: break-all; }
.person .act { margin-left: auto; flex-shrink: 0; }
.small-btn { padding: 7px 12px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--card); font-weight: 600; font-size: 13px; color: var(--text); }
.foot { text-align: center; color: var(--text-soft); font-size: 12px; margin-top: 28px; }
.hidden { display: none !important; }
.badge { font-size: 12px; color: var(--text-soft); }
.brand-name { font-family: var(--font-heading); font-weight: 600; font-size: 21px; line-height: 1.15; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.swatch { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.swatch input[type=color] { width: 44px; height: 36px; padding: 2px; border-radius: 8px; cursor: pointer; }
.logo-preview { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.logo-preview img { height: 48px; max-width: 160px; object-fit: contain; background: var(--bg); border-radius: 8px; padding: 4px; }
input[type=file] { padding: 9px; font-size: 14px; }
/* iPhone draws date/time boxes wider than the screen and centers the text: keep them inside the card */
input[type=date], input[type=time], input[type=datetime-local], input[type=month] {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; max-width: 100%; min-width: 0;
  box-sizing: border-box; text-align: left; min-height: 44px; }
input[type=date]::-webkit-date-and-time-value, input[type=time]::-webkit-date-and-time-value,
input[type=datetime-local]::-webkit-date-and-time-value { text-align: left; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.small-btn.on { background: var(--primary); color: var(--on-primary, #fff); border-color: var(--primary); }
.row-btn { width: 100%; background: none; border: 0; border-top: 1px solid var(--border); text-align: left; cursor: pointer; color: var(--text); font: inherit; }
.row-btn:first-child { border-top: 0; }
.pill.ok { background: var(--ok-bg); color: var(--primary); }
.btn.danger { background: var(--error); }
.btn.danger:hover { background: var(--error); filter: brightness(.92); }
textarea { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); resize: vertical; }
a { color: var(--link); }
.rate-hint { margin-top: 7px; font-size: 13px; color: var(--text-soft); min-height: 16px; }
.rate-hint strong { color: var(--primary); }
.results { margin-top: 6px; }
.results .row-btn { padding: 10px 4px; }
.checklist { max-height: 340px; overflow-y: auto; border: 1.5px solid var(--border); border-radius: 10px; margin-top: 8px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-top: 1px solid var(--border); font-weight: 400; margin: 0; cursor: pointer; }
.check-row:first-child { border-top: 0; }
.check-row input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; }
.check-row .n { display: block; font-weight: 600; }
.check-row .m { display: block; font-size: 13px; color: var(--text-soft); }
.sticky { position: sticky; top: 0; z-index: 5; box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.stop.done { opacity: .75; }
.m { color: var(--text-soft); font-size: 13px; }
.announce.unread { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.note { padding: 10px 0; border-top: 1px solid var(--border); }
.note:first-of-type { border-top: 0; }
.note.pinned { color: var(--text); font-weight: 500; }
.headsup { background: color-mix(in srgb, var(--accent) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border)); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 10px; }
.add-note { margin-top: 10px; }
.prod-row { border-top: 1px solid var(--border); padding: 12px 0; }
.prod-row:first-of-type { border-top: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.grid3 label { margin: 0; font-size: 12px; font-weight: 600; color: var(--text-soft); }
.grid3 input, .grid3 select { margin-top: 4px; padding: 9px 10px; font-size: 15px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.grid2 label { margin: 0; font-size: 12px; font-weight: 600; color: var(--text-soft); }
.grid2 input { margin-top: 4px; }
.picker { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 10px; }
.new-prod { margin-top: 12px; padding: 10px 12px; background: var(--bg); border-radius: 10px; }
.pin-label { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; margin-bottom: 8px; }
.thread { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.comment { padding: 8px 10px; border-radius: 10px; background: var(--bg); margin-bottom: 8px; font-size: 14.5px; }
.comment.mine { background: color-mix(in srgb, var(--link) 10%, var(--card)); }
.comment .who { font-size: 13px; margin-bottom: 3px; }
.reply { display: flex; gap: 8px; align-items: flex-end; }
.reply textarea { flex: 1; }
/* announcements: look comes from Settings > Announcements (pin style/color/label, photo side) */
.announce { --pin: var(--accent); }
.announce.pinned.pin-highlight { border: 2px solid var(--pin); background: color-mix(in srgb, var(--pin) 12%, var(--card)); }
.announce.pinned.pin-border { border: 1px solid var(--border); border-left: 6px solid var(--pin); }
.announce.pinned.pin-banner { padding-top: 0; overflow: hidden; border: 2px solid var(--pin); }
.announce.pinned.pin-banner .pin-label { display: block; margin: 0 -18px 12px; border-radius: 0; padding: 7px 18px; }
.announce.pinned .pin-label { background: var(--pin); color: var(--pin-ink, #1d1a10); }
.ann-main { display: flex; gap: 12px; align-items: flex-start; }
.ann-text { flex: 1; min-width: 0; }
.photos-left .ann-main { flex-direction: row-reverse; }
.photos-below .ann-main { flex-direction: column; }
.photos-below .ann-photos { flex-direction: row; flex-wrap: wrap; width: 100%; }
.ann-photos { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.thumb { width: 88px; height: 88px; padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg); cursor: zoom-in; position: relative; display: inline-block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.missing { display: none; }
.thumb.small { width: 70px; height: 70px; }
.thumb.add { display: flex; align-items: center; justify-content: center; font-size: 26px; color: var(--text-soft); cursor: pointer; margin: 0; font-weight: 400; border-style: dashed; }
.thumb .x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; line-height: 22px; padding: 0; }
.photo-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rich { margin-top: 4px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.rich p, .rich ul, .rich ol, .rich blockquote, .rich h3 { margin: 0 0 6px; }
.rich ul, .rich ol { padding-left: 22px; }
.rich h3 { font-size: 17px; font-family: var(--font-heading); }
.rich blockquote { border-left: 3px solid var(--border); padding-left: 10px; color: var(--text-soft); }
@media (max-width: 380px) { .thumb { width: 72px; height: 72px; } }
/* text editor */
.rte { border: 1.5px solid var(--border); border-radius: 10px; background: var(--card); overflow: hidden; }
.rte:focus-within { border-color: var(--link); box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 18%, transparent); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 5px; border-bottom: 1px solid var(--border); background: var(--bg); }
.rte-bar button { min-width: 34px; height: 32px; border: 0; border-radius: 6px; background: none; color: var(--text); font-size: 15px; }
.rte-bar button:hover { background: var(--card); }
.rte-bar button.on { background: var(--primary); color: var(--on-primary, #fff); }
.rte-box { min-height: 110px; max-height: 50vh; overflow-y: auto; padding: 12px 14px; font-size: 16px; line-height: 1.45; outline: none; }
.rte-box:empty::before { content: attr(data-placeholder); color: var(--text-soft); }
.rte-box p, .rte-box ul, .rte-box ol, .rte-box blockquote, .rte-box h3 { margin: 0 0 6px; }
.rte-box blockquote { border-left: 3px solid var(--border); padding-left: 10px; color: var(--text-soft); }
/* reactions */
.reacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.react { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; border: 1.5px solid var(--border); background: var(--card); font-size: 14px; color: var(--text); line-height: 1.3; }
.react span { font-size: 12px; font-weight: 600; color: var(--text-soft); }
.react.mine { border-color: var(--link); background: color-mix(in srgb, var(--link) 12%, var(--card)); }
.react.mine span { color: var(--link); }
.react.add { color: var(--text-soft); font-size: 13px; }
.comment .reacts { margin-top: 6px; }
.comment .react { padding: 1px 7px; font-size: 13px; }
.react-pick { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 6px; margin-top: 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); box-shadow: 0 8px 24px rgba(0,0,0,.12); max-width: 340px; }
.react-pick button { border: 0; background: none; font-size: 20px; padding: 5px 0; border-radius: 8px; }
.react-pick button:hover { background: var(--bg); }
/* photo viewer */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.9); display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 94vw; max-height: 86vh; object-fit: contain; border-radius: 6px; }
.lb-x { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; font-size: 20px; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 32px; border-radius: 10px; }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
.lb-count { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); color: #ddd; font-size: 14px; }
.ann-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
fieldset.plain { border: 0; padding: 0; margin: 8px 0 0; }
fieldset.plain legend { padding: 0; margin-bottom: 2px; }
.thumb.sample { cursor: default; }
.thumb.sample svg { width: 100%; height: 100%; display: block; }
.sample-tag { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: 9.5px; font-weight: 600; padding: 2px 5px; border-radius: 5px; letter-spacing: .01em; }
/* popup sheet (replies from the home screen) */
.sheet-bg { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 560px; max-height: 88vh; display: flex; flex-direction: column; border-radius: 18px 18px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.2); animation: sheet-up .18s ease-out; }
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 18px; } }
@keyframes sheet-up { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.sheet-head b { flex: 1; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--card); color: var(--text); font-size: 16px; flex-shrink: 0; }
.sheet-body { overflow-y: auto; padding: 14px 16px max(16px, env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.sheet-body .announce { margin-bottom: 0; }
.google-link { display: inline-flex; align-items: center; gap: 6px; }
.google-link svg { width: 15px; height: 15px; }
/* breathing room when a full-width button sits between cards */
.btn + .card, .btn + form.card { margin-top: 14px; }
.act-group { margin-left: auto; display: flex; gap: 6px; flex-shrink: 0; }
.small-btn.danger { background: var(--error); border-color: var(--error); color: #fff; }
.confirm-del { background: var(--error-bg); border-radius: 10px; padding: 12px; margin: 4px 0 10px; }
.confirm-del .row { justify-content: flex-end; }
.msg + .card, .msg + form.card { margin-top: 14px; }
/* ---------- Messages ---------- */
.unread-pill { background: var(--error); color: #fff; }
.setup-hint { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.inbox-tools { display: flex; gap: 8px; align-items: center; margin-top: 14px; }
.inbox-tools input { flex: 1; }
.inbox-tools .small-btn { padding: 12px 14px; flex-shrink: 0; }
.conv-list { padding: 4px 0; }
.conv-row { display: flex; gap: 12px; align-items: center; width: 100%; padding: 12px 16px; border: 0; border-top: 1px solid var(--border); background: none; text-align: left; color: var(--text); font: inherit; cursor: pointer; }
.conv-row:first-child { border-top: 0; }
.conv-row:hover { background: color-mix(in srgb, var(--bg) 60%, var(--card)); }
.avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; background: color-mix(in srgb, var(--primary) 14%, var(--card)); color: var(--primary); }
.conv-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.conv-name { font-weight: 600; display: flex; align-items: center; gap: 6px; min-width: 0; }
.conv-name .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-name .pill { margin-left: 0; flex-shrink: 0; }
.conv-prev { font-size: 13.5px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-row.unread .conv-name { font-weight: 800; }
.conv-row.unread .conv-prev { color: var(--text); font-weight: 500; }
.conv-time { font-size: 12px; color: var(--text-soft); display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--link); }
.convo-head { display: flex; gap: 12px; align-items: center; }
.convo-title { font-size: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convo-actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 4px; }
.thread-list { margin: 14px 0; display: flex; flex-direction: column; gap: 2px; }
.day-sep { text-align: center; margin: 12px 0 6px; font-size: 12px; color: var(--text-soft); }
.day-sep span { background: var(--bg); padding: 0 8px; }
.msg-row { display: flex; flex-direction: column; max-width: 84%; margin-bottom: 8px; }
.msg-row.in { align-self: flex-start; align-items: flex-start; }
.msg-row.out { align-self: flex-end; align-items: flex-end; }
.msg-row.note-msg { align-self: center; align-items: center; max-width: 92%; }
.bubble { padding: 9px 13px; border-radius: 16px; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.msg-row.in .bubble { background: var(--card); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.msg-row.out .bubble { background: var(--primary); color: var(--on-primary, #fff); border-bottom-right-radius: 5px; }
.msg-row.out .bubble a { color: var(--on-primary, #fff); }
.msg-row.note-msg .bubble { background: color-mix(in srgb, var(--accent) 18%, var(--card)); border: 1px dashed color-mix(in srgb, var(--accent) 60%, var(--border)); }
.bubble .body { white-space: pre-wrap; }
.bubble .subj { font-weight: 700; margin-bottom: 3px; }
.bubble .files { margin-top: 6px; font-size: 13px; display: flex; gap: 10px; flex-wrap: wrap; }
.note-tag { font-size: 12px; font-weight: 700; color: var(--text-soft); margin-bottom: 3px; }
.msg-row .meta { font-size: 11.5px; color: var(--text-soft); margin-top: 3px; padding: 0 4px; }
.msg-row .meta .fail { color: var(--error); font-weight: 600; }
.msg-row .reacts { margin-top: 3px; }
.msg-row .reacts .react { padding: 1px 7px; font-size: 13px; }
.msg-row .reacts .react.add { opacity: 0; transition: opacity .15s; }
.msg-row:hover .reacts .react.add, .msg-row:focus-within .reacts .react.add, .msg-row .reacts .react.add:focus { opacity: 1; }
@media (hover: none) { .msg-row .reacts .react.add { opacity: .7; } }
.composer { position: sticky; bottom: 0; z-index: 5; margin-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; box-shadow: 0 -6px 18px rgba(0,0,0,.06); padding: 12px 14px max(12px, env(safe-area-inset-bottom)); }
.composer .chips { margin: 0 0 8px; }
.composer textarea, .composer input { margin-bottom: 0; }
.composer #csub { margin-bottom: 8px; }
.notice { background: var(--error-bg); color: var(--error); border-radius: 10px; padding: 9px 12px; font-size: 13.5px; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; font-size: 13px; color: var(--text-soft); }
.conv-prev .newc { color: var(--link); font-weight: 600; }
.test-banner { background: color-mix(in srgb, var(--accent) 22%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 60%, var(--border)); border-radius: 10px; padding: 9px 12px; font-size: 13.5px; margin: 12px 0; }
.test-card { border: 2px solid var(--accent); }
/* setup walkthroughs */
.ready-line { margin: 8px 0 4px; font-size: 14.5px; }
.pill.fail { background: var(--error-bg); color: var(--error); }
.subsection { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.addr-row { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.addr-row input { flex: 1; min-width: 0; }
.addr-row input#em-local { flex: 0 0 34%; }
.howto { padding-left: 20px; font-size: 14px; margin: 8px 0; }
.howto li { margin-bottom: 4px; }
.dns-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; margin-top: 8px; }
table.dns { border-collapse: collapse; width: 100%; font-size: 13px; }
table.dns th, table.dns td { padding: 8px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
table.dns tr:last-child td { border-bottom: 0; }
table.dns code { font-size: 12px; word-break: break-all; }
table.dns .dns-val code { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
ol.steps { list-style: none; padding: 0; margin: 12px 0 0; counter-reset: st; }
ol.steps li { position: relative; padding: 0 0 14px 38px; counter-increment: st; }
ol.steps li::before { content: counter(st); position: absolute; left: 0; top: -2px; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: var(--bg); border: 1.5px solid var(--border); color: var(--text-soft); }
ol.steps li.done::before { content: "✓"; background: var(--primary); border-color: var(--primary); color: var(--on-primary, #fff); }
ol.steps li.wait::before { background: color-mix(in srgb, var(--accent) 30%, var(--card)); border-color: var(--accent); color: var(--text); }
ol.steps li.fail::before { content: "!"; background: var(--error); border-color: var(--error); color: #fff; }
ol.steps li:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 28px; bottom: 2px; width: 2px; background: var(--border); }
.st-h { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.st-h span { font-size: 13px; color: var(--text-soft); }
ol.steps .small-btn { margin-top: 8px; }
.m.fail { color: var(--error); }
.num-list { margin-top: 8px; border: 1px solid var(--border); border-radius: 10px; max-height: 300px; overflow-y: auto; }
.num-list .row-btn { padding: 10px 12px; }
.num-list .row-btn.confirming { background: color-mix(in srgb, var(--accent) 16%, var(--card)); }
details.adv summary { cursor: pointer; list-style: none; }
details.adv summary::-webkit-details-marker { display: none; }
details.adv summary::after { content: " ▸"; color: var(--text-soft); }
details.adv[open] summary::after { content: " ▾"; }
.sheet.tall { max-height: 94vh; height: 94vh; }
/* confirmation popup (Saved / Logged!) */
.done-pop { position: fixed; inset: 0; z-index: 120; pointer-events: none; display: none; align-items: center; justify-content: center; padding: 30px; background: color-mix(in srgb, var(--primary) 45%, transparent); }
.done-pop.show { display: flex; animation: dp-fade .18s ease-out; }
.done-card { pointer-events: auto; cursor: pointer; background: var(--card); border-radius: 22px; padding: 28px 24px 24px; text-align: center; max-width: 320px; width: 100%; box-shadow: 0 20px 50px rgba(0,0,0,.3); animation: dp-pop .3s cubic-bezier(.2,1.4,.4,1); }
.done-check { width: 80px; height: 80px; border-radius: 50%; background: var(--accent); margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 25%, transparent); }
.done-check svg { width: 42px; height: 42px; stroke: var(--primary); stroke-width: 4; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: dp-draw .45s .15s ease-out forwards; }
.done-card h2 { color: var(--primary); margin: 0 0 4px; font-size: 26px; }
.done-card p { margin: 0; color: var(--text-soft); }
.done-card p:empty { display: none; }
@keyframes dp-pop { from { transform: scale(.85); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes dp-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes dp-draw { to { stroke-dashoffset: 0 } }
@media (prefers-reduced-motion: reduce) { .done-pop.show, .done-card { animation: none; } .done-check svg { animation: none; stroke-dashoffset: 0; } }

/* notes in a conversation: quick list + jump-to highlight */
#notelist b { display: block; margin-bottom: 4px; }
.note-jump { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--border); padding: 9px 2px; cursor: pointer; color: inherit; font: inherit; }
.note-jump:first-of-type { border-top: 0; }
.note-jump:hover .nj-body { text-decoration: underline; }
.note-jump .nj-body { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.msg-row.flash .bubble { animation: msgflash 2.4s ease-out; }
@keyframes msgflash { 0%, 35% { box-shadow: 0 0 0 3px var(--accent, #e3b341); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .msg-row.flash .bubble { animation: none; outline: 3px solid var(--accent, #e3b341); } }

/* conversation: name + buttons stay pinned at the top while you scroll (reply box is pinned at the bottom) */
.convo-top { position: sticky; top: 0; z-index: 6; background: var(--bg); margin: 0 -16px; padding: 10px 16px 8px; border-bottom: 1px solid var(--border); box-shadow: 0 6px 14px -10px rgba(0,0,0,.18); }
.convo-top .convo-head .avatar { width: 38px; height: 38px; font-size: 14px; }
.convo-top .convo-title { font-size: 19px; margin: 0; }
.convo-top .convo-actions { flex-wrap: nowrap; overflow-x: auto; margin: 8px 0 0; padding-bottom: 2px; scrollbar-width: none; }
.convo-top .convo-actions::-webkit-scrollbar { display: none; }
.convo-top .convo-actions .small-btn { flex: 0 0 auto; }
.convo-top #notelist, .convo-top #linkbox { margin: 8px 0 0; max-height: 45vh; overflow-y: auto; }
.convo-top #m:not(.hidden) { margin: 8px 0 0; }
.convo .thread-list { padding-top: 10px; }
.msg-row { scroll-margin-top: 170px; scroll-margin-bottom: 230px; }

/* client notes: about 5 show, the rest scroll inside the box; search on top */
.nsearch { margin: 0 0 8px; }
.notes-scroll { position: relative; overflow-y: auto; overscroll-behavior: contain; }
.notes-scroll.scrolls { border-bottom: 1px solid var(--border); padding-right: 4px; }
.note.hidden { display: none; }

/* email replies: which email you're answering */
.reply-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13.5px; background: color-mix(in srgb, var(--primary) 6%, var(--card)); border: 1px solid var(--border); border-radius: 10px; padding: 7px 10px; margin-bottom: 8px; }
.reply-bar > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.reply-bar .small-btn { flex: 0 0 auto; }
.reply-link { font-size: inherit; }
.msg-row.replying .bubble { outline: 2px dashed color-mix(in srgb, var(--accent) 80%, var(--border)); outline-offset: 2px; }

/* full-screen conversation (like iMessage / GoHighLevel): top bar and reply box fixed,
   only the messages scroll in between; the page itself never scrolls */
.wrap.convo { height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding-bottom: 0; overflow: hidden; box-sizing: border-box; }
.wrap.convo > * { flex-shrink: 0; }
.wrap.convo .top { margin-bottom: 8px; }
.wrap.convo .convo-top { position: static; margin: 0 -16px; }
.wrap.convo #thread { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 10px 16px 12px; display: flex; flex-direction: column; }
.wrap.convo .test-banner { margin: 0 0 8px; font-size: 12.5px; padding: 6px 10px; }
.wrap.convo .composer { position: static; margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
.wrap.convo .composer .rte-box { max-height: 28vh; min-height: 80px; }
.wrap.convo .composer textarea { max-height: 28vh; }
@media (min-width: 520px) { .wrap.convo .composer, .wrap.convo .convo-top, .wrap.convo #thread { margin-left: 0; margin-right: 0; } .wrap.convo .composer { border-radius: var(--radius) var(--radius) 0 0; border: 1px solid var(--border); border-bottom: 0; } }
.wrap.convo .msg-row { scroll-margin: 12px; }

/* calendar: month grid like v1 */
.cal-card { padding: 16px 14px; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-month { font-family: var(--font-heading); font-size: 17px; color: var(--primary); }
.cal-arrow { width: 36px; height: 36px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--primary) 8%, var(--card)); color: var(--primary); font-size: 16px; cursor: pointer; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-week div { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: .03em; padding-bottom: 6px; }
.cal-day { aspect-ratio: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 9px; font-size: 13px; color: var(--text); background: color-mix(in srgb, var(--card) 70%, var(--bg)); border: 1px solid transparent; padding: 0; font: inherit; }
.cal-day.empty { background: none; }
.cal-day.has { cursor: pointer; background: color-mix(in srgb, var(--link) 14%, var(--card)); border-color: color-mix(in srgb, var(--link) 30%, var(--border)); font-weight: 700; }
.cal-day.has:hover { background: color-mix(in srgb, var(--link) 22%, var(--card)); }
.cal-day.today { border-color: var(--accent); border-width: 2px; }
.cal-n { font-size: 13px; line-height: 1; }
.cal-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--link); margin-top: 3px; }
.cal-count { font-size: 9px; color: var(--primary); margin-top: 1px; line-height: 1; }
.cal-tech { font-size: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--text-soft); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; margin-top: 1px; }
.pick-list { border: 1px solid var(--border); border-radius: 10px; margin: 6px 0 10px; overflow: hidden; }
.hist-list { margin-top: 6px; }
.hist-row { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--border); padding: 10px 4px; font: inherit; color: inherit; cursor: pointer; }
.hist-row:first-child { border-top: 0; }
.hist-row:hover { background: color-mix(in srgb, var(--primary) 5%, transparent); }
.hist-row .n { font-weight: 600; }
.hist-row .m { white-space: nowrap; color: var(--text-soft); font-size: 13px; }
.day-visit { display: block; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; font: inherit; color: inherit; cursor: pointer; }
.day-visit:hover { border-color: var(--link); }
.day-visit .n { font-weight: 700; margin-bottom: 3px; }
.day-visit .n .m { font-weight: 400; }
.day-visit .m { font-size: 13.5px; color: var(--text-soft); }
.dv-who { font-size: 12.5px; font-weight: 600; color: var(--text-soft); margin-bottom: 3px; }
.dv-rate { color: var(--primary); font-weight: 600; }
.dv-notes { margin-top: 6px; font-size: 13px; background: var(--bg); border-radius: 8px; padding: 6px 8px; white-space: pre-wrap; }
.hits-h { font-size: 12.5px; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: .03em; margin: 10px 2px 4px; }
.note-hit { display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--border); padding: 10px 12px; font: inherit; color: inherit; cursor: pointer; }
.note-hit:first-child { border-top: 0; }
.note-hit:hover { background: color-mix(in srgb, var(--primary) 5%, transparent); }
.note-hit .n { font-weight: 600; font-size: 14px; }
.note-hit .n .m { font-weight: 400; color: var(--text-soft); font-size: 12.5px; }
.note-hit .snip { font-size: 13.5px; color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.note-hit.open .snip { -webkit-line-clamp: unset; }
.note-hit mark { background: color-mix(in srgb, var(--accent) 55%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }

/* ===== v1 look, for every company (colors come from the company's theme) ===== */
:root { --soil: #5b3a1f; --shadow: 0 6px 20px rgba(20, 48, 28, .07); }
body { overflow-x: clip; }
/* page header: logo, small label, big title, subtitle, grass edge */
.hero { position: relative; margin: -20px calc(50% - 50vw) 18px; padding: calc(16px + env(safe-area-inset-top)) calc(50vw - 50%) 44px; }
.hero .top { margin-bottom: 14px; }
.hero .top img { height: 54px; max-width: 190px; }
.hero .top img + .brand-name { display: none; }        /* the logo already says the name */
.hero .eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--soil); font-weight: 600; margin-bottom: 6px; }
.hero h1 { color: var(--primary); font-size: 28px; }
.hero .sub { margin: 6px 0 0; font-size: 14.5px; }
.grass { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 30px; display: block; }
.grass .g-blades { fill: var(--grass, var(--link)); }
.grass .g-soil { fill: var(--soil); }
.hero + .back { margin-top: 0; }
/* cards: soft shadow like v1 */
.card, .menu-card { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--border) 70%, var(--card)); }
/* home menu: icon tile + serif title */
.menu { gap: 14px; }
.menu-card { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: center; padding: 20px 18px; transition: transform .08s; }
.menu-card > .t, .menu-card > .d { grid-column: 2; }
.menu-card .t { font-family: var(--font-heading); font-size: 19px; color: var(--primary); }
.menu-card:not(:disabled):active { transform: scale(.985); }
.menu-ic { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--link) 13%, var(--card)); display: flex; align-items: center; justify-content: center; }
.menu-ic svg { width: 24px; height: 24px; stroke: var(--link); fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.menu-card.soon .menu-ic { filter: grayscale(1); opacity: .6; }
/* form labels: small caps like v1 (not checkbox labels) */
label:not(.swatch):not(.upl-btn):not(.color-row):not(:has(> input[type=checkbox])):not(:has(> input[type=radio])) { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--soil); }
input:not([type=checkbox]):not([type=radio]):not([type=color]), select, textarea { background-color: color-mix(in srgb, var(--card) 80%, var(--bg)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 18%, transparent); }
.foot { line-height: 1.6; }
.foot b { font-family: var(--font-heading); font-size: 14px; color: var(--primary); }
/* bottom tab bar (v1) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: color-mix(in srgb, var(--card) 96%, transparent); backdrop-filter: blur(6px); border-top: 1px solid var(--border); display: flex; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 18px rgba(20, 48, 28, .08); }
.tabbar button { flex: 1; max-width: 110px; background: none; border: 0; padding: 6px 2px; display: flex; flex-direction: column; align-items: center; gap: 3px; font: 600 11px var(--font-body); color: var(--text-soft); cursor: pointer; border-radius: 10px; position: relative; }
.tabbar button svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button.active { color: var(--link); }
.tabbar button.active::after { content: ""; position: absolute; bottom: 0; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
body.has-tabs .wrap { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.card.line > .row > b { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--primary); }
/* home: one big main action, everything else as small tiles */
.menu-card.main { padding: 22px 18px; background: color-mix(in srgb, var(--link) 7%, var(--card)); border-color: color-mix(in srgb, var(--link) 25%, var(--border)); }
.menu-card.main .menu-ic { background: var(--primary); }
.menu-card.main .menu-ic svg { stroke: var(--on-primary, #fff); }
.menu.tiles { grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.menu-card.tile { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; text-align: center; padding: 14px 3px 12px; min-width: 0; }
.menu-card.tile .menu-ic { width: 42px; height: 42px; grid-row: auto; }
.menu-card.tile .t { font-family: var(--font-body); font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.25; overflow-wrap: normal; word-break: normal; hyphens: manual; letter-spacing: -.01em; }
.menu-card.tile .unread-pill { display: block; margin: 4px auto 0; width: fit-content; }
@media (max-width: 340px) { .menu.tiles { grid-template-columns: repeat(2, 1fr); } }
/* phones show the first 5 shortcuts; computers show them all (up to 8) */
.tabbar button:nth-child(n+6) { display: none; }
/* desktop: the tab bar becomes a slim left sidebar (bottom bars are a phone thing) */
@media (min-width: 900px) {
  .tabbar button:nth-child(n+6) { display: flex; }
  .tabbar { top: 0; bottom: 0; right: auto; width: 88px; flex-direction: column; justify-content: flex-start; gap: 6px; padding: 24px 8px; border-top: 0; border-right: 1px solid var(--border); box-shadow: 4px 0 18px rgba(20, 48, 28, .05); }
  .tabbar button { flex: 0 0 auto; max-width: none; padding: 10px 2px; }
  .tabbar button:hover { background: color-mix(in srgb, var(--link) 8%, transparent); color: var(--link); }
  .tabbar button.active { background: color-mix(in srgb, var(--link) 12%, transparent); }
  .tabbar button.active::after { display: none; }
  body.has-tabs { padding-left: 88px; }
  body.has-tabs .wrap { padding-bottom: 48px; }
  body.has-tabs .hero { margin-left: calc(50% - 50vw + 44px); margin-right: calc(50% - 50vw + 44px); padding-left: calc(50vw - 50% - 44px); padding-right: calc(50vw - 50% - 44px); }
}

/* shortcut bar editor */
.tabs-ed { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.te-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--border); background: var(--card); }
.te-row:first-child { border-top: 0; }
.te-ic { width: 34px; height: 34px; border-radius: 9px; background: color-mix(in srgb, var(--link) 12%, var(--card)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.te-ic svg { width: 20px; height: 20px; stroke: var(--link); fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.te-n { flex: 1; font-weight: 600; min-width: 0; }
.te-tag { display: inline-block; font-size: 11px; font-weight: 600; color: var(--text-soft); background: var(--bg); border-radius: 6px; padding: 1px 6px; margin-left: 4px; white-space: nowrap; }
.te-b { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 15px; padding: 0; flex-shrink: 0; cursor: pointer; }
.te-b:disabled { opacity: .3; cursor: default; }
.te-x { color: var(--error); }
.te-lock { border-color: transparent; background: none; }
.te-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.chip-btn { border: 1px dashed color-mix(in srgb, var(--link) 50%, var(--border)); background: none; color: var(--link); font: 600 13px var(--font-body); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.chip-btn:disabled { opacity: .4; cursor: default; }
.te-note { margin: 10px 2px 0; }
/* pinned announcement, shrunk to one line after you've seen it */
.announce-mini { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; font: inherit; color: var(--text); background: color-mix(in srgb, var(--pin) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--pin) 45%, var(--border)); border-left: 5px solid var(--pin); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; cursor: pointer; box-shadow: var(--shadow); }
.announce-mini:hover { border-color: var(--pin); }
.am-pin { flex-shrink: 0; }
.am-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.am-t { font-weight: 700; }
.am-s { color: var(--text-soft); }
.am-c { flex-shrink: 0; font-size: 12.5px; color: var(--text-soft); }
.am-more { flex-shrink: 0; font-size: 12.5px; font-weight: 700; color: var(--link); }

/* ===== theme editor choices (set on <html data-*> by the company's theme) ===== */
.g-soft { fill: var(--grass); opacity: .5; }
.divider-img { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 36px; object-fit: cover; display: block; }
html[data-divider=none] .hero { padding-bottom: 18px; border-bottom: 1px solid var(--border); }
/* header: colored band (v1's original striped header) */
html[data-header=band] .hero { background: repeating-linear-gradient(100deg, var(--primary) 0 46px, var(--primary-hover) 46px 92px); color: var(--on-primary); padding-top: calc(22px + env(safe-area-inset-top)); }
html[data-header=band] .hero h1, html[data-header=band] .hero .brand-name { color: var(--on-primary); }
html[data-header=band] .hero .sub, html[data-header=band] .hero .who, html[data-header=band] .hero .who a, html[data-header=band] .hero .who button { color: color-mix(in srgb, var(--on-primary) 82%, transparent); }
html[data-header=band] .hero .eyebrow { color: var(--accent); }
/* header: your picture behind it */
html[data-header=image] .hero { background: linear-gradient(180deg, rgba(0,0,0,.30), rgba(0,0,0,.58)), var(--header-img) center / cover no-repeat; color: #fff; padding-top: calc(26px + env(safe-area-inset-top)); }
html[data-header=image] .hero h1, html[data-header=image] .hero .brand-name { color: #fff; }
html[data-header=image] .hero .sub, html[data-header=image] .hero .who, html[data-header=image] .hero .who a, html[data-header=image] .hero .who button { color: rgba(255,255,255,.88); }
html[data-header=image] .hero .eyebrow { color: var(--accent); }
/* cards */
html[data-cards=border] .card, html[data-cards=border] .menu-card { box-shadow: none; border-color: var(--border); }
html[data-cards=flat] .card, html[data-cards=flat] .menu-card { box-shadow: none; border-color: transparent; background: color-mix(in srgb, var(--card) 72%, var(--bg)); }
html[data-cards=lifted] .card, html[data-cards=lifted] .menu-card { box-shadow: 0 14px 34px rgba(20, 48, 28, .13); border-color: transparent; }
html[data-cards=lifted] .menu-card:not(:disabled):hover { transform: translateY(-2px); }
/* spacing */
html[data-density=compact] .card { padding: 13px 14px; margin-bottom: 10px; }
html[data-density=compact] .menu-card { padding: 14px; }
html[data-density=compact] .menu-card.tile { padding: 10px 3px 9px; }
html[data-density=compact] .menu.tiles { gap: 8px; }
html[data-density=compact] .hero { padding-bottom: 38px; }
html[data-density=compact] .hero h1 { font-size: 25px; }
/* icons */
.menu-ic .ic-img, .te-ic .ic-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.menu-ic:has(.ic-img), .te-ic:has(.ic-img) { background: none; overflow: hidden; }
html[data-icons=circle] .menu-ic, html[data-icons=circle] .te-ic { border-radius: 50%; }
html[data-icons=plain] .menu-ic, html[data-icons=plain] .te-ic { background: none; }
html[data-icons=plain] .menu-card.tile .menu-ic svg { width: 30px; height: 30px; }
html[data-icons=solid] .menu-ic, html[data-icons=solid] .te-ic { background: var(--primary); }
html[data-icons=solid] .menu-ic svg, html[data-icons=solid] .te-ic svg { stroke: var(--on-primary); }
/* home tiles per row */
.menu.tiles { grid-template-columns: repeat(var(--tiles, 3), minmax(0, 1fr)); }
html[style*="--tiles: 4"] .menu-card.tile .t { font-size: 11.5px; }
.foot-art { display: block; max-width: 220px; max-height: 90px; margin: 26px auto 0; object-fit: contain; }
/* tab bar styles */
.tabbar .ic-img { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; }
html[data-tabbar=minimal] .tabbar button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html[data-tabbar=minimal] .tabbar button { padding: 10px 2px; }
@media (max-width: 899px) {
  html[data-tabbar=floating] .tabbar { left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); border: 1px solid var(--border); border-radius: 22px; padding: 6px 4px; box-shadow: 0 10px 30px rgba(20, 48, 28, .18); }
  html[data-tabbar=floating] body.has-tabs .wrap { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
}
@media (min-width: 900px) {
  html[data-tabbar=floating] .tabbar { top: 12px; bottom: 12px; left: 12px; border: 1px solid var(--border); border-radius: 22px; box-shadow: 0 10px 30px rgba(20, 48, 28, .12); }
  html[data-tabbar=floating] body.has-tabs { padding-left: 100px; }
}

/* ===== theme editor ===== */
.wrap.te-wrap { max-width: 1120px; padding-bottom: 120px; }
.te-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .te-grid { grid-template-columns: minmax(0, 1fr) 390px; align-items: start; }
  .te-preview { order: 2; position: sticky; top: 16px; }
  .te-controls { order: 1; }
}
.tp-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--soil); margin: 0 4px 8px; }
.tp-phone { border: 10px solid #1d1f1c; border-radius: 34px; background: var(--bg); overflow: hidden; height: 640px; max-height: 70vh; position: relative; box-shadow: 0 18px 50px rgba(0,0,0,.18); }
@media (max-width: 899px) { .tp-phone { height: 430px; } }
.tp-screen { height: 100%; overflow-y: auto; overflow-x: hidden; position: relative; font-size: 15px; }
.tp-screen .hero.tp-hero { margin: 0; padding: 16px 14px 40px; }
.tp-screen .hero .top { margin-bottom: 10px; }
.tp-screen .hero .top img { height: 40px; }
.tp-screen .hero h1 { font-size: 22px; }
.tp-screen .hero .sub { font-size: 13px; }
.tp-screen .grass, .tp-screen .divider-img { height: 22px; }
.tp-body { padding: 14px 12px 90px; }
.tp-body .announce-mini { margin-bottom: 10px; padding: 8px 10px; }
.tp-body .menu-card.main { padding: 14px 12px; grid-template-columns: 38px 1fr; }
.tp-body .menu-card.main .menu-ic, .tp-body .menu-ic { width: 38px; height: 38px; }
.tp-body .menu-card .t { font-size: 16px; }
.tp-body .menu-card .d { font-size: 12px; }
.tp-body .menu-card.tile .t { font-size: 11px; }
.tp-body .menu.tiles { gap: 8px; margin-top: 10px; }
.tp-body .foot { margin-top: 16px; }
.tabbar.tp-tabbar { position: absolute; left: 0; right: 0; bottom: 0; top: auto; width: auto; flex-direction: row; padding: 6px 2px 8px; border-right: 0; border-top: 1px solid var(--border); box-shadow: 0 -4px 18px rgba(20,48,28,.08); }
.tabbar.tp-tabbar > span { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font: 600 10px var(--font-body); color: var(--text-soft); position: relative; }
.tabbar.tp-tabbar > span.active { color: var(--link); }
.tabbar.tp-tabbar svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabbar.tp-tabbar .ic-img { width: 21px; height: 21px; }
html[data-tabbar=floating] .tabbar.tp-tabbar { left: 8px; right: 8px; bottom: 8px; top: auto; border: 1px solid var(--border); border-radius: 18px; }
html[data-tabbar=minimal] .tabbar.tp-tabbar > span > span { display: none; }
/* sections */
.te-sec { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; box-shadow: var(--shadow); padding: 0 18px; }
.te-sec[open] { padding-bottom: 18px; }
.te-sec > summary { cursor: pointer; padding: 15px 18px; margin: 0 -18px; font-weight: 700; font-size: 16px; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.te-sec > summary::-webkit-details-marker { display: none; }
.te-sec > summary::after { content: "▾"; color: var(--text-soft); transition: transform .15s; }
.te-sec[open] > summary::after { transform: rotate(180deg); }
.te-sec label:first-of-type { margin-top: 0; }
/* segmented choices */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { flex: 1 1 auto; min-width: 72px; padding: 9px 10px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--card); color: var(--text); font: 600 13.5px var(--font-body); cursor: pointer; }
.seg button.on { border-color: var(--link); background: color-mix(in srgb, var(--link) 12%, var(--card)); color: var(--link); }
/* presets */
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.preset { text-align: left; border: 1.5px solid var(--border); border-radius: 12px; background: var(--card); padding: 10px; font: inherit; color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.preset:hover { border-color: var(--link); }
.preset.on { border-color: var(--link); box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 20%, transparent); }
.preset .m { font-size: 12px; }
.pr-sw { display: flex; height: 22px; border-radius: 6px; overflow: hidden; margin-bottom: 4px; border: 1px solid rgba(0,0,0,.08); }
.pr-sw i { flex: 1; }
/* dividers */
.dividers { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.dv { border: 1.5px solid var(--border); border-radius: 10px; background: var(--card); padding: 6px 6px 7px; font: 600 12px var(--font-body); color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 5px; align-items: stretch; }
.dv.on { border-color: var(--link); box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 20%, transparent); }
.dv-art { position: relative; height: 26px; border-radius: 6px; background: var(--bg); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.dv-art .grass, .dv-art .divider-img { height: 22px; }
/* colors */
.colors { display: grid; gap: 6px; }
@media (min-width: 600px) { .colors { grid-template-columns: 1fr 1fr; } }
label.color-row { display: flex; align-items: center; gap: 10px; margin: 0; padding: 6px 8px; border: 1px solid var(--border); border-radius: 10px; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--text); cursor: pointer; }
label.color-row input[type=color] { width: 38px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: none; flex-shrink: 0; cursor: pointer; }
label.color-row > span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
label.color-row .m { font-size: 12px; font-weight: 400; }
label.color-row code { font-size: 12px; color: var(--text-soft); }
.ok-line { color: var(--link); font-weight: 600; }
.font-sample { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--bg); display: flex; flex-direction: column; gap: 4px; }
.font-sample b { font-size: 20px; color: var(--primary); }
/* uploads */
.upl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 0; }
.upl > .m { flex-basis: 100%; }
.upl-img { max-height: 48px; max-width: 180px; border-radius: 8px; border: 1px solid var(--border); object-fit: contain; background: var(--bg); }
label.upl-btn { margin: 0; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text); cursor: pointer; display: inline-block; }
/* menu rows */
.te-menu { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.tm-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-top: 1px solid var(--border); background: var(--card); }
.tm-row:first-child { border-top: 0; }
.tm-row.off { opacity: .5; }
.tm-row .tm-name { flex: 1; min-width: 0; padding: 8px 10px; font-size: 14px; }
.tm-row .tm-n { flex: 1; font-weight: 600; font-size: 14px; }
/* save bar */
.savebar { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translate(-50%, 140%); z-index: 60; display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 10px 12px; box-shadow: 0 14px 40px rgba(0,0,0,.2); transition: transform .2s ease; max-width: calc(100vw - 24px); flex-wrap: wrap; justify-content: center; }
.savebar.show { transform: translate(-50%, 0); }
.savebar .sb-t { font-weight: 700; font-size: 14px; margin-right: 4px; }
@media (prefers-reduced-motion: reduce) { .savebar { transition: none; } }

label .hint { text-transform: none; letter-spacing: 0; font-weight: 400; }
input[type=range], input[type=checkbox], input[type=radio] { accent-color: var(--link); }
.ai-sec { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--card)), var(--card) 60%); }
.ai-ex { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ai-sec .btn { margin-top: 12px; }

/* visit form: the card with the problem gets a red outline */
.card.bad { border-color: var(--error) !important; box-shadow: 0 0 0 2px color-mix(in srgb, var(--error) 30%, transparent); }
.day-visit .dv-rate, .person .dv-rate { font-size: 12.5px; margin: 1px 0 3px; }
.act-row { display: flex; gap: 10px; margin: 0 0 14px; }
.act-row .btn { margin: 0; flex: 1; }
a.small-btn { text-decoration: none; display: inline-flex; align-items: center; flex-shrink: 0; }
.stop-note { margin-top: 8px; font-size: 13px; color: var(--text-soft); white-space: pre-wrap; border-left: 3px solid var(--border); padding-left: 8px; }
.person.off { opacity: .6; }
.person-acts { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.person-acts { margin-left: auto; }
/* computers: use more of the screen (phones keep the narrow column) */
@media (min-width: 900px) {
  .wrap:not(.te-wrap) { max-width: 720px; }
}
a.btn { display: block; text-align: center; text-decoration: none; box-sizing: border-box; }

/* ---------- loading animation (style picked in the theme editor, colors from the theme) */
.loader { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 44px 0 24px; color: var(--text-soft); font-size: 14px; }
.ld { display: inline-flex; align-items: flex-end; justify-content: center; gap: 5px; width: 40px; height: 36px; }
.ld i { display: none; }
/* spinner (default) */
.ld { box-sizing: border-box; }
html:not([data-loader]) .ld, html[data-loader=spin] .ld { width: 36px; border-radius: 50%; border: 4px solid color-mix(in srgb, var(--link) 18%, transparent); border-top-color: var(--link); animation: ld-spin .8s linear infinite; }
/* bouncing dots */
html[data-loader=dots] .ld { align-items: center; width: auto; }
html[data-loader=dots] .ld i:nth-child(-n+3) { display: block; width: 11px; height: 11px; border-radius: 50%; background: var(--link); animation: ld-bounce .9s ease-in-out infinite; }
html[data-loader=dots] .ld i:nth-child(2) { animation-delay: .15s; }
html[data-loader=dots] .ld i:nth-child(3) { animation-delay: .3s; }
/* growing grass */
html[data-loader=grass] .ld { width: auto; gap: 3px; border-bottom: 4px solid var(--soil); padding: 0 4px; }
html[data-loader=grass] .ld i { display: block; width: 7px; height: 30px; background: var(--grass); clip-path: polygon(0 100%, 45% 0, 100% 100%); transform-origin: bottom; animation: ld-grow 1.1s ease-in-out infinite; }
html[data-loader=grass] .ld i:nth-child(2) { animation-delay: .12s; height: 24px; }
html[data-loader=grass] .ld i:nth-child(3) { animation-delay: .24s; }
html[data-loader=grass] .ld i:nth-child(4) { animation-delay: .36s; height: 22px; }
html[data-loader=grass] .ld i:nth-child(5) { animation-delay: .48s; }
/* pulse */
html[data-loader=pulse] .ld { width: 36px; height: 36px; border-radius: 50%; background: var(--link); animation: ld-pulse 1.1s ease-in-out infinite; }
@keyframes ld-spin { to { transform: rotate(360deg); } }
@keyframes ld-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-12px); opacity: 1; } }
@keyframes ld-grow { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@keyframes ld-pulse { 0% { transform: scale(.55); opacity: .9; } 100% { transform: scale(1.15); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ld, .ld i { animation-duration: 2.4s !important; } }
/* while switching screens: a small loader floats in so you know the tap worked */
#navload { position: fixed; left: 50%; top: 38%; transform: translate(-50%, -50%); z-index: 70; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 4px 28px 0; box-shadow: 0 14px 40px rgba(0,0,0,.16); opacity: 0; pointer-events: none; transition: opacity .15s; }
#navload.show { opacity: 1; }
#navload .loader { padding: 18px 0 16px; }
body.has-tabs #navload { margin-left: 0; }
@media (min-width: 900px) { body.has-tabs #navload { left: calc(50% + 44px); } }
.loader-demo { border: 1px dashed var(--border); border-radius: 12px; margin-top: 8px; }
.loader-demo .loader { padding: 16px 0 12px; }

/* ---------- campaigns */
.step { position: relative; }
.step-wait { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--text-soft); }
.step-wait input { width: 70px; margin: 0; }
.step-wait select { width: auto; margin: 0; }
.step + .step::before { content: ""; position: absolute; left: 26px; top: -15px; width: 2px; height: 14px; background: var(--border); }
.field-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.field-chips .chip-btn { padding: 4px 10px; font-size: 12px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.stat { background: color-mix(in srgb, var(--link) 7%, var(--card)); border-radius: 10px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 20px; color: var(--primary); }
.stat span { font-size: 12px; color: var(--text-soft); }
.step-res { margin-top: 10px; }
.step-res summary { cursor: pointer; color: var(--link); font-weight: 600; font-size: 14px; }
/* campaign step that sends a newsletter */
.nl-use { margin-top: 10px; }
.nl-pick { display: flex; gap: 10px; align-items: flex-start; }
.nl-pick-thumb { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); overflow: hidden; display: grid; place-items: center; font-size: 24px; }
.nl-pick-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nl-pick-main { flex: 1; min-width: 0; }
.nl-pick-main select { margin-top: 0; }
.nl-pick-sub { overflow-wrap: anywhere; }
.nl-mode button { flex: 1 1 140px; min-width: 0; white-space: normal; }
.nl-mode button[disabled] { opacity: .45; cursor: not-allowed; }
.nl-step [data-nlrm] { margin-top: 12px; }
.empty-state p { margin: 6px 0 0; }
/* space between a message box and buttons right under it */
.msg + .seg, .msg + .act-row, .msg + details, .msg + .btn { margin-top: 14px; }
/* the picked choice in a row of buttons is clearly picked (it looked greyed out in some themes) */
.seg button.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary, #fff); }

/* ---------- credits (theme colors only) */
.msg.info { background: color-mix(in srgb, var(--primary) 8%, var(--card)); color: var(--text); border-left: 4px solid var(--primary); }
.cr-top { text-align: center; }
.cr-big { font-family: var(--font-heading); font-size: 56px; font-weight: 700; line-height: 1; color: var(--primary); overflow-wrap: anywhere; }
.cr-big-l { color: var(--text-soft); font-size: 14px; margin-top: 4px; }
.cr-bar { height: 10px; border-radius: 99px; background: var(--border); overflow: hidden; margin: 18px 0 8px; }
.cr-bar span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.cr-line { margin: 6px 0 0; font-size: 14px; color: var(--text); }
.cr-plan { margin: 10px 0 0; }
.cr-top .btn { margin-top: 16px; }
.cr-h2 { font-size: 19px; margin: 22px 0 10px; }
.cr-list { list-style: none; margin: 0; padding: 0; }
.cr-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); }
.cr-row:first-child { border-top: 0; padding-top: 0; }
.cr-what { min-width: 0; flex: 1; }
.cr-what .n { font-weight: 600; overflow-wrap: anywhere; }
.cr-what .m { margin-top: 2px; }
.cr-amt { flex-shrink: 0; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.cr-amt.plus { color: var(--primary); }
.cr-amt.minus { color: var(--text-soft); }
.cr-note { margin: 12px 0 0; }
.credit-line { margin: 8px 0 0; }
.credit-line.low { color: var(--text); font-weight: 600; }
.msg.credit-out a { color: inherit; font-weight: 700; text-decoration: underline; }

/* list rows with rename / copy / delete on the right (web/rowactions.js) */
.ra-row { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--border); }
.ra-row:first-child { border-top: 0; }
.ra-row > .row-btn { border-top: 0; flex: 1 1 auto; min-width: 0; padding: 12px 4px; }
.ra-acts { display: flex; gap: 6px; flex-shrink: 0; padding-right: 4px; }
.ra-acts .te-b.sure { width: auto; padding: 0 10px; font-size: 13px; font-weight: 600; background: color-mix(in srgb, var(--accent) 22%, var(--card)); }
.ra-row.renaming > :not(.ra-rename) { display: none !important; }   /* the name box takes the whole row */
.ra-rename { display: flex; gap: 8px; align-items: center; flex: 1 1 100%; min-width: 0; padding: 10px 4px; flex-wrap: wrap; }
.ra-rename input { flex: 1 1 260px; min-width: 0; margin: 0; }
@media (max-width: 480px) { .ra-row { flex-wrap: wrap; } .ra-acts { width: 100%; justify-content: flex-end; padding: 0 4px 10px; } }

/* photo library (web/library.js): picker sheet + Photos page */
.lib-bar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.lib-bar .lib-q { margin: 0; width: 100%; box-sizing: border-box; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.lib-grid[aria-busy=true] { opacity: .6; }
.lib-cell { min-width: 0; }
.lib-pick { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: color-mix(in srgb, var(--text) 6%, var(--bg)); cursor: pointer; }
.lib-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-pick:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.lib-tag { position: absolute; left: 4px; bottom: 4px; padding: 1px 6px; border-radius: 6px; background: rgba(0,0,0,.6); color: #fff; font: 600 11px var(--font-body); }
.lib-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 5px; background: rgba(0,0,0,.6); color: #fff; font: 600 11px/1.3 var(--font-body); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-pick.busy { opacity: .55; cursor: progress; }
.lib-pick.missing img, .lib-big.missing img { visibility: hidden; }
.lib-note { margin: 0; font-size: 13px; }
.lib-share-box { margin: 4px 0 10px; }
.lib-share-box .btn { width: 100%; }
.lib-more { display: block; margin: 12px auto 0; }
.vd-photos .photo-pick { margin-top: 8px; }
.vd-photos .msg { margin-top: 8px; }
.lib-more[hidden], .lib-empty[hidden] { display: none; }
.lib-empty { margin: 10px 0; }
.lib-top { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 10px; }
.lib-big { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.lib-big img { width: 100%; max-height: 46vh; object-fit: contain; border-radius: 8px; display: block; background: color-mix(in srgb, var(--text) 6%, var(--bg)); }
.lib-detail .sheet-body textarea, .lib-detail .sheet-body input { width: 100%; box-sizing: border-box; }
.lib-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.lib-acts .btn { flex: 1 1 140px; width: auto; }
.lib-acts .btn.sure { background: var(--error); border-color: var(--error); color: #fff; }
.lib-page .msg .lib-undo { margin-left: 8px; }

/* importer (web/importer.js): where it comes from + the review table */
.imp-lead { margin: 0 0 10px; }
.imp-q { font-weight: 600; margin: 6px 0 8px; }
.imp-docs { display: grid; gap: 8px; margin-bottom: 14px; }
.imp-doc { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer; font-weight: 400; }
.imp-doc:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, var(--card)); }
.imp-doc input { width: auto; margin: 3px 0 0; flex-shrink: 0; }
.imp-doc b { display: block; font-weight: 600; }
.imp-doc .m { display: block; font-size: 13px; color: var(--text-soft); }
.imp-pick { margin-right: 8px; }
.imp-files { display: inline-block; margin: 8px 0; overflow-wrap: anywhere; }
.imp-tip { margin-top: 12px; }
.rv-only { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; font-weight: 500; }
.rv-only input { width: auto; margin: 0; }
.rv-list { display: grid; gap: 10px; }
.rv-row { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 12px; padding: 12px; min-width: 0; }
.rv-row.check { border-left-color: var(--accent); }
.rv-row.bad { border-left-color: var(--error); }
.rv-row.off { opacity: .55; }
.rv-keep { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; font-size: 14px; }
.rv-keep input { width: auto; margin: 0; }
.rv-flags { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.rv-flags:empty { display: none; }
.rv-flag { font-size: 13px; padding: 4px 8px; border-radius: 6px; background: color-mix(in srgb, var(--text) 5%, var(--card)); color: var(--text-soft); overflow-wrap: anywhere; }
.rv-flag.error { background: var(--error-bg); color: var(--error); font-weight: 600; }
.rv-flag.warn { background: color-mix(in srgb, var(--accent) 18%, var(--card)); color: var(--text); }
.rv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
label.rv-f { margin: 10px 0 0; min-width: 0; }
.rv-f.wide { grid-column: 1 / -1; }
.rv-f input { margin-top: 4px; width: 100%; min-width: 0; padding: 10px 12px; }
.rv-more { display: block; margin: 12px auto 0; }
.rv-more[hidden] { display: none; }
.rv-sum .n { font-weight: 600; }
.rv-note { margin: 0 0 14px; }
.svc-price { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; }
.vp-amt { margin-left: auto; padding-left: 12px; white-space: nowrap; }
/* "New update ready" (app.js): sits above the shortcut bar; tap to load, with a progress bar */
.update-bar { position: fixed; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 60; max-width: 520px; margin: 0 auto;
  padding: 12px 16px; border-radius: 12px; background: var(--ink, #2f2a24); color: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.25); font-weight: 600; }
.update-bar .ub-btn { all: unset; display: block; width: 100%; cursor: pointer; text-align: center; font: inherit; color: inherit; }
.update-bar .ub-t { font-size: 14px; margin-bottom: 8px; }
.update-bar .ub-track { height: 6px; border-radius: 99px; background: rgba(255,255,255,.25); overflow: hidden; }
.update-bar .ub-fill { height: 100%; background: #fff; border-radius: 99px; transition: width .2s; }
/* Home: today's route card, My tools, All tools, pin editor (theme colors only) */
.rc-wrap { margin-top: 12px; }
.rc-wrap:empty { display: none; }
.rc.card { padding: 14px 16px; margin: 0; }
.rc-t { font-family: var(--font-heading); font-size: 19px; font-weight: 600; color: var(--primary); }
.rc-sub { color: var(--text-soft); font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.rc-bar { height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--link) 15%, var(--card)); overflow: hidden; margin-top: 10px; }
.rc-bar i { display: block; height: 100%; background: var(--link); border-radius: inherit; }
.rc-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rc-acts .small-btn { min-height: 44px; padding: 10px 14px; display: inline-flex; align-items: center; text-decoration: none; }
.rc-acts .small-btn.act { background: var(--primary); color: var(--on-primary, #fff); border-color: var(--primary); }
.rc-done .rc-t { color: var(--link); }
.rc-addlink { display: inline-block; margin-top: 6px; min-height: 44px; font-size: 14px; }
.btn.rc-build { margin: 0; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; }
.rc-ic { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tools-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 2px 0; }
.tools-head h2 { font-size: 18px; margin: 0; }
.tools-head .link { min-height: 44px; min-width: 44px; font-size: 15px; }
.menu.tiles.mytools { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 8px; }
.menu-card.tile { min-height: 44px; }
.tools-h { font-size: 17px; margin: 20px 2px 8px; color: var(--text-soft); text-transform: uppercase; letter-spacing: .06em; font-family: var(--font-body); }
.tools-list { gap: 10px; }
.tools-list .menu-card { padding: 14px 16px; }
#mytools .tabs-ed { margin-top: 8px; }
.pe-note { margin: 8px 2px; }
.pe-empty { padding: 12px; }
.pe-star { color: var(--accent); font-size: 18px; }
.te-b.pe-star.on { color: var(--accent); width: 44px; height: 44px; }
#mytools .te-b, .card .pe-list .te-b { width: 44px; height: 44px; }
.pe-lock { width: 44px; text-align: center; border: 0; font-size: 14px; }
.pe-all { background: color-mix(in srgb, var(--card) 80%, var(--bg)); }
.pe-more { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.pe-more .m { width: 100%; }
.pe-add { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; border: 1px dashed color-mix(in srgb, var(--link) 50%, var(--border)); background: var(--card); color: var(--text); font: 600 14px var(--font-body); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.pe-add:disabled { opacity: .45; cursor: default; }
.pe-acts { gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
