/* ─── Contacts list + Contact HQ (2026-09-26) ───────────────────────────────────
   Scoped to #tab-contacts (list) and #tab-contact (opened contact). Shared theme tokens only, so light and
   dark mode follow the app. Global header and sidebar untouched. */

#tab-contacts .ct-sr, #tab-contact .ct-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
#tab-contacts :is(button, a, select, input, summary):focus-visible,
#tab-contact :is(button, a, select, input, textarea, summary):focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
#tab-contacts .ct-muted, #tab-contact .ch-muted { color: var(--text-2); }

/* ── LIST ────────────────────────────────────────────────────────────────── */
#tab-contacts .ct-page { padding: 0; max-width: 1400px; }
#tab-contacts .ct-header { background: none; border: none; padding: 0 0 12px; margin: 0; position: static; box-shadow: none; }
#tab-contacts .ct-header-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
#tab-contacts .ct-title { font-family: 'Cormorant Garamond', serif; font-size: 34px; font-weight: 500; margin: 0; color: var(--text); }
#tab-contacts .ct-add-btn { height: 42px; padding: 0 20px; border: none; border-radius: 8px; background: var(--gold); color: #1C1B18;
  font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-sm); white-space: nowrap; }
#tab-contacts .ct-add-btn:hover { background: var(--gold-light); }
#tab-contacts .ct-search-wrap { position: relative; margin-bottom: 14px; color: var(--text-2); }
#tab-contacts .ct-search-wrap svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); pointer-events: none; }
#tab-contacts .ct-search { width: 100%; box-sizing: border-box; height: 50px; padding: 0 16px 0 46px; font-size: 16px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg-input); color: var(--text); margin: 0; }
#tab-contacts .ct-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#tab-contacts .ct-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
#tab-contacts .ct-chip { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; }
#tab-contacts .ct-chip:hover { border-color: var(--gold); }
#tab-contacts .ct-chip.ct-chip-active { background: var(--gold-dim); border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); font-weight: 600; color: var(--text); }
#tab-contacts .ct-chip-count { min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 12px; font-weight: 600; text-align: center; }
#tab-contacts .ct-chip-active .ct-chip-count { background: var(--gold); color: #1C1B18; }
#tab-contacts .ct-select { width: auto; flex: none; display: inline-block; margin: 0; height: 38px; padding: 0 34px 0 15px; border-radius: 999px; border: 1px solid var(--border); background-color: var(--card);
  color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
#tab-contacts .ct-select.ct-select-active { background-color: var(--gold-dim); border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); font-weight: 600; }
#tab-contacts .ct-count { margin: 14px 0 0; font-size: 14px; color: var(--text-2); }

#tab-contacts .ct-list { display: block; padding: 0; }
#tab-contacts .ct-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-sm); font-size: 14.5px; }
#tab-contacts .ct-table th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-2);
  padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--bg-subtle); }
#tab-contacts .ct-table th:first-child { border-top-left-radius: 12px; }
#tab-contacts .ct-table th:last-child { border-top-right-radius: 12px; }
#tab-contacts .ct-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
#tab-contacts .ct-table tr:last-child td { border-bottom: none; }
#tab-contacts .ct-row:hover td { background: var(--card-hover); }
#tab-contacts .ct-row-attn td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
#tab-contacts .ct-name { font-size: 15.5px; font-weight: 600; color: var(--text); text-decoration: none; }
#tab-contacts .ct-name:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
#tab-contacts .ct-sub { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
#tab-contacts .ct-temp { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface); color: var(--text-2); }
#tab-contacts .ct-temp-hot { background: #FBE3E0; color: #9A2F24; }
#tab-contacts .ct-temp-warm { background: #FCEBD9; color: #8A4A12; }
#tab-contacts .ct-td-contact span { display: block; }
#tab-contacts .ct-em { color: var(--text-2); font-size: 13.5px; word-break: break-all; }
#tab-contacts .ct-td-fu { white-space: nowrap; }
#tab-contacts .ct-fu-date { font-weight: 500; }
#tab-contacts .ct-fu-none { color: var(--text-2); }
#tab-contacts .ct-link, #tab-contact .ch-link { display: block; margin-top: 3px; padding: 0; border: none; background: none; color: var(--text);
  font-size: 13px; font-weight: 500; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; cursor: pointer; }
