/* @ekm-tags: style, messaging */
/*
 * Inbox 2030 — the owner-approved Unified Inbox concept (2026-10-25) laid over the live Patient Communication view
 * (js/ekm-unified-inbox.js). One simple Inbox, like Messages, on a glass sheet:
 *   - one header across the inbox: Patients / Team / Archived as a segmented control (counts are small ink squares), then the
 *     channel tabs spread evenly, each word in its channel color with a bar under the selected one;
 *   - left: search + the conversation list (a circle in the channel color with the source glyph as a badge, name, time, the
 *     "about" line, a two-line preview; unread rows bold with a gold dot; the selected row is a raised bright sheet);
 *   - right: the conversation (header with the circle, the name in Italiana, actions; message bubbles; staff notes; the composer
 *     with Reply / Note, saved replies, emoji and Send);
 *   - narrow (the inbox at most ~820px wide): the list and the conversation take turns at full width, with a Back button.
 * Restyle + layout only: every control is the existing one (same data attributes, same handlers).
 *
 * Two layers:
 *   1. every theme (scoped to .uib-root): the new controls fit the existing PR5 plain style (css/ekm-unified-inbox.css);
 *   2. Pearl and Pearl Night only (as css/ekm-pearl-luxe.css): the concept. Tokens come from the Home redesign's --lux-* set with
 *      fallbacks, so it works on its own and follows Home's finishes (--fin-*) once that lands.
 * Rules: no overflow, symmetric, no pill shapes (radii stop at 22px; counts are small squares), WCAG AA, 44px targets.
 */

/* ── 1. every theme ───────────────────────────────────────────────────────────────────────────────────────────── */
.uib-root .uib-sheet, .uib-root .uib-ibx-h, .uib-root .uib-search-wrap { display: contents; }
.uib-root [data-uib-menu-wrap="more"], .uib-root [data-uib-menu-wrap="tools"], .uib-root [data-uib-pop="more"], .uib-root [data-uib-pop="tools"] { display: contents; }
.uib-root [data-uib-menu="more"], .uib-root [data-uib-menu="tools"], .uib-root .uib-back, .uib-root .uib-tab-short, .uib-root .uib-ini, .uib-root .uib-ui-ico, .uib-root .uib-pane-head .uib-src { display: none; }
.uib-root .uib-status[data-uib-empty] { display: none; }
.uib-root .uib-refresh { order: 9; }
.uib-root .uib-pane-head { padding-bottom: 14px; border-bottom: 1px solid var(--uib-rule); }
.uib-root .uib-pane-titles .uib-pane-meta { padding: 4px 0 0; border: 0; }
.uib-root .uib-pane-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; min-width: 0; }
/* the per-message "Request from this message" link needs the full conversation's workflow panel, which is not on this screen (it would
   act on whichever conversation Messages last had open); + Workflow in the header opens that panel for THIS conversation instead */
