/* chat.css — Conversations (Bundle 9 follow-on, spec C3).
 * The styles chat.js and the conversations.js picker own: the list
 * rows' lead marks, a message's reply quote, attachments, reaction
 * chips and picker, and the composer's reply / editing banner and
 * pending-attachment tray. The list rows, thread pane and composer
 * frames themselves live in styles.css (they predate C3); the gold
 * stays where styles.css already puts it — the one primary action
 * (＋ New conversation, Send) — and nothing here adds another.
 * Wave 10: Billdr's indigo tints are retired; tints here are the
 * design system's navy-grey (#e8edf3 / #f8f9fb), accents navy. */

/* Row leads: a circle for the icon-led threads (General, groups,
 * projects), matching the avatar chip's place in the row. */
.conv-lead { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #e8edf3; color: var(--navy); flex: none; }
.conv-loading { padding: 6px 2px; }

/* The reply quote: who, then their words, two lines at most —
 * tapping it jumps to the message (chat.js). */
.chat-quote { display: flex; align-items: flex-start; gap: 8px; width: 100%; text-align: left; border: 0; border-left: 3px solid #cbd2da; background: #f8f9fb; border-radius: 0 8px 8px 0; padding: 6px 10px; margin: 0 0 6px; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.chat-quote-main { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; min-width: 0; }
.chat-quote-thumb { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; flex: none; background: #e8ebee; }
p.chat-quote { cursor: default; }
.chat-quote-who { font-weight: 600; color: var(--ink); }

@keyframes chatFlash { 0% { background: #e8edf3; } 100% { background: transparent; } }
.comment.chat-flash { animation: chatFlash 2.2s ease-out; }

/* Attachments on a message: photos as thumbnails (tap to open the
 * full picture), files as a named row (tap to download), a voice
 * note with its player. */
.chat-atts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chat-att-img { border: 1px solid var(--line); border-radius: 10px; padding: 0; overflow: hidden; background: #fff; cursor: pointer; line-height: 0; }
.chat-att-img img { max-width: 260px; max-height: 200px; width: auto; height: auto; }
.chat-att-file { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.chat-att-name { font-weight: 600; }
.chat-att-size { color: var(--muted); font-size: 12px; }
.chat-att-voice { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: #fff; font-size: 13px; }
.chat-att-voice audio { height: 32px; max-width: 220px; }

/* Reactions: the app's five kinds by their words. A chip is a
 * button — tapping toggles yours. Yours reads tinted, never gold. */
.chat-rxrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chat-rx { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 10px; min-height: 26px; font: inherit; font-size: 12px; cursor: pointer; }
.chat-rx.mine { background: #e8edf3; border-color: var(--navy); color: var(--navy); font-weight: 600; }
.chat-rx:focus-visible, .chat-rxp:focus-visible, .chat-quote:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(11, 34, 53, .12); }
.chat-rxpick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chat-rxp { border: 1px solid var(--line); background: #f8f9fb; border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12px; cursor: pointer; }

/* The composer's bars: Replying / Editing above the box, and the
 * tray of attachments waiting to go out with the send. */
.chat-banner { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; font-size: 12.5px; color: var(--muted); }
.chat-banner-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-pending { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chat-pend { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 12.5px; background: #fff; }
.chat-pend img { width: 28px; height: 28px; object-fit: cover; border-radius: 5px; }

/* ---------- Wave 22 chat fix pass (2026-10-15) ----------
 * The two chats — the Conversations pane (chat.js) and the project
 * Communications thread (app.js's mountComments, shared with the
 * walkthrough and photo threads) — render ONE message shape now:
 * an initials chip, a quiet name + time head, the words in a
 * bubble (your own right-aligned in navy, everyone else's in a
 * soft tint), and a day divider whenever the calendar turns, so
 * heads carry just the time. The thread lists breathe again (the
 * 4px strip the panes imposed is gone), unread rows scan darker
 * with a navy pill (red is for errors here, not counts), and gold
 * stays on Send alone. The dark lightbox re-tints the same shape
 * at the end of this section. */

/* Day divider */
.msg-day { display: flex; align-items: center; gap: 12px; margin: 16px 0 8px; }
.msg-day:first-child { margin-top: 4px; }
.msg-day::before, .msg-day::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.msg-day span { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

/* One message shape */
.comments-list .comment.msg { display: flex; gap: 10px; padding: 8px 0; border-bottom: 0; }
.comments-list .comment.msg .msg-av { flex: none; margin-top: 1px; }
.comments-list .comment.msg .msg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.comments-list .comment.msg.mine .msg-main { align-items: flex-end; }
.comments-list .comment.msg .c-head { margin: 0 0 4px; font-size: 12.5px; color: var(--muted); }
.comments-list .comment.msg .c-head b { color: var(--ink); font-size: 13px; font-weight: 600; }
.comments-list .comment.msg .c-time { font-size: 11.5px; }
.comments-list .comment.msg.mine .c-head { text-align: right; }
.msg-bubble { background: #eef1f5; border-radius: 4px 14px 14px 14px; padding: 9px 13px; max-width: 78%; width: fit-content; }
/* wave635-bubble (Micheal, 2026-11-12): the dark navy own-bubble was
 * hard to read — own messages now sit in a light violet with deep
 * violet text; gold stays on accents and Send. */
.comment.msg.mine .msg-bubble { background: #e9e2fb; color: #2c1d4e; border: 1px solid #cdc0f2; border-radius: 14px 4px 14px 14px; }
.msg-bubble .c-body { font-size: 14px; line-height: 1.5; }
.comment.msg.mine .c-body { color: #2c1d4e; }
.comment.msg.mine .mention { background: rgba(44, 29, 78, .14); color: #2c1d4e; }
.msg-bubble .chat-atts:first-child { margin-top: 0; }
/* Editing in place swaps the bubble for the composer: the bubble
 * steps aside (full width, no tint) while the edit is open. */
.msg-bubble:has(.composer) { width: 100%; max-width: 100%; background: transparent; padding: 0; border-radius: 0; }
.comments-list .comment.msg .chat-quote { width: auto; max-width: 88%; }
.comments-list .comment.msg .c-actions { margin-top: 5px; }
.comments-list .comment.msg.is-deleted { display: block; text-align: center; padding: 6px 0; }
.comments-list .c-none { text-align: center; padding: 30px 12px; }

/* Thread breathing room: the panes/cards already pad once, so the
 * list and composer sit a step inside them, not flush. */
#conv-thread-slot .comments-list { padding: 10px 16px; }
#proj-thread-slot .comments-list { padding: 10px 6px; }
#walkthrough-comments .comments-list { padding: 10px 16px; }
.chat-slot .c-composer-slot { padding: 12px 16px 2px; }
.chat-card .chat-slot .c-composer-slot { padding-left: 6px; padding-right: 6px; }

/* Conversations list: unread reads navy and a step darker, so the
 * list scans — red stays for errors and deletes. */
.conv-unread { background: var(--navy); }
.conv-row:has(.conv-unread) .conv-row-snip { color: var(--ink); font-weight: 500; }

/* The shipped (Billdr) skin: hold the tighter message rhythm
 * against the design system's comment padding. */
body.skin-billdr #app .comments-list .comment.msg { padding: 8px 0; }

/* The dark lightbox: the same shape, re-tinted. */
.lb-comments .msg-bubble { background: rgba(255, 255, 255, .09); color: #dbe2ee; }
.lb-comments .comment.msg.mine .msg-bubble { background: #1d425f; color: #fff; }
.lb-comments .msg-day::before, .lb-comments .msg-day::after { border-top-color: rgba(255, 255, 255, .14); }
.lb-comments .msg-day span { color: #8fa0b8; }
.lb-comments .comment.msg .c-head b { color: #fff; }

@media (max-width: 760px) {
  .msg-bubble { max-width: 88%; }
  .comments-list .comment.msg .chat-quote { max-width: 92%; }
}

/* The New conversation picker (conversations.js): a person or
 * a project's thread — people rows and the project dropdown,
 * nothing else since fix pass 13 (the group maker that lived
 * here is gone; groups start inside a conversation now). The
 * panel frame and its rows live in styles.css. (The panel's
 * title and section captions were stripped in fix pass 12 —
 * the owner: "what is that for".) The checkbox-row rules below
 * belong to the People panel's add list (chat-people.js),
 * which kept the row shape. */
.conv-picker-row.is-inline { flex-direction: row; align-items: center; gap: 10px; cursor: pointer; min-height: 44px; }
/* Choosing group members selects, it doesn't switch: drawn as the
 * portal's selection box (navy fill, icons.js `check` tick). */
.conv-picker-row.is-inline input[type="checkbox"] { -webkit-appearance: none; appearance: none; margin: 0; flex: none; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #cbd2da; background: #fff; cursor: pointer; }
.conv-picker-row.is-inline input[type="checkbox"]:checked { background: var(--navy) no-repeat center / 14px 14px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.6l5 5L19.5 6.6'/%3E%3C/svg%3E"); }
.conv-picker-row.is-inline input[type="checkbox"]:focus-visible { outline: none; }

/* ---------- Wave 22 fix pass 3 (2026-10-15) ----------
 * The chat tweaks, owner-directed with his Instagram DMs as the
 * reference: avatars are the person's Settings photo (initials
 * only as the fallback), reactions read as emojis — chips tucked
 * at the bubble's edge, the picker a floating emoji bar — and
 * both composers lead their bar with an emoji button and panel.
 * Colours stay Rookery navy; the reaction kinds and words in the
 * store do not change. */

/* Avatars: the photo fills the round chip when it lands
 * (hydrateAvatars signs people.avatarPath and adds .on); the
 * initials sit underneath until then, and stay if there is no
 * photo to show. */
.avatar-chip { position: relative; overflow: hidden; }
.avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; opacity: 0; transition: opacity .18s ease; pointer-events: none; }
.avatar-img.on { opacity: 1; }
.conv-avatar:empty { display: none; }

/* Reactions as emojis: the chip row rides up over the bubble's
 * bottom edge, Instagram-style; a chip is a small white pill with
 * the emoji and its count. Yours reads navy-tinted, never gold. */
.comments-list .comment.msg .chat-rxrow { margin-top: -8px; padding: 0 8px; position: relative; z-index: 2; }
.chat-rx { display: inline-flex; align-items: center; gap: 4px; background: #fff; box-shadow: 0 1px 3px rgba(11, 34, 53, .16); padding: 2px 8px; min-height: 24px; font-size: 12.5px; line-height: 1.2; }
.chat-rx.mine { background: #e8edf3; }
/* The picker is one floating pill bar of emojis; a pick grows a
 * step under the cursor, the way the apps do it. */
.comments-list .comment.msg .chat-rxpick { display: inline-flex; width: fit-content; flex-wrap: nowrap; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px; box-shadow: 0 6px 18px rgba(11, 34, 53, .18); }
.chat-rxp { border: 0; background: transparent; border-radius: 50%; padding: 4px 5px; font-size: 17px; line-height: 1.1; transition: transform .12s ease, background .12s ease; }
.chat-rxp:hover { background: #eef1f6; transform: scale(1.18); }
/* The wider grid (fix pass 12): the picker's ＋ opens the rest
 * of the emoji set under the quick row, inside the same
 * floating pill — the pill wraps to a card and the grid is its
 * own scrollable area. A grid pick stores the character itself
 * as the reaction kind (chatReactionGrid in chat.js). */
.comments-list .comment.msg .chat-rxpick.expanded { flex-wrap: wrap; width: 268px; max-width: 80vw; border-radius: 18px; }
.chat-rxp-more { color: var(--muted); font-size: 14px; }
.chat-rxp-more[aria-expanded="true"] { background: #e8edf3; color: var(--navy); }
.chat-rxgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; flex: 0 0 100%; max-height: 172px; overflow-y: auto; padding-top: 5px; margin-top: 5px; border-top: 1px solid var(--line); }
.chat-rxg { border: 0; background: transparent; border-radius: 8px; padding: 4px 0; font-size: 17px; line-height: 1.15; cursor: pointer; transition: transform .12s ease, background .12s ease; }
.chat-rxg:hover { background: #eef1f6; transform: scale(1.15); }
.chat-rxg:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(11, 34, 53, .12); }

/* The composers' emoji button + panel (emojis.js wires them).
 * The panel floats above the composer box beside the mention
 * picker, as a grid of the common emojis. */
.emoji-btn { border: 0; background: transparent; font-size: 19px; line-height: 1; padding: 4px 2px; border-radius: 50%; cursor: pointer; }
.emoji-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(11, 34, 53, .12); }
.emoji-panel { position: absolute; left: 0; bottom: calc(100% + 4px); z-index: 31; width: 296px; max-width: 86vw; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.emoji-panel button { border: 0; background: transparent; font-size: 19px; line-height: 1.25; padding: 5px 0; border-radius: 8px; cursor: pointer; }
.emoji-panel button:hover { background: #eef1f6; }
/* …and on the lightbox's dark ground. */
.lb-comments .emoji-panel { background: #16222f; border-color: rgba(255, 255, 255, .2); }
.lb-comments .emoji-panel button:hover, .lb-comments .emoji-btn:hover { background: rgba(255, 255, 255, .12); }

/* ---------- Wave 22 fix pass 4 (2026-10-15) ----------
 * Pinned conversations: the pin rides at the row's right edge.
 * Quiet outline until it's on; on reads navy on the navy tint —
 * the marker a pinned row carries. (It is a span with a button's
 * role inside the row's own button, wired in renderConvRows —
 * its tap pins, it never opens the thread.) */
.conv-pin { flex: none; margin-top: 1px; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #9aa7b5; cursor: pointer; }
.conv-pin .ico { width: 15px; height: 15px; transition: transform .18s ease; }
.conv-pin:hover { background: #eef1f6; color: var(--navy); }
.conv-pin:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(11, 34, 53, .12); }
/* Pinned (fix pass 6, the owner's ask — "make the flip or
 * something so you know it is clicked"): the pin FILLS solid
 * and tips 45°, the classic pushed pin, animated on the tap.
 * Navy, not gold: gold is this portal's one-action colour, and
 * a gold pin on every pinned row would spend it wrong; a solid
 * navy pin in a tint disc against the quiet grey outline reads
 * at a glance. The class rides c.pinned — the same state the
 * list sorts by — and chatTogglePin re-renders on the tap, so
 * the flip lands immediately and survives every re-render. */
.conv-pin.on { color: var(--navy); background: #e8edf3; }
.conv-pin.on .ico { fill: currentColor; transform: rotate(45deg); }
.conv-pin.on:hover { background: #dde5ee; }

/* Message actions (fix pass 4, added scope — the owner's
 * Instagram / Muse references): NO permanent buttons on a
 * message. Hovering (or focusing into, or tapping on touch) a
 * message pops a small bar at the bubble's top corner —
 * react · reply · copy · ⋯ (the ⋯ on your own messages only;
 * Copy lives in the bar alone since fix pass 6, the menu is
 * Edit · Delete). The reaction picker floats over the
 * thread as a popover anchored to its message; it never pushes
 * a message down. */
.comments-list .comment.msg { position: relative; }
.comments-list .comment.msg .msg-bubble { position: relative; }
.msg-actions { position: absolute; top: -15px; right: -8px; z-index: 25; display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: #fff; border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 4px 14px rgba(11, 34, 53, .16); opacity: 0; pointer-events: none; transform: translateY(2px); transition: opacity .15s ease, transform .15s ease; }
.comment.msg.mine .msg-actions { right: auto; left: -8px; }
.comment.msg:hover .msg-actions, .comment.msg:focus-within .msg-actions, .comment.msg.has-open .msg-actions { opacity: 1; pointer-events: auto; transform: none; }
@media (hover: none) { .comment.msg .msg-actions { opacity: 1; pointer-events: auto; transform: none; } }
.msg-bubble:has(.composer) .msg-actions { display: none; }
.msg-act { border: 0; background: transparent; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); font-size: 14px; line-height: 1; padding: 0; }
.msg-act:hover { background: #eef1f6; color: var(--navy); }
.msg-act:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(11, 34, 53, .12); }
.msg-act .ico { width: 15px; height: 15px; }
/* The ⋯ menu: one dropdown shape, opening under its button —
 * upward when its message rides the foot of the list. */
.chat-menuwrap { position: relative; display: inline-flex; }
.chat-menu { position: absolute; top: calc(100% + 5px); right: 0; z-index: 32; min-width: 148px; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; }
.comment.msg.mine .chat-menu { right: auto; left: 0; }
.chat-menu.up { top: auto; bottom: calc(100% + 5px); }
.chat-menu-item { border: 0; background: transparent; text-align: left; font: inherit; cursor: pointer; white-space: nowrap; }
.chat-menu-item:focus-visible { outline: none; }
/* The reaction picker, floating: anchored above its message,
 * flipping below when the head of the list leaves no room
 * (floatRxPicker in chat.js picks the side after each render). */
.comments-list .comment.msg .chat-rxpick { position: absolute; z-index: 30; margin: 0; left: 46px; bottom: calc(100% - 4px); }
.comments-list .comment.msg.mine .chat-rxpick { left: auto; right: 8px; }
.comments-list .comment.msg .chat-rxpick.below { bottom: auto; top: calc(100% - 4px); }

/* ---------- Wave 22 fix pass 5 (2026-10-15) ----------
 * The membership doors, owner-directed: the New conversation
 * picker's projects are a dropdown now; a direct/group thread's
 * head carries a ⋯ menu (Add people · Delete chat); the
 * add-people panel sits under the head; and a list row carries
 * its own ⋯ with Delete chat. The menus are the fix-4 ⋯ shape —
 * one dropdown, everywhere it appears. */

/* The project dropdown in the New conversation picker: the
 * select takes the picker's field treatment (the same border,
 * radius and focus ring as its text inputs). */
.conv-picker-select { width: 100%; border: 1px solid #cbd2da; font: inherit; background: #fff; color: var(--ink); cursor: pointer; }
.conv-picker-select:focus { outline: none; }

/* The thread head's ⋯ rides the titlerow's right edge — the
 * slot the View project door takes on a project thread. */
.conv-head-menuwrap { margin-left: auto; }
.conv-head-menuwrap .chat-menu { z-index: 44; }

/* A list row's ⋯: the pin's sibling — the same round quiet
 * control, sitting at the row's right edge before the pin. */
.conv-row-menubtn { flex: none; margin-top: 1px; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #9aa7b5; cursor: pointer; }
.conv-row-menubtn .ico { width: 15px; height: 15px; }
.conv-row-menubtn:hover { background: #eef1f6; color: var(--navy); }
.conv-row-menubtn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(11, 34, 53, .12); }
.conv-row-menu { min-width: 150px; }

/* The add-people panel: the picker's frame, under the thread
 * head — its checkbox rows are the group picker's own shape. */
.chat-add-panel { border: 1px solid var(--line); background: #fff; margin: 6px 0 10px; }
.chat-add-title { text-transform: uppercase; margin: 2px 2px 8px; }
.chat-add-note { margin: 0 2px 10px; }
.chat-add-list { display: flex; flex-direction: column; max-height: 220px; overflow: auto; }
.chat-add-none { margin: 2px; }
.chat-add-error { margin-top: 8px; }
.chat-add-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
/* The panel's foot (fix pass 13): Delete chat as a danger row
 * of its own, under a rule — deleting the chat lives in the
 * chat, not only in menus. */
.chat-add-foot { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.chat-add-del { display: block; width: 100%; padding: 8px; border: 0; border-radius: 6px; background: transparent; font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
/* The People panel's member list (fix pass 10): who's in the
 * conversation, one row each, with the group-only Remove. */
.chat-add-subtitle { margin-top: 12px; }
.chat-people-list { display: flex; flex-direction: column; }
.chat-person-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px; }
.chat-person-row .btn { flex: none; }

/* ---------- Wave 22 fix pass 7 (2026-10-15) ----------
 * The chat composer is ONE rounded bar (the owner's Instagram
 * reference): the emoji button inside at the left, the field
 * growing in the middle — capped, so it stays one bar — and at
 * the right the mention, attach and mic buttons, which step
 * aside for the gold Send while there's something to send (the
 * swap is syncChrome's, in chat.js). Recording takes the whole
 * bar: a pulsing navy dot (red is for errors here), the clock,
 * Stop and ✕. The error line moved above the bar with the
 * banner and the tray. app.js's comment composer keeps its own
 * two-row shape — these rules are .chat-composer's only. */
.chat-composer .chat-cerr { margin: 0 0 6px; font-size: 12.5px; }
.chat-composer .chat-cerr:empty { display: none; }
.chat-bar-main { display: flex; align-items: flex-end; gap: 2px; border: 1px solid var(--line); border-radius: 24px; padding: 4px 6px; }
.chat-composer .emoji-btn { flex: none; margin-bottom: 3px; }
.chat-bar-field { position: relative; flex: 1; min-width: 0; display: flex; }
/* The bar's field sheds styles.css's boxed textarea treatment:
 * no border of its own, no vertical resize — it grows by the
 * script's hand to the cap, then scrolls. */
.chat-composer .chat-bar-field textarea { border: 0; border-radius: 0; padding: 7px 4px; resize: none; background: transparent; max-height: 120px; overflow-y: auto; line-height: 1.45; }
.chat-composer .chat-bar-field textarea:focus { outline: none; border-color: transparent; }
/* The bar's round icon buttons — the Assistant's bar shares
 * the shape (its own rules live with the drawer in styles.css). */
.chat-bar-btn { flex: none; border: 0; background: transparent; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); font: inherit; font-size: 17px; font-weight: 700; padding: 0; margin-bottom: 1px; }
.chat-bar-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(11, 34, 53, .12); }
.chat-bar-btn:disabled { opacity: .45; cursor: default; }
.chat-bar-btn:disabled:hover { background: transparent; color: var(--muted); }
.chat-bar-btn .ico { width: 19px; height: 19px; }
.chat-composer .chat-send, .chat-composer .chat-cancel { flex: none; border-radius: 999px; min-height: 34px; padding: 6px 16px; margin-bottom: 1px; }
.chat-composer .chat-cancel { padding: 6px 10px; }
/* The recording state of the bar. */
.chat-rec { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 24px; padding: 4px 6px 4px 14px; min-height: 44px; }
.chat-rec-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--navy); animation: chatRecPulse 1.1s ease-in-out infinite; }
@keyframes chatRecPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.78); } }
.chat-rec-time { flex: none; min-width: 34px; font-size: 14px; font-weight: 700; color: var(--navy); }
.chat-rec-hint { flex: 1; min-width: 0; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-rec-actions { flex: none; display: inline-flex; align-items: center; gap: 4px; }
.chat-rec-actions .chat-bar-btn { margin-bottom: 0; }
.chat-rec-stop { border-radius: 999px; min-height: 34px; padding: 6px 14px; display: inline-flex; align-items: center; gap: 6px; }
.chat-rec-stop .ico { width: 12px; height: 12px; }
/* A staged voice note's chip carries its player. */
.chat-pend audio { height: 28px; width: 168px; max-width: 44vw; }
.chat-pend-audio { padding: 4px 6px; }
/* The pane's drop state (drag-and-drop, fix pass 7): a dashed
 * navy veil over the open thread — it never takes the pointer,
 * so the drag's enter/leave counting stays on the pane itself. */
#conv-thread-slot { position: relative; }
.chat-drop { position: absolute; inset: 8px; z-index: 40; display: flex; align-items: center; justify-content: center; border: 2px dashed var(--navy); border-radius: 14px; background: rgba(232, 237, 243, .93); color: var(--navy); font-size: 15px; font-weight: 700; pointer-events: none; }

/* The Rookery Assistant's bar + thread (fix pass 7): the
 * drawer takes the chat's shapes — its bar is the one rounded
 * bar, and its conversation reads like the chat: his questions
 * right-aligned in navy, the answers in soft tint with the
 * sparkle mark in a navy chip beside them, the chat's avatar
 * place. The base .asst-* rules live in styles.css; these are
 * this pass's shapes, kept here with the chat surfaces (and
 * because styles.css sits at the per-file upload ceiling —
 * the same reason clients.css split off it). */
/* The bar */
/* wave562: the assistant bar IS the chat composer's bar — the
   form carries .chat-composer, the bar .chat-bar-main, the field
   sits in .chat-bar-field — so the chat rules above dress it
   whole and there are no assistant-only bar rules left to drift.
   (wave549/558 patched a lookalike pill twice; the owner still
   saw it wrong. The classes end that.) wave563: the form ALSO
   carries .composer — chat-composer.js's root wears both, and
   styles.css's .composer textarea rule is what gives the field
   its full width and inherited font; without it the swapped-in
   textarea fell back to the browser's ~200px monospace default
   (the verification walk caught exactly that). The whole drawer
   lives outside #app, so #app-scoped skin rules never reach it —
   the shared unscoped classes are the only reliable dress.
   Listening keeps its ring: */
#asst-bar.listening { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(11, 34, 53, .12); }
#asst-bar.listening #asst-mic { background: var(--navy); color: #fff; animation: chatRecPulse 1.1s ease-in-out infinite; }
.asst-rec-note { margin: 0 2px; font-size: 12px; color: var(--muted); }
.asst-status { margin: 0 2px; font-size: 12.5px; color: var(--muted); }
/* The drawer's drop state: the pane's dashed veil again. */
.asst-drop { position: absolute; inset: 10px; z-index: 5; display: flex; align-items: center; justify-content: center; border: 2px dashed var(--navy); border-radius: 14px; background: rgba(232, 237, 243, .94); color: var(--navy); font-size: 15px; font-weight: 700; pointer-events: none; }
/* The thread as chat bubbles: padding and corners are the
 * chat's own (9px 13px; the tail corner square-ish on the
 * speaker's side). The answer's tint replaces the card white
 * and its gold rule; his questions keep the navy and drop
 * their gold underline — inside the thread it's chat, not
 * drawer chrome. */
.asst-msg { padding: 9px 13px; }
.asst-bot { background: #eef1f5; border: 0; border-radius: 4px 14px 14px 14px; }
.asst-user { border-bottom: 0; border-radius: 14px 4px 14px 14px; }
/* The assistant's mark: the drawer's sparkle in a navy chip,
 * where the chat puts a person's photo. */
.asst-row { display: flex; gap: 8px; align-items: flex-start; }
.asst-mark { flex: none; width: 28px; height: 28px; margin-top: 1px; border-radius: 50%; background: var(--navy); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; }
.asst-mark .ico { width: 15px; height: 15px; }
.asst-mark { position: relative; overflow: hidden; }
.asst-mark .cal-avpic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.conv-lead-callie { padding: 0; overflow: hidden; background: #4a2fb8; }
.asst-row .asst-msg { flex: 1; min-width: 0; }
/* ---------- Wave 22 fix pass 9 (2026-10-16) ----------
 * The chat dock: a slim tab fixed at the bottom-right, and the
 * panel that rises above it when — and only when — the tab is
 * clicked. The panel is a white card in the portal's shapes;
 * inside it, the list rows and the thread are the Conversations
 * surfaces' own (styles.css + this file), so nothing here
 * re-skins them. Z-order: below the lightbox (100), the
 * Assistant drawer (120) and the modal overlays (1200+) — the
 * dock waits its turn under all of them. */
.chat-dock { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.chat-dock.dock-buried { display: none; }
/* On the quote editor the sticky total bar owns the bottom
 * edge (quotes.css's .quote-totalbar — the Total, in gold):
 * while one is on the page, the dock lifts above it rather
 * than sit on the number. */
body:has(.quote-totalbar) .chat-dock { bottom: 84px; }

/* wave49-schedule (Micheal, 2026-10-21 22:03 — item E): the dock
 * rode over the Schedule bulk bar's right end (its Clear button)
 * while a selection was up. Same mechanism as the totals bar
 * above — while the bar is on, the dock lifts clear of it; with
 * no selection the bar is gone and the dock sits at its usual
 * 18px. The Schedule bar is sticky to the viewport bottom with a
 * 12px offset and stands ~64px tall, so 88px clears it. */
body:has(#psched-bulk.ps-bulk-on) .chat-dock { bottom: 88px; }

/* wave542 (2026-11-09): on the Communications page the dock steps
 * aside entirely. The page IS the messages hub — the tab's one
 * door (Expand) leads away from it — and the floating pair (this
 * dock at the bottom-right, the Support launcher above it) rode
 * over the record pane's internal composer: the launcher hangs
 * in the composer's row at the pane's bottom-right corner, and
 * wherever the shell drops its side track (meetings' cx-noside,
 * the ≤1100px two-column shell) the pane reaches the content
 * edge and the tab lands on the composer's right end outright.
 * The burial is the Assistant drawer's own (.dock-buried):
 * display none, state untouched — the dock returns, exactly as
 * he left it, the moment he leaves the page. */
body:has(#view-emails:not(.hidden)) .chat-dock { display: none; }

/* The tab: white pill, navy words, a navy count — the same
 * count the sidebar badge shows, painted by the same hand.
 * Gold stays off it (gold is the one action + the one number;
 * the tab is neither). */
.dock-tab { display: inline-flex; align-items: center; font: inherit; cursor: pointer; }
.dock-count { line-height: 1; border-radius: 20px; }

/* The panel: a bounded card — 380 wide, never taller than the
 * viewport leaves — with the list or the thread inside it, each
 * a flex column whose middle scrolls. */
.dock-panel { width: 380px; max-width: calc(100vw - 24px); height: min(580px, calc(100dvh - 110px)); border: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
.dock-view { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.dock-head { flex: none; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.dock-head-title { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-head-main { flex: 1; min-width: 0; }
.dock-sub { font-size: 12px; margin: 1px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-head .conv-avatar { flex: none; }
.dock-head #dock-new { margin-left: auto; flex: none; }
/* The dock thread head's ⋯ menu (fix pass 10): the page head
 * menu's twin, anchored to its wrap above the panel's edge. */
.dock-head-menuwrap { position: relative; flex: none; }
.dock-head-menuwrap .chat-menu { z-index: 44; }
#dock-people-slot { flex: none; }
#dock-people-slot .chat-add-panel { margin: 8px 10px 0; max-height: 300px; overflow-y: auto; }
.dock-x, .dock-back { flex: none; border: 0; background: transparent; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); padding: 0; }
.dock-x:hover, .dock-back:hover { background: #e8edf3; color: var(--navy); }
.dock-x:focus-visible, .dock-back:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(11, 34, 53, .12); }

/* The list inside the panel: the page's rows, a step tighter. */
.dock-rows { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; }
.dock-rows .conv-row { width: 100%; }
.dock-empty { padding: 14px 10px; }

/* The thread inside the panel: the shared slot machinery (flex
 * column, scrolling list, pinned composer — styles.css's
 * .chat-slot), held relative for the drop veil, with the
 * Conversations pane's breathing room. */
.dock-thread-slot { position: relative; flex: 1; min-height: 0; }
.dock-thread-slot .comments-list { padding: 10px 12px; }
.dock-thread-slot .c-composer-slot { padding: 12px 12px 2px; }

/* Small screens: the panel goes near-full-screen — an inset
 * card over the page, the way the apps open a chat. */
@media (max-width: 640px) {
  .chat-dock { right: 12px; bottom: 12px; }
  body:has(.quote-totalbar) .chat-dock { bottom: 76px; }
  .dock-panel { position: fixed; inset: 10px; width: auto; max-width: none; height: auto; }
}

/* Attachments on a question bubble, the chat way. */
.asst-atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.asst-att-img { width: 84px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.asst-att-file { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 12.5px; cursor: pointer; }
.asst-atts audio { height: 30px; max-width: 200px; }

/* ======================= DW1 · Chat (design wave, 2026-10-17) ======================= */
/* Chrome only — pane frames, heads, buttons, inputs, menus, the dock's
 * tab and panel frame, the Assistant drawer's frame. The conversation
 * look (Instagram-flavoured, owner-directed) is deliberately left as
 * it is: .msg-bubble, .comment.msg, .msg-day, reactions, quotes,
 * attachments, the message action bar and the asst-* bubbles are not
 * touched here. The dock and the drawer live outside #app, so they are
 * scoped body.skin-billdr … on their own roots. */

/* -- Conversations page: two white panes on the grey page -- */
body.skin-billdr #app .conv-layout { gap: 20px; }
/* The shared .btn display rule was un-hiding the narrow-screen back
 * link on wide screens; it shows only where the panes stack again. */
body.skin-billdr #app .btn.conv-back { display: none; }
body.skin-billdr #app .conv-pane-list { padding: 16px 12px 12px; }
body.skin-billdr #app .conv-pane-head { padding: 0 4px 14px; border-bottom-color: var(--ds-line); margin-bottom: 8px; }
body.skin-billdr #app .conv-pane-head h2 { font-size: var(--ds-fs-lg); font-weight: 700; color: var(--ds-navy); margin: 0 0 12px; }
body.skin-billdr #app .conv-new-btn { width: 100%; margin: 0 0 10px; }
body.skin-billdr #app .conv-row { border-radius: var(--ds-r-sm); padding: 12px 10px; }
body.skin-billdr #app .conv-row:hover { background: var(--ds-tint); }
/* Active row = the sidebar's active pill (light grey-blue). */
body.skin-billdr #app .conv-row.active { background: var(--ds-nav-active); }
body.skin-billdr #app .conv-row-name { font-size: var(--ds-fs); font-weight: 700; color: var(--ds-navy); }
body.skin-billdr #app :is(.conv-row-time, .conv-row-meta) { color: var(--ds-faint); font-size: var(--ds-fs-xs); }
body.skin-billdr #app .conv-row-snip { font-size: var(--ds-fs-sm); color: var(--ds-muted); }
body.skin-billdr #app .conv-row:has(.conv-unread) .conv-row-snip { color: var(--ds-ink); }
body.skin-billdr #app .conv-pane-thread { padding: 20px 24px; }
body.skin-billdr #app .conv-thread-head { border-bottom-color: var(--ds-line); padding-bottom: 14px; }
body.skin-billdr #app .conv-thread-titlerow h2 { font-size: var(--ds-fs-xl); font-weight: 700; color: var(--ds-navy); }
body.skin-billdr #app #conv-meta { font-size: var(--ds-fs-sm); color: var(--ds-muted); }
/* Head actions: View project = Billdr's outlined secondary (gold);
 * People ＋ = small neutral square; ⋮ = the gold row-edge ellipsis. */
body.skin-billdr #app #conv-view-project { background: var(--ds-card); color: var(--ds-gold-ink); border: 1px solid var(--ds-gold); font-weight: 600; }
body.skin-billdr #app #conv-view-project:hover { background: var(--ds-gold-tint); color: var(--ds-gold-ink-hover); }
body.skin-billdr #app #conv-head-people-btn { width: var(--ds-ctl-sm); padding: 0; }
body.skin-billdr #app #conv-head-menu-btn { width: var(--ds-ctl-sm); padding: 0; border-color: transparent; background: transparent; color: var(--ds-gold-ink); }
body.skin-billdr #app #conv-head-menu-btn:hover { background: var(--ds-bg); border-color: var(--ds-line); }

/* -- list-row ⋮ (gold, rule 5); the pin stays navy (owner's call) -- */
body.skin-billdr :is(#app, .chat-dock) .conv-row-menubtn { color: var(--ds-gold-ink); }
body.skin-billdr :is(#app, .chat-dock) .conv-row-menubtn:hover { background: var(--ds-bg); color: var(--ds-gold-ink-hover); }
body.skin-billdr :is(#app, .chat-dock) :is(.conv-row-menubtn, .conv-pin):focus-visible { box-shadow: var(--ds-focus); }

/* -- menus: the shared fx-menu shape -- */
body.skin-billdr .chat-menu { border-color: var(--ds-line); border-radius: var(--ds-r-ctl); box-shadow: var(--ds-shadow-pop); padding: 4px; }
body.skin-billdr .chat-menu-item { font-size: var(--ds-fs-sm); padding: 9px 10px; border-radius: 6px; color: var(--ds-ink); }
body.skin-billdr .chat-menu-item:hover { background: var(--ds-bg); }
body.skin-billdr .chat-menu-item:focus-visible { box-shadow: var(--ds-focus); }
body.skin-billdr .chat-menu-item.danger { color: var(--ds-danger); }

/* -- People / add panel and the New-conversation picker -- */
body.skin-billdr .chat-add-panel { border-color: var(--ds-line); border-radius: var(--ds-r); padding: 14px 16px; }
body.skin-billdr .chat-add-title { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; color: var(--ds-muted); }
body.skin-billdr .chat-add-note { font-size: var(--ds-fs-sm); color: var(--ds-ink); }
body.skin-billdr .chat-add-foot { border-top-color: var(--ds-line); }
body.skin-billdr .chat-add-del { color: var(--ds-danger); font-size: var(--ds-fs-sm); }
body.skin-billdr .chat-add-del:hover { background: var(--ds-bad-bg); }
body.skin-billdr .chat-person-row { min-height: 44px; border-bottom: 1px solid var(--ds-hair); }
body.skin-billdr .chat-person-row:last-child { border-bottom: 0; }
body.skin-billdr .conv-picker-row.is-inline input[type="checkbox"] { border-color: var(--ds-line-strong); }
body.skin-billdr .conv-picker-row.is-inline input[type="checkbox"]:checked { border-color: var(--ds-gold-strong); background-color: var(--ds-gold-strong); }
body.skin-billdr .conv-picker-row.is-inline input[type="checkbox"]:focus-visible { box-shadow: var(--ds-focus); }
body.skin-billdr .conv-picker-select { min-height: var(--ds-ctl); padding: 0 34px 0 12px; border-color: var(--ds-line); border-radius: var(--ds-r-ctl); font-size: var(--ds-fs-sm); }
body.skin-billdr .conv-picker-select:focus { border-color: var(--ds-gold); box-shadow: var(--ds-focus); }

/* -- the composer bar frame (its inner shape is the owner's; only the
 *    frame, focus ring and icon-button hovers take the tokens) -- */
body.skin-billdr .chat-composer .chat-cerr { color: var(--ds-danger); }
body.skin-billdr .chat-bar-main,
body.skin-billdr .chat-rec { border-color: var(--ds-line); background: var(--ds-card); }
body.skin-billdr .chat-bar-main:focus-within { border-color: var(--ds-gold); box-shadow: var(--ds-focus); }
body.skin-billdr .chat-bar-btn:hover,
body.skin-billdr .emoji-btn:hover { background: var(--ds-bg); color: var(--ds-navy); }
body.skin-billdr :is(.chat-bar-btn, .emoji-btn):focus-visible { box-shadow: var(--ds-focus); }
body.skin-billdr .chat-composer .chat-send { min-height: 34px; padding: 0 16px; border-radius: var(--ds-r-pill); }
body.skin-billdr :is(.chat-banner, .chat-pend) { border-color: var(--ds-line); }
body.skin-billdr .chat-banner { background: var(--ds-tint); }
body.skin-billdr #app .chat-slot .c-composer-slot,
body.skin-billdr .chat-dock .chat-slot .c-composer-slot { border-top-color: var(--ds-line); }
body.skin-billdr :is(#app, .chat-dock) .chat-internal-tag { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--ds-muted); }

/* -- the dock: Billdr's floating accent chat button (gold in indigo's
 *    seat), label kept visible — it is the button's name — and the
 *    count as a navy badge on the gold -- */
body.skin-billdr .dock-tab {
  min-height: 52px; padding: 0 20px 0 18px; gap: 10px; border: 0; border-radius: var(--ds-r-pill);
  background: var(--ds-gold); color: var(--ds-on-gold); font-size: var(--ds-fs); font-weight: 700;
  box-shadow: 0 10px 24px -8px rgba(11, 34, 53, .45);
}
body.skin-billdr .dock-tab:hover { background: var(--ds-gold-hover); }
body.skin-billdr .dock-tab:focus-visible { outline: none; box-shadow: var(--ds-focus), 0 10px 24px -8px rgba(11, 34, 53, .45); }
body.skin-billdr .dock-tab[aria-expanded="true"] { background: var(--ds-gold-hover); }
body.skin-billdr .dock-tab .ico { width: 20px; height: 20px; }
body.skin-billdr .dock-count { background: var(--ds-navy); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; }
/* The panel: a white 14px card, hairline head. */
body.skin-billdr .dock-panel { background: var(--ds-card); border-color: var(--ds-line); border-radius: 14px; box-shadow: 0 24px 48px -16px rgba(11, 34, 53, .4); }
body.skin-billdr .dock-head { background: var(--ds-card); border-bottom-color: var(--ds-line); padding: 12px 12px 12px 16px; min-height: 60px; }
body.skin-billdr .dock-head-title { font-size: var(--ds-fs-md); font-weight: 700; color: var(--ds-navy); }
body.skin-billdr .dock-sub { color: var(--ds-muted); }
body.skin-billdr :is(.dock-x, .dock-back) { color: var(--ds-muted); border-radius: var(--ds-r-sm); }
body.skin-billdr :is(.dock-x, .dock-back):hover { background: var(--ds-bg); color: var(--ds-navy); }
body.skin-billdr :is(.dock-x, .dock-back):focus-visible { box-shadow: var(--ds-focus); }
body.skin-billdr #dock-head-menu-btn { color: var(--ds-gold-ink); }
/* ＋ New sits outside #app, so the shared button layer never reached
 * it: it takes the small gold primary here. */
body.skin-billdr .chat-dock #dock-new.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-height: var(--ds-ctl-sm); padding: 0 12px; border: 0; border-radius: var(--ds-r-sm); box-shadow: none;
  background: var(--ds-gold); color: var(--ds-on-gold); font: inherit; font-size: var(--ds-fs-sm); font-weight: 600; white-space: nowrap; cursor: pointer;
}
body.skin-billdr .chat-dock #dock-new.btn:hover { background: var(--ds-gold-hover); }
body.skin-billdr .chat-dock #dock-new.btn:focus-visible { outline: none; box-shadow: var(--ds-focus); }
/* The dock's rows: the page rows' tokens (they sit outside #app). */
body.skin-billdr .chat-dock .dock-rows { padding: 8px; }
body.skin-billdr .chat-dock .conv-row { border-radius: var(--ds-r-sm); padding: 12px 10px; }
body.skin-billdr .chat-dock .conv-row:hover { background: var(--ds-tint); }
body.skin-billdr .chat-dock .conv-row.active { background: var(--ds-nav-active); }
body.skin-billdr .chat-dock .conv-row-name { font-size: var(--ds-fs); font-weight: 700; color: var(--ds-navy); }
body.skin-billdr .chat-dock :is(.conv-row-time, .conv-row-meta) { color: var(--ds-faint); font-size: var(--ds-fs-xs); }
body.skin-billdr .chat-dock .conv-row-snip { font-size: var(--ds-fs-sm); }
body.skin-billdr .chat-dock :is(.dock-empty, .empty) { color: var(--ds-muted); font-size: var(--ds-fs-sm); text-align: left; }
/* Same chrome for the dock's own buttons that ride .btn (People panel). */
body.skin-billdr .chat-dock .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--ds-ctl-sm); padding: 0 12px;
  border-radius: var(--ds-r-sm); font: inherit; font-size: var(--ds-fs-sm); font-weight: 600; cursor: pointer;
}
body.skin-billdr .chat-dock .btn-primary { background: var(--ds-gold); color: var(--ds-on-gold); border: 0; box-shadow: none; }
body.skin-billdr .chat-dock .btn-primary:hover:not(:disabled) { background: var(--ds-gold-hover); }
body.skin-billdr .chat-dock .btn-primary:disabled { background: var(--ds-neutral-bg); color: var(--ds-faint); opacity: 1; }
body.skin-billdr .chat-dock .btn-ghost { background: var(--ds-card); color: var(--ds-ink); border: 1px solid var(--ds-line-strong); font-weight: 500; }
body.skin-billdr .chat-dock .btn-ghost:hover:not(:disabled) { background: var(--ds-tint); }

/* -- the Assistant drawer's frame: a white panel, hairline head, navy
 *    title (was the navy gradient + gold rule of the Navy look) -- */
body.skin-billdr .asst-drawer { background: var(--ds-card); border-left-color: var(--ds-line); box-shadow: -18px 0 40px -24px rgba(11, 34, 53, .35); }
body.skin-billdr .asst-head { background: var(--ds-card); color: var(--ds-ink); border-bottom: 1px solid var(--ds-line); padding: 18px 16px 14px 20px; }
body.skin-billdr .asst-title { color: var(--ds-navy); font-size: var(--ds-fs-lg); letter-spacing: 0; display: flex; align-items: center; gap: 8px; }
body.skin-billdr .asst-title .ico { color: var(--ds-gold-strong); }
body.skin-billdr .asst-sub { color: var(--ds-muted); font-size: var(--ds-fs-xs); margin-top: 4px; }
body.skin-billdr .asst-x { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--ds-r-sm); color: var(--ds-muted); padding: 0; }
body.skin-billdr .asst-x:hover { background: var(--ds-bg); color: var(--ds-navy); }
body.skin-billdr .asst-x:focus-visible { outline: none; box-shadow: var(--ds-focus); }
body.skin-billdr .asst-messages { background: var(--ds-bg); }
body.skin-billdr .asst-sources { background: var(--ds-bg); }
body.skin-billdr .asst-sources-toggle { font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--ds-muted); }
body.skin-billdr .asst-sources-toggle:hover { color: var(--ds-navy); }
body.skin-billdr .asst-chip { background: var(--ds-neutral-bg); border: 0; color: var(--ds-ink); font-weight: 500; }
body.skin-billdr .asst-form { background: var(--ds-card); border-top-color: var(--ds-line); padding: 14px 16px 8px; }
body.skin-billdr :is(.asst-note, .asst-status, .asst-rec-note) { color: var(--ds-muted); }

@media (max-width: 900px) {
  body.skin-billdr #app .conv-layout.show-thread .btn.conv-back { display: inline-flex; margin-bottom: 12px; }
  body.skin-billdr #app .conv-pane-thread { padding: 16px; }
}
/* The shared input layer gave the bar's field a frame of its own (a
 * box inside the rounded bar); the field goes back to frameless. */
body.skin-billdr :is(#app, .chat-dock) .chat-composer .chat-bar-field textarea,
body.skin-billdr :is(#app, .chat-dock) .chat-composer .chat-bar-field textarea:focus { border: 0; border-radius: 0; background: transparent; box-shadow: none; min-height: 0; }

/* ======================= DW2 P12 · Chat + global chrome (2026-10-18) =======================
 * Structure first (plain selectors — the Navy appearance gets it too),
 * then the light skin's look under body.skin-billdr. Covers: the list's
 * All / Unread pills, the hidden-threads foot, the in-thread search
 * bar, the ＋ New picker's three modes (page + dock), the notice
 * dialog, and — chrome block at the end — the user box's account
 * menu button. integrations.css is another builder's; chrome CSS
 * lives here by the P12 package's terms. */

/* -- All / Unread pills (CompanyCam's list shape) -- */
.conv-filter { display: flex; gap: 6px; margin-top: 10px; }
.conv-filter-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font: inherit; font-weight: 600; cursor: pointer; }
.conv-filter-n { font-size: 11.5px; font-weight: 700; opacity: .85; }
.conv-filter-pill:focus-visible { outline: none; }

/* -- hidden project threads, at the list's foot -- */
.conv-hidden-foot { padding: 10px 10px 4px; border-top: 1px solid var(--line); margin-top: 6px; }
.conv-hidden-foot .linkbtn { font-size: 13px; }
.conv-hidden-rows .conv-row { opacity: .72; }
.conv-hidden-rows .conv-row:hover { opacity: 1; }

/* -- search inside a thread -- */
.chat-find { display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin: 0 0 8px; border: 1px solid var(--line); background: var(--card, #fff); }
.chat-find.hidden { display: none; }
.chat-find > .ico { flex: none; color: var(--muted); }
.chat-find-input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; font: inherit; font-size: 14px; padding: 4px 0 !important; min-height: 0 !important; color: var(--ink); }
.chat-find-input:focus { outline: none; }
.chat-find-n { flex: none; font-size: 12px; color: var(--muted); white-space: nowrap; }
.dock-thread-slot .chat-find { margin: 8px 10px 4px; }

/* -- the ＋ New picker's modes (page + dock share the builder) -- */
.conv-picker-modes { display: flex; width: 100%; margin-bottom: 10px; }
.conv-picker-modes .seg-btn { flex: 1; justify-content: center; white-space: nowrap; }
.conv-picker-label { display: block; margin: 8px 0 4px; font-weight: 600; }
.conv-picker .conv-picker-input { margin-bottom: 4px; }
.conv-picker .chat-add-list { max-height: 200px; }
.conv-picker .chat-add-error { margin: 8px 0 0; font-size: 13px; }
.dock-picker { margin: 8px 10px 0; max-height: 360px; overflow-y: auto; }

/* The picker's own fields: the shared ".conv-picker input" rule
 * (a full-width search field with a magnifier) is for its search
 * box — the tick boxes and the group name take their own shape. */
.conv-picker .conv-picker-row.is-inline input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; border-radius: 5px; border: 1.5px solid #cbd2da; background: #fff; }
.conv-picker .conv-picker-row.is-inline input[type="checkbox"]:checked { border-color: var(--navy); background: var(--navy) no-repeat center / 14px 14px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.6l5 5L19.5 6.6'/%3E%3C/svg%3E"); }
body.skin-billdr #app .conv-picker .conv-picker-row.is-inline input[type="checkbox"],
body.skin-billdr .chat-dock .conv-picker .conv-picker-row.is-inline input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; padding: 0; border-radius: 5px; border: 1.5px solid var(--ds-line-strong); background: #fff; }
body.skin-billdr #app .conv-picker .conv-picker-row.is-inline input[type="checkbox"]:checked,
body.skin-billdr .chat-dock .conv-picker .conv-picker-row.is-inline input[type="checkbox"]:checked { border-color: var(--ds-gold-strong); background: var(--ds-gold-strong) no-repeat center / 14px 14px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.6l5 5L19.5 6.6'/%3E%3C/svg%3E"); }
body.skin-billdr #app .conv-picker input.conv-picker-input,
body.skin-billdr .chat-dock .conv-picker input.conv-picker-input { padding: 0 12px; background-image: none; }

/* -- a notice (an honest failure, in place of an alert) -- */
.chat-notice .rk-confirm-body { white-space: pre-line; }

body.skin-billdr .conv-filter-pill { border-color: var(--ds-line); color: var(--ds-muted); font-size: var(--ds-fs-sm); }
body.skin-billdr .conv-filter-pill:hover { background: var(--ds-tint); color: var(--ds-navy); }
body.skin-billdr .conv-filter-pill.active { background: var(--ds-nav-active); border-color: var(--ds-nav-active); color: var(--ds-navy); }
body.skin-billdr .conv-filter-pill:focus-visible { box-shadow: var(--ds-focus); }
body.skin-billdr .conv-hidden-foot { border-top-color: var(--ds-hair); }
body.skin-billdr .conv-hidden-foot .linkbtn { color: var(--ds-gold-ink); }
body.skin-billdr .chat-find { border-color: var(--ds-line); border-radius: var(--ds-r-ctl); }
body.skin-billdr .chat-find:focus-within { border-color: var(--ds-gold); box-shadow: var(--ds-focus); }
body.skin-billdr :is(.chat-find > .ico, .chat-find-n) { color: var(--ds-muted); }
body.skin-billdr .conv-picker { border-color: var(--ds-line); border-radius: var(--ds-r); padding: 12px; }
body.skin-billdr .conv-picker-label { color: var(--ds-muted); font-size: var(--ds-fs-xs); }
body.skin-billdr .conv-picker .conv-picker-input { min-height: var(--ds-ctl); border-color: var(--ds-line); border-radius: var(--ds-r-ctl); font-size: var(--ds-fs-sm); }
body.skin-billdr .conv-picker .conv-picker-input:focus { outline: none; border-color: var(--ds-gold); box-shadow: var(--ds-focus); }
body.skin-billdr :is(#app, .chat-dock) .conv-picker-modes { background: var(--ds-fill); }
body.skin-billdr .chat-dock .conv-picker-modes .seg-btn { font-size: var(--ds-fs-xs); padding: 6px 8px; }
body.skin-billdr #app #conv-head-find-btn { width: var(--ds-ctl-sm); padding: 0; border-color: transparent; background: transparent; color: var(--ds-gold-ink); }
body.skin-billdr #app #conv-head-find-btn:hover { background: var(--ds-bg); border-color: var(--ds-line); }

/* -- CHROME: the user box's account menu (DW2 P12) --
 * #user-email rides inside a quiet button with an initials chip and
 * a caret; the menu itself is the shared fx-menu (ui-kit rkMenu),
 * opened upward from the sidebar's foot by app.js. */
.userbox-menu { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; padding: 6px 8px; border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.userbox-menu:focus-visible { outline: none; }
.userbox-menu #user-email { flex: 1; min-width: 0; }
.userbox-av { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.userbox-av:empty { display: none; }
.userbox-caret { flex: none; opacity: .7; }
.fx-menu.user-menu { min-width: 220px; }
@media (max-width: 900px) {
  .userbox-menu { width: auto; padding: 4px; }
  .userbox-caret { display: none; }
}
body.skin-billdr .userbox-menu { color: var(--ds-muted); border-radius: var(--ds-r-sm); }
body.skin-billdr .userbox-menu:hover { background: var(--ds-nav-active); color: var(--ds-navy); }
body.skin-billdr .userbox-menu:focus-visible { box-shadow: var(--ds-focus); }
body.skin-billdr .userbox-av { background: var(--ds-gold-tint); color: var(--ds-gold-ink); }
/* ======================= /DW2 P12 ======================= */

/* DW3 C-9 (B3): muted mark + "marked unread" dot on a conversation row */
.conv-muted { flex: none; display: inline-flex; align-items: center; color: #9aa7b5; margin-top: 3px; position: relative; }
.conv-muted::after { content: ""; position: absolute; left: -1px; right: -1px; top: 50%; height: 1.5px; background: currentColor; transform: rotate(-45deg); }
.conv-unread.is-muted { background: #c3ccd6; }
.conv-unread.conv-unread-dot { width: 10px; height: 10px; min-width: 0; padding: 0; border-radius: 50%; margin-top: 5px; font-size: 0; }

/* ---------- Assistant preset questions (wave50-presets, 2026-10-21) ----------
 * The phone app's five starting questions as a tappable row above
 * the drawer's bar (assistant-ui.js builds it; the drawer's bar
 * language lives in this file, so the row's does too). Real buttons:
 * bordered pills you can see and tap, never bare text. While an
 * answer is in flight the row dims and every pill disables. */
.asst-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.asst-preset {
  font: inherit; font-size: 13px; line-height: 1.3; cursor: pointer;
  padding: 7px 12px; border-radius: 999px;
  background: #fff; color: var(--navy); border: 1px solid var(--line);
}
.asst-preset:hover { border-color: var(--gold); }
.asst-preset:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.asst-presets.asst-presets-busy { opacity: .55; }
.asst-preset:disabled { cursor: default; }
body.skin-billdr .asst-preset { background: var(--ds-card); border-color: var(--ds-line); }

/* wave244 (2026-10-29, audit walk): on the quote editor and the
 * invoice record/editor, the gold Messages pill at bottom-right rode
 * over the table's Total column and the invoice's pricing / Payment
 * options side. On those two surfaces the dock parks at the
 * bottom-LEFT instead (the panel opens above it, left-aligned), and
 * the surfaces carry bottom clearance (quotes.css #qe-cats,
 * invoices.css #inv-rec-body) so their last rows and blocks can
 * always be scrolled clear of it. The named right-side areas are
 * never under the pill. These rules come last on purpose: they
 * supersede the totalbar lift and the small-screen offsets above
 * for these two surfaces. */
body:has(.quote-totalbar) .chat-dock,
body:has(.inv-rec-head) .chat-dock { left: 18px; right: auto; bottom: 18px; align-items: flex-start; }
@media (max-width: 760px) {
  body:has(.inv-rec-head) .chat-dock { left: 12px; bottom: 12px; }
  /* narrow screens: the quote total bar spans the full width, so the
   * pill lifts above its (empty) left end rather than sit on the bar */
  body:has(.quote-totalbar) .chat-dock { left: 12px; bottom: 76px; }
}

/* wave355: the Conversations list grouped by job (trade-rooms.js moves chat.js's
 * own rows into these sections — jobs lead, the company-wide threads below) */
#conv-rows .conv-sect { margin: 0 0 6px; }
#conv-rows .conv-sect + .conv-sect { border-top: 1px solid var(--ds-line, var(--line, #dde3ea)); padding-top: 4px; }
#conv-rows .conv-sect-head { display: flex; align-items: baseline; gap: 8px; padding: 8px 10px 4px; }
#conv-rows .conv-sect-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ds-navy, var(--navy, #1d2b4a)); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#conv-rows .conv-sect-sub { font-size: 12px; color: var(--ds-muted, var(--muted, #5b6472)); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#conv-rows .conv-sect-n { margin-left: auto; flex: none; font-size: 11px; font-weight: 700; color: #fff; background: var(--ds-navy, var(--navy, #1d2b4a)); border-radius: 999px; padding: 1px 7px; }
#conv-rows .conv-sect-job .conv-row { padding-left: 16px; }

/* wave543: the private-ask panel (lane composers + outside-visible
 * chat rooms) — the answer lives in this box only, never the thread. */
.chat-askp { border: 1px solid #d9d2f5; border-radius: 12px; background: #f7f5ff; padding: 8px 10px; margin-bottom: 8px; }
.chat-askp-head { display: flex; align-items: center; gap: 8px; }
.chat-askp-title { font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 5px; }
.chat-askp-note { font-size: 12px; color: var(--ds-muted, var(--muted, #5b6472)); flex: 1; min-width: 0; }
.chat-askp-body { margin-top: 8px; font-size: 13px; }
.chat-askp-q { font-weight: 600; margin: 0 0 4px; }
.chat-askp-a { white-space: pre-wrap; }
.chat-askp-src, .chat-askp-think { font-size: 12px; color: var(--ds-muted, var(--muted, #5b6472)); margin: 6px 0 0; }
.chat-askp-err { color: #b3261e; margin: 0; }
.chat-askp-row { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.chat-askp-row textarea { flex: 1; font: inherit; border: 1px solid var(--line, #dfe3ea); border-radius: 8px; padding: 6px 8px; resize: none; background: #fff; }

/* wave589-asstcenter (2026-11-11): Callie's field sat LOW in its
 * bar — measured live: the emoji button and Send centred on the
 * bar's centre, the field's text line ~11–12px low in the drawer
 * (45px bar) and ~14.5px low in the full-width Conversations
 * mount (51px bar). The field is the portal's only composer field
 * born as an <input> and swapped to a <textarea> at init
 * (assistant-ui.js), so the dress the chat fields get from the
 * shared rule above never fully landed on it in either mount —
 * the drawer lives outside #app, beyond the skin reset's reach,
 * and inside #app the generic box treatment still showed through
 * (a border of its own, and a ↕ resize grip at the field's right
 * end in the owner's screenshot). The bar is bottom-anchored
 * (align-items: flex-end), so every extra pixel of field box
 * pushes the text line down. Fix: give the assistant's field the
 * chat field's exact dress (chat.css's .chat-composer rule),
 * scoped to #asst-bar — the ID in the selector outranks both the
 * generic .composer box rule and the shared chat rule, and the
 * selector needs no #app, so it dresses BOTH mounts alike. The
 * shared chat rules are untouched. */
#asst-bar .chat-bar-field textarea { border: 0; border-radius: 0; background: transparent; resize: none; padding: 7px 4px; line-height: 1.45; }
#asst-bar .chat-bar-field textarea:focus { outline: none; border-color: transparent; }

/* wave589b-asstcenter2 (2026-11-11): wave589 put the field's own
 * dress right (grip gone; in the drawer the text then sat within
 * ~1–2.5px of the controls), but the full-width mount
 * (Conversations → AI Assistant, inside #app) still rode low:
 * live re-measurement put the text and the emoji together ~4–5px
 * under the bar's centre while Send sat ON it (−0.5px). The cause
 * is the bar's own anchor: .chat-bar-main is align-items:
 * flex-end, so every child bottom-aligns on its margin box — the
 * emoji lifted by its margin-bottom: 3px, the icon buttons and
 * Send by 1px — and in #app Send itself stands taller (39px
 * measured) than in the drawer (33px): design-system.css's
 * body.skin-billdr #app .btn sets min-height: var(--ds-ctl)
 * (40px), and its ID outranks chat.css's own skin rule for
 * .chat-send (min-height: 34px); in the drawer, that design
 * system's .asst-drawer twin only ties the chat rule and loses on
 * load order, so the drawer keeps the 34px dress. Bottom-anchored
 * against the taller Send, the field+emoji line rode low by the
 * height difference. Fix, scoped to #asst-bar so the shared chat
 * bars keep their bottom anchor: centre the bar and zero the
 * children's bottom margins, so in the single-line state each
 * child's own centre IS the bar's centre and no mount's Send
 * height can pull the line off it. This is the email composer's
 * in-house shape (emails.css: body.skin-billdr #app #view-emails
 * #em-composer-slot .chat-bar-main { align-items: center } with
 * its :is(.emoji-btn, .chat-bar-btn) { margin-bottom: 0 }). One
 * deliberate difference from chat: when the field grows
 * multi-line, Callie's controls stay centred against the grown
 * field rather than bottom-anchored. The alignment is set by
 * #asst-bar at ID specificity, above .chat-bar-main's base rule,
 * and the margins outrank the shared .chat-composer child rules,
 * so both mounts centre from these same rules — the drawer needs
 * no #app, and inside #app the skin reset adds only properties
 * these rules don't set. Send's height itself is NOT touched. */
#asst-bar { align-items: center; }
#asst-bar .emoji-btn { margin-bottom: 0; }
#asst-bar .chat-bar-btn { margin-bottom: 0; }
#asst-bar .chat-send { margin-bottom: 0; }