#tab-contact .ch-link { display: inline; margin: 0; }
.ct-fu-tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.ct-fu-overdue { background: #FBE3E0; color: #8E2A20; }
.ct-fu-today { background: #FCEBD9; color: #7A4210; }
#tab-contacts .ct-td-actions { white-space: nowrap; text-align: right; width: 1%; }
#tab-contacts .ct-open { height: 34px; padding: 0 14px; border-radius: 8px; border: 1.5px solid var(--gold); background: var(--card); color: var(--text);
  font-size: 13.5px; font-weight: 600; cursor: pointer; vertical-align: middle; }
#tab-contacts .ct-open:hover { background: var(--gold-dim); }
.ct-menu-wrap { position: relative; display: inline-block; vertical-align: middle; margin-left: 6px; }
.ct-more { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 34px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; }
.ct-more svg { fill: currentColor; }
.ct-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 200px; padding: 6px; text-align: left;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.ct-menu[hidden] { display: none; }
.ct-menu [role="menuitem"] { display: block; width: 100%; padding: 10px 12px; border: none; border-radius: 6px; background: none; color: var(--text);
  font-size: 14px; text-align: left; cursor: pointer; }
.ct-menu [role="menuitem"]:hover, .ct-menu [role="menuitem"]:focus { background: var(--bg-hover); outline: none; }
#tab-contacts .ct-empty { padding: 40px 16px; text-align: center; color: var(--text-2); background: var(--card); border: 1px solid var(--border); border-radius: 12px; }

/* ── CONTACT HQ ──────────────────────────────────────────────────────────── */
#tab-contact .ch-shell { height: auto; min-height: 100%; padding: 14px 24px 32px; box-sizing: border-box; }
#tab-contact .ch-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
#tab-contact .ch-back { border: none; background: none; padding: 6px 0; font-size: 15px; font-weight: 500; color: var(--text); cursor: pointer; }
#tab-contact .ch-prevnext { display: flex; align-items: center; gap: 10px; }
#tab-contact .ch-pn-btn { height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 14px; cursor: pointer; }
#tab-contact .ch-pn-btn:disabled { opacity: .45; cursor: default; }
#tab-contact .ch-pn-count { font-size: 14px; color: var(--text-2); white-space: nowrap; }
#tab-contact .ch-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
#tab-contact .ch-aside { position: sticky; top: 12px; }
#tab-contact .ch-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow-sm); }
#tab-contact .ch-main { min-width: 0; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); }
#tab-contact .ch-body { padding: 18px; display: flex; flex-direction: column; gap: 16px; overflow: visible; height: auto; background: none; }
#tab-contact .ch-body > .ch-card { box-shadow: none; }
#tab-contact .ch-tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
#tab-contact .ch-tabs::-webkit-scrollbar { display: none; }
#tab-contact .ch-tab { flex: none; padding: 14px 18px 12px; font-size: 15px; color: var(--text-2); border: none; border-bottom: 2.5px solid transparent; background: none; cursor: pointer; }
#tab-contact .ch-tab.active { color: var(--text); border-bottom-color: var(--gold); font-family: 'Cormorant Garamond', serif; font-size: 18px; font-weight: 600; }

/* Summary panel */
#tab-contact .ch-archived { margin-bottom: 12px; padding: 10px 12px; border-radius: 8px; background: var(--bg-subtle); border: 1px solid var(--border); font-size: 13.5px; }
#tab-contact .ch-ident { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding-bottom: 16px; }
#tab-contact .ch-avatar { width: 84px; height: 84px; border-radius: 50%; background: var(--gold-dim); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 500; color: var(--text); }
#tab-contact .ch-name { margin: 0; font-family: 'Cormorant Garamond', serif; font-size: 32px; font-weight: 600; line-height: 1.1; color: var(--text); }
#tab-contact .ch-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
#tab-contact .ch-pill { padding: 4px 12px; border-radius: 999px; background: var(--surface); color: var(--text); font-size: 13.5px; }
#tab-contact .ch-pill-stage { background: #E4F4E9; color: #1D6B40; }
#tab-contact .ch-pill-temp { background: #FCEBD9; color: #8A4A12; }
#tab-contact .ch-pill-dnc { background: #FBE3E0; color: #8E2A20; font-weight: 600; }
#tab-contact .ch-ident-actions { display: flex; align-items: center; gap: 6px; }
#tab-contact .ch-edit { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 14.5px; cursor: pointer; }
#tab-contact .ch-edit:hover { border-color: var(--gold); }
#tab-contact .ch-comms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
#tab-contact .ch-comm { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 6px; border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); text-decoration: none; font-size: 13.5px; background: var(--card); }
#tab-contact .ch-comm:hover { border-color: var(--gold); background: var(--gold-dim); }
#tab-contact .ch-comm-off { color: var(--text-3); background: var(--bg-subtle); cursor: not-allowed; }
#tab-contact .ch-rows { list-style: none; margin: 0; padding: 12px 0; display: flex; flex-direction: column; gap: 9px; }
#tab-contact .ch-row { display: flex; align-items: flex-start; gap: 12px; font-size: 14.5px; color: var(--text); }
#tab-contact .ch-row .ch-ic { flex: none; margin-top: 1px; color: var(--text-2); }
#tab-contact .ch-row a { color: var(--text); }
#tab-contact .ch-row > span { flex: 1; min-width: 0; word-break: break-word; }
#tab-contact .ch-inline-link { flex: none; font-size: 13px; color: var(--text); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
#tab-contact .ch-sub { border-top: 1px solid var(--border); padding-top: 12px; }
#tab-contact .ch-sub-h { margin: 0; font-family: 'Cormorant Garamond', serif; font-size: 19px; font-weight: 600; color: var(--text); }
#tab-contact .ch-sub .ch-rows { padding-top: 8px; }
#tab-contact .ch-flag { display: inline-block; padding: 0 7px; border-radius: 999px; background: #FBE3E0; color: #8E2A20; font-size: 11.5px; font-weight: 600; }
#tab-contact .ch-flag-gold { background: var(--gold-dim); color: var(--text); }
#tab-contact .ch-exp { border-top: 1px solid var(--border); }
#tab-contact .ch-exp > summary { display: flex; align-items: center; gap: 12px; padding: 12px 0; font-size: 14.5px; color: var(--text); cursor: pointer; list-style: none; }
#tab-contact .ch-exp > summary::-webkit-details-marker { display: none; }
#tab-contact .ch-exp > summary .ch-ic { color: var(--text-2); }
#tab-contact .ch-exp > summary > span:nth-of-type(1) { flex: 1; }
#tab-contact .ch-chev { font-size: 16px; color: var(--text-2); transition: transform .15s; }
#tab-contact .ch-exp[open] .ch-chev { transform: rotate(180deg); }
#tab-contact .ch-exp-body { padding: 0 0 14px 30px; display: flex; flex-direction: column; gap: 8px; }
#tab-contact .ch-kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
#tab-contact .ch-kv-block { flex-direction: column; gap: 4px; }
#tab-contact .ch-k { color: var(--text-2); flex: none; }
#tab-contact .ch-v { color: var(--text); text-align: right; word-break: break-word; }
#tab-contact .ch-kv-block .ch-v { text-align: left; }
#tab-contact .ch-pre { white-space: pre-wrap; }
#tab-contact .ch-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--surface); font-size: 12px; }
#tab-contact .ch-insights .cb-card { margin-top: 8px; box-shadow: none; }

/* Overview */
#tab-contact .ch-card-h { display: flex; align-items: center; gap: 10px; margin: 0; font-family: 'Cormorant Garamond', serif; font-size: 23px; font-weight: 600; color: var(--text); }
#tab-contact .ch-card-h .ch-ic { color: var(--text-2); }
#tab-contact .ch-fu { display: flex; align-items: center; gap: 16px; }
#tab-contact .ch-fu-icon { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--gold-dim); color: #8A6A1F; display: flex; align-items: center; justify-content: center; }
#tab-contact .ch-fu-text { flex: 1; min-width: 0; }
#tab-contact .ch-fu-label { font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
#tab-contact .ch-fu-title { margin-top: 2px; font-family: 'Cormorant Garamond', serif; font-size: 23px; font-weight: 600; color: var(--text); }
#tab-contact .ch-muted-strong { color: var(--text-2); }
#tab-contact .ch-fu-failed { margin: 4px 0; padding: 6px 10px; border-radius: 6px; background: #FBE3E0; color: #7D2A20; font-size: 13px; }
#tab-contact .ch-fu-due { margin-top: 2px; font-size: 15px; color: var(--text-2); }
#tab-contact .ch-fu-actions { flex: none; display: flex; flex-direction: column; gap: 8px; min-width: 170px; }
#tab-contact .ch-btn-gold { height: 40px; padding: 0 18px; border: none; border-radius: 8px; background: var(--gold); color: #1C1B18; font-size: 14.5px; font-weight: 600; cursor: pointer; }
#tab-contact .ch-btn-gold:hover { background: var(--gold-light); }
#tab-contact .ch-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 14.5px; cursor: pointer; text-decoration: none; white-space: nowrap; }
#tab-contact .ch-btn:hover { border-color: var(--gold); }
#tab-contact .ch-note .ch-card-h { margin-bottom: 12px; }
#tab-contact .ch-note-text { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-input);
  color: var(--text); font: inherit; font-size: 15px; resize: vertical; min-height: 46px; transition: min-height .15s; }
