/* Member chat (Chat tab). Matches the member portal's dark palette. */
/* The chat replaces the coming-soon card: drop its padding, border and spacing. */
.member-portal .chat-panel { padding:0; border:0; background:none; margin-top:-16px; }
.chat-panel { position:relative; display:grid; gap:12px;
  -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; }
.chat-panel.chat-blurred > * { filter:blur(14px); }
.chat-panel button { font:inherit; color:inherit; background:none; border:0; padding:0; margin:0; cursor:pointer; text-align:left; }
.chat-panel img { -webkit-user-drag:none; user-select:none; pointer-events:none; }
.chat-status { padding:40px 20px; text-align:center; color:#bdc5d0; }
.chat-status .secondary-button { margin-top:12px; }

.chat-bar { display:flex; align-items:center; gap:10px; padding:9px 12px 9px; border-bottom:1px solid #262c35; }
.chat-bar-title { flex:1; min-width:0; display:flex; flex-direction:column; }
.chat-bar-title > span:first-child,.chat-bar-link { font-weight:700; font-size:18px; color:#f1f3f5; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-panel .chat-bar-sub { font-size:14px; color:#9aa6b6; }
.chat-panel .chat-back { font-size:27px; line-height:1; color:#d97757; padding:0 6px 0 0; }
.chat-panel .chat-icon-button { min-width:32px; min-height:32px; display:grid; place-items:center; font-size:19.5px; color:#d97757; border-radius:8px; text-align:center; }
.chat-section-label { margin:14px 14px 4px; font-size:13px; letter-spacing:1.6px; text-transform:uppercase; color:#8f9bab; font-weight:700; }
/* In "Sections", each header folds its section away (member-chat.js listSection): a full-width button with a
   chevron at the right that points down while open and turns to the right when folded; the rows slide shut. */
.chat-panel .chat-section-toggle { display:flex; align-items:center; gap:6px; width:calc(100% - 28px); min-height:0; height:auto; margin:14px 14px 4px; padding:4px 0; border:0; border-radius:0; background:none; box-shadow:none; font-family:inherit; font-size:13px; letter-spacing:1.6px; text-transform:uppercase; color:#8f9bab; font-weight:700; text-align:left; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.chat-section-chevron { margin-left:auto; font-size:23.5px; line-height:1; letter-spacing:0; color:#8f9bab; transform:rotate(90deg); transition:transform .3s ease; }
.chat-section-toggle.is-collapsed .chat-section-chevron { transform:rotate(0deg); }
.chat-section-body { display:grid; grid-template-rows:1fr; transition:grid-template-rows .3s ease; }
.chat-section-body.is-collapsed { grid-template-rows:0fr; }
.chat-section-inner { min-height:0; overflow:hidden; }
@media (prefers-reduced-motion:reduce) { .chat-section-chevron, .chat-section-body { transition:none; } }
.chat-empty,.chat-loading { padding:12px 16px; font-size:15px; color:#9aa6b6; text-align:center; }
.chat-error { padding:0 16px; font-size:15px; color:#ff9aa0; }
.chat-error:empty { display:none; }

.chat-avatar { flex:0 0 48px; width:48px; height:48px; border-radius:50%; overflow:hidden; display:grid; place-items:center; background:#2b3a4f; color:#f5e6df; font-weight:700; font-size:15px; }
/* Block, not a grid item: Safari sizes a grid item's height:100% from the photo itself, so portrait photos spilled out of the circle. */
.chat-avatar:has(> img) { display:block; }
.chat-avatar img { display:block; width:100%; height:100%; aspect-ratio:1; object-fit:cover; }
.chat-avatar-small { flex-basis:34px; width:34px; height:34px; font-size:12px; }
/* Bigger photos in the chat list and beside group chat messages. */
.chat-panel .chat-item .chat-avatar { flex-basis:66px; width:66px; height:66px; font-size:18px; }
.chat-row .chat-avatar-small { flex-basis:42px; width:42px; height:42px; font-size:14px; }
.chat-avatar-org { background:linear-gradient(135deg,#8a4a33,#2e1d16); font-size:14px; }
.chat-avatar-hidden { background:#252b33; }
/* Photos and group logos get a soft light ring, a dark gap inside it and a soft shadow, so every
   photo reads the same against the dark background. Members' photos also get a slight color lift
   (display only; the stored photo is untouched). No ring without a photo or for anonymous members. */
.chat-avatar:has(> img) { padding:1.5px; border:0; background:linear-gradient(140deg,rgba(255,255,255,.55),rgba(255,255,255,.12)); box-shadow:0 3px 10px rgba(0,0,0,.4); }
.chat-avatar:has(> img) img { border-radius:50%; border:2px solid #0d1014; box-sizing:border-box; }
.chat-avatar:not(.chat-avatar-logo):not(.chat-avatar-hidden) img { filter:contrast(1.06) saturate(1.12) brightness(1.02); }
.chat-avatar-logo:has(> img) img { padding:2px; background:#0d1014; }
/* A Hush group's emoji (Jay, October 17, 2026): large on black inside the same ring as a photo, the ring a faint coral
   gradient; every Hush-side photo ring is coral too (the Hush tab's chat list, an open Hush chat). */
.chat-avatar.chat-avatar-emoji { display:block; padding:1.5px; container-type:size; background:linear-gradient(140deg,rgba(255,154,128,.62),rgba(255,154,128,.14)); box-shadow:0 3px 10px rgba(0,0,0,.4); }
.chat-avatar-emoji-face { display:grid; place-items:center; width:100%; height:100%; box-sizing:border-box; border-radius:50%; border:2px solid #0d1014; background:#000; font-size:52cqw; line-height:1; font-weight:400; }
:is(.hush-chats, .chat-conversation.is-grid, .grid-chat-list) .chat-avatar:has(> img) { background:linear-gradient(140deg,rgba(255,154,128,.62),rgba(255,154,128,.14)); }
/* iPhone Safari never painted filtered photos that started below the fold of a scrolling sheet (the
   reactions list showed empty circles until tapped); their own layer makes it paint them. */
.chat-sheet .chat-avatar img { transform:translateZ(0); -webkit-backface-visibility:hidden; backface-visibility:hidden; }
/* People's photos are rounded squares in the chat list, a 1:1 chat's header and next to group chat
   messages; group chats' logos and initials stay round. */
:is(.chat-panel .chat-item, .chat-group-logo, .chat-row) .chat-avatar:not(.chat-avatar-org):not(.chat-avatar-logo) { border-radius:22%; }
:is(.chat-panel .chat-item, .chat-group-logo, .chat-row) .chat-avatar:not(.chat-avatar-org):not(.chat-avatar-logo) img { border-radius:20%; }
.chat-row .chat-avatar-button { border-radius:22%; }
/* Group logos (Jay, October 19, 2026): a square crest, a metallic rim in the side's color, blue on the Social side and
   clay on the Hush side, with a people chip at the bottom right, so a group never reads as a 1:1 chat's square photo. */
.chat-avatar.chat-avatar-crest { position:relative; overflow:visible; display:block; padding:3px; box-sizing:border-box; border:0; border-radius:20%; container-type:size; background:linear-gradient(145deg,#e4eefb,#d97757 40%,#2f4d7a); box-shadow:0 4px 12px rgba(0,0,0,.55),0 0 14px rgba(217,119,87,.28); }
.chat-avatar.chat-avatar-crest.is-hush { background:linear-gradient(145deg,#fbd8c9,#D97757 40%,#7a3520); box-shadow:0 4px 12px rgba(0,0,0,.55),0 0 14px rgba(217,119,87,.3); }
.chat-avatar-crest-face { display:grid; place-items:center; width:100%; height:100%; box-sizing:border-box; overflow:hidden; border-radius:14%; border:1.5px solid #0d1014; background:linear-gradient(135deg,#8a4a33,#2e1d16); color:#f5e6df; font-weight:700; font-size:30cqw; line-height:1; }
.chat-avatar-crest.is-hush .chat-avatar-crest-face { background:#000; color:#f3c4b2; }
.chat-avatar-crest.chat-avatar-logo .chat-avatar-crest-face { background:#0d1014; }
.chat-avatar-crest .chat-avatar-crest-face img { display:block; width:100%; height:100%; border-radius:0; }
.chat-avatar-crest .chat-avatar-crest-face.chat-avatar-emoji-face { border-radius:14%; border-width:1.5px; font-size:52cqw; font-weight:400; }
/* An emoji logo (Jay, October 20, 2026): a soft light falls on it from the upper left, over the emoji and its black tile. */
.chat-avatar-emoji-face, .chat-avatar-crest-face.has-emoji-light { position:relative; }
/* A built group's emoji logo drawn as an SVG image (member-chat.js) gets the same light. */
.chat-avatar-emoji-face::after, .chat-avatar-crest-face.has-emoji-light::after { content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none; background:radial-gradient(circle at 18% 14%,rgba(255,255,255,.34),rgba(255,255,255,.12) 32%,rgba(255,255,255,0) 62%); }
.chat-avatar-chip { position:absolute; right:-7%; bottom:-7%; width:36%; height:36%; min-width:16px; min-height:16px; box-sizing:border-box; display:grid; place-items:center; border-radius:30%; border:2px solid #0d1014; background:#5f86bd; color:#fff; }
.chat-avatar-crest.is-hush .chat-avatar-chip { background:#D97757; }
.chat-avatar-chip svg { width:64%; height:64%; }
.chat-hidden-name { color:#a3adbb; font-style:italic; }

.chat-panel .chat-item { position:relative; display:flex; align-items:center; gap:12px; width:100%; padding:8px 14px; border-bottom:0; }
/* The line under a row starts at the name, not under the photo (like iMessage and Telegram): 14px padding + 66px photo + 12px gap. */
.chat-panel .chat-item::after { content:''; position:absolute; left:92px; right:0; bottom:0; height:1px; background:#1f252d; pointer-events:none; }
.chat-panel .chat-item:hover { background:#161c24; }
.chat-item-middle { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
/* The first time the chat list shows: each row's photo pops in with a small bounce, then the rest of
   the row fades in, one row after another from the top (delays set in member-chat.js). */
.chat-list-view.is-popping .chat-item > * { animation:chat-item-fade .4s ease-out both; }
.chat-list-view.is-popping .chat-item > :first-child { animation:chat-photo-pop .5s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes chat-photo-pop { from { opacity:0; transform:scale(.3); } to { opacity:1; transform:scale(1); } }
@keyframes chat-item-fade { from { opacity:0; transform:translateX(8px); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce) {
  .chat-list-view.is-popping .chat-item > *, .chat-list-view.is-popping .chat-item > :first-child { animation:chat-item-fade .25s ease-out both; }
}
.chat-item-top { display:flex; justify-content:space-between; gap:8px; }
.chat-item-name { font-weight:700; font-size:16px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* A group chat's name with its member count: a small pill with a people icon, after the name (the name
   still shortens with … first). */
.chat-item-head { display:flex; align-items:center; gap:7px; min-width:0; }
.chat-item-head > .chat-item-name { min-width:0; }
.chat-member-count { flex:none; display:inline-flex; align-items:center; gap:4px; height:19px; padding:0 8px 0 6px; border-radius:10px; background:rgba(217,119,87,.13); box-shadow:inset 0 0 0 1px rgba(217,119,87,.18); color:#e0957a; font-size:12.5px; font-weight:700; line-height:1; letter-spacing:.01em; font-variant-numeric:tabular-nums; }
.chat-member-count::before { content:''; width:12px; height:12px; background:currentColor; opacity:.9;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm7.5-1a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7ZM9 13c-3.9 0-7 2-7 4.5V20h14v-2.5C16 15 12.9 13 9 13Zm7.5-1c-.6 0-1.2.1-1.8.2 1.4 1 2.3 2.4 2.3 4.1V20h5v-2.4c0-2.5-2.5-4.6-5.5-4.6Z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm7.5-1a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7ZM9 13c-3.9 0-7 2-7 4.5V20h14v-2.5C16 15 12.9 13 9 13Zm7.5-1c-.6 0-1.2.1-1.8.2 1.4 1 2.3 2.4 2.3 4.1V20h5v-2.4c0-2.5-2.5-4.6-5.5-4.6Z'/%3E%3C/svg%3E") center/contain no-repeat; }
.chat-item-time { font-size:13px; color:#8f9bab; white-space:nowrap; }
.chat-item-last { font-size:15px; color:#9aa6b6; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* In the chat list, the last message shows up to two lines, except on a row that also carries the app's own
   line (Easy Exit's "Waiting on you"), which keeps it to one. */
.chat-list-view .chat-item-last { white-space:normal; overflow-wrap:anywhere; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2; }
.chat-list-view .chat-item-waiting .chat-item-last { display:block; white-space:nowrap; }
/* Easy Exit: a 1:1 chat waiting days on your reply to a question: a soft tint and a small "Waiting on you · Easy Exit"
   line (Jay, October 21, 2026: no ❗ or red bar), whose Easy Exit is a text button with a bigger invisible tap area. */
.chat-panel .chat-item-waiting { background:rgba(240,134,140,.06); box-shadow:none; }
.chat-panel .chat-item-waiting:hover { background:rgba(240,134,140,.09); }
.chat-item-waiting-line { display:block; margin-top:4px; font-size:13.5px; color:#f5a9ad; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-item-waiting-line .chat-easy-exit { position:relative; display:inline; padding:0; border:0; border-radius:0; background:none; color:#f5a9ad; font-size:13.5px; font-weight:700; text-decoration:underline; text-underline-offset:2px; }
.chat-item-waiting-line .chat-easy-exit::after { content:''; position:absolute; inset:-14px -10px; }
.chat-easy-exit { flex:0 0 auto; padding:6px 10px; border-radius:999px; border:1px solid #7a3a40; background:#3a1d20; color:#ffd5d7; font-size:14px; font-weight:700; cursor:pointer; white-space:nowrap; }
.chat-easy-exit-text { display:block; width:100%; box-sizing:border-box; min-height:96px; resize:vertical; padding:10px 12px; border-radius:12px; border:1px solid #343b46; background:#151b23; color:#f1f3f5; font:inherit; font-size:17px; }
.chat-easy-exit-hint { display:flex; justify-content:space-between; align-items:center; gap:8px; margin:6px 2px 10px; font-size:13px; color:#8f9bab; }
.chat-sheet-actions > .chat-easy-exit-another,.chat-panel .chat-sheet-actions > .chat-easy-exit-another { display:flex; flex-direction:column; align-items:center; justify-content:center; padding-top:6px; padding-bottom:6px; line-height:1.15; color:#d97757; font-size:15px; font-weight:700; }
.chat-waiting-row { display:flex; align-items:center; gap:10px; padding:9px 0; border-bottom:1px solid #2f3846; }
.chat-waiting-row:last-of-type { margin-bottom:12px; }
.chat-join-pill { flex:none; align-self:center; padding:6px 14px; border-radius:999px; background:#d97757; color:#1a0f0b; font-size:14.5px; font-weight:800; }
.chat-badge,.chat-tab-badge { min-width:20px; height:20px; padding:0 6px; border-radius:10px; background:#d97757; color:#1a0f0b; font-size:13px; font-weight:800; display:inline-grid; place-items:center; }
.chat-tab-badge { margin-left:6px; height:18px; min-width:18px; font-size:12px; }
/* A Hush chat's unread count: the amber of the Chat tab's Hush badge. */
.chat-badge-grid { background:#f0a14a; color:#1a1206; }

/* The open chat fills the screen below the tabs (height set by fitToScreen), so the message box is always visible. */
.chat-conversation { display:flex; flex-direction:column; height:min(78vh,720px); min-height:320px; }
.chat-conversation .chat-messages { min-height:0; }
/* The caution, Hush, privacy and disappearing notes: one quiet line at the top (member-chat.js noteLine; Jay, October
   21, 2026), the first that applies; a tap (or its ✕, with a 44px tap area) hides it and the next takes its place. */
.chat-notes { flex:none; margin:8px 12px 0; }
.chat-panel .chat-note-line { position:relative; display:flex; align-items:center; gap:8px; width:100%; min-height:44px; box-sizing:border-box; margin:0; padding:6px 44px 6px 12px;
  border:0; border-radius:14px; background:rgba(255,255,255,.05); color:#a7b2c1; font:inherit; font-size:13.5px; line-height:1.4; text-align:left; cursor:pointer; }
.chat-panel .chat-note-line .chat-note-text { flex:1; min-width:0; margin:0; padding:0; border:0; background:none; color:inherit; font:inherit; text-align:left; }
.chat-note-line b { color:#d7dee8; font-weight:700; }
.chat-panel .chat-note-close { position:absolute; top:0; right:0; bottom:0; display:flex; align-items:center; justify-content:center; width:44px; margin:0; padding:0; border:0; background:none; color:#8f9bab; font-size:13px; font-weight:700; line-height:1; }
.chat-messages { flex:1; overflow-y:auto; padding:10px; display:flex; flex-direction:column; gap:8px; overscroll-behavior:contain; }
/* Messages sit at the bottom, by the message box: a new chat's first bubble starts there and
   each new one pushes the earlier ones up. (margin-top:auto, not justify-content:flex-end, so a
   long chat still scrolls.)
   A group chat's first child is the open polls' zero-height sticky anchor (margin 0), so the push goes on the one after
   it (Jay, October 19, 2026: group chats' bubbles sat at the top). */
.chat-messages > :first-child:not(.chat-poll-float-anchor), .chat-messages > .chat-poll-float-anchor:first-child + * { margin-top:auto; }
.chat-loading-idle { font-size:13px; }
.chat-row { display:flex; gap:8px; align-items:flex-end; }
.chat-row-mine { justify-content:flex-end; }
.chat-bubble { max-width:78%; padding:7px 11px; border-radius:16px; background:#1d2530; font-size:16px; line-height:1.4; transition:background .3s; touch-action:manipulation; }
.chat-row-mine .chat-bubble { background:#2a3d57; }
/* Swipe a bubble either way to reply (swipe-back.js): a ↩︎ fades in on the side it leaves and pops once it's far enough. */
.chat-row.is-reply-swiping { position:relative; }
.chat-reply-cue { position:absolute; top:50%; width:30px; height:30px; margin-top:-15px; display:grid; place-items:center; border-radius:50%;
  background:rgba(255,255,255,.12); color:#e8edf5; font-size:16px; opacity:0; pointer-events:none; transition:transform .15s ease-out; }
.chat-reply-cue.is-armed { transform:scale(1.2); background:rgba(255,255,255,.22); }
.chat-highlight .chat-bubble { background:#3a5276; }
.chat-who { display:flex; justify-content:space-between; align-items:baseline; gap:10px; font-size:13.5px; font-weight:700; color:#d97757; margin-bottom:2px; }
.chat-row-mine .chat-who { color:#f5e6df; }
.chat-time { font-weight:500; font-size:12.5px; font-style:normal; color:#8f9bab; white-space:nowrap; }
/* At the end of the last line of text when it fits there, else on a line of its own, at the right. */
.chat-body { display:flow-root; }
.chat-time-inline { float:right; margin-left:10px; position:relative; top:4px; line-height:1.4; }
/* Under a photo or shared profile, or after the reactions. */
.chat-foot { display:flex; justify-content:flex-end; align-items:center; margin-top:4px; }
.chat-reactions.chat-foot { justify-content:flex-start; }
.chat-reactions .chat-time { margin-left:auto; padding-left:10px; }
.chat-admin,.chat-you { margin-left:6px; padding:1px 5px; border-radius:4px; font-size:10.5px; font-weight:800; font-style:normal; color:#0d1014; background:#74d99b; vertical-align:1px; }
.chat-you { background:#d97757; }
.chat-body { white-space:pre-wrap; overflow-wrap:anywhere; }
.chat-link { color:#8ec9ff; text-decoration:underline; }
.chat-deleted { font-style:italic; color:#8f9bab; }
/* Editing and disappearing messages (migration 244). */
.chat-edited, .chat-timer { opacity:.85; }
.chat-disappear-warning { color:#ffd60a; }
.chat-sheet .chat-menu-on { font-weight:800; }
.chat-sheet .chat-edit-input { width:100%; box-sizing:border-box; min-height:96px; resize:vertical; margin:6px 0; }
.chat-panel .chat-quote { display:block; width:100%; margin-bottom:5px; padding:4px 8px; border-left:3px solid #d97757; border-radius:4px; background:rgba(255,255,255,.05); font-size:14px; color:#a7b0bd; }
.chat-quote b { display:block; color:#f5e6df; font-size:13px; }
.chat-quote span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-reactions { display:flex; flex-wrap:wrap; align-items:center; gap:4px; margin-top:4px; }
.chat-panel .chat-reaction { padding:1px 7px; border-radius:999px; border:1px solid #33404f; background:#141a22; font-size:14px; font-weight:700; }
.chat-panel .chat-reaction-mine { border-color:#d97757; background:rgba(217,119,87,.15); }
.chat-pending { display:block; margin-top:3px; font-size:13px; color:#8f9bab; text-align:right; }
.chat-panel .chat-failed { color:#ff9aa0; width:100%; text-align:right; }

.chat-composer-wrap { border-top:1px solid #262c35; padding:8px 10px 12px; }
/* The composer is the chat's last thing, on the bottom edge (the groups and the 🎭 link moved to the top of the messages). */
.chat-conversation > .chat-composer-wrap:last-child { padding-bottom:calc(12px + env(safe-area-inset-bottom,0px)); }
.chat-replybar { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:6px; padding:5px 8px; border-left:3px solid #d97757; background:#161c24; border-radius:6px; font-size:14px; color:#a7b0bd; }
.chat-replybar span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-composer { display:flex; align-items:flex-end; gap:8px; }
.chat-input { flex:1; min-height:38px; max-height:140px; resize:none; padding:9px 13px; border-radius:19px; border:1px solid #343b46; background:#151b23; color:#f1f3f5; font:inherit; font-size:17px;
  -webkit-user-select:text; user-select:text; }
.chat-counter { font-size:13px; color:#ffd166; align-self:center; }
.chat-panel .chat-send { width:38px; height:38px; border-radius:50%; background:#d97757; color:#1a0f0b; font-weight:800; font-size:20.5px; text-align:center; }
/* The message box: the send button sits inside it at the bottom right, and the text grows a row at a
   time (member-chat.js grow) up to 6 rows, then scrolls inside. */
.chat-input-box { flex:1; min-width:0; display:flex; align-items:flex-end; gap:4px; padding:3px 3px 3px 0; border-radius:20px; border:1px solid #343b46; background:#151b23; }
.chat-input-box:focus-within { border-color:#d97757; }
.chat-input-box .chat-input { min-height:32px; max-height:calc(6 * 1.375em + 12px); overflow-y:auto; box-sizing:border-box; padding:6px 4px 6px 13px; border:0; border-radius:0; background:transparent; line-height:1.375; outline:none; }
/* Send and ＋ are 44px (Jay, October 21, 2026): the box is 44px tall, so Send fills its height less the box's own edge. */
.chat-input-box { min-height:44px; box-sizing:border-box; }
.chat-input-box .chat-input { min-height:36px; }
.chat-panel .chat-input-box .chat-send { flex:none; width:36px; height:36px; font-size:19px; position:relative; }
.chat-panel .chat-input-box .chat-send::after { content:''; position:absolute; inset:-4px; }
.chat-cannot-send { margin:4px 0; font-size:15px; color:#9aa6b6; text-align:center; }

.chat-overlay { position:absolute; inset:0; z-index:5; background:rgba(0,0,0,.6); display:flex; align-items:flex-end; }
/* On the app frame (a chat list's sheet, member-chat.js sheet), it covers the header and tabs too. */
main.app-frame > .chat-overlay { z-index:30; }
/* That layer is also .chat-panel (member-chat.js sheet), for the panel's sheet styles; keep it a dim layer, not a panel. */
.member-portal .chat-overlay.chat-panel, .chat-overlay.chat-panel { margin:0; padding:0; border:0; background:rgba(0,0,0,.6); display:flex; gap:0; }
.chat-sheet { width:100%; max-height:85%; overflow-y:auto; margin:10px; padding:14px; border-radius:18px; background:#171d26; border:1px solid #2f3846; }
.chat-sheet h4 { margin:0 0 8px; font-size:17px; }
.chat-sheet p { margin:0 0 10px; font-size:15px; color:#a7b0bd; }
.chat-sheet-preview { margin-bottom:10px; padding:8px 10px; border-radius:12px; background:#1d2530; font-size:15px; }
.chat-sheet-preview b { display:block; font-size:13px; color:#d97757; }
.chat-emoji-bar { display:flex; justify-content:space-between; gap:4px; padding:6px 8px; margin-bottom:10px; border-radius:999px; background:#10141a; border:1px solid #2f3846; }
.chat-panel .chat-emoji { font-size:24.5px; line-height:1; padding:4px; border-radius:50%; text-align:center; }
.chat-panel .chat-emoji-mine { background:rgba(217,119,87,.25); }
.chat-panel .chat-emoji-more { color:#9aa6b6; font-size:22.5px; }
.chat-emoji-grid { display:grid; grid-template-columns:repeat(6,1fr); gap:6px; margin-bottom:12px; }
.chat-menu { border:1px solid #2f3846; border-radius:12px; overflow:hidden; margin-bottom:8px; }
.chat-panel .chat-menu-item { display:block; width:100%; padding:12px 14px; font-weight:600; border-bottom:1px solid #2f3846; }
.chat-menu-item:last-child { border-bottom:0; }
.chat-panel .chat-danger { color:#ff8a90; }
/* Leave group, at the end of a group's member list. */
/* Leave group: at the right of a group's member list's Back bar, a floating pill like Back's, in red. */
.chat-panel .chat-members-nav .chat-leave-group { flex:none; display:flex; align-items:center; gap:6px; width:auto; min-height:0; height:40px; margin:0 0 0 auto; padding:0 16px; border:0; border-radius:20px;
  background:rgba(30,37,47,.86); box-sizing:border-box; outline:1px solid rgba(255,255,255,.08); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); box-shadow:0 4px 14px rgba(0,0,0,.45);
  font-size:16px; font-weight:600; line-height:1; letter-spacing:0; color:#ff8a90; }
.chat-panel .chat-primary,.chat-panel .chat-secondary { display:block; width:100%; padding:11px 0; border-radius:12px; font-weight:700; text-align:center; }
.chat-panel .chat-primary { background:#d97757; color:#1a0f0b; }
.chat-panel .chat-secondary { border:1px solid #343b46; margin-top:6px; }
.chat-panel .chat-primary:disabled { opacity:.6; }
/* "Want to know when they reply?" (askNotify in member-chat.js). */
.chat-sheet ol.chat-home-steps { margin:0 0 12px; padding-left:20px; font-size:15px; line-height:1.45; color:#c9d1dc; }
.chat-sheet ol.chat-home-steps li + li { margin-top:6px; }
.chat-sheet .chat-notify-status { color:#ff9aa0; }
.chat-sheet .chat-notify-status:empty { display:none; }
.chat-sheet-actions { display:flex; gap:8px; }
.chat-sheet-actions > * { flex:1 1 0; margin-top:0 !important; }
.chat-segments { display:flex; gap:4px; padding:3px; margin-bottom:10px; border-radius:10px; background:#10141a; }
.chat-panel .chat-segment { flex:1; padding:6px 0; border-radius:8px; font-size:13.5px; font-weight:700; color:#9aa6b6; text-align:center; }
.chat-panel .chat-segment-on { background:#2a3d57; color:#f1f3f5; }
.chat-steps { margin:0 0 12px; padding-left:20px; font-size:15px; line-height:1.6; }
.chat-reactor { display:flex; align-items:center; gap:10px; padding:6px 0; }
.chat-reactor-name { flex:1; font-size:16px; }
.chat-reactor-emoji { font-size:20.5px; }
.chat-toast { cursor:pointer; position:absolute; left:12px; right:12px; bottom:76px; z-index:6; padding:10px 12px; border-radius:10px; background:#232c38; border:1px solid #3a4656; font-size:15px; }

.chat-rules { padding:18px; display:flex; flex-direction:column; gap:10px; }
.chat-rules h3 { margin:0; font-size:20.5px; }
.chat-rules h4 { margin:6px 0 0; font-size:16px; color:#f5e6df; }
.chat-rules-text { margin:4px 0 0; font-size:15px; line-height:1.6; color:#bdc5d0; white-space:pre-wrap; }
.chat-rules-list { margin:0; padding-left:20px; font-size:15px; line-height:1.6; color:#e5e7eb; }
.chat-rules .chat-primary { margin-top:6px; }

.chat-search { margin:10px 12px 6px; width:calc(100% - 24px) !important; padding:9px 12px !important; border-radius:10px !important; background:#151b23 !important; border:1px solid #343b46 !important; }
.chat-sorts,.chat-picks { display:flex; flex-wrap:wrap; gap:6px; }
.chat-sorts { padding:0 12px 14px; border-bottom:1px solid #3a4350; }
.chat-panel .chat-sort,.chat-panel .chat-pick { padding:5px 11px; border-radius:999px; border:1px solid #343b46; font-size:14px; font-weight:700; color:#9aa6b6; }
.chat-panel .chat-sort-on,.chat-panel .chat-pick-on { border-color:#d97757; color:#d97757; background:rgba(217,119,87,.1); }
.chat-member-list { max-height:min(70vh,640px); overflow-y:auto; }
.chat-member { display:flex; align-items:center; gap:12px; padding:9px 14px; border-bottom:1px solid #1f252d; }
/* Your own row looks like the others; the YOU tag marks it. */
.chat-member-name { flex:1; min-width:0; font-weight:700; font-size:16px; }
.chat-member-list .chat-secondary { width:calc(100% - 28px); margin:10px 14px; }

.chat-settings { padding-bottom:12px; }
.chat-setting { display:flex; flex-direction:column; justify-content:center; gap:3px; min-height:52px; box-sizing:border-box; padding:10px 14px; border-bottom:1px solid #1f252d; }
.chat-settings-card > .chat-setting:last-child, .chat-settings-card > :last-child > .chat-setting:last-child { border-bottom:0; }
.chat-setting-toggle { flex-direction:row; align-items:center; justify-content:space-between; gap:12px; cursor:pointer; }
.chat-setting-text { display:flex; flex-direction:column; gap:3px; min-width:0; }
.chat-setting-name { font-weight:400; font-size:17px; color:#f1f3f5; }
.chat-setting-detail { font-size:14px; line-height:1.35; color:#a7b2c1; }
.chat-setting-paused { margin:6px 0 0; font-size:14px; color:#ffd166; }
.chat-panel .chat-inline-link { color:#d97757; font-weight:700; }
.chat-block-list .chat-member { padding:6px 0; border:0; }
.chat-setting-toggle .chat-setting-detail { font-weight:400; color:#a7b2c1; }
.chat-panel .chat-attach { flex:none; width:44px; height:44px; border-radius:50%; border:1px solid #343b46; color:#d97757; font-size:20.5px; font-weight:700; text-align:center; }
.chat-panel .chat-photo { display:block; margin:2px 0 4px; border-radius:12px; overflow:hidden; background:#10141a; }
/* A fixed 4:5 frame (tapping shows the whole photo): no size is stored with a photo, so a frame that grew when the photo
   arrived pushed the chat's messages around on a slow connection (October 22, 2026). */
.chat-photo img { display:block; width:220px; max-width:100%; aspect-ratio:4/5; height:auto; object-fit:cover; }
.chat-photo-expired { display:block; padding:24px 18px; font-size:14px; font-style:italic; color:#8f9bab; }
.chat-photo-viewer .chat-sheet { background:#05070a; }
.chat-photo-full { display:block; width:100%; max-height:70vh; object-fit:contain; margin-bottom:8px; border-radius:10px; }
.chat-removed { margin:10px 12px 0; padding:9px 11px; border-radius:10px; background:rgba(255,138,144,.08); border:1px solid rgba(255,138,144,.35); color:#ff9aa0; font-size:14.5px; line-height:1.45; }
.chat-muted { color:#ffd166; }
.chat-report-reasons { margin-bottom:10px; }
.chat-sheet .chat-report-details { width:100%; border-radius:12px; margin-bottom:8px; }
.chat-mention { color:#7cc4ff; font-weight:700; }
.chat-mention-suggestions { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:6px; }
.chat-mention-suggestions:empty { display:none; }

/* The chat card, with the home-screen card above it. */
.chat-card { position:relative; border:1px solid #2b3038; border-radius:14px; background:#10141a; overflow:hidden; }
.chat-home-card { padding:14px 16px; border:1px solid #33465f; border-radius:14px; background:#141c27; }
.chat-home-card h4 { margin:0 0 6px; font-size:17px; }
.chat-home-card p { margin:0 0 10px; font-size:15px; color:#a7b0bd; line-height:1.5; }
.chat-home-card .chat-steps { margin-bottom:12px; }
/* Rules: one link per set of rules, each opening in a new tab. */
.chat-rules-intro { margin:0; font-size:15px; color:#a7b0bd; }
.chat-rules-links { display:grid; gap:8px; margin:6px 0 4px; }
.chat-panel .chat-rules-link { display:block; width:100%; padding:13px 14px; border:1px solid #33404f; border-radius:12px; background:#151b23; color:#f5e6df; font-weight:700; font-size:16px; }
.chat-panel .chat-rules-link:hover { border-color:#d97757; }
/* Organization logos. */
.chat-avatar-logo { background:#0d1014; border:1px solid #2b3038; }
.chat-avatar-logo img { object-fit:contain; padding:3px; }
/* A 1:1 chat's header: photo, name and side, the Verified pill, then Easy Exit at the far right. */
.chat-person-bar { display:flex; align-items:center; gap:8px; min-width:0; padding:8px 12px 8px 6px; }
/* The chat's Back (a .chat-nav-back for swipe-back.js), at the top left of 1:1 and group chats. */
.chat-panel .chat-bar .chat-nav-back.chat-person-back { flex:none; display:inline-flex; align-items:center; justify-content:center; gap:6px; min-width:44px; height:44px; margin:0; padding:0 12px 0 10px; border:1px solid rgba(255,255,255,.08); border-radius:22px; background:rgba(40,47,58,.85); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); box-shadow:0 2px 10px rgba(0,0,0,.35); color:#f1f3f5; line-height:1; }
.chat-panel .chat-bar .chat-nav-back.chat-person-back:active { background:rgba(58,66,80,.9); }
.chat-back-arrow { display:block; margin-top:-3px; font-size:32px; font-weight:300; line-height:1; }
.chat-back-count { display:none; min-width:26px; height:24px; padding:0 8px; border-radius:12px; background:#f1f3f5; color:#0b0e13; font-size:14.5px; font-weight:700; line-height:24px; text-align:center; box-sizing:border-box; }
.chat-person-back.has-count .chat-back-count { display:block; }
.chat-panel .chat-bar .chat-nav-back.chat-person-back:not(.has-count) { width:44px; padding:0 2px 0 0; }
.chat-person-bar .chat-group-logo { flex:none; }
.chat-person-text { min-width:0; flex:0 1 auto; display:flex; flex-direction:column; align-items:flex-start; gap:2px; }
.chat-person-top { max-width:100%; display:flex; align-items:center; gap:6px; }
.chat-panel .chat-person-title { min-width:0; flex:0 1 auto; padding:0; text-align:left; }
.chat-person-title .chat-group-name { display:block; }
.chat-person-sub { max-width:100%; }
.chat-person-sub.is-main::before, .chat-person-sub.is-hush::before { flex:none; }
.chat-person-sub-text { min-width:0; overflow:hidden; text-overflow:ellipsis; }
/* After the name (Jay, October 21, 2026): a small green ✓ when verified, a small ⚠️ Not verified when not; no pill. */
.chat-person-verify { flex:none; font-size:13px; font-weight:700; white-space:nowrap; }
.chat-person-verify.is-verified { color:#4cc38a; font-size:15px; }
.chat-person-verify.is-not-vetted { color:#f0868c; }
/* ⋯ at the header's right: the chat's options (Easy Exit among them). */
.chat-panel .chat-more { flex:none; display:flex; align-items:center; justify-content:center; gap:4px; width:44px; height:44px; margin:0; padding:0; border:0; background:none; color:#d7dee8; cursor:pointer; }
.chat-more-dot { width:4.5px; height:4.5px; border-radius:50%; background:currentColor; }
.chat-person-gap { flex:1 1 0; min-width:0; margin-left:-8px; }
.chat-panel .chat-group-back { justify-self:start; width:44px; height:44px; display:grid; place-items:center; padding:0; font-size:47px; font-weight:300; line-height:1; color:#f5e6df; margin-left:-6px; text-align:center; }
.chat-group-name { max-width:100%; font-weight:700; font-size:18px; color:#f1f3f5; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-group-sub { font-size:14px; color:#9aa6b6; white-space:nowrap; }
/* A DM's "Social chat": the social profile's blue square (see .member-profile-grid-badge.is-main). */
.chat-group-sub.is-main, .chat-group-sub.is-hush { display:inline-flex; align-items:center; gap:6px; }
.chat-group-sub.is-main::before { content:''; width:8px; height:8px; border-radius:2.5px; background:#e59a7d; box-shadow:0 0 6px rgba(217,119,87,.75); }
/* A Hush chat's "Hush chat": the glowing clay square. */
.chat-group-sub.is-hush::before { content:''; width:8px; height:8px; border-radius:2.5px; background:#e8875f; box-shadow:0 0 6px rgba(217,119,87,.75); }
.chat-panel .chat-group-logo { justify-self:end; padding:0; border-radius:50%; }
.chat-group-logo .chat-avatar { width:44px; height:44px; flex-basis:44px; }
/* Members list: group info centered at the top, back arrow top left; tap a member to message them. */
.chat-members-top { position:relative; display:flex; flex-direction:column; align-items:center; padding:14px 16px 12px; text-align:center; }
.chat-avatar-large { flex-basis:112px; width:112px; height:112px; font-size:29px; margin-top:6px; }
.chat-members-name { margin:12px 0 2px; font-size:22.5px; font-weight:700; color:#f1f3f5; }
.chat-members-count { margin:0; font-size:15px; color:#9aa6b6; }
.chat-panel button.chat-member { position:relative; display:flex; align-items:center; gap:12px; width:100%; padding:9px 14px; border-bottom:0; text-align:left; }
/* A group's member list: the same inset line, from the name (14px padding + 48px photo + 12px gap). */
.chat-panel button.chat-member::after { content:''; position:absolute; left:74px; right:0; bottom:0; height:1px; background:#1f252d; pointer-events:none; }
.chat-panel button.chat-member:hover { background:#161c24; }
.chat-panel .chat-primary.chat-danger-button { background:#e5484d; color:#fff; margin-bottom:8px; }
.chat-panel .chat-item { -webkit-touch-callout:none; -webkit-user-select:none; user-select:none; }
.chat-device-status { margin-bottom:6px; }
/* Organization chat: a sender's photo is a button that opens a DM with them. */
.chat-panel .chat-avatar-button { flex:0 0 auto; align-self:flex-end; padding:0; margin:0; border:0; border-radius:50%; background:none; cursor:pointer; line-height:0; }
.chat-panel .chat-avatar-button:focus-visible { outline:2px solid #d97757; outline-offset:2px; }

/* ---------- Motion polish (member-chat.js) ---------- */
/* Back to the chat list: the chat you just left glows for a moment, and its old unread count fades away. */
.chat-item-return { animation:chat-item-return 1.4s ease-out; }
@keyframes chat-item-return { from { background:rgba(217,119,87,.16); } to { background:transparent; } }
.chat-badge-out { animation:chat-badge-out .45s ease-in forwards; }
@keyframes chat-badge-out { to { opacity:0; transform:scale(.5); } }
/* A message that just arrived or was just sent rises into place; while sending it's slightly faded. */
.chat-row-enter { animation:chat-row-enter .32s ease-out; }
@keyframes chat-row-enter { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
/* Opening a chat: each bubble fades in and rises 6px into place, from the newest (bottom) up, with no bounce (delays set
   in member-chat.js, 25ms apart; Jay, October 21, 2026: the bounce read as jitter in long chats). */
.chat-messages.is-popping .chat-row { animation:chat-bubble-pop .24s cubic-bezier(.2,.8,.2,1) both; }
@keyframes chat-bubble-pop { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }
.chat-row-sending .chat-bubble { opacity:.65; }
.chat-row-delivered .chat-bubble { animation:chat-delivered .35s ease-out; }
@keyframes chat-delivered { from { opacity:.65; } to { opacity:1; } }
/* Member list placeholders while the first page loads. */
.chat-member-skeleton { pointer-events:none; }
.chat-skeleton-avatar { flex:0 0 66px; width:66px; height:66px; border-radius:10px; }
.chat-skeleton-name { height:12px; border-radius:6px; }
.chat-skeleton-avatar, .chat-skeleton-name { background:linear-gradient(90deg,#1a2029 0%,#242c37 50%,#1a2029 100%); background-size:200% 100%; animation:chat-skeleton 1.3s ease-in-out infinite; }
@keyframes chat-skeleton { from { background-position:100% 0; } to { background-position:-100% 0; } }
@media (prefers-reduced-motion: reduce) {
  /* Fades only, no movement or shimmer. */
  .chat-row-enter { animation-name:chat-row-fade; }
  .chat-messages.is-popping .chat-row { animation:chat-row-fade .2s ease-out both; }
  @keyframes chat-row-fade { from { opacity:0; } to { opacity:1; } }
  .chat-badge-out { animation-name:chat-badge-fade; }
  @keyframes chat-badge-fade { to { opacity:0; } }
  .chat-skeleton-avatar, .chat-skeleton-name { animation:none; background:#1f2630; }
}
/* Reading a group's community rules or the chat rules before agreeing: "‹ Back" at the bottom left. */
.chat-rules.chat-rules-reading { padding:0; gap:0; height:calc(100dvh - 140px); }
.chat-rules-reading .chat-nav-bar { padding-top:8px; }
.chat-rules-reading .chat-rules-body { flex:1; min-height:0; overflow-y:auto; padding:18px; display:flex; flex-direction:column; gap:10px; }
.chat-rules-reading .chat-rules-text { max-height:none; overflow:visible; font-size:16px; }
.chat-rules-reading .chat-rules-page { margin:4px 0 8px; }
/* Grid chats: the card for a shared social profile ("Share my social profile" in the chat's menu). */
.chat-shared-profile { margin-top:6px; min-width:210px; border:1px solid #6b3e2e; border-radius:14px; background:#141c26; overflow:hidden; }
.chat-shared-profile-head { display:flex; align-items:center; gap:10px; padding:10px 12px; }
.chat-shared-profile-text { display:flex; flex-direction:column; font-size:14px; color:#9aa6b6; }
.chat-shared-profile-text b { font-size:16px; color:#eef2f7; }
.chat-panel .chat-shared-profile-open { display:block; width:100%; height:40px; border:0; border-top:1px solid #263445; background:transparent; color:#d97757; font-size:15.5px; font-weight:700; }
/* "Share my Hush profile" in a Social chat (Plus, migration 203): the same card in the Hush clay. */
.chat-shared-profile.is-hush { border-color:#7a4a3a; background:#1f1612; }
.chat-panel .chat-shared-profile.is-hush .chat-shared-profile-open { border-top-color:#3d2a22; color:#D97757; }
/* A Plus feature in a chat menu without Plus: glows (plus.css), and opens the Plus sheet. */
.chat-panel .chat-menu-item.chat-menu-plus { color:#eef2f7; }
/* The pills above the chat list (Sections / All together; room for search and filters later),
   the same look as the Grid's filter pills. */
.chat-list-pills { display:flex; gap:8px; padding:24px 16px 10px; overflow-x:auto; scrollbar-width:none; border-bottom:1px solid #1f252d; }
.chat-list-pills::-webkit-scrollbar { display:none; }
.chat-panel .chat-list-pill { flex:none; height:36px; margin:0; padding:0 14px; border:1px solid #363e4a; border-radius:18px; background:transparent; color:#d7dee8; font-size:15px; font-weight:600; white-space:nowrap; cursor:pointer; }
.chat-panel .chat-list-pill.is-on { border-color:#d97757; background:#1b2532; color:#cfe0f5; }
/* Chat settings › How to get notifications: the steps open under the row. */
.chat-notification-help-body { margin-top:10px; }
.chat-notification-help .chat-steps { margin-bottom:0; }
/* My photos: the ＋ sheet's saved photos, the manager (Chat settings › My photos) and their tiles. */
.chat-library-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin:0 0 12px; }
.chat-library-photo { position:relative; aspect-ratio:1; padding:0; border:0; border-radius:10px; overflow:hidden; background:#1d2530; cursor:pointer; }
.chat-library-photo img { width:100%; height:100%; object-fit:cover; display:block; }
/* Holding a saved photo in My Photo Album lifts it to drag (libraryGrid in member-chat.js). */
.chat-library-grid.is-sorting { touch-action:none; }
.chat-library-grid.is-sorting .chat-library-photo:not(.is-dragging) { opacity:.75; }
.chat-library-photo.is-dragging { transform:scale(1.06); box-shadow:0 10px 24px rgba(0,0,0,.55),0 0 0 2px currentColor; z-index:1; transition:transform .12s; }
@media (prefers-reduced-motion:reduce) { .chat-library-photo.is-dragging { transform:none; transition:none; } }
.chat-library-status, .chat-library-count { margin:0 0 10px; font-size:15px; color:#a7b0bd; }
.chat-library-add:disabled { opacity:.5; }
.chat-library-confirm .chat-photo-full { display:block; max-width:100%; max-height:50vh; margin:0 auto 12px; border-radius:12px; }
.chat-library-picker.is-grid .chat-primary, .chat-library-confirm.is-grid .chat-primary { background:var(--grid-accent,#D97757); color:#fff; }
/* My photos sits in Chat settings' frame (margin:-16px), so it brings back its own side room. */
.chat-my-photos-page { padding:16px 20px 24px; }
.chat-my-photos-page .chat-segments { margin:0 0 14px; }

/* ⓘ on the Social and Hush section headers: opens Social vs. Hush (member-portal.js). */
.chat-section-info { display:inline-flex; align-items:center; justify-content:center; flex:none; width:17px; height:17px; margin-left:7px; border-radius:50%;
  border:1.5px solid currentColor; font:italic 700 12px/1 Georgia,"Times New Roman",serif; opacity:.75; cursor:pointer; }
.chat-section-info:hover, .chat-section-info:focus-visible { opacity:1; }

/* At the top of the messages in Social and Hush chats (Jay, October 21, 2026; it was under the message bar), before the
   first ones: the groups you share, then "🎭 What is the difference between Social and Hush chats?" (member-chat.js chatTopInfo). */
.chat-top-info { display:flex; flex-direction:column; align-items:center; gap:2px; margin:4px 0 10px; }
.chat-messages .chat-nav-bar { padding:0; }
/* The groups row fills the width and scrolls from its first pill; centered, a row wider than the screen was cut off at
   both ends (Jay, October 22, 2026). A short row still sits in the middle (safe center). */
.chat-top-info > .chat-nav-bar { align-self:stretch; min-width:0; }
.chat-top-info .chat-pills { justify-content:safe center; }
/* .chat-panel button in the selector, so it wins over the panel's button reset (which zeroed its margin and centering). */
.chat-panel button.chat-two-profiles-link { display:block; min-height:44px; margin:0 auto; padding:2px 4px; text-align:center; background:none; border:0; color:#8d97a5; font-size:14px; line-height:1.3; cursor:pointer; }
.chat-panel button.chat-two-profiles-link:hover, .chat-panel button.chat-two-profiles-link:focus-visible { color:#c9d1dc; text-decoration:underline; }
/* "Be a chat admin?" (askAdmin in member-chat.js): what agreeing means. */
.chat-panel .chat-admin-terms{margin:0 0 14px;padding-left:20px;display:grid;gap:6px;font-size:15px;line-height:1.4;text-align:left}

/* A group's own bubble (migration 177, e.g. "🎉 Alex was InvitedIn to Bros 😏"): the group's round logo (a button
   that opens its member list) and a festive bubble with a soft gold edge. No reactions or menu. */
.chat-row-notice .chat-notice-logo { border-radius:50%; }
.chat-bubble.chat-notice { background:linear-gradient(135deg,#2a2618,#1d2530 70%); box-shadow:inset 0 0 0 1px rgba(232,196,104,.35); }
.chat-notice-who { color:#e8c468; }
.chat-notice-text { display:flow-root; white-space:pre-wrap; overflow-wrap:anywhere; }

/* Nominee chats ("Voters can message me", migration 181): a ballot mark before the name, the group under it, a note at the top. */
.chat-nominee-mark { margin-right:5px; font-size:.9em; }
.chat-item-nominee { display:block; font-size:13px; color:#c9b27a; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-group-sub.is-nominee { color:#c9b27a; }
.chat-panel .chat-nominee-note { flex:none; align-self:center; margin:8px 16px 4px; padding:7px 12px; border-radius:12px; background:#1b1a14; color:#b9ad8c; font-size:14.5px; line-height:1.4; text-align:center; }
.chat-panel .chat-nominee-note { text-align:left; padding:9px 14px; }
.chat-panel .chat-nominee-title { margin:0 0 4px; font-weight:700; color:#d9cca6; }
.chat-panel .chat-nominee-points { margin:0; padding-left:18px; }
.chat-panel .chat-nominee-points li + li { margin-top:2px; }
.chat-cannot-send.chat-nominee-closed { padding:8px 12px; border-radius:12px; background:#1b1a14; color:#b9ad8c; }

/* Online now on a Hush chat (member-chat.js avatar): a green dot at the photo's lower right, ringed in the
   background color so it reads on any photo. */
.chat-avatar-wrap { position:relative; display:inline-flex; flex:none; }
.chat-online-dot { position:absolute; right:1px; bottom:1px; width:15px; height:15px; border-radius:50%; pointer-events:none;
  background:radial-gradient(circle at 32% 28%,#f2fff6 0 12%,#8ff5b3 30%,#34c96b 66%,#1d9449 100%);
  box-shadow:0 0 0 2.5px #0d1014,0 0 9px 1px rgba(76,224,128,.7); }
.chat-online-dot::after { content:''; position:absolute; inset:0; border-radius:50%; box-shadow:0 0 0 2px rgba(110,240,155,.85); animation:chat-online-pulse 2.6s ease-out infinite; }
@keyframes chat-online-pulse { 0% { transform:scale(1); opacity:.9; } 70%,100% { transform:scale(2); opacity:0; } }
@media (prefers-reduced-motion: reduce) { .chat-online-dot::after { animation:none; opacity:0; } }
.chat-group-logo .chat-online-dot { width:11px; height:11px; right:0; bottom:0; }
/* Polls in group chats (member-chat.js pollCard, pollComposer, drawPollFloat). Selectors start with .chat-panel so
   they win over its button reset. */
.chat-bubble.chat-bubble-poll { width:min(84%,340px); max-width:none; background:#1e1512; border:1px solid #5a3426; }
.chat-row-mine .chat-bubble.chat-bubble-poll { background:#2a1a13; }
.chat-poll-tag { display:flex; justify-content:space-between; align-items:baseline; gap:8px; margin-top:2px; font-size:11.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:#d97757; }
.chat-poll-tag em { font-style:normal; font-weight:500; letter-spacing:0; text-transform:none; color:#8d97a5; }
.chat-poll-question { margin:6px 0 4px; font-size:16px; font-weight:650; line-height:1.3; color:#f0f4fa; }
.chat-poll-hint { margin:0 0 2px; font-size:12.5px; color:#8d97a5; }
.chat-panel .chat-poll-option { position:relative; display:flex; align-items:center; gap:9px; width:100%; margin-top:6px; padding:9px 10px; border:1px solid #2a3542; border-radius:11px; overflow:hidden; font-size:14.5px; line-height:1.3; text-align:left; color:#e6ebf2; }
.chat-panel .chat-poll-option:disabled { cursor:default; }
.chat-poll-fill { position:absolute; inset:0 auto 0 0; background:rgba(217,119,87,.16); transition:width .35s ease; }
.chat-poll-mark { position:relative; flex:none; width:18px; height:18px; border-radius:50%; border:2px solid #5d6b7c; }
.chat-poll-option.is-multiple .chat-poll-mark { border-radius:5px; }
.chat-panel .chat-poll-option.is-mine { border-color:#d97757; }
.chat-poll-option.is-mine .chat-poll-mark { border-color:#d97757; background:#d97757; box-shadow:inset 0 0 0 3px #1e1512; }
.chat-poll-option.is-multiple.is-mine .chat-poll-mark { box-shadow:none; display:grid; place-items:center; }
.chat-poll-option.is-multiple.is-mine .chat-poll-mark::after { content:'✓'; color:#0d1014; font-size:12px; font-weight:800; line-height:1; }
.chat-poll-label { position:relative; flex:1; min-width:0; overflow-wrap:anywhere; }
.chat-poll-count { position:relative; flex:none; color:#9fb0c4; font-size:12.5px; font-variant-numeric:tabular-nums; }
.chat-poll-foot { display:flex; justify-content:space-between; gap:10px; margin-top:9px; font-size:12px; color:#8d97a5; }
/* The floating bar: a sticky anchor of no height at the top of the messages; the bar floats in it. */
.chat-poll-float-anchor { position:sticky; top:0; z-index:4; height:0; margin:0 !important; }
.chat-poll-float { position:absolute; top:0; left:0; right:0; border:1px solid #5a3426; border-radius:14px; background:rgba(22,32,44,.95); -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px); box-shadow:0 8px 28px rgba(0,0,0,.5); overflow:hidden; }
.chat-panel .chat-poll-float-bar { display:flex; align-items:center; gap:9px; width:100%; padding:10px 12px; font-size:14.5px; color:#e6ebf2; }
.chat-poll-float-icon { flex:none; font-size:16px; }
.chat-poll-float-q { flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-weight:600; }
.chat-poll-float-q.is-count { font-weight:700; }
.chat-poll-float-meta { flex:none; font-size:12.5px; color:#8d97a5; }
.chat-poll-float-chevron { flex:none; color:#d97757; font-size:14px; }
.chat-poll-float-new { flex:none; padding:1px 6px; border-radius:5px; background:#d97757; color:#1a0f0b; font-size:10.5px; font-weight:800; letter-spacing:.05em; }
.chat-poll-float-voted { flex:none; width:22px; text-align:center; color:#7fc3a0; font-weight:700; }
.chat-poll-float-body { max-height:55vh; overflow-y:auto; padding:0 12px 12px; }
.chat-panel .chat-poll-float-item { display:flex; align-items:center; gap:9px; width:100%; padding:11px 0; border-top:1px solid #243245; font-size:14.5px; color:#e6ebf2; }
.chat-poll-float-item small { flex:none; color:#8d97a5; font-size:12px; }
.chat-panel .chat-poll-float-back { margin:2px 0 6px; font-size:13px; color:#d97757; text-decoration:none; }
/* New poll sheet. */
.chat-poll-sheet .chat-sheet h4 { margin:0 0 6px; }
.chat-poll-label-text { display:block; margin:12px 0 5px; font-size:13px; color:#9aa6b6; }
.chat-poll-input { width:100%; padding:10px 12px; border:1px solid #2f3846; border-radius:10px; background:#0f141a; color:#e6ebf2; font:inherit; font-size:16px; }
.chat-poll-inputs { display:flex; flex-direction:column; gap:6px; }
.chat-poll-input-row { display:flex; gap:8px; align-items:center; }
.chat-panel .chat-poll-remove { flex:none; width:28px; text-align:center; font-size:20px; color:#6b7684; }
.chat-panel .chat-poll-remove:disabled { opacity:.3; cursor:default; }
.chat-panel .chat-poll-add { margin-top:9px; font-size:14.5px; color:#d97757; text-decoration:none; }
.chat-panel .chat-poll-add:disabled { color:#6b7684; cursor:default; }
.chat-poll-seg { display:flex; padding:3px; border:1px solid #2f3846; border-radius:10px; background:#0f141a; }
.chat-panel .chat-poll-seg-item { flex:1; padding:8px 0; border-radius:8px; text-align:center; font-size:14px; color:#9aa6b6; }
.chat-panel .chat-poll-seg-item.is-on { background:#2a3d57; color:#fff; font-weight:600; }
.chat-poll-days { display:flex; gap:6px; }
.chat-panel .chat-poll-day { flex:1; padding:8px 0; border:1px solid #2f3846; border-radius:9px; text-align:center; font-size:14px; color:#9aa6b6; }
.chat-panel .chat-poll-day.is-on { border-color:#d97757; background:rgba(217,119,87,.14); color:#fff; font-weight:600; }
.chat-poll-sheet .chat-primary { margin-top:14px; }
.chat-poll-note { margin:8px 0 2px; text-align:center; font-size:12px; color:#7d8896; }
.chat-panel .chat-share-start { margin:0 0 12px; }
@media (prefers-reduced-motion: reduce) { .chat-poll-fill { transition:none; } }

/* A group chat's header and member grid (Jay, October 17, 2026): the logo, name and member count with a chevron at the
   right that folds the grid to one row; under it, everyone as a square (four to a row up to 12, then three tall,
   scrolling sideways), set apart from the messages by a border. */
/* With the member grid gone (Jay, October 19, 2026), the header keeps the chat bar's border, like a 1:1 chat's. */
.chat-grid-bar { gap:12px; padding:10px 12px; }
.chat-grid-bar:has(> .chat-person-back) { gap:8px; padding-left:6px; }
.chat-grid-bar > .chat-avatar { flex:none; }
.chat-grid-bar-title { flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; }
.chat-group-creator { overflow:hidden; text-overflow:ellipsis; }
.chat-group-creator-name { appearance:none; background:none; border:0; padding:0; margin:0; font:inherit; color:#d8e2ef; text-decoration:underline; text-underline-offset:2px; cursor:pointer; }
.chat-panel .chat-grid-toggle { flex:none; width:44px; height:44px; border-radius:50%; background:#1b2233; display:flex; align-items:center; justify-content:center; }
.chat-grid-chevron { width:10px; height:10px; border:solid #d97757; border-width:2.5px 2.5px 0 0; transform:translateY(2px) rotate(-45deg); transition:transform .25s ease; }
.chat-grid-toggle.is-folded .chat-grid-chevron { transform:translateY(-3px) rotate(135deg); }
.chat-member-grid { flex:none; position:relative; z-index:1; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:3px; padding:0 12px 12px;
  border-bottom:2px solid #3a4560; box-shadow:0 6px 14px rgba(0,0,0,.35); overscroll-behavior-x:contain; scrollbar-width:none; }
.chat-member-grid::-webkit-scrollbar { display:none; }
.chat-member-grid.is-scrolling, .chat-member-grid.is-folded { grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:calc((100% - 9px) / 4); overflow-x:auto; }
.chat-member-grid.is-scrolling { grid-template-rows:repeat(3,auto); }
.chat-member-grid.is-folded { grid-template-rows:auto; }
.chat-panel .chat-grid-square, .chat-grid-square { position:relative; display:block; aspect-ratio:1; min-width:0; border-radius:6px; overflow:hidden; background:#1b2233; color:#f1f3f5; text-align:left; }
.chat-grid-photo { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.chat-grid-square.is-placeholder .chat-grid-photo { opacity:.35; filter:grayscale(1); }
.chat-grid-square.is-you::after { content:''; position:absolute; inset:0; border-radius:6px; box-shadow:inset 0 0 0 2px #d97757; pointer-events:none; }
.chat-grid-name { position:absolute; left:0; right:0; bottom:0; padding:16px 6px 5px; background:linear-gradient(transparent,rgba(0,0,0,.75)); font-size:12.5px; font-weight:600;
  line-height:1.2; }
/* Up to two lines; anything past them is cut off, with no "…" (Jay, October 18, 2026). */
.chat-grid-name-text { display:block; max-height:2.4em; overflow:hidden; }
.chat-grid-online { position:absolute; top:6px; left:6px; width:9px; height:9px; border-radius:50%; background:#4ad66d; box-shadow:0 0 0 2px #0d1014, 0 0 6px rgba(74,214,109,.7); }
.chat-grid-square.is-skeleton { animation:chat-grid-wait 1.2s ease-in-out infinite alternate; }
@keyframes chat-grid-wait { from { opacity:.45; } to { opacity:.9; } }
@media (prefers-reduced-motion: reduce) { .chat-grid-chevron { transition:none; } .chat-grid-square.is-skeleton { animation:none; } }
/* "+ Create Group" in the chat list's pill row (Jay, October 17, 2026). */
.chat-panel .chat-list-pill.chat-create-pill { border-color:rgba(217,119,87,.55); color:#e59a7d; }
/* The Chat tab's grid (Jay, October 17, 2026) and Chat settings' Social and Hush sections. */
.chat-social-grid { margin-bottom:6px; }
/* Its header is styled like the chat list's section headers (.chat-section-label/.chat-section-toggle); no border or
   shadow under it, so it runs straight into the sections below (Jay, October 17, 2026). */
/* The Social grid's squares turn over like the Hush Grid's the first time it shows (flipSocialGrid in member-chat.js;
   grid-flip and grid-flip-fade are in app-frame.css). */
.chat-social-grid .chat-grid-square.is-flipping-in { animation:grid-flip .7s cubic-bezier(.3,.7,.4,1) both; }
.chat-social-grid .chat-grid-square.is-face-down { transform:perspective(700px) rotateY(-180deg); }
/* Its back: a grey layer until it turns past halfway (grid-flip-back), as on the Hush Grid. */
.chat-social-grid .chat-grid-square.is-face-down::after, .chat-social-grid .chat-grid-square.is-flipping-in::after { content:''; position:absolute; inset:0; z-index:5; background:#1f2630; pointer-events:none; }
.chat-social-grid .chat-grid-square.is-flipping-in::after { animation:grid-flip-back .7s both; animation-delay:inherit; }
@media (prefers-reduced-motion: reduce) {
  .chat-social-grid .chat-grid-square.is-flipping-in { animation:grid-flip-fade .25s ease-out both; }
  .chat-social-grid .chat-grid-square.is-face-down { transform:none; opacity:0; }
  .chat-social-grid .chat-grid-square.is-face-down::after, .chat-social-grid .chat-grid-square.is-flipping-in::after { content:none; }
}
.chat-social-grid .chat-member-grid { padding:0 12px 12px; border-bottom:0; box-shadow:none; }
/* Account, Chat and Grid settings share one pattern (Jay, October 21, 2026; Settings.dc.html): a section header, then a
   card of 52px rows. The Social and Hush parts keep their color as a 2px top edge on the card and a colored header with
   its square, not a tinted wash (Plus rows inside them no longer stack glows; their wash was October 17 and 19). */
.chat-settings-section { margin:18px 0 0; padding:0; }
.chat-settings-section-title { display:flex; align-items:center; gap:8px; margin:0 2px 8px; font-size:13px; font-weight:700; letter-spacing:1.2px; text-transform:uppercase; color:#8f9bab; }
.chat-settings-section-note { margin:-4px 2px 8px; font-size:14px; line-height:1.35; color:#a7b2c1; }
.chat-settings-section.is-social .chat-settings-section-title::before { content:''; flex:none; width:9px; height:9px; border-radius:2px; background:#d97757; }
.chat-settings-section.is-hush .chat-settings-section-title::before { content:''; flex:none; width:9px; height:9px; border-radius:2px; background:#d97757; }
.chat-settings-section.is-social .chat-settings-section-title { color:#d97757; }
.chat-settings-section.is-hush .chat-settings-section-title { color:#e99b80; }
.chat-settings-card, .chat-settings-section.member-account-side > .member-account-card { border:1px solid #262c35; border-radius:14px; background:#141920; overflow:hidden; }
.chat-settings-card:empty { display:none; }
.chat-settings .chat-picks { gap:8px; margin-top:6px; }
.chat-settings .chat-pick { min-height:36px; padding:0 14px; border-radius:18px; font-size:15px; font-weight:600; }
.chat-settings-section.is-social > :is(.chat-settings-card,.member-account-card) { border-top:2px solid #d97757; }
.chat-settings-section.is-hush > :is(.chat-settings-card,.member-account-card) { border-top:2px solid #d97757; }
/* Plus rows sit in the card as plain rows with a small PLUS tag, not glowing boxes inside it. */
:is(.chat-settings-card,.member-account-card) .plus-glow:not(.chat-list-pill):not(.meet-pill) { box-sizing:border-box; width:100%; min-height:52px; margin:0; padding:10px 14px; border:0; border-bottom:1px solid #1f252d; border-color:#1f252d !important; border-radius:0; color:#f1f3f5; font:inherit; text-align:left; }
:is(.chat-settings-card,.member-account-card) .plus-glow:last-child { border-bottom:0; }
/* plus.css makes .chat-setting-plus a block (for its old glowing box), which dropped a Plus row's switch under its text;
   in a card it's a row like the others, its switch on the right (Jay, October 21, 2026). */
:is(.chat-settings-card,.member-account-card) .chat-setting.chat-setting-plus { display:flex; flex-direction:column; justify-content:center; gap:3px; }
:is(.chat-settings-card,.member-account-card) .chat-setting-toggle.chat-setting-plus { flex-direction:row; align-items:center; justify-content:space-between; gap:12px; }
:is(.chat-settings-card,.member-account-card) .plus-glow :is(.chat-setting-name,.grid-settings-name,.member-account-value > span:first-child)::after {
  content:'PLUS'; display:inline-flex; align-items:center; height:22px; padding:0 8px; margin-left:8px; border-radius:11px; background:rgba(110,168,255,.16); color:#9fc0ff; font-size:12px; font-weight:800; letter-spacing:.04em; vertical-align:2px; }

/* The pill row's placeholder while the chat first loads (renderLoadingList). */
.ui-skeleton.chat-skeleton-pill { display:inline-block; flex:none; height:36px; border-radius:18px; }
/* The ⓘ before the Social and Hush grids' headings (What is the Grid?). */
.chat-section-info.is-grid-info { margin-left:0; margin-right:7px; }
/* An uppercase heading (the Hush Grid's) must not turn the ⓘ into an I. */
.chat-section-info { text-transform:none; letter-spacing:0; }

/* A group chat's header opens the group's page (Jay, October 21, 2026). */
.chat-group-open { all:unset; box-sizing:border-box; display:flex; flex-direction:column; gap:1px; min-width:0; max-width:100%; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.chat-group-open:focus-visible, .chat-group-open-chevron:focus-visible { outline:2px solid #d97757; outline-offset:3px; border-radius:8px; }
.chat-group-open-logo { cursor:pointer; }
/* A round button in the side's color, so the way into the group page is easy to see; it nudges right now and then. */
.chat-group-open-chevron { --chev:217,119,87; flex:none; display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; padding:0 0 3px 2px; box-sizing:border-box; border:1.5px solid rgba(var(--chev),.75); border-radius:50%; background:rgba(var(--chev),.18); box-shadow:0 0 14px rgba(var(--chev),.35); color:rgb(var(--chev)); font-size:30px; font-weight:700; line-height:1; cursor:pointer; animation:chat-chevron-nudge 4s ease-in-out 1s infinite; }
.chat-group-open-chevron:active { transform:scale(.92); background:rgba(var(--chev),.3); }
.chat-conversation.is-grid .chat-group-open-chevron, .chat-grid-bar:has(.chat-avatar-crest.is-hush) .chat-group-open-chevron { --chev:232,135,95; }
@keyframes chat-chevron-nudge { 0%,80%,100% { transform:translateX(0); } 86% { transform:translateX(4px); } 92% { transform:translateX(0); } 96% { transform:translateX(2px); } }
@media (prefers-reduced-motion: reduce) { .chat-group-open-chevron { animation:none; } }

/* The group's page and its member list. */
.chat-avatar-xl { flex-basis:112px; width:112px; height:112px; font-size:36px; }
.group-page { --group-accent:#d97757; --group-accent-soft:rgba(217,119,87,.14); --group-accent-line:rgba(217,119,87,.35); display:flex; flex-direction:column; gap:18px; padding-bottom:96px; }
.group-page.is-hush { --group-accent:#e8875f; --group-accent-soft:rgba(217,119,87,.14); --group-accent-line:rgba(217,119,87,.4); }
.group-page-head { display:flex; flex-direction:column; align-items:center; gap:10px; padding:20px 0 4px; text-align:center; background:radial-gradient(ellipse 90% 70% at 50% 20%,var(--group-accent-soft),transparent 70%); }
.group-page-head .chat-avatar-xl { margin-bottom:6px; }
.group-page-name { margin:0; font-size:28px; font-weight:800; letter-spacing:-.3px; color:#eef1f6; overflow-wrap:anywhere; }
.group-page-side { font-size:14px; font-weight:600; color:var(--group-accent); background:var(--group-accent-soft); border:1px solid var(--group-accent-line); padding:4px 12px; border-radius:999px; }
.group-page-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.group-page-stat { display:flex; flex-direction:column; gap:2px; padding:14px 16px; border-radius:14px; background:#141920; border:1px solid #262c35; }
.group-page-stat-value { display:flex; align-items:center; gap:8px; font-size:27px; font-weight:800; color:#eef1f6; }
.group-page-stat-label { font-size:14px; color:#a3acbb; }
.group-page-online-dot { width:9px; height:9px; border-radius:50%; background:#3ecf73; box-shadow:0 0 0 4px rgba(62,207,115,.18),0 0 10px #3ecf73; }
.group-search { display:flex; align-items:center; gap:10px; height:48px; padding:0 14px; box-sizing:border-box; border-radius:14px; background:#0f1318; border:1px solid #363e4a; }
.group-search:focus-within { border-color:var(--group-accent); box-shadow:0 0 0 4px var(--group-accent-soft); }
.group-search-icon { font-size:15px; opacity:.8; }
.group-search-input { flex:1; min-width:0; height:100%; border:0; background:transparent; color:#eef1f6; font:inherit; font-size:16px; outline:none; }
/* See members, Group rules and Notifications: one card of 52px rows (Jay, October 21, 2026), its value at the right. */
.group-page-card { border:1px solid #262c35; border-radius:14px; background:#141920; overflow:hidden; }
.group-page-row { display:flex; align-items:center; gap:12px; width:100%; min-height:52px; padding:8px 14px; box-sizing:border-box; border:0; border-radius:0; background:transparent; color:#eef1f6; font:inherit; text-align:left; cursor:pointer; }
.group-page-row + .group-page-row { border-top:1px solid #1f252d; }
.group-page-row:active { background:#1d2530; }
.group-page-row-icon { display:grid; place-items:center; width:32px; height:32px; border-radius:10px; background:var(--group-accent-soft); font-size:17px; }
.group-page-row-text { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.group-page-row-title { font-size:17px; font-weight:700; }
.group-page-plus-tag { display:inline-flex; align-items:center; height:22px; padding:0 8px; margin-left:8px; border-radius:11px; background:rgba(110,168,255,.16); color:#9fc0ff; font-size:12px; font-weight:800; letter-spacing:.04em; vertical-align:2px; }
.group-page-row-sub { flex:none; font-size:15px; color:#a7b2c1; }
.group-page-row-sub:empty { display:none; }
.group-page-row-chevron, .group-member-chevron { color:#6b7585; font-size:24px; line-height:1; }
/* Leave group: a plain red text button at the bottom (Jay, October 21, 2026; it was a pill). */
.group-page-leave { align-self:center; min-height:44px; margin:0; padding:0 16px; border:0; border-radius:22px; background:none; color:#f0868c; font:inherit; font-size:16px; font-weight:600; cursor:pointer; }
.group-members-head { display:flex; align-items:center; gap:12px; padding-top:6px; }
.group-members-head-text { min-width:0; display:flex; flex-direction:column; gap:2px; }
.group-members-title { margin:0; font-size:22px; font-weight:800; color:#eef1f6; }
.group-members-sub { font-size:14px; color:#a3acbb; overflow-wrap:anywhere; }
.group-members { display:flex; flex-direction:column; gap:2px; }
.group-members:empty { display:none; }
.group-members-label { margin:10px 4px 4px; font-size:12.5px; font-weight:700; letter-spacing:1.2px; text-transform:uppercase; color:#8792a3; }
.group-members-note { margin:6px 4px; font-size:15px; color:#a3acbb; }
.group-member-row { display:flex; align-items:center; gap:12px; width:100%; min-height:62px; padding:8px; box-sizing:border-box; border:0; border-radius:16px; background:transparent; color:#eef1f6; font:inherit; text-align:left; cursor:pointer; }
button.group-member-row:active { background:#151a24; }
.group-member-row.is-anonymous { cursor:default; }
.group-member-line { display:flex; align-items:center; gap:8px; }
.group-member-line > .group-member-row { flex:1; min-width:0; }
.group-member-remove { flex:none; min-height:36px; padding:0 14px; border:1px solid rgba(217,119,87,.55); border-radius:999px; background:transparent; color:#e8957a; font:inherit; font-size:14.5px; font-weight:600; cursor:pointer; }
.group-member-remove:active { transform:scale(.97); }
.group-member-photo { position:relative; flex:none; width:48px; height:48px; }
.group-member-photo img { display:block; width:100%; height:100%; object-fit:cover; border-radius:14px; box-shadow:0 0 0 1.5px rgba(255,255,255,.18),0 2px 8px rgba(0,0,0,.4); }
.group-member-photo.is-placeholder img { opacity:.6; }
.group-member-online { position:absolute; right:-3px; bottom:-3px; width:13px; height:13px; border-radius:50%; background:#3ecf73; border:3px solid #0b0d12; }
.group-member-text { flex:1; min-width:0; display:flex; flex-direction:column; align-items:flex-start; gap:4px; }
.group-member-name-row { display:flex; align-items:center; gap:8px; max-width:100%; }
.group-member-name { min-width:0; font-size:17px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.group-member-you { flex:none; font-size:11.5px; font-weight:800; color:#0b1422; background:var(--group-accent); padding:2px 7px; border-radius:999px; }
.group-member-verify { font-size:14px; font-weight:500; }
.group-member-verify.is-verified { color:#4cc38a; }
.group-member-verify.is-not-verified { color:#e0876a; }
.group-members-more { align-self:center; margin-top:8px; min-height:44px; padding:0 18px; border-radius:22px; border:1px solid #2a3243; background:#131822; color:#cfd6e2; font:inherit; font-size:15px; cursor:pointer; }

/* Viewed Me on the Social side (Jay, October 21, 2026): its pill's count, and the list page, whose rows are the chat
   list's own (the list sits in .chat-panel.chat-list-view for them). */
.chat-viewed-pill { display:inline-flex; align-items:center; gap:7px; }
.chat-pill-count { display:inline-flex; align-items:center; justify-content:center; min-width:20px; height:20px; padding:0 6px; border-radius:10px;
  background:#fff; color:#0d1014; font-size:12px; font-weight:700; line-height:1; }
.chat-viewed-title { margin:4px 16px 2px; font:500 28px/1.15 var(--room-serif,Georgia,serif); }
.chat-viewed-list.chat-panel { display:block; gap:0; padding:0; }
.chat-viewed-list .chat-item.is-skeleton .chat-viewed-skeleton { height:40px; border-radius:8px; }
.chat-viewed-empty { margin:16px; color:#8f98a5; font-size:15px; }
/* Viewed Me without Plus: the rows blurred, each opening the Plus sheet (Jay, October 21, 2026). */
.chat-viewed-new { flex:none; padding:2px 7px; border-radius:6px; background:#d97757; color:#1a0f0b; font-size:12px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
.chat-viewed-row.is-plus-blur :is(.chat-avatar,.chat-item-name,.chat-item-last) { filter:blur(7px); }

/* Saved phrases (Jay, October 22, 2026; member-chat.js phraseButton): a button inside the message box, beside the send
   arrow, while the box is empty. It fades out slowly as they type, goes at once on a paste (.is-instant), and fades back in
   once the box is empty again. */
.chat-panel .chat-phrases-button { flex:none; align-self:center; display:inline-flex; align-items:center; gap:5px; max-width:170px; height:34px; margin:0 2px; padding:0 11px;
  overflow:hidden; white-space:nowrap; border:1px solid rgba(217,119,87,.45); border-radius:17px; background:#1a2230; color:#c4d4ea; font-size:14px; font-weight:600;
  opacity:1; transition:opacity 1.4s ease, max-width 1.4s ease, padding 1.4s ease, margin 1.4s ease, border-width 1.4s ease; }
.chat-panel .chat-conversation.is-grid .chat-phrases-button { border-color:rgba(217,119,87,.55); background:#241a16; color:#f3c4b2; }
.chat-panel .chat-phrases-button.is-hidden { opacity:0; max-width:0; padding:0; margin:0; border-width:0; pointer-events:none; }
.chat-panel .chat-phrases-button.is-instant { transition:none; }
.chat-panel .chat-phrases-button[hidden] { display:none; }
.chat-phrases-icon { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2; stroke-linejoin:round; }
@media (prefers-reduced-motion: reduce) { .chat-panel .chat-phrases-button { transition:opacity .2s ease; } }
.chat-phrases-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.chat-phrases-head h4 { margin:0; }
.chat-panel .chat-link-button { min-height:44px; padding:0 4px; border:0; background:none; color:#e0957a; font-size:15px; font-weight:600; }
.chat-phrases-sheet.is-grid .chat-link-button, .chat-phrases-page.is-grid .chat-link-button { color:#e8a184; }
.chat-phrases-list { display:flex; flex-direction:column; gap:8px; margin:8px 0 4px; }
.chat-panel .chat-phrase { display:flex; flex-direction:column; align-items:flex-start; gap:3px; width:100%; padding:12px 14px; text-align:left;
  border:1px solid #2b3340; border-radius:14px; background:#1b2129; color:#ece8df; }
.chat-phrase-name { font-size:13.5px; color:#e0957a; }
.chat-phrases-sheet.is-grid .chat-phrase-name, .chat-phrases-page.is-grid .chat-phrase-name { color:#e8a184; }
.chat-phrase-text { font-size:16px; line-height:1.35; overflow-wrap:anywhere; }
.chat-phrases-list .chat-phrase-text { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.chat-phrases-empty { margin:4px 0 8px; color:#9aa3ae; font-size:15px; }
.chat-phrases-rows { border-top:2px solid #d97757; border-radius:12px; background:#11151b; overflow:hidden; }
.chat-phrases-page.is-grid .chat-phrases-rows { border-top-color:#D97757; background:#12100e; }
.chat-phrase-row { display:flex; align-items:center; gap:10px; min-height:64px; padding:10px 14px; border-bottom:1px solid #222a35; }
.chat-phrase-row:last-child { border-bottom:0; }
.chat-phrase-row-text { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.chat-phrase-row .chat-phrase-text { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-phrases-heading { margin:22px 4px 10px; font-size:15px; font-weight:600; color:#c9d2de; }
.chat-phrases-page.is-grid .chat-phrases-heading { color:#f3c4b2; }
.chat-phrases-count { margin:8px 4px 18px; font-size:13.5px; color:#7f8794; }
.chat-phrase-form { display:flex; flex-direction:column; padding:14px; border:1px solid #2b3340; border-radius:16px; background:#141920; }
.chat-phrase-label { margin:0 0 6px; font-size:13px; letter-spacing:.08em; text-transform:uppercase; color:#8f9bab; }
.chat-phrase-input { box-sizing:border-box; width:100%; min-height:48px; margin-bottom:12px; padding:10px 12px; border:1px solid #2b3340; border-radius:12px; background:#0f1318; color:#ece8df; font:inherit; font-size:16px; }
.chat-phrase-textarea { min-height:84px; margin-bottom:0; resize:none; }
.chat-phrase-counter { margin:4px 0 8px; text-align:right; font-size:12.5px; color:#7f8794; }
.chat-phrase-form .chat-secondary { margin-top:8px; }
.chat-panel .chat-danger-text { color:#ff8a80; }
/* The Hush tab in clay (Jay, October 22, 2026): the chosen tab, the form's edge and focus, Save as a clay pill with dark text,
   and Back in clay when the page was opened from a Hush chat. */
.chat-panel.chat-phrases-page.is-grid .chat-segment-on { background:#D97757; color:#1a0f0b; }
.chat-phrases-page.is-grid .chat-phrase-form { border-color:rgba(217,119,87,.35); background:#1a1411; }
.chat-phrases-page.is-grid .chat-phrase-input { border-color:#3a2c25; background:#120e0c; }
.chat-phrases-page.is-grid .chat-phrase-input:focus { outline:none; border-color:#D97757; }
.chat-phrases-page.is-grid .chat-phrase-label { color:#c9a08f; }
:where(body.app-framed) :is(.chat-panel.chat-phrases-page.is-grid,.chat-phrases-sheet.is-grid) .chat-primary { background:#D97757; color:#1a0f0b; }
:where(body.app-framed) .chat-panel.chat-phrases-page.is-grid .chat-primary:hover { background:#e08a6d; }
:where(body.app-framed) .chat-panel.chat-phrases-page.is-grid .chat-secondary:not(.chat-danger-text) { border-color:rgba(217,119,87,.6); background:#1a120f; color:#f3c4b2; }
#portalNavigation:has(.chat-phrases-page.from-hush) #portalMenuBack { color:#f3c4b2; border-color:#D97757; }
/* Opened from a Hush chat, the Saved phrases sheet is a Hush sheet (Jay, October 22, 2026): a warm ground, a clay edge and
   handle, clay names and Manage, and a clay button. */
body.app-framed .chat-phrases-sheet.is-grid .chat-sheet { border-top-color:rgba(217,119,87,.5); background:#18120f; }
body.app-framed .chat-phrases-sheet.is-grid .chat-sheet::before { background:#5a3f33; }
.chat-panel .chat-phrases-sheet.is-grid .chat-phrase { border-color:#3a2c25; background:#211814; }
.chat-phrases-sheet.is-grid .chat-phrases-empty { color:#b9a59b; }
/* Save in the menu's Back row, at its right end (Jay, October 22, 2026): blue, or clay on the Hush tab, dark text. */
.member-portal.app-framed .portal-menu-nav .chat-phrases-save { margin-left:auto; width:auto; min-height:48px; height:48px; padding:0 22px; border:0; border-radius:24px;
  background:#d97757; color:#1a0f0b; font-size:17px; font-weight:700; }
.member-portal.app-framed .portal-menu-nav .chat-phrases-save.is-hush { background:#D97757; color:#1a0f0b; }
.member-portal.app-framed .portal-menu-nav .chat-phrases-save:disabled { opacity:.6; }
/* "Phrase saved" between Back and Save: shown, then a very slow fade (Jay, October 22, 2026). */
.member-portal.app-framed .portal-menu-nav .chat-phrases-saved { flex:1; min-width:0; text-align:center; font-size:15px; font-weight:600; color:#e0957a;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; animation:chat-phrases-saved 9s ease-in forwards; }
.member-portal.app-framed .portal-menu-nav .chat-phrases-saved.is-hush { color:#f3c4b2; }
.member-portal.app-framed .portal-menu-nav .chat-phrases-saved + .chat-phrases-save { margin-left:0; }
@keyframes chat-phrases-saved { 0%,20% { opacity:1; } 100% { opacity:0; } }
@media (prefers-reduced-motion: reduce) { .member-portal.app-framed .portal-menu-nav .chat-phrases-saved { animation:chat-phrases-saved 9s linear forwards; } }

/* One profile (Jay, October 25, 2026): the Social chats' closing notice, after their last message. */
.chat-retire-notice { margin:14px auto 6px; max-width:320px; padding:12px 14px; border:1px solid rgba(217,119,87,.35); border-radius:14px; background:rgba(217,119,87,.08); text-align:center; }
.chat-retire-title { margin:0 0 4px; font-weight:600; font-size:15px; color:#cfdcf0; }
.chat-retire-body { margin:0; font-size:14px; line-height:1.4; color:#a9b5c6; }

/* Switch pills in pill rows (Arrange, Read Receipts): moved here from member-meet.css when Meet was retired (Jay, October 27, 2026). */
.meet-pill { flex:none; position:relative; margin-left:auto; display:inline-flex; align-items:center; gap:8px; height:36px; box-sizing:border-box; padding:0 7px 0 14px; border:1px solid #363e4a; border-radius:18px; color:#d7dee8; font-size:15px; font-weight:600; white-space:nowrap; cursor:pointer; }
.meet-pill.is-on { border-color:#d97757; background:#2a1812; color:#f3d5c8; font-weight:700; }
.meet-pill input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.meet-switch { position:relative; width:36px; height:22px; border-radius:11px; background:#3a424e; transition:background .2s ease; }
.meet-knob { position:absolute; top:2px; left:2px; width:18px; height:18px; border-radius:50%; background:#c7d0dc; transition:transform .2s ease, background .2s ease; }
.meet-pill.is-on .meet-switch { background:#d97757; }
.meet-pill.is-on .meet-knob { transform:translateX(14px); background:#fff; }
.meet-pill:focus-within { outline:2px solid #d97757; outline-offset:2px; }
@media (prefers-reduced-motion: reduce) {
  .meet-switch, .meet-knob { transition:none; }
}
/* A photo that's still downloading stays hidden, then fades in whole (Jay, October 27, 2026; loadPhoto in member-chat.js). */
img[data-loading] { opacity:0; }
.chat-avatar img, .chat-member-grid img { transition:opacity .2s ease; }
@media (prefers-reduced-motion:reduce) { .chat-avatar img, .chat-member-grid img { transition:none; } }