.uib-root .msg-hub-spruce-bubble-actions { display: none; }
.uib-root .uib-composer { position: relative; }
.uib-root .uib-mode { display: flex; flex-wrap: wrap; gap: 0 18px; align-items: center; }
.uib-root .uib-mode-btn { min-height: 44px; padding: 0 2px; border: 0; border-radius: 0; background: none; color: var(--uib-ink-soft); font-size: 14px; cursor: pointer; }
.uib-root .uib-mode-btn[aria-pressed="true"] { color: var(--uib-ink); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.uib-root .uib-composer.is-note .uib-reply { border-color: var(--uib-gold); }
.uib-root .uib-comp-menu { position: static; display: inline-flex; }
.uib-root .uib-comp-menu .uib-menu-pop {
  display: none; position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 30; max-height: min(50vh, 380px); overflow-y: auto;
  padding: 8px; flex-direction: column; gap: 6px; background: var(--uib-card); border: 1px solid var(--uib-border); border-radius: 4px; box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .3);
}
.uib-root[data-uib-menu-open="saved"] [data-uib-pop="saved"] { display: flex; }
.uib-root[data-uib-menu-open="emoji"] [data-uib-pop="emoji"] { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 2px; }
.uib-root .uib-emo { min-height: 44px; border: 0; border-radius: 8px; background: none; font-size: 20px; cursor: pointer; }
.uib-root .uib-emo:hover { background: var(--uib-sel); }
.uib-root .uib-saved-list { display: flex; flex-direction: column; min-height: 0; }
.uib-root .uib-saved-item { display: flex; flex-direction: column; gap: 2px; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 4px; background: none; color: var(--uib-ink); text-align: left; cursor: pointer; }
.uib-root .uib-saved-item:hover { background: var(--uib-sel); }
.uib-root .uib-saved-item b { font-size: 13.5px; font-weight: 600; }
.uib-root .uib-saved-item span { font-size: 12.5px; color: var(--uib-ink-soft); }
.uib-root .uib-saved-q { width: 100%; }
.uib-root .uib-saved-all { align-self: flex-start; }
.uib-root .uib-staff-note { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-left: 2px solid var(--uib-gold); color: var(--uib-ink); overflow-wrap: anywhere; }
.uib-root .uib-staff-note-h { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--uib-muted); }
.uib-root .uib-staff-note-t { white-space: pre-wrap; }
.uib-root .uib-staff-note small { font-size: 11.5px; color: var(--uib-muted); }
.uib-root .uib-mode-hint { flex-basis: 100%; }