#tab-contact .ch-note-text:focus { min-height: 96px; }
#tab-contact .ch-note-actions { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
#tab-contact .ch-note-save { margin-left: auto; }
#tab-contact .ch-tip { position: absolute; left: 0; top: calc(100% + 6px); z-index: 5; max-width: 320px; padding: 8px 10px; border-radius: 8px; background: #1C1B18; color: #F8F7F4;
  font-size: 12.5px; line-height: 1.35; opacity: 0; visibility: hidden; transition: opacity .12s; pointer-events: none; }
#tab-contact .ch-note-actions .ch-btn:hover ~ .ch-tip, #tab-contact .ch-note-actions .ch-btn:focus-visible ~ .ch-tip { opacity: 1; visibility: visible; }
#tab-contact .ch-note-where { margin: 6px 0 0; font-size: 12.5px; color: var(--text-2); }
#tab-contact .ch-note-status { margin-top: 8px; font-size: 13px; color: var(--text-2); min-height: 0; }
#tab-contact .ch-note-status:empty { display: none; }
#tab-contact .ch-feed-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
#tab-contact .ch-chips { display: flex; gap: 6px; flex-wrap: wrap; }
#tab-contact .ch-chip { height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13.5px; cursor: pointer; }
#tab-contact .ch-chip.active { background: var(--gold-dim); border-color: var(--gold); font-weight: 600; }
#tab-contact .ch-feed-list, #tab-contact .ch-list { list-style: none; margin: 0; padding: 0; }
#tab-contact .ch-feed-row { display: grid; grid-template-columns: 44px minmax(150px, 220px) 1fr; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); }
#tab-contact .ch-feed-row:first-child { border-top: none; }
#tab-contact .ch-feed-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--gold-dim); color: #8A6A1F; }
#tab-contact .ch-feed-comms { background: #E4F4E9; color: #1D6B40; }
#tab-contact .ch-feed-events { background: #E3EEFB; color: #1F5596; }
#tab-contact .ch-feed-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#tab-contact .ch-feed-title { font-size: 14.5px; font-weight: 600; color: var(--text); }
#tab-contact .ch-feed-when { font-size: 13px; color: var(--text-2); }
#tab-contact .ch-feed-detail { font-size: 14px; color: var(--text); word-break: break-word; }
/* A narrow activity card (sidebar open on a laptop-width window, split view…) left the detail column a few pixels wide,
   one character per line. Below this card width the row uses the same stacked layout as phones. */
#tab-contact .ch-feed { container-type: inline-size; }
@container (max-width: 480px) {
  #tab-contact .ch-feed-row { grid-template-columns: 40px 1fr; }
  #tab-contact .ch-feed-icon { width: 40px; height: 40px; }
  #tab-contact .ch-feed-detail { grid-column: 2; }
}
#tab-contact .ch-feed-more { margin-top: 8px; }
#tab-contact .ch-empty { margin: 8px 0 0; font-size: 14px; color: var(--text-2); }
#tab-contact .ch-appt { display: flex; align-items: center; gap: 16px; }

/* Lists (properties, tasks, documents) */
#tab-contact .ch-list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
#tab-contact .ch-list-row:first-child { border-top: none; }
#tab-contact .ch-list-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
#tab-contact .ch-list-title { font-size: 15px; font-weight: 600; color: var(--text); }
#tab-contact .ch-done .ch-list-title { text-decoration: line-through; color: var(--text-2); }
#tab-contact .ch-card .ch-list { margin-top: 10px; }
#tab-contact details.ch-exp-card > summary { cursor: pointer; list-style: none; }
#tab-contact .ch-body .cw-tx-card, #tab-contact .ch-body .cr-section { background: var(--card); }

/* ── Phone ───────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  #tab-contact .ch-layout { grid-template-columns: 1fr; }
  #tab-contact .ch-aside { position: static; }
}
@media (max-width: 760px) {
  #tab-contacts .ct-title { font-size: 28px; }
  #tab-contacts .ct-add-btn { height: 40px; padding: 0 14px; }
  #tab-contacts .ct-filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 2px 14px 6px; scrollbar-width: none; }
  #tab-contacts .ct-filters::-webkit-scrollbar { display: none; }
  #tab-contacts .ct-chips { flex-wrap: nowrap; }
  #tab-contacts .ct-chip, #tab-contacts .ct-select { flex: none; }
  #tab-contacts .ct-table, #tab-contacts .ct-table tbody, #tab-contacts .ct-table tr, #tab-contacts .ct-table td { display: block; width: auto; }
  #tab-contacts .ct-table thead { display: none; }
  #tab-contacts .ct-table { background: none; border: none; box-shadow: none; }
  #tab-contacts .ct-table tr { background: var(--card); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; padding: 12px 14px; position: relative; }
  #tab-contacts .ct-table td { border: none; padding: 3px 0; }
  #tab-contacts .ct-td-name { padding-right: 130px !important; }
  #tab-contacts .ct-table td:has(> .ct-dash:only-child) { display: none; }
  #tab-contacts .ct-row-attn td:first-child { box-shadow: none; }
  #tab-contacts .ct-row-attn { box-shadow: inset 3px 0 0 var(--gold); }
  #tab-contacts .ct-td-actions { position: absolute; top: 10px; right: 12px; width: auto; }
  #tab-contacts .ct-td-contact span { display: inline; margin-right: 10px; }
  #tab-contacts .ct-td-fu { white-space: normal; display: flex !important; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
  #tab-contacts .ct-td-fu .ct-link { display: inline; margin: 0; }
  #tab-contacts .ct-td-fu::before { content: 'Follow-up: '; color: var(--text-2); font-size: 13px; }

  #tab-contact .ch-shell { padding: 10px 12px 170px; }
  #tab-contact .ch-name { font-size: 27px; }
  #tab-contact .ch-avatar { width: 68px; height: 68px; font-size: 25px; }
  /* Call / Text / Email stay in reach: pinned to the bottom of the screen on phones */
  /* sits directly above the app's bottom navigation, which stays visible here */
  #tab-contact .ch-comms { position: fixed; left: 0; right: 0; bottom: calc(var(--bottom-nav-h, 64px) + env(safe-area-inset-bottom)); z-index: 60; margin: 0; padding: 8px 12px;
    background: var(--card); border-top: 1px solid var(--border); border-bottom: none; box-shadow: 0 -4px 14px rgba(0,0,0,.08); }
  #tab-contact .ch-comm { flex-direction: row; justify-content: center; padding: 10px 6px; }
  #tab-contact .ch-body { padding: 12px; }
  #tab-contact .ch-card { padding: 14px; }
  #tab-contact .ch-fu { flex-wrap: wrap; }
  #tab-contact .ch-fu-actions { flex-direction: row; width: 100%; min-width: 0; }
  #tab-contact .ch-fu-actions > * { flex: 1; }
  #tab-contact .ch-feed-row { grid-template-columns: 40px 1fr; }
  #tab-contact .ch-feed-icon { width: 40px; height: 40px; }
  #tab-contact .ch-feed-detail { grid-column: 2; }
  #tab-contact .ch-tab { padding: 12px 12px 10px; }
  #tab-contact .ch-prevnext { width: 100%; justify-content: space-between; }
}

/* History entry detail ("Read more") — the modal sits outside #tab-contact. Full text keeps its line breaks. */
#tab-contact .ch-read-more { font-weight: 600; text-decoration: underline; white-space: nowrap; }
.ch-entry-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 14px; }
.ch-entry-meta dt { font-size: 12px; color: var(--text-muted, #6b7280); text-transform: uppercase; letter-spacing: .04em; }
.ch-entry-meta dd { margin: 2px 0 0; font-size: 14px; }
.ch-entry-full { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.55; max-height: 60vh; overflow-y: auto; }
/* Quick Contact link that is off (do not contact / bad number) — shown with its reason, not clickable. */
.cb-qc-off { opacity: .6; cursor: not-allowed; text-decoration: none; }