/* ── 2. Pearl + Pearl Night: the concept ──────────────────────────────────────────────────────────────────────── */
/* the token set is shared with Team Messages and the floating Messages window (css/ekm-team-messages-2030.css) */
html[data-theme="pearl"] :is(.uib-root, .msg-page-shell, .msg-hub-mobile-back, #msg-float-panel) {
  --i-ink: var(--lux-ink, #1F1A17);
  --i-muted: var(--lux-muted, #5E5650);
  --i-glass: var(--lux-glass, rgba(255, 255, 255, .58));
  --i-hi: rgba(255, 255, 255, .94);
  --i-edge: var(--lux-edge, rgba(255, 255, 255, .85));
  --i-hair: var(--lux-hair, rgba(31, 26, 23, .08));
  --i-well: var(--lux-well, rgba(31, 26, 23, .05));
  --i-shade: rgba(70, 52, 32, .22);
  --i-on-ink: var(--lux-on-ink, #FFFFFF);
  --i-gold: #8A6A44;
  --i-gold-glow: rgba(201, 168, 119, .5);
  --i-note: rgba(184, 149, 95, .16);
  --i-alert: var(--lux-alert, #9A3B2E);
  --i-solid: #F7F4EF;
  --i-badge: #FCFBF9;
}
html[data-theme="pearl_night"] :is(.uib-root, .msg-page-shell, .msg-hub-mobile-back, #msg-float-panel) {
  --i-ink: var(--lux-ink, #F5F5F4);
  --i-muted: var(--lux-muted, #AEB2B9);
  --i-glass: var(--lux-glass, rgba(38, 39, 43, .58));
  --i-hi: rgba(255, 255, 255, .10);
  --i-edge: var(--lux-edge, rgba(255, 255, 255, .12));
  --i-hair: var(--lux-hair, rgba(255, 255, 255, .08));
  --i-well: var(--lux-well, rgba(255, 255, 255, .06));
  --i-shade: rgba(0, 0, 0, .7);
  --i-on-ink: var(--lux-on-ink, #121316);
  --i-gold: #E6E7EA;
  --i-gold-glow: rgba(255, 255, 255, .42);
  --i-note: rgba(255, 255, 255, .08);
  --i-alert: var(--lux-alert, #EBA493);
  --i-solid: #1E1F23;
  --i-badge: #17181B;
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root {
  /* the PR5 kit's own variables follow Pearl, so any rule not restyled below still matches */
  --uib-bg: transparent; --uib-card: var(--i-hi); --uib-ink: var(--i-ink); --uib-ink-soft: var(--i-muted); --uib-muted: var(--i-muted);
  --uib-on-ink: var(--i-on-ink); --uib-gold: var(--i-gold); --uib-border: var(--i-hair); --uib-border-soft: var(--i-hair); --uib-rule: var(--i-hair);
  --uib-sel: var(--i-well); --uib-link: var(--i-ink); --uib-err-ink: var(--i-alert);
  container: uibroot / inline-size;
  overflow: hidden auto; padding: 16px clamp(12px, 2vw, 24px);
  background: transparent; color: var(--i-ink);
  font-family: 'Inter Tight', var(--font-ui, -apple-system), -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 14px; letter-spacing: -.006em;
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root :focus-visible { outline: 2px solid var(--i-gold); outline-offset: 2px; }
/* the page title stays for screen readers; the sheet is the page */
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-head { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* channel colors: --uib-cc is the bar, --uib-disc the circle (72% channel + 28% near-black, white initials AA); --uib-tc is the channel word (66% channel + 34% ink on Pearl, 60% + 40% on
   Pearl Night, precomputed so every word meets AA on the glass). Staff keep their own colors in Team Messages. */
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root :is([data-uib-lane="spruce"], [data-uib-filter="spruce"]) { --uib-cc: #3A7FD0; --uib-tc: #315D91; --uib-disc: #2D5E99; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root :is([data-uib-lane="fax"], [data-uib-filter="fax"]) { --uib-cc: #B9852E; --uib-tc: #856126; --uib-disc: #886324; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root :is([data-uib-lane="gmail_me"], [data-uib-filter="gmail_me"], [data-uib-lane="gmail_info"], [data-uib-filter="gmail_info"]) { --uib-cc: #7468B8; --uib-tc: #574D81; --uib-disc: #564E88; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root :is([data-uib-lane="task"], [data-uib-filter="task"]) { --uib-cc: #7F8C3A; --uib-tc: #5E652E; --uib-disc: #5E682D; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root :is([data-uib-lane="doc"], [data-uib-filter="doc"]) { --uib-cc: #9A7B58; --uib-tc: #705A42; --uib-disc: #725B43; }
html[data-theme="pearl_night"] .uib-root :is([data-uib-lane="spruce"], [data-uib-filter="spruce"]) { --uib-tc: #85AEDE; }
html[data-theme="pearl_night"] .uib-root :is([data-uib-lane="fax"], [data-uib-filter="fax"]) { --uib-tc: #D1B27D; }
html[data-theme="pearl_night"] .uib-root :is([data-uib-lane="gmail_me"], [data-uib-filter="gmail_me"], [data-uib-lane="gmail_info"], [data-uib-filter="gmail_info"]) { --uib-tc: #A8A0D0; }
html[data-theme="pearl_night"] .uib-root :is([data-uib-lane="task"], [data-uib-filter="task"]) { --uib-tc: #AEB684; }
html[data-theme="pearl_night"] .uib-root :is([data-uib-lane="doc"], [data-uib-filter="doc"]) { --uib-tc: #BEAC96; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root :is([data-uib-filter="all"], [data-uib-filter="needs"]) { --uib-cc: var(--i-ink); --uib-tc: var(--i-ink); }

/* the sheet: header row across, list left, conversation right */
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-sheet {
  position: relative; display: grid; min-width: 0;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  grid-template-rows: auto auto auto minmax(0, 1fr);
  grid-template-areas: "tabs chans" "tools pane" "status pane" "list pane";
  height: max(440px, calc(100dvh - var(--uib-top, 180px) - 16px));
  border-radius: 22px; overflow: hidden;
  background: var(--i-glass); -webkit-backdrop-filter: blur(28px) saturate(170%); backdrop-filter: blur(28px) saturate(170%);
  box-shadow: inset 0 1px 0 var(--i-hi), inset 0 0 0 1px var(--i-edge), 0 1px 1px rgba(0, 0, 0, .03), 0 28px 56px -30px var(--i-shade);
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-sheet::before { content: ""; grid-area: 1 / 1 / 2 / -1; border-bottom: 1px solid var(--i-hair); pointer-events: none; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root :is(.uib-ibx-h, .uib-toolbar, .uib-split) { display: contents; }

/* Patients / Team / Archived: a segmented control */
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-tabs {
  grid-area: tabs; align-self: center; display: flex; flex-wrap: nowrap; gap: 2px; margin: 12px 14px; padding: 4px; min-width: 0;
  border: 0; border-radius: 14px; background: var(--i-well);
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-tab {
  flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 10px;
  border: 0; border-radius: 11px; background: none; color: var(--i-muted); font-size: 14px; font-weight: 500; white-space: nowrap;
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-tab:hover { color: var(--i-ink); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-tab.is-on { color: var(--i-ink); font-weight: 600; background: var(--i-hi); box-shadow: inset 0 0 0 .5px var(--i-edge), 0 6px 16px -8px var(--i-shade); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-tab-long { display: none; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-tab-short { display: inline; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root :is(.uib-tab-count, .uib-filter-n) {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; text-decoration: none;
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-tab-count { background: var(--i-ink); color: var(--i-on-ink); }

/* channel tabs: spread evenly, each word in its color, a bar under the selected one */
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-filters {
  grid-area: chans; display: flex; flex-wrap: wrap; align-items: stretch; align-content: center; gap: 0; min-width: 0; padding: 4px 10px;
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-filter {
  position: relative; flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 52px; min-width: 44px; padding: 0 10px;
  border: 0; border-radius: 0; background: none; font-size: 14px; font-weight: 500; white-space: nowrap;
  color: var(--uib-tc, var(--i-ink));
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-filter.is-on { font-weight: 650; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-filter .uib-filter-label,
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-filter:hover .uib-filter-label,
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-filter.is-on .uib-filter-label { text-decoration: none; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-filter::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2.5px; border-radius: 2px 2px 0 0; background: var(--uib-cc);
  transform: scaleX(0); transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-filter:hover::after { transform: scaleX(.4); opacity: .4; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-filter.is-on::after { transform: scaleX(1); opacity: 1; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-filter-n { background: var(--i-well); color: var(--i-ink); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-filter-n { display: none; }
@container uibroot (min-width: 1180px) {
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-filter-n { display: inline-grid; }
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-filter-n.is-zero { display: none; }
}

/* list column top: search, Filters, Refresh */
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-tools {
  grid-area: tools; display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; margin: 0; padding: 14px 14px 8px; width: auto; min-width: 0;
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-search-wrap {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; border-radius: 12px; background: var(--i-well);
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-search-wrap:focus-within { box-shadow: 0 0 0 2px var(--i-gold); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-search-wrap .uib-ui-ico { display: block; flex: none; width: 16px; height: 16px; color: var(--i-muted); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-search {
  flex: 1 1 auto; width: auto; min-width: 0; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--i-ink); font: inherit; font-size: 14px; outline: none;
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-search::placeholder { color: var(--i-muted); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-search:focus-visible { outline: none; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root :is(.uib-ui-ico) { display: block; width: 18px; height: 18px; flex: none; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-icon-btn {
  position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; padding: 0;
  border: 0; border-radius: 12px; background: var(--i-well); color: var(--i-ink); box-shadow: none;
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-markall { flex: none; white-space: nowrap; color: var(--i-ink); font-size: 13px; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-icon-btn:hover { background: var(--i-hi); box-shadow: inset 0 0 0 1px var(--i-hair); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-head .uib-back { display: none; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-icon-btn .uib-btn-tx,
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-src-word { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-tools-toggle.is-active::after { content: ""; position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--i-gold); box-shadow: 0 0 0 2px var(--i-badge); }

/* menus: solid sheets, so nothing shows through them */
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-menu-wrap { display: block; position: relative; flex: none; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-comp-menu { position: static; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root [data-uib-menu="more"],
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root [data-uib-menu="tools"] { display: grid; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-menu-pop {
  display: none; position: absolute; z-index: 30; padding: 8px; flex-direction: column; gap: 4px; min-width: 0;
  border: 0; border-radius: 16px; background: var(--i-solid); box-shadow: inset 0 0 0 1px var(--i-hair), 0 24px 48px -18px var(--i-shade);
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root[data-uib-menu-open="tools"] [data-uib-pop="tools"],
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root[data-uib-menu-open="more"] [data-uib-pop="more"],
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root[data-uib-menu-open="saved"] [data-uib-pop="saved"] { display: flex; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root[data-uib-menu-open="emoji"] [data-uib-pop="emoji"] { display: grid; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root :is([data-uib-pop="tools"], [data-uib-pop="more"]) { right: 0; top: calc(100% + 6px); width: min(260px, calc(100vw - 48px)); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-menu-pop .uib-btn,
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-menu-pop .uib-linkbtn,
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-menu-pop .uib-mute {
  display: flex; align-items: center; gap: 10px; width: 100%; justify-content: flex-start; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none; box-shadow: none;
  color: var(--i-ink); font-size: 14px; font-weight: 500; text-align: left; text-decoration: none;
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-menu-pop .uib-btn:hover,
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-menu-pop .uib-linkbtn:hover,
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-menu-pop .uib-mute:hover { background: var(--i-well); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-menu-pop .uib-btn.is-on,
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-menu-pop .uib-mute.is-on { background: var(--i-hi); font-weight: 600; box-shadow: inset 0 0 0 1px var(--i-hair); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-menu-pop .uib-mute[disabled] { color: var(--i-muted); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-select {
  width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--i-well); color: var(--i-ink); font: inherit; font-size: 14px;
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-mutes { display: flex; flex-direction: column; align-items: stretch; gap: 2px; margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--i-hair); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-mute-why { padding: 2px 12px 4px; font-size: 12.5px; font-style: normal; color: var(--i-muted); }

/* load / error lines */
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-status { grid-area: status; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 0; padding: 0 16px 6px; min-width: 0; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-err { color: var(--i-alert); border-left-color: var(--i-alert); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root :is(.uib-load, .uib-muted) { color: var(--i-muted); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-linkbtn { color: inherit; }

/* the list */
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-list {
  grid-area: list; min-height: 0; min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px 8px 8px;
  border: 0; border-radius: 0; background: none;
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-row-li { border: 0; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-row {
  position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; column-gap: 12px; align-items: start; min-height: 68px;
  padding: 12px 10px 12px 20px; border: 0; border-radius: 14px; background: none; box-shadow: none; color: var(--i-ink);
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-row-li + .uib-row-li .uib-row::before { content: ""; position: absolute; left: 76px; right: 10px; top: 0; height: 1px; background: var(--i-hair); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-row:hover { background: var(--i-well); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-row.is-sel { background: var(--i-hi); box-shadow: inset 0 0 0 .5px var(--i-edge), 0 10px 22px -14px var(--i-shade); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-row.is-sel::before,
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-row-li:has(.uib-row.is-sel) + .uib-row-li .uib-row::before { display: none; }
/* the circle: initials in the channel color, the source glyph as a badge */
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-src {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%;
  background: var(--uib-disc, #50555F); color: #FFFFFF; font-size: 14px; font-weight: 600; letter-spacing: .02em; line-height: 1;
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-ini { display: block; color: #FFFFFF; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-glyph {
  position: absolute; right: -3px; bottom: -3px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--i-badge); box-shadow: 0 0 0 1.5px var(--i-badge), 0 2px 6px rgba(0, 0, 0, .18);
  color: var(--uib-tc, var(--i-muted));
}
/* the source word stays as the circle's accessible label (visually hidden), on the circle in white */
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-src-word { color: #FFFFFF; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-glyph .uib-src-ico { width: 12px; height: 12px; stroke-width: 2.2; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-src.is-glyph-only .uib-glyph { position: static; width: auto; height: auto; background: none; box-shadow: none; color: #FFFFFF; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-src.is-glyph-only .uib-src-ico { width: 20px; height: 20px; stroke-width: 1.7; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
/* line 1: the name; line 2 (the "about" line): sender · status · Muted. Names and senders show in full, wrapping
   rather than cutting off (owner 2026-10-26: "Taylor Broo…", "Contact On…"); the status follows the sender and moves
   to the next line when there is no room beside it */
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-row-top {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 1px 6px; min-width: 0;
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-row-top > :is(.uib-state, .uib-mutedmark) { white-space: nowrap; }
/* the sender takes its own line, so the status (and "Muted") start the next one on every row, the same rhythm whatever the
   sender's length; what starts that line needs no "·" ("Needs response · Muted", or "Muted" alone) */
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-row-top > .uib-sub { flex-basis: 100%; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-row-top > .uib-sub + :is(.uib-state, .uib-mutedmark)::before { content: none; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-sub { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-who { flex: 0 0 100%; min-width: 0; font-size: 15px; font-weight: 600; font-style: normal; color: var(--i-ink); white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-row.is-unread .uib-who { font-weight: 700; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-who.is-unlinked { color: var(--i-muted); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root :is(.uib-sub, .uib-state, .uib-mutedmark) { font-size: 12.5px; font-weight: 600; font-style: normal; color: var(--i-muted); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-who + .uib-sub .uib-sep { display: none; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root :is(.uib-who + .uib-state, .uib-who + .uib-mutedmark)::before { content: none; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-preview {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; margin: 0;
  font-size: 13.5px; line-height: 1.4; color: var(--i-muted);
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-row.is-unread .uib-preview { color: var(--i-ink); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-time { grid-column: 3; grid-row: 1; padding-top: 2px; font-size: 12.5px; color: var(--i-muted); font-variant-numeric: tabular-nums; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-dot { position: absolute; left: 6px; top: 30px; width: 9px; height: 9px; background: var(--i-gold); box-shadow: 0 0 8px var(--i-gold-glow); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-empty { padding: 28px 18px; color: var(--i-muted); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-more { padding: 12px 8px 4px; border: 0; color: var(--i-muted); }

/* buttons */
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border: 0; border-radius: 12px; background: var(--i-hi); color: var(--i-ink); font-family: inherit; font-size: 13.5px; font-weight: 600; line-height: 1.2; white-space: nowrap; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--i-hair), 0 8px 18px -12px var(--i-shade); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-btn:active { transform: scale(.96); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-btn[disabled] { opacity: .6; cursor: default; transform: none; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-btn--primary {
  background: var(--fin-bg, var(--i-ink)); color: var(--fin-ink, var(--i-on-ink));
  box-shadow: inset 0 1px 0 var(--fin-hi, transparent), inset 0 -1px 0 var(--fin-lo, transparent), 0 10px 22px -12px var(--i-shade);
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-btn .uib-ui-ico { width: 16px; height: 16px; }

/* the conversation */
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane {
  grid-area: pane; position: static; display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden;
  border: 0; border-left: 1px solid var(--i-hair); border-radius: 0; background: none; container: uibthread / inline-size;
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-empty { flex: 1 1 auto; display: grid; place-items: center; padding: 24px; color: var(--i-muted); font-size: 15px; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-head {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 12px 16px; border-bottom: 1px solid var(--i-hair); flex-wrap: nowrap;
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-head .uib-src { display: grid; flex: none; width: 40px; height: 40px; font-size: 13px; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-titles { flex: 1 1 auto; min-width: 0; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-title {
  margin: 0; font-family: 'Italiana', var(--font-display, 'Cormorant Garamond'), 'Iowan Old Style', Georgia, serif; font-size: 24px; font-weight: 400; line-height: 1.15; letter-spacing: .02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; color: var(--i-ink);
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-sub { font-size: 12.5px; color: var(--i-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-acts { flex: none; flex-wrap: nowrap; gap: 6px; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-acts > :is(.uib-chart, .uib-wf) {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--i-hi); color: var(--i-ink);
  font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--i-hair), 0 8px 18px -12px var(--i-shade);
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-acts .uib-ui-ico { width: 16px; height: 16px; }
/* one subtitle line: source · sender, then the status (· Assigned · Shared mailbox · Muted) */
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-titles { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); column-gap: 6px; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-title { grid-column: 1 / -1; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-titles .uib-pane-meta {
  padding: 0; border: 0; font-size: 12.5px; color: var(--i-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-titles .uib-pane-meta::before { content: "\00B7\00A0"; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-body { padding: 18px 20px; min-width: 0; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-thread { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-body:not(.uib-thread) { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-card-title { font-size: 16px; font-weight: 600; color: var(--i-ink); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-card-text { color: var(--i-ink); font-size: 14.5px; line-height: 1.5; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root :is(.uib-card-meta, .uib-note) { color: var(--i-muted); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-bubbles { display: flex; flex-direction: column; gap: 8px; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-bubbles .msg-hub-spruce-bubble {
  display: flex; flex-direction: column; max-width: min(560px, 78%); padding: 10px 14px; border: 0; border-radius: 18px;
  font-family: inherit; font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere;
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-bubbles .msg-hub-spruce-bubble .msg-hub-spruce-bubble-meta { order: 2; margin: 4px 0 0; padding: 0; border: 0; font-size: 11.5px; opacity: .78; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-bubbles .msg-hub-spruce-bubble.inbound {
  align-self: flex-start; background: var(--i-hi); box-shadow: inset 0 0 0 1px var(--i-hair); border-bottom-left-radius: 6px;
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-bubbles .msg-hub-spruce-bubble.outbound {
  align-self: flex-end; background: var(--fin-solid, var(--i-ink)); color: var(--fin-ink, var(--i-on-ink)); border-bottom-right-radius: 6px; box-shadow: none;
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-bubbles .msg-hub-spruce-bubble.outbound :is(.msg-thread-prose, .msg-hub-spruce-bubble-meta, .msg-read-more, a) { color: inherit; -webkit-text-fill-color: currentColor; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-staff-note {
  align-self: stretch; padding: 10px 14px; border: 0; border-radius: 14px; background: var(--i-note); color: var(--i-ink); font-size: 14.5px; line-height: 1.45;
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-staff-note :is(.uib-staff-note-h, small) { color: var(--i-muted); }

/* the composer: Reply / Note · text · saved replies · emoji · Send */
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-composer {
  position: relative; flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "mode txt tools" "hint hint hint";
  align-items: end; gap: 0 8px; margin: 0 14px 14px; padding: 8px; border: 0; border-radius: 18px;
  background: var(--i-hi); box-shadow: inset 0 0 0 1px var(--i-hair), 0 12px 28px -18px var(--i-shade);
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-composer.is-note { box-shadow: inset 0 0 0 1.5px var(--i-gold), 0 12px 28px -18px var(--i-shade); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-composer > .uib-note { grid-column: 1 / -1; margin: 4px 6px; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-mode { grid-area: mode; align-self: center; display: flex; flex-wrap: nowrap; gap: 2px; padding: 3px; border-radius: 12px; background: var(--i-well); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-mode-btn {
  min-height: 44px; padding: 0 12px; border: 0; border-radius: 9px; background: none; color: var(--i-muted); font-size: 13px; font-weight: 600; text-decoration: none;
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-mode-btn[aria-pressed="true"] { background: var(--i-hi); color: var(--i-ink); text-decoration: none; box-shadow: 0 6px 14px -8px var(--i-shade); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-reply {
  grid-area: txt; width: 100%; min-height: 44px; max-height: 160px; field-sizing: content; padding: 11px 6px; resize: none;
  border: 0; border-radius: 0; background: transparent; color: var(--i-ink); font: inherit; font-size: 14.5px; line-height: 1.45; outline: none;
}
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-reply::placeholder { color: var(--i-muted); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-composer:focus-within { box-shadow: inset 0 0 0 1.5px var(--i-gold), 0 12px 28px -18px var(--i-shade); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-comp-tools { grid-area: tools; display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-comp-tools .uib-icon-btn { background: none; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-comp-tools .uib-icon-btn:hover,
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-comp-tools .uib-icon-btn[aria-expanded="true"] { background: var(--i-well); box-shadow: none; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-send { margin: 0; padding: 0 18px; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-mode-hint { grid-area: hint; margin: 4px 6px 2px; font-size: 12px; color: var(--i-muted); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-comp-menu .uib-menu-pop { left: 0; right: 0; bottom: calc(100% + 10px); max-height: min(46vh, 380px); overflow-y: auto; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root [data-uib-pop="emoji"] { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 2px; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-emo { min-height: 44px; border-radius: 10px; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-emo:hover { background: var(--i-well); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-saved-q { width: 100%; min-height: 44px; padding: 0 12px; border-radius: 10px; background: var(--i-well); flex: none; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-saved-item { border-radius: 10px; color: var(--i-ink); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-saved-item:hover { background: var(--i-well); }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-saved-item span { color: var(--i-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-saved-all { min-height: 44px; padding: 0 10px; font-weight: 600; text-decoration: none; }

/* a narrow conversation: icon-only actions (their words stay as their accessible names), the composer's tools on their own row */
@container uibthread (max-width: 680px) {
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-acts > .uib-chart { width: 44px; padding: 0; justify-content: center; }
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-acts > .uib-chart > :not(svg) { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@container uibthread (max-width: 560px) {
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-acts > :is(.uib-wf) { width: 44px; padding: 0; justify-content: center; }
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-acts > :is(.uib-wf) > :not(svg) { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-head { gap: 8px; padding: 10px 12px; }
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-title { font-size: 21px; }
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-body { padding: 14px 12px; }
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-bubbles .msg-hub-spruce-bubble { max-width: 88%; }
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-composer { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "mode tools" "txt txt" "hint hint"; margin: 0 10px 10px; }
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-comp-tools { justify-self: end; }
}
@container uibthread (max-width: 440px) {
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-head .uib-src { display: none; }
}

/* narrow inbox: the list and the conversation take turns at full width */
@container uibroot (max-width: 860px) {
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-sheet {
    grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto minmax(0, 1fr);
    grid-template-areas: "tabs" "chans" "tools" "status" "list";
  }
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-sheet::before { display: none; }
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-tabs { margin: 12px 12px 8px; }
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-filters { padding: 0 6px; border-top: 1px solid var(--i-hair); border-bottom: 1px solid var(--i-hair); }
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-filter { min-height: 44px; padding: 0 8px; }
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-tools { padding: 12px 12px 8px; }
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane { display: none; border-left: 0; }
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root.is-reading .uib-sheet { grid-template-rows: minmax(0, 1fr); grid-template-areas: "pane"; }
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root.is-reading :is(.uib-tabs, .uib-filters, .uib-tools, .uib-status, .uib-list) { display: none; }
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root.is-reading .uib-pane { display: flex; }
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-pane-head .uib-back { display: grid; background: none; }
}
@container uibroot (max-width: 432px) {
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-row { padding: 12px 8px 12px 18px; column-gap: 10px; }
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root .uib-row-li + .uib-row-li .uib-row::before { left: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  html:is([data-theme="pearl"], [data-theme="pearl_night"]) .uib-root :is(.uib-filter::after, .uib-btn) { transition: none; }
}
