/* ==========================================================================
   Nexvoryn chat UI v2.3 (chat.css) — loaded by the guest layout and the staff/owner layout after aq.css.
   A  wallpaper + chat frame         F  menus, emoji, photo sheet, lightbox
   B  messages: bubbles, tails ...   G  shared rows: chat rows, member rows, option rows, file cards
   C  pinned bar, typing, jump       H  customer shell: header, intro card, starters, sheets
   D  composer, attach, voice        I  customer Chats home, group thread, group info
   E  banners, empty / error         J  join page, QR page
   Colours only come from aq.css tokens, so light, dark and every accent work without extra rules.
   ========================================================================== */
:root {
  --aq-doodle: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22232%22%20height%3D%22232%22%20viewBox%3D%220%200%20232%20232%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cg%20transform%3D%22translate(30%2034)%20rotate(-12)%20scale(1.05)%22%3E%3Cpath%20d%3D%22M-9-6h18a3%203%200%200%201%203%203v8a3%203%200%200%201-3%203h-9l-5%204v-4h-4a3%203%200%200%201-3-3v-8a3%203%200%200%201%203-3z%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(118%2022)%20rotate(8)%20scale(0.8)%22%3E%3Cpath%20d%3D%22M0-8l2.3%204.8%205.2.7-3.8%203.6.9%205.2L0%203.8l-4.6%202.5.9-5.2-3.8-3.6%205.2-.7z%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(196%2048)%20rotate(15)%20scale(1)%22%3E%3Cpath%20d%3D%22M-8%202v-2a8%208%200%200%201%2016%200v2%22%2F%3E%3Crect%20x%3D%22-9%22%20y%3D%221%22%20width%3D%224%22%20height%3D%226%22%20rx%3D%221.5%22%2F%3E%3Crect%20x%3D%225%22%20y%3D%221%22%20width%3D%224%22%20height%3D%226%22%20rx%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M7%207a3%203%200%200%201-3%202h-2%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(70%2096)%20rotate(25)%20scale(0.75)%22%3E%3Cpath%20d%3D%22M0-8v16M-8%200h16M-5-5l10%2010M5-5l-10%2010%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(150%20104)%20rotate(-10)%20scale(0.9)%22%3E%3Cpath%20d%3D%22M0%208s-8-4.7-8-10a4.5%204.5%200%200%201%208-2.6%204.5%204.5%200%200%201%208%202.6c0%205.3-8%2010-8%2010z%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(214%20128)%20rotate(-20)%20scale(0.85)%22%3E%3Cpath%20d%3D%22M9-9-1.5%201.5%22%2F%3E%3Cpath%20d%3D%22M9-9-2%209l-3.5-7.5L-9-2z%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(26%20156)%20rotate(10)%20scale(0.9)%22%3E%3Ccircle%20r%3D%223.5%22%2F%3E%3Cpath%20d%3D%22M3.5%200v1.5a2.5%202.5%200%200%200%205%200V0a8.5%208.5%200%201%200-3.3%206.7%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(104%20170)%20rotate(-6)%20scale(1)%22%3E%3Cpath%20d%3D%22M9-6h-18a3%203%200%200%200-3%203v8a3%203%200%200%200%203%203h9l5%204v-4h4a3%203%200%200%200%203-3v-8a3%203%200%200%200-3-3z%22%2F%3E%3Cpath%20d%3D%22M-5%200h10M-5%204h6%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(180%20192)%20rotate(12)%20scale(0.8)%22%3E%3Ccircle%20r%3D%228%22%2F%3E%3Cpath%20d%3D%22m-3.5.5%202.3%202.3L4-2%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(52%20212)%20rotate(-15)%20scale(0.8)%22%3E%3Cpath%20d%3D%22M1-9-8%202h7l-1%207%209-11H0z%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(136%20222)%20rotate(5)%20scale(0.7)%22%3E%3Cpath%20d%3D%22M0-8l2.3%204.8%205.2.7-3.8%203.6.9%205.2L0%203.8l-4.6%202.5.9-5.2-3.8-3.6%205.2-.7z%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(226%20206)%20rotate(0)%20scale(0.5)%22%3E%3Cpath%20d%3D%22M0-8v16M-8%200h16M-5-5l10%2010M5-5l-10%2010%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(92%2044)%20rotate(0)%20scale(1)%22%3E%3Ccircle%20r%3D%221.1%22%20fill%3D%22%23000%22%20stroke%3D%22none%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(176%2086)%20rotate(0)%20scale(1)%22%3E%3Ccircle%20r%3D%221.1%22%20fill%3D%22%23000%22%20stroke%3D%22none%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(14%20110)%20rotate(0)%20scale(1)%22%3E%3Ccircle%20r%3D%221.1%22%20fill%3D%22%23000%22%20stroke%3D%22none%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(206%20170)%20rotate(0)%20scale(1)%22%3E%3Ccircle%20r%3D%221.1%22%20fill%3D%22%23000%22%20stroke%3D%22none%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(120%20140)%20rotate(0)%20scale(1)%22%3E%3Ccircle%20r%3D%221.1%22%20fill%3D%22%23000%22%20stroke%3D%22none%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(60%20184)%20rotate(0)%20scale(1)%22%3E%3Ccircle%20r%3D%221.1%22%20fill%3D%22%23000%22%20stroke%3D%22none%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(230%2010)%20rotate(20)%20scale(0.8)%22%3E%3Ccircle%20r%3D%228%22%2F%3E%3Cpath%20d%3D%22M-3.5%202.2a4.5%204.5%200%200%200%207%200%22%2F%3E%3Cpath%20d%3D%22M-2.8-2.5h.01M2.8-2.5h.01%22%20stroke-width%3D%222.2%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --aq-tail-out: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2011%2015%22%3E%3Cpath%20d%3D%22M0%200C.6%206.5%204%2012.3%2011%2015H0Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
  --aq-tail-in: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2011%2015%22%3E%3Cpath%20d%3D%22M11%200C10.4%206.5%207%2012.3%200%2015h11Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
  --aq-bubble-shadow: var(--bubble-shadow);
}

/* ---------- A. chat frame + wallpaper ---------- */
.chat { position: relative; display: flex; flex-direction: column; min-height: 0; height: 100%; background: var(--wallpaper-gradient); color: var(--text-primary); }
.chat-scrollwrap { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; isolation: isolate; }
.chat-wall { position: absolute; inset: 0; z-index: -1; pointer-events: none; background-color: var(--doodle); opacity: var(--doodle-opacity); -webkit-mask-image: var(--aq-doodle); mask-image: var(--aq-doodle); -webkit-mask-size: 232px 232px; mask-size: 232px 232px; }
.chat.is-drop::after { content: "Drop to send"; position: absolute; inset: 10px; z-index: 50; display: flex; align-items: center; justify-content: center; border: 2px dashed var(--accent); border-radius: 22px; background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--accent-text); font-weight: 600; font-size: 18px; pointer-events: none; }
.chat-banners { flex: none; position: relative; z-index: 4; }
.chat-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scroll-behavior: auto; outline: 0; }
.chat-list { display: flex; flex-direction: column; justify-content: flex-end; min-height: 100%; padding: 8px 0 10px; }
.chat-top, .chat-foot { flex: none; }
.chat-top:empty, .chat-foot:empty { display: none; }
.chat-msgs { display: flex; flex-direction: column; padding: 4px 12px; }
.chat-older { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-secondary); font-size: 12.5px; font-weight: 500; padding: 10px; }
.chat-older .spinner { width: 16px; height: 16px; border-width: 2px; }

/* day chips + unread divider */
.chat-day { position: sticky; top: 8px; z-index: 3; display: flex; justify-content: center; margin: 12px 0 8px; pointer-events: none; }
.chat-day span, .msg-syspill {
  background: var(--pill-bg); color: var(--pill-text); border: 1px solid var(--pill-border); box-shadow: var(--shadow-e1);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-radius: var(--aq-r-pill);
}
.chat-day span { font-size: 12px; line-height: 16px; font-weight: 600; padding: 5px 12px; transition: opacity .25s ease; }
/* REVIEW-WEB: a chip that floats over the messages (stuck) fades out when the list stops moving (chat.js scrollDays) */
.chat-scroll:not(.is-scrolling) .chat-day.is-stuck span { opacity: 0; }
.chat-unread { display: flex; align-items: center; gap: 10px; margin: 12px 0 6px; color: var(--accent-text); font-size: 12px; line-height: 16px; font-weight: 600; }
.chat-unread::before, .chat-unread::after { content: ""; flex: 1; height: 1px; background: var(--accent); opacity: .35; }

/* ---------- B. messages ---------- */
.msg { position: relative; display: flex; flex-direction: column; margin-top: 2px; }
.msg-first { margin-top: 8px; }
.msg-in { align-items: flex-start; }
.msg-out { align-items: flex-end; }
.msg-sys { align-items: center; margin: 8px 0; padding: 0 6px; }
.msg-syspill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; max-width: min(86%, 440px); text-align: center; font-size: 12px; line-height: 16px; font-weight: 500; padding: 6px 14px; }
.msg-syspill svg { flex: none; opacity: .85; }

.msg-bubble {
  position: relative; width: fit-content; min-width: 64px; max-width: min(78%, 560px); padding: 7px 12px 7px; border-radius: var(--aq-r-bubble);
  background: var(--bubble-in); color: var(--bubble-in-text); box-shadow: var(--aq-bubble-shadow);
  font-size: 16px; line-height: 22px; letter-spacing: -0.006em;
  outline: 0; touch-action: pan-y; -webkit-touch-callout: none; user-select: text; transition: transform 180ms var(--aq-ease);
}
.msg-out .msg-bubble { background: var(--bubble-own); color: var(--bubble-own-text); }
.msg-bubble:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* the tail sits on the LAST bubble of a run (bottom outer corner), the corner it grows from is 4 px */
.msg-in.msg-last .msg-bubble:not(.is-emoji) { border-bottom-left-radius: 4px; }
.msg-out.msg-last .msg-bubble:not(.is-emoji) { border-bottom-right-radius: 4px; }
.msg-last .msg-bubble:not(.is-emoji)::before { content: ""; position: absolute; bottom: 0; width: 11px; height: 15px; pointer-events: none; }
.msg-in.msg-last .msg-bubble:not(.is-emoji)::before { left: -8px; background: var(--bubble-in); -webkit-mask: var(--aq-tail-in) no-repeat; mask: var(--aq-tail-in) no-repeat; }
.msg-out.msg-last .msg-bubble:not(.is-emoji)::before { right: -8px; background: var(--bubble-own-end); -webkit-mask: var(--aq-tail-out) no-repeat; mask: var(--aq-tail-out) no-repeat; }
.msg-bubble.is-flash { animation: aq-flash 1.4s var(--aq-ease); }
@keyframes aq-flash { 0%, 100% { box-shadow: var(--aq-bubble-shadow); } 25%, 70% { box-shadow: 0 0 0 4px var(--accent-soft), 0 0 0 6px color-mix(in srgb, var(--accent) 45%, transparent); } }
.msg-bubble.is-pending { opacity: .92; }
.msg-bubble.is-failed { box-shadow: 0 0 0 1.5px var(--danger); }
.msg-bubble.is-mention { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 60%, transparent), var(--aq-bubble-shadow); }
.msg.is-just-deleted .msg-bubble { animation: aq-fade 220ms var(--aq-ease); }
.msg-out:not(.msg-skel) .msg-bubble.is-pending { animation: aq-send .32s var(--aq-ease-spring); transform-origin: bottom right; }
@keyframes aq-send { from { transform: scale(.92); opacity: .6; } to { transform: none; opacity: .92; } }
.msg-in.msg-last:not(.msg-skel) { animation: aq-rise 220ms var(--aq-ease); }

.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; unicode-bidi: plaintext; }
.msg-text .link { color: var(--bubble-in-link); word-break: break-all; }
.msg-out .msg-text .link { color: var(--bubble-own-link); }
.msg-text:lang(ur), .msg-text[dir="rtl"] { font-family: var(--aq-font-urdu); line-height: 1.75; }
.msg-bubble.is-emoji { background: transparent !important; box-shadow: none !important; padding: 2px 4px 0; min-width: 0; }
.msg-bubble.is-emoji .msg-text { font-size: 40px; line-height: 1.15; }
.msg-bubble.is-emoji-1 .msg-text { font-size: 56px; line-height: 1.1; }
.msg-bubble.is-emoji-2 .msg-text { font-size: 46px; }
.msg-bubble.is-emoji .msg-meta { background: var(--pill-bg); border-radius: 10px; padding: 1px 6px; color: var(--pill-text); }

/* time + ticks: float at the end of the last text line */
.msg-meta { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 11.5px; line-height: 14px; font-weight: 500; letter-spacing: .01em; white-space: nowrap; color: var(--bubble-in-time); user-select: none; }
.msg-text .msg-meta { float: right; position: relative; top: 7px; margin: 0 0 0 12px; }
.msg-bubble > .msg-meta { display: flex; margin-top: 2px; }
.msg-out .msg-meta { color: var(--bubble-own-time); }
.msg-edited { font-size: 11px; opacity: .85; margin-right: 2px; }
.msg-flag { display: inline-flex; opacity: .85; }
.tk { display: inline-flex; align-items: center; color: var(--tick-sent); }
.tk svg { display: block; }
.tk[data-status="read"] { color: var(--tick-read); }
.tk-own { color: var(--tick-own-sent); }
.tk-own[data-status="read"] { color: var(--tick-own-read); }
.tk-own[data-status="delivered"] { color: var(--tick-own-delivered); }
.tk.is-new svg path:last-child { stroke-dasharray: 14; stroke-dashoffset: 14; animation: aq-draw .15s var(--aq-ease) forwards; }
@keyframes aq-draw { to { stroke-dashoffset: 0; } }

/* group senders */
.msg-g.msg-in { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 8px; align-items: start; justify-items: start; }
.msg-g.msg-in > * { grid-column: 2; }
.msg-g.msg-in > .msg-av { grid-column: 1; grid-row: 1 / span 3; align-self: start; }
.msg-g.msg-in:not(.msg-first) > .msg-av { visibility: hidden; }
.msg-g.msg-in .msg-bubble { max-width: min(82%, 540px); }
.msg-sender { display: flex; align-items: baseline; gap: 6px; min-width: 0; margin: 0 0 2px; font-size: 13.5px; line-height: 18px; font-weight: 600; color: var(--accent-text); }
.msg-sender-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-sender-r { flex: none; font-size: 11.5px; font-weight: 600; opacity: .9; }
.msg-sender-r::before { content: "· "; }
.msg-sender.is-anon { color: var(--text-muted); font-weight: 500; }
.msg:not(.msg-first) .msg-sender { display: none; }
.msg-tag { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 3px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--warning-text); }
.msg-tag-auto { color: var(--text-muted); font-weight: 500; font-style: italic; }
.msg-tag-fwd { color: inherit; opacity: .72; font-weight: 500; font-style: italic; }
.msg.msg-t-broadcast .msg-bubble { background: var(--warning-tint); color: var(--text-primary); box-shadow: 0 0 0 1px color-mix(in srgb, var(--warning) 30%, transparent), var(--aq-bubble-shadow); }
.msg.msg-t-broadcast.msg-out .msg-bubble { background: var(--bubble-own); color: var(--bubble-own-text); }
.msg-opts { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--text-secondary); display: inline-flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 120ms; box-shadow: var(--shadow-e1); }
.msg-bubble:hover .msg-opts, .msg-bubble:focus-within .msg-opts { opacity: 1; }
.msg-bubble.is-emoji .msg-opts { display: none; }
@media (hover: none) { .msg-opts { display: none; } }

/* tombstones */
.msg-bubble.is-tomb { background: color-mix(in srgb, var(--bubble-in) 72%, transparent); color: var(--text-muted); box-shadow: none; border: 1px dashed var(--border); }
.msg-out .msg-bubble.is-tomb { background: color-mix(in srgb, var(--surface) 55%, transparent); color: var(--text-muted); }
.msg-out.msg-last .msg-bubble.is-tomb::before, .msg-in.msg-last .msg-bubble.is-tomb::before { display: none; }
.msg-tomb { display: flex; align-items: center; gap: 6px; font-style: italic; font-size: 14.5px; }
.msg-bubble.is-tomb .msg-meta { color: var(--text-muted); }

/* reply quote */
.msg-quote { display: flex; flex-direction: column; width: 100%; min-width: 160px; max-width: 100%; margin: 1px -4px 6px; width: calc(100% + 8px); padding: 6px 10px 6px 12px; border: 0; border-radius: 10px; text-align: left; color: inherit; position: relative; overflow: hidden; background: var(--bubble-in-quote-bg); font-size: 13.5px; line-height: 18px; }
.msg-quote::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3.5px; background: var(--bubble-in-quote-bar); }
.msg-out .msg-quote { background: var(--bubble-own-quote-bg); }
.msg-out .msg-quote::before { background: var(--bubble-own-quote-bar); }
.msg-quote-name { display: block; font-size: 12.5px; font-weight: 600; color: var(--bubble-in-quote-bar); }
.msg-out .msg-quote-name { color: var(--bubble-own-quote-bar); }
.msg-quote-text { display: block; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-quote.is-deleted .msg-quote-text { font-style: italic; }

/* photos */
.msg-bubble.is-photo { padding: 4px; }
.msg-bubble.is-photo .msg-text { padding: 4px 8px 2px; }
.msg-bubble.is-photo > .msg-meta { padding: 0 8px 3px; }
.msg-bubble.is-photo .msg-photo + .msg-meta { position: absolute; right: 12px; bottom: 10px; padding: 2px 8px; border-radius: 10px; color: #fff; background: rgba(0, 0, 0, .38); }
.msg-bubble.is-photo .msg-photo + .msg-meta .tk { color: #fff; }
.msg-bubble.is-photo .msg-quote, .msg-bubble.is-photo .msg-sender, .msg-bubble.is-photo .msg-tag { margin-left: 6px; margin-right: 6px; width: auto; }
.msg-photo { position: relative; display: block; width: 240px; max-width: 100%; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: var(--surface-sunken); cursor: zoom-in; }
.msg-photo.no-ratio { aspect-ratio: 4 / 3; }
.msg-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.msg-photo.is-loading { background: linear-gradient(100deg, var(--skel-base) 30%, var(--skel-shine) 50%, var(--skel-base) 70%); background-size: 300% 100%; animation: aq-shimmer 1.4s linear infinite; }
.msg-photo.is-broken .msg-img { visibility: hidden; }
.msg-photo.is-broken::after { content: "Photo unavailable"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 13px; font-weight: 500; }
.msg-uploading { display: none; position: absolute; inset: 0; background: rgba(6, 22, 26, .38); align-items: center; justify-content: center; }
.is-pending .msg-uploading { display: flex; }
.msg-uploading::after { content: ""; width: 30px; height: 30px; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: aq-spin .8s linear infinite; }

/* files */
.msg-bubble.is-file { padding: 6px 6px 6px; }
.msg-bubble.is-file .msg-text { padding: 4px 6px 0; }
.msg-bubble.is-file > .msg-meta { padding: 0 6px 1px; }
.fcard { display: flex; align-items: center; gap: 4px; width: 264px; max-width: 100%; padding: 4px; border-radius: 14px; background: color-mix(in srgb, var(--surface-sunken) 60%, transparent); }
.msg-out .fcard, .fcard.is-out { background: rgba(255, 255, 255, .12); }
.fcard-body { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 2px; border: 0; background: none; color: inherit; text-align: left; border-radius: 10px; cursor: pointer; }
.fcard-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fcard-name { font-size: 14.5px; line-height: 19px; font-weight: 600; min-width: 0; }
.fcard-meta { font-size: 12.5px; line-height: 16px; opacity: .75; margin-top: 1px; }
.fcard-dl { flex: none; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: inherit; opacity: .85; }
.fcard-dl:hover { background: var(--aq-press); color: inherit; opacity: 1; }
.ename { display: flex; min-width: 0; max-width: 100%; white-space: nowrap; }
.ename-h { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ename-t { flex: none; }
.fic { flex: none; display: block; }
.fic-tile { fill: var(--surface-sunken); }
.fic-page { fill: var(--surface); stroke: currentColor; stroke-width: 1.4; }
.fic-fold { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.fic-label { fill: currentColor; font: 700 7.5px/1 var(--aq-font); letter-spacing: .02em; }
.fic-pdf { color: var(--danger-text); } .fic-pdf .fic-tile { fill: var(--danger-tint); }
.fic-doc { color: var(--info-text); } .fic-doc .fic-tile { fill: var(--info-tint); }
.fic-xls { color: var(--success-text); } .fic-xls .fic-tile { fill: var(--success-tint); }
.fic-ppt, .fic-zip { color: var(--warning-text); } .fic-ppt .fic-tile, .fic-zip .fic-tile { fill: var(--warning-tint); }
.fic-other, .fic-txt { color: var(--text-secondary); }
.msg-out .fic { color: #fff; }
.msg-out .fic .fic-tile { fill: rgba(255, 255, 255, .18); }
.msg-out .fic .fic-page { fill: rgba(255, 255, 255, .12); }

/* reactions: pill overlapping the bubble bottom */
.msg-reactions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 4px; margin: -10px 10px 0; }
.msg-in .msg-reactions { align-self: flex-start; }
.msg-out .msg-reactions { align-self: flex-end; }
.msg-reactions.is-pop .rx { animation: aq-rxpop .38s var(--aq-ease-spring); }
@keyframes aq-rxpop { 0% { transform: scale(.4); } 60% { transform: scale(1.12); } 100% { transform: none; } }
.rx { display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 7px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text-secondary); font-size: 14px; line-height: 1; box-shadow: var(--shadow-e2); }
.rx.is-mine { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.rx { position: relative; }
.rx::after { content: ''; position: absolute; inset: -8px -2px; }   /* 40 px tall touch target, the chip itself stays small */
.rx-n { font-size: 12px; font-weight: 600; }
.msg-failed { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: var(--danger-text); font-size: 12.5px; font-weight: 500; }
.msg-retry { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 6px; border: 0; background: none; color: var(--danger-text); font-weight: 600; font-size: 12.5px; text-decoration: underline; text-underline-offset: 2px; }
.msg-swipe { position: absolute; left: 4px; top: 50%; width: 32px; height: 32px; margin-top: -16px; border-radius: 50%; background: var(--surface); color: var(--accent-text); box-shadow: var(--shadow-e2); display: inline-flex; align-items: center; justify-content: center; opacity: 0; transform: scale(.6); transition: opacity 120ms, transform 160ms var(--aq-ease-spring); pointer-events: none; }
.msg.is-swipe-ready .msg-swipe { opacity: 1; transform: none; }
.msg-skel .msg-bubble { padding: 0; background: transparent; box-shadow: none; min-width: 0; }
.msg-skel .msg-bubble::before { display: none !important; }
.msg-skel .skeleton { border-radius: 18px; }

/* ---------- C. pinned bar, typing, jump to latest ---------- */
.chat-pinbar { position: relative; z-index: 5; flex: none; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 12px 6px 14px; border: 0; border-bottom: 1px solid var(--glass-border); background: var(--glass-bg); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4); backdrop-filter: blur(var(--glass-blur)) saturate(1.4); color: var(--text-primary); text-align: left; cursor: pointer; }
.chat-pinbar:hover { background: color-mix(in srgb, var(--glass-bg) 80%, var(--accent-softer)); }
.pb-bars { flex: none; display: flex; flex-direction: column; gap: 2px; height: 30px; width: 3px; }
.pb-bars i { flex: 1; border-radius: 2px; background: var(--accent); opacity: .3; }
.pb-bars i.is-on { opacity: 1; }
.pb-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pb-tx b { font-size: 12px; line-height: 15px; font-weight: 600; color: var(--accent-text); }
.pb-prev { font-size: 13.5px; line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-ico { flex: none; color: var(--text-muted); display: inline-flex; }

.msg-typing { margin: 6px 12px 4px; }
.msg-typing .msg-bubble { display: flex; gap: 4px; align-items: center; height: 38px; padding: 0 14px; min-width: 0; }
.td { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .5; animation: aq-bounce 1.2s infinite ease-in-out; }
.td:nth-child(2) { animation-delay: .15s; }
.td:nth-child(3) { animation-delay: .3s; }

.chat-jump { position: absolute; right: 14px; bottom: 14px; z-index: 4; width: 44px; height: 44px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--text-secondary); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-e2); animation: aq-pop .16s var(--aq-ease); transition: transform 120ms, background-color 150ms; -webkit-tap-highlight-color: transparent; }
.chat-jump:active { transform: scale(.92); }
.chat-jump.has-new { color: var(--accent-text); }
.cj-n { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--unread-bg); color: var(--unread-text); font-size: 12px; font-weight: 700; line-height: 1; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--surface); }

/* ---------- D. composer ---------- */
.chat-quick { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 12px 2px; overflow-x: auto; scrollbar-width: none; }
.chat-quick::-webkit-scrollbar { display: none; }
.qr-wrap { position: relative; flex: none; }
.qr { flex: none; display: inline-flex; align-items: center; gap: 4px; max-width: 260px; height: 38px; padding: 0 14px; border: 1px solid var(--accent); border-radius: 19px; background: var(--aq-chip); color: var(--accent-text); font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: var(--shadow-e1); }
.qr:hover { background: var(--accent-softer); }
.qr-add { border-style: dashed; color: var(--text-secondary); border-color: var(--border); box-shadow: none; }
.qr-edit { border-color: transparent; background: none; color: var(--text-secondary); box-shadow: none; }
.qr-x { position: absolute; top: -4px; right: -4px; width: 22px; height: 22px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--danger); display: inline-flex; align-items: center; justify-content: center; }

.chat-replybar { flex: none; display: flex; align-items: center; gap: 6px; margin: 6px 10px 0; padding: 6px 4px 6px 6px; border-radius: 16px; background: var(--aq-field); border: 1px solid var(--border); box-shadow: var(--shadow-e2); animation: aq-rise 220ms var(--aq-ease-emph); }
.rb-quote { position: relative; flex: 1; min-width: 0; padding: 4px 10px 4px 14px; border-radius: 10px; background: var(--bubble-in-quote-bg); }
.rb-quote::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 2px; background: var(--accent); }
.rb-quote-name { font-size: 12.5px; line-height: 16px; font-weight: 600; color: var(--accent-text); }
.rb-quote-text { font-size: 13.5px; line-height: 18px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-replybar.is-edit .rb-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-text); }

.chat-composer { position: relative; flex: none; display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
.chat-field { flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 0; min-height: 48px; padding: 4px 4px; border-radius: var(--r-composer, 24px); background: var(--aq-field); border: 1px solid var(--border); box-shadow: var(--shadow-e2); color: var(--text-muted); transition: box-shadow var(--aq-dur-fast), border-color var(--aq-dur-fast); }
.chat-field:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.chat-field .cbtn { width: 40px; height: 40px; color: var(--text-muted); align-self: flex-end; }
.chat-field .cbtn:hover { color: var(--text-secondary); }
.chat-field .cbtn:active { transform: scale(.88); }
.chat-input { flex: 1; min-width: 0; align-self: center; display: block; max-height: 132px; padding: 9px 4px; border: 0; outline: 0; resize: none; background: none; color: var(--text-primary); font-size: 16px; line-height: 22px; overflow-y: auto; }
.chat-input::placeholder { color: var(--text-muted); }
.chat-input:disabled { cursor: not-allowed; }
.chat-send { position: relative; flex: none; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--bubble-own); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform 140ms var(--aq-ease-spring), filter 150ms, width 160ms var(--aq-ease), height 160ms var(--aq-ease); box-shadow: var(--shadow-fab); }
.chat-send:hover:not(:disabled) { filter: brightness(1.06); }
.chat-send:disabled { filter: saturate(.4) brightness(1.1); box-shadow: none; opacity: .7; }
.chat-send:active:not(:disabled) { transform: scale(.92); }
.chat-send.is-morph svg { animation: aq-morph .34s var(--aq-ease-spring); }
@keyframes aq-morph { from { transform: scale(.3) rotate(-60deg); opacity: 0; } to { transform: none; opacity: 1; } }
.chat-send.is-rec-hold { width: 56px; height: 56px; margin: -4px -4px -4px 0; animation: aq-ring 1.1s infinite; z-index: 3; }
.chat-send svg { pointer-events: none; }
.chat-composer.is-recording .chat-field { display: none; }

/* locked composer (channels, view-only, removed) */
.chat-lockbar { flex: none; display: flex; justify-content: center; padding: 8px 12px 12px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.lb-pill { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; max-width: 560px; min-height: 48px; padding: 6px 8px 6px 16px; border-radius: var(--aq-r-pill); background: var(--aq-field); border: 1px solid var(--border); box-shadow: var(--shadow-e1); color: var(--text-secondary); font-size: 14px; line-height: 18px; font-weight: 500; text-align: center; }
.lb-pill > svg { flex: none; }
.lb-text { min-width: 0; }
.lb-act { flex: none; min-height: 36px; padding: 0 12px; border: 0; border-radius: 18px; background: none; color: var(--accent-text); font-weight: 600; font-size: 14px; }
.lb-act:hover { background: var(--accent-softer); }

/* attach menu */
.chat-attach { position: absolute; left: max(10px, env(safe-area-inset-left)); bottom: calc(100% - 2px); z-index: 8; width: min(300px, calc(100vw - 20px)); padding: 6px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-e3); transform-origin: bottom left; animation: aq-pop .16s var(--aq-ease); }
.ca-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 0 10px; border: 0; border-radius: 14px; background: none; text-align: left; color: var(--text-primary); -webkit-tap-highlight-color: transparent; }
.ca-item:hover, .ca-item:focus-visible { background: var(--accent-softer); }
.ca-tx { display: flex; flex-direction: column; min-width: 0; }
.ca-tx b { font-size: 15px; line-height: 20px; font-weight: 600; }
.ca-tx span { font-size: 12.5px; line-height: 16px; color: var(--text-secondary); }
.ca-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; }
.ca-cam .ca-ico { background: var(--accent-soft); color: var(--accent-text); }
.ca-lib .ca-ico { background: var(--info-tint); color: var(--info-text); }
.ca-doc .ca-ico { background: var(--warning-tint); color: var(--warning-text); }
.ca-hint { display: flex; align-items: center; gap: 10px; margin-top: 4px; padding: 10px 10px 8px; border-top: 1px solid var(--divider); font-size: 12.5px; line-height: 1.4; color: var(--text-secondary); }
.ca-hint .ca-ico { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-sunken); color: var(--text-secondary); }
.chat-composer.is-recording .chat-attach { display: none; }
.doc-preview { margin: 14px 0 10px; display: flex; }
.doc-preview .fcard { width: 100%; background: var(--surface-sunken); }
.doc-sheet .field { margin-bottom: 12px; }

/* voice recording (chat-media.js) */
.chat-recbar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border-radius: 24px; background: var(--aq-field); border: 1px solid var(--border); box-shadow: var(--shadow-e2); }
.chat-recbar.is-cancel { background: var(--danger-tint); }
.rb-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: aq-pulse 1s infinite; }
.rb-timer { flex: none; min-width: 38px; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.rb-wave { flex: 1; min-width: 0; height: 30px; display: flex; align-items: center; gap: 2px; overflow: hidden; }
.rb-bar { flex: 1 1 0; min-width: 2px; max-width: 3px; min-height: 3px; border-radius: 2px; background: var(--accent-text); transition: height .07s linear; }
.rb-hint { flex: none; display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 500; color: var(--text-secondary); animation: aq-bob 1.6s infinite; }
.chat-recbar.is-cancel .rb-hint { color: var(--danger-text); }
.rb-trash { flex: none; width: 44px; height: 44px; margin-left: -8px; border: 0; border-radius: 50%; background: none; color: var(--danger); display: inline-flex; align-items: center; justify-content: center; }
.rb-trash:hover { background: var(--danger-tint); }
.chat-lock { position: absolute; right: 14px; bottom: 96px; z-index: 6; width: 46px; height: 82px; border-radius: 23px; background: var(--surface); color: var(--text-primary); border: 1px solid var(--border); box-shadow: var(--shadow-e3); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; animation: aq-rise 220ms var(--aq-ease-spring); }
.chat-lock svg:last-child { color: var(--text-muted); animation: aq-bob 1.2s infinite; }
.chat-rectip { position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 6; padding: 7px 14px; border-radius: 16px; background: var(--text-primary); color: var(--surface); font-size: 12.5px; font-weight: 500; white-space: nowrap; pointer-events: none; }
.chat-tray { flex: none; height: 290px; background: var(--surface); border-top: 1px solid var(--divider); }
.chat-tray .emo { height: 100%; }

/* voice player */
.vp { display: flex; align-items: center; gap: 10px; width: 258px; max-width: 100%; padding-top: 2px; }
.msg-bubble.is-voice { padding: 8px 12px 6px 8px; }
.vp-btn { position: relative; flex: none; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; transition: transform 120ms var(--aq-ease-spring); }
.vp-btn:active { transform: scale(.9); }
.vp-out .vp-btn { background: rgba(255, 255, 255, .2); color: #fff; }
.vp-btn.is-unplayed::after { content: ""; position: absolute; right: -1px; top: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 2px var(--bubble-in); }
.vp-body { flex: 1; min-width: 0; }
.vp-wave { display: flex; align-items: center; gap: 2px; height: 30px; cursor: pointer; touch-action: pan-y; border-radius: 6px; color: var(--accent-text); }
.vp-out .vp-wave { color: #fff; }
.vp-bar { flex: 1 1 0; min-width: 2px; max-width: 3px; border-radius: 2px; background: currentColor; opacity: .35; transition: opacity .08s; }
.vp-bar.on { opacity: 1; }
.vp-meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 1px; font-size: 11.5px; line-height: 16px; color: var(--bubble-in-time); }
.vp-out .vp-meta { color: var(--bubble-own-time); }
.vp-speed { height: 18px; min-width: 30px; padding: 0 7px; border: 0; border-radius: 9px; background: var(--surface-sunken); color: var(--text-secondary); font-size: 11.5px; font-weight: 700; line-height: 18px; }
.vp-out .vp-speed { background: rgba(255, 255, 255, .2); color: #fff; }
.vp-dl { color: inherit; font-weight: 600; }

/* ---------- E. banners, empty / error ---------- */
.chat-banner { display: flex; align-items: center; gap: 10px; margin: 8px 10px 0; padding: 8px 8px 8px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-e2); color: var(--text-primary); font-size: 14px; line-height: 1.35; font-weight: 500; }
.chat-banner > svg { flex: none; }
.chat-banner .cb-text { flex: 1; min-width: 0; }
.chat-banner .btn { min-height: 36px; border-radius: 11px; padding: 0 14px; font-size: 14px; }
.chat-banner .cbtn { width: 36px; height: 36px; }
.chat-banner-push > svg { color: var(--warning-text); }
.chat-banner-warn { margin: 0; justify-content: center; border-radius: 0; border: 0; border-bottom: 1px solid var(--glass-border); box-shadow: none; padding: 7px 14px; background: var(--warning-tint); color: var(--warning-text); font-size: 13px; }
.chat-banner-rate { flex-wrap: wrap; row-gap: 2px; }
.chat-banner-rate .cb-text { flex: 1 1 140px; }
.chat-banner-rate .spick { margin: 0; gap: 0; }
.chat-empty, .chat-error { display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 300px; margin: 0 auto; padding: 28px 16px; text-align: center; color: var(--text-secondary); font-size: 14.5px; line-height: 20px; }
.chat-empty b, .chat-error b { color: var(--text-primary); font-size: 17px; line-height: 22px; font-weight: 600; }
.chat-error .btn { margin-top: 10px; }
.ce-ico { width: 60px; height: 60px; margin-bottom: 10px; border-radius: 20px; background: var(--surface); color: var(--accent-text); box-shadow: var(--shadow-e2); display: inline-flex; align-items: center; justify-content: center; }
.ce-ico.is-warn { color: var(--danger-text); background: var(--danger-tint); box-shadow: none; }

/* ---------- F. context menu, emoji picker, photo sheet, lightbox ---------- */
.chat-menu { position: fixed; z-index: 1200; min-width: 236px; max-width: calc(100vw - 16px); padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-e3); animation: aq-pop .18s var(--aq-ease); }
.cm-rx { display: flex; gap: 2px; padding: 4px 4px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--divider); }
.cm-emoji { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; font-size: 24px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; transition: transform 120ms var(--aq-ease-spring), background-color 120ms; }
.cm-emoji:hover { background: var(--surface-sunken); transform: scale(1.15); }
.cm-emoji.is-on { background: var(--accent-soft); }
.cm-more { font-size: 0; color: var(--text-secondary); background: var(--surface-sunken); }
.cm-more svg { width: 18px; height: 18px; }
.cm-list { display: flex; flex-direction: column; }
.cm-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 12px; border: 0; border-radius: 10px; background: none; text-align: left; font-size: 15px; font-weight: 500; color: var(--text-primary); }
.cm-item:hover, .cm-item:focus-visible { background: var(--accent-softer); }
.cm-item svg { color: var(--text-secondary); flex: none; }
.cm-item.is-danger, .cm-item.is-danger svg { color: var(--danger-text); }
.cm-item.is-danger:hover { background: var(--danger-tint); }
.cm-item > svg + span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-note { padding: 8px 12px 6px; font-size: 12.5px; color: var(--text-secondary); word-break: break-all; border-top: 1px solid var(--divider); margin-top: 4px; }
.cm-sep { height: 1px; margin: 4px 6px; background: var(--divider); }

.emo { display: flex; flex-direction: column; min-height: 0; }
.emo-search { flex: none; display: flex; align-items: center; gap: 8px; height: 40px; margin: 10px 12px 6px; padding: 0 12px; border-radius: var(--aq-r-pill); background: var(--surface-sunken); color: var(--text-muted); border: 1px solid transparent; }
.emo-search-input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 16px; color: var(--text-primary); }
.emo-tabs { flex: none; display: flex; gap: 4px; padding: 0 8px 6px; overflow-x: auto; scrollbar-width: none; }
.emo-tabs::-webkit-scrollbar { display: none; }
.emo-tab { flex: none; height: 32px; padding: 0 12px; border: 0; border-radius: 16px; background: none; color: var(--text-secondary); font-size: 13px; font-weight: 600; }
.emo-tab.is-on { background: var(--accent-soft); color: var(--accent-text); }
.emo-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px 8px; overscroll-behavior: contain; }
.emo-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; }
.emo-btn { aspect-ratio: 1; min-height: 38px; border: 0; border-radius: 10px; background: none; font-size: 26px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.emo-btn:hover { background: var(--aq-press); }
.emo-empty { grid-column: 1 / -1; padding: 28px 12px; text-align: center; color: var(--text-secondary); font-size: 14px; }

.pv { position: fixed; inset: 0; z-index: 1500; display: flex; flex-direction: column; background: #050D0F; color: #fff; animation: aq-fade 180ms var(--aq-ease); }
.pv-top { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px; padding-top: max(8px, env(safe-area-inset-top)); }
.pv-btn { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.pv-btn:hover { background: rgba(255, 255, 255, .12); }
.pv-heading { flex: 1; min-width: 0; text-align: center; }
.pv-name { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-count { font-size: 12.5px; opacity: .75; }
.pv-stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 6px 12px; }
.pv-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.pv-thumbs { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 14px; overflow-x: auto; scrollbar-width: none; }
.pv-thumb { flex: none; width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; background: #123; opacity: .6; }
.pv-thumb.is-on { border-color: var(--accent-text); opacity: 1; }
.pv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-add { flex: none; width: 56px; height: 56px; border: 2px dashed rgba(255, 255, 255, .4); border-radius: 12px; background: none; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.pv-bar { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 10px 14px; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.pv-field { flex: 1; min-width: 0; display: flex; align-items: center; min-height: 48px; padding: 0 6px; border-radius: 24px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); color: #fff; }
.pv-ibtn { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: rgba(255, 255, 255, .8); display: inline-flex; align-items: center; justify-content: center; }
.pv-caption { flex: 1; min-width: 0; height: 46px; border: 0; outline: 0; background: none; padding: 0 8px; font-size: 16px; color: #fff; }
.pv-caption::placeholder { color: rgba(255, 255, 255, .6); }
.pv-send { position: relative; flex: none; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--bubble-own); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-fab); }
.pv-send.is-busy svg { opacity: 0; }
.pv-send.is-busy::after { content: ""; position: absolute; width: 22px; height: 22px; border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: aq-spin .7s linear infinite; }
.pv-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #fff; color: var(--accent-strong); font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.pv-tray { flex: none; height: 290px; background: var(--surface); color: var(--text-primary); }
.pv-tray .emo { height: 100%; }

.lb { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; background: rgba(4, 12, 14, .96); color: #fff; animation: aq-fade .18s ease-out; }
.lb-top { flex: none; display: flex; align-items: center; gap: 4px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); }
.lb-count { padding-left: 8px; font-size: 14px; opacity: .85; }
.lb-btn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: #fff; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.lb-btn:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.lb-stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 12px; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; user-select: none; -webkit-user-drag: none; transition: opacity .2s; }
.lb-nav { position: absolute; top: 50%; width: 48px; height: 48px; margin-top: -24px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.lb-nav:hover { background: rgba(255, 255, 255, .24); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-cap { flex: none; max-height: 25vh; overflow-y: auto; padding: 12px 20px; padding-bottom: max(16px, env(safe-area-inset-bottom)); text-align: center; font-size: 15px; line-height: 1.45; white-space: pre-wrap; }
.lb-wait { display: none; position: absolute; width: 38px; height: 38px; border: 2.5px solid rgba(255, 255, 255, .3); border-top-color: #fff; border-radius: 50%; animation: aq-spin .8s linear infinite; }
.lb-stage.is-loading .lb-wait { display: block; }
.lb-stage.is-loading .lb-img { opacity: 0; }
.lb-stage.is-broken .lb-img { display: none; }
.lb-stage.is-broken::after { content: "This photo could not be loaded."; color: #fff; font-size: 15px; font-weight: 500; opacity: .85; }

/* ---------- G. shared rows ---------- */
/* avatars built by AQ.v23 */
.av23 { position: relative; flex: none; display: inline-flex; border-radius: 50%; }
.av23-face { border-radius: inherit; }
.av23-face.is-neutral { background: var(--surface-sunken); color: var(--text-muted); }
.av-dot { position: absolute; right: 0; bottom: 0; width: 26%; height: 26%; min-width: 10px; min-height: 10px; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 2.5px var(--online-ring); }
.gav23 { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 30%; background: var(--bubble-own); color: #fff; overflow: hidden; }
.gav23 img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gav23 svg { stroke-width: 1.9; }
.gav23.has-img { background: var(--surface-sunken); }
.privline { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; font-size: 12.5px; line-height: 16px; font-weight: 500; }
.privline > svg { flex: none; }
.privline-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.illu { display: block; color: var(--text-muted); max-width: 100%; height: auto; }

/* chat rows (AQ.v23.chatRow) */
.crow { position: relative; display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 0 16px; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; transition: background-color 150ms; }
.crow:hover { background: var(--accent-softer); color: inherit; }
.crow:active { background: var(--accent-soft); }
.crow.is-on { background: var(--accent-soft); }
.crow:focus-visible { outline-offset: -2px; }
.crow + .crow::before { content: ""; position: absolute; left: 16px; right: 16px; top: 0; height: 1px; background: var(--divider); }
.crow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 12px 0; }
.crow-l1 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.crow-name { flex: 0 1 auto; min-width: 0; font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: -0.011em; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow-l1 .vbadge { flex: none; }
.crow-time { flex: none; margin-left: auto; font-size: 11.5px; line-height: 14px; font-weight: 500; letter-spacing: .01em; color: var(--text-muted); }
.crow-time.is-hot { color: var(--secondary-text); font-weight: 600; }
.crow-l2 { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14.5px; line-height: 20px; color: var(--text-secondary); }
.crow-l2 .tk { flex: none; }
.crow-prev { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow-prev b { font-weight: 600; color: var(--text-primary); }
.crow-prev b.is-anon { color: var(--text-secondary); font-weight: 500; }
.crow-prev.is-typing { color: var(--accent-text); font-weight: 500; }
.crow-prev.is-deleted { font-style: italic; }
.crow-meta { flex: none; display: flex; align-items: center; gap: 6px; color: var(--text-muted); }
.crow-ico { display: inline-flex; }
.crow.is-unread .crow-prev { color: var(--text-primary); }

/* member / receipt rows, option rows */
.mrow { position: relative; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 6px 16px; }
.mrow + .mrow::before { content: ""; position: absolute; left: 70px; right: 0; top: 0; height: 1px; background: var(--divider); }
.mrow-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mrow-tx b { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 15.5px; line-height: 20px; font-weight: 600; }
.mrow-tx b > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow-tx > span { font-size: 13px; line-height: 17px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-list { display: flex; flex-direction: column; margin: 12px 0 4px; border-radius: var(--aq-r-card); background: var(--card); border: 1px solid var(--border); overflow: hidden; }
.opt-row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 14px; border: 0; background: none; text-align: left; color: var(--text-primary); font-size: 15.5px; font-weight: 500; width: 100%; }
.opt-row + .opt-row::before { content: ""; position: absolute; left: 60px; right: 0; top: 0; height: 1px; background: var(--divider); }
.opt-row:hover { background: var(--accent-softer); }
.opt-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-text); }
.opt-t { flex: 1; }
.opt-chev { color: var(--text-muted); flex: none; }
.mute-off { margin-top: 12px; }
.rcpt-sum { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; padding: 12px 14px; border-radius: 16px; background: var(--surface-sunken); }
.rcpt-sum b { display: block; font-size: 15.5px; font-weight: 600; }
.rcpt-sum span { display: block; font-size: 13px; color: var(--text-secondary); }
.rcpt-ico { flex: none; width: 36px; height: 36px; border-radius: 12px; background: var(--surface); display: inline-flex; align-items: center; justify-content: center; }
.rcpt-list { margin: 6px -16px 0; }
.rcpt-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 13px; color: var(--text-secondary); }
.rcpt-note svg { flex: none; margin-top: 1px; }

/* ---------- H. customer shell ---------- */
.guest-body { min-height: 100%; background: var(--bg); }
html:has(.guest-body) { height: 100%; }
.guest { position: relative; height: 100vh; height: 100dvh; max-width: 560px; margin: 0 auto; background: var(--bg); overflow: hidden; }
@media (min-width: 640px) {
  .guest-body { background: radial-gradient(1200px 600px at 85% -10%, var(--hero-glow), transparent 60%), radial-gradient(900px 500px at -10% 110%, var(--hero-glow-2), transparent 60%), var(--bg); }
  .guest { height: calc(100dvh - 40px); margin: 20px auto; border-radius: 28px; border: 1px solid var(--border); box-shadow: var(--shadow-e3); }
}
@media (max-width: 639px) { .gchat { position: fixed; inset: 0; } }
.gchat { display: flex; flex-direction: column; height: 100%; min-height: 0; background: var(--wallpaper); color: var(--text-primary); }
.gchat-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.gchat-body > .chat { flex: 1 1 auto; min-height: 0; }

/* glass header (customer 1:1 and group threads) */
.ghead {
  position: relative; z-index: 8; flex: none; display: flex; align-items: center; gap: 4px; min-height: 60px;
  padding: 6px 6px 6px 4px; padding-top: max(6px, env(safe-area-inset-top)); padding-left: max(4px, env(safe-area-inset-left)); padding-right: max(6px, env(safe-area-inset-right));
  background: var(--glass-bg); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4); backdrop-filter: blur(var(--glass-blur)) saturate(1.4); border-bottom: 1px solid var(--glass-border); color: var(--text-primary);
}
.ghead .cbtn, .ghead .hbtn { color: var(--text-secondary); }
.ghead .gchat-back { color: var(--accent-text); }
.hbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--text-secondary); text-decoration: none; transition: background-color 150ms, transform 120ms; }
.hbtn:hover { background: var(--aq-press); color: var(--text-primary); }
.hbtn:active { transform: scale(.92); }
.hbtn.is-on::after { content: ""; position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 2px var(--surface); }
.hbtn .hb-n { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--unread-bg); color: var(--unread-text); font-size: 11px; font-weight: 700; line-height: 18px; box-shadow: 0 0 0 2px var(--surface); }
.gchat-back { margin-right: -2px; }
.gchat-id { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 2px 6px; border: 0; border-radius: 16px; background: none; color: inherit; text-align: left; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color 150ms; }
.gchat-id:hover { background: var(--aq-press); }
.gchat-av { position: relative; flex: none; display: inline-flex; }
.gchat-av .avatar { width: 40px; height: 40px; font-size: 15px; }
.gchat-dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 2.5px var(--online-ring); }
.gchat-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.gchat-nameline { display: flex; align-items: center; gap: 5px; min-width: 0; }
.gchat-name { display: block; min-width: 0; font-weight: 600; font-size: 16.5px; line-height: 20px; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gchat-badge { display: inline-flex; flex: none; line-height: 0; color: var(--verified); }
.gchat-line { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; line-height: 16px; color: var(--text-secondary); }
.gchat-status { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gchat-status.is-online { color: var(--success-text); font-weight: 600; }
.gchat-status.is-typing { color: var(--accent-text); font-weight: 600; }
.gchat-rate { flex: none; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.gchat-rate .rtag { font-size: 12.5px; }
.gchat-rate .rtag-avg { color: var(--text-primary); }
.gchat-status:not([hidden]) + .gchat-rate::before { content: "·"; margin-right: 3px; color: var(--text-muted); }
.gchat-mute { display: inline-flex; color: var(--text-muted); }
.gchat-loading, .gchat-fatal { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 32px 24px; text-align: center; color: var(--text-secondary); }
.gchat-fatal h2 { color: var(--text-primary); font-size: 20px; font-weight: 600; }
.gchat-fatal-ico { width: 64px; height: 64px; border-radius: 20px; background: var(--danger-tint); color: var(--danger-text); display: inline-flex; align-items: center; justify-content: center; }
.chat-menu-top { z-index: 1250; min-width: 272px; }

/* welcome / intro card at the top of the customer 1:1 chat */
.intro { margin: 10px 12px 8px; padding: 14px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--aq-r-card); box-shadow: var(--shadow-e2); animation: aq-rise 320ms var(--aq-ease-emph); }
.intro-top { display: flex; align-items: center; gap: 14px; min-width: 0; }
.intro-avbtn { position: relative; flex: none; padding: 0; border: 0; border-radius: 50%; background: none; line-height: 0; -webkit-tap-highlight-color: transparent; }
.intro-avbtn .avatar { width: 56px; height: 56px; font-size: 20px; }
.intro-avbtn::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; padding: 2px; background: linear-gradient(135deg, var(--accent), var(--hero-glow)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.intro-dot { position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 2.5px var(--card); }
.intro-id { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.intro-name { font-size: 15.5px; line-height: 20px; font-weight: 600; overflow-wrap: anywhere; }
.intro-name .vbadge { margin-left: 5px; vertical-align: -0.15em; }
.intro-name .nwb { display: inline; }
.intro-name .nwb-name { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
.intro-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 13px; line-height: 17px; color: var(--text-secondary); }
.intro-meta .rtag { font-size: 13px; }
.intro-meta .rtag-avg { color: var(--text-primary); }
.intro-biz { color: var(--text-secondary); }
.intro-meta .rtag + .intro-biz::before { content: "·"; margin-right: 6px; color: var(--text-muted); }
.intro-chip { align-self: flex-start; }
.intro-note { margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--border); font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); }

/* starters + note + resolved */
.chat-starters { display: flex; flex-direction: column; gap: 14px; padding: 6px 12px 8px; }
.chat-starters .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-note { display: flex; align-items: flex-start; gap: 8px; max-width: 340px; margin: 0 auto; color: var(--text-secondary); font-size: 12.5px; line-height: 1.45; text-align: left; }
.chat-note svg { flex: none; margin-top: 1px; color: var(--success); }
.chat-resolved { display: flex; flex-direction: column; align-items: center; gap: 2px; width: fit-content; max-width: calc(100% - 28px); margin: 6px auto 8px; padding: 8px 16px; border-radius: 16px; background: var(--success-tint); color: var(--success-text); text-align: center; font-size: 12.5px; line-height: 1.4; font-weight: 600; box-shadow: var(--shadow-e1); }
.chat-resolved > div { display: inline-flex; align-items: center; gap: 6px; }
.chat-resolved span { font-weight: 400; }

/* header menu: profile card + switches */
.cm-profile { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; margin-bottom: 4px; padding: 8px 10px; border: 0; border-radius: 12px; background: var(--surface-sunken); text-align: left; color: var(--text-primary); -webkit-tap-highlight-color: transparent; }
.cm-profile:hover, .cm-profile:focus-visible { background: var(--accent-softer); }
.cm-profile > svg { flex: none; color: var(--text-muted); }
.cm-pav { width: 42px; height: 42px; font-size: 15px; }
.cm-pr-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.cm-pr-text b { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-pr-text span { font-size: 12.5px; font-weight: 500; color: var(--accent-text); }
.cm-ico { display: inline-flex; color: var(--text-secondary); }
.cm-switch { position: relative; flex: none; margin-left: auto; width: 42px; height: 26px; border-radius: 13px; background: var(--surface-sunken); border: 1px solid var(--border); transition: background-color var(--aq-dur-med); }
.cm-switch i { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform var(--aq-dur-med) var(--aq-ease); }
.cm-switch.is-on { background: var(--accent); border-color: transparent; }
.cm-switch.is-on i { transform: translateX(16px); }

/* profile sheet, staff photo viewer */
.pf-photo { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 14px 0 6px; }
.pf-avwrap { position: relative; }
.pf .avatar-xxl, .viewer .avatar-xxl { box-shadow: 0 0 0 4px var(--accent-soft); }
.pf-cam { position: absolute; right: -2px; bottom: 2px; width: 40px; height: 40px; padding: 0; border: 3px solid var(--surface); border-radius: 50%; background: var(--bubble-own); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-e2); -webkit-tap-highlight-color: transparent; }
.pf-cam:disabled { opacity: .6; }
.pf-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pf-remove, button.pf-remove { color: var(--danger-text); }
.pf-remove:hover, button.pf-remove:hover { background: var(--danger-tint); color: var(--danger-text); }
.pf-progress { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 8px 0 10px; font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.pf-track { position: relative; width: 100%; height: 6px; border-radius: 3px; background: var(--surface-sunken); overflow: hidden; }
.pf-bar { position: absolute; top: 0; bottom: 0; left: 0; width: 40%; border-radius: 3px; background: var(--accent); animation: aq-slide 1.1s ease-in-out infinite; }
.pf-form { margin-top: 10px; }
.viewer { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 24px 22px; }
.viewer .avatar-xxl { width: 132px; height: 132px; font-size: 46px; }
.viewer-name { margin-top: 16px; font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.018em; overflow-wrap: anywhere; }
.viewer-name .nwb { display: inline; }
.viewer-name .nwb-name { white-space: normal; overflow: visible; }
.viewer-name .vbadge { margin-left: 6px; vertical-align: -0.12em; }
.viewer-rate { display: flex; justify-content: center; margin-top: 6px; }
.viewer-biz { font-size: 14px; font-weight: 500; color: var(--text-secondary); }
.viewer-status { margin-top: 8px; font-size: 13.5px; font-weight: 500; color: var(--text-secondary); }
.viewer-status.is-online { color: var(--success-text); }
.viewer-close { margin-top: 18px; min-width: 140px; }

/* chat-shaped loading placeholder */
.gchat-skel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 12px 12px max(14px, env(safe-area-inset-bottom)); background: var(--wallpaper-gradient); overflow: hidden; }
.sk-row { display: flex; }
.sk-in { justify-content: flex-start; }
.sk-out { justify-content: flex-end; }
.sk-bubble { display: block; max-width: 78%; border-radius: 18px; }
.gchat-skel .sk-row:nth-of-type(1) .sk-bubble { width: 58%; height: 54px; }
.gchat-skel .sk-row:nth-of-type(2) .sk-bubble { width: 40%; height: 38px; }
.gchat-skel .sk-row:nth-of-type(3) .sk-bubble { width: 50%; height: 44px; }
.gchat-skel .sk-row:nth-of-type(4) .sk-bubble { width: 68%; height: 64px; }
.gchat-skel .sk-row:nth-of-type(5) .sk-bubble { width: 34%; height: 38px; }
.sk-composer { display: flex; gap: 8px; margin-top: 6px; }
.sk-field { flex: 1; height: 48px; border-radius: 24px; }
.sk-send { flex: none; width: 48px; height: 48px; border-radius: 50%; }
.guest-body .toasts { bottom: calc(92px + env(safe-area-inset-bottom)); }

/* ---------- I. customer Chats home, group thread, group info ---------- */
.gc { position: relative; display: flex; flex-direction: column; height: 100%; min-height: 0; background: var(--bg); color: var(--text-primary); overflow: hidden; }
.webhead { position: relative; z-index: 6; flex: none; display: flex; align-items: center; gap: 6px; min-height: 56px; padding: 6px 6px 6px 16px; padding-top: max(6px, env(safe-area-inset-top)); background: var(--surface); border-bottom: 1px solid var(--border); }
.wh-biz { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; font-size: 17px; line-height: 20px; font-weight: 700; letter-spacing: -0.015em; }
.wh-biz span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-logo { flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--bubble-own); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-e1); }
.wh-logo svg { display: block; }
.gc-scroll { position: relative; isolation: isolate; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.gc-scroll::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 460px; z-index: -1; pointer-events: none; background: radial-gradient(60% 55% at 20% 0%, var(--hero-glow-2), transparent 70%), radial-gradient(55% 50% at 85% 10%, var(--hero-glow), transparent 70%); opacity: .75; }
.gc-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 18px 20px 4px; }
.gc-title h1 { font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -0.022em; }
.gc-title p { font-size: 13.5px; color: var(--text-secondary); margin-top: 2px; }
.gc-search { display: flex; align-items: center; gap: 10px; height: 44px; margin: 12px 16px 4px; padding: 0 14px; border-radius: var(--aq-r-pill); background: var(--surface-sunken); color: var(--text-muted); border: 1.5px solid transparent; transition: border-color 150ms, background-color 150ms; }
.gc-search:focus-within { border-color: var(--accent); background: var(--aq-field); }
.gc-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--text-primary); font-size: 16px; }
.gc-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.gc-section { margin: 12px 12px 0; }
.gc-list { background: var(--card); border: 1px solid var(--border); border-radius: var(--aq-r-card); box-shadow: var(--shadow-e1); overflow: hidden; }
.gc-list .crow:first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.gc-list .crow:last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
.gc-start .crow-name { color: var(--accent-text); }
.gc-start .av23-face { background: var(--accent-soft); color: var(--accent-text); }
.gc-none { padding: 18px 16px; text-align: center; color: var(--text-secondary); font-size: 14px; }
.pwa-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-e2); }
.pwa-logo { flex: none; width: 44px; height: 44px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; background: var(--bubble-own); color: #fff; }
.pwa-tx { flex: 1; min-width: 0; }
.pwa-tx b { display: block; font-size: 15px; line-height: 19px; font-weight: 600; }
.pwa-tx span { display: block; font-size: 13px; line-height: 17px; color: var(--text-secondary); }
.pwa-card .btn { flex: none; }
.pwa-card .cbtn { width: 36px; height: 36px; margin: -4px -4px -4px -6px; color: var(--text-muted); }
.srow-card { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: var(--aq-r-card); background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-e1); }
.srow-ic { flex: none; width: 36px; height: 36px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-text); }
.srow-ic.is-warn { background: var(--warning-tint); color: var(--warning-text); }
.srow-tx { flex: 1; min-width: 0; }
.srow-tx b { display: block; font-size: 15px; line-height: 20px; font-weight: 600; }
.srow-tx span { display: block; font-size: 13px; line-height: 17px; color: var(--text-secondary); }
.gc-note { display: flex; align-items: center; gap: 12px; margin: 16px 16px 0; padding: 14px 16px; border-radius: var(--aq-r-card); border: 1.5px dashed var(--border); color: var(--text-secondary); font-size: 13.5px; line-height: 18px; }
.gc-note .srow-ic { background: var(--success-tint); color: var(--success-text); }
.gc-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin: 16px 12px 0; padding: 26px 20px 24px; border-radius: var(--aq-r-card); background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-e1); }
.gc-empty .illu { margin-bottom: 10px; }
.gc-empty b { font-size: 17px; line-height: 22px; font-weight: 600; }
.gc-empty p { max-width: 260px; font-size: 14.5px; line-height: 20px; color: var(--text-secondary); }
.gc-empty .btn { margin-top: 10px; }
.gc-skel .crow { pointer-events: none; }
.gc-skel .sk-av { width: 52px; height: 52px; border-radius: 50%; flex: none; }
.gc-skel .sk-l { display: block; height: 12px; border-radius: 6px; }

/* group thread overlay (inside /chats) */
.gthread { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; background: var(--wallpaper); animation: aq-pagein 220ms var(--aq-ease-emph); }
.gthread.is-leaving { animation: aq-pageout 150ms var(--aq-ease) forwards; }
@keyframes aq-pagein { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes aq-pageout { to { opacity: 0; transform: translateX(24px); } }
.gthread-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.gthread-body > .chat { flex: 1 1 auto; min-height: 0; }
.ghead .gav23 { box-shadow: var(--shadow-e1); }
.ghead-sub { color: var(--text-secondary); }
.ghead-sub.is-typing { color: var(--accent-text); font-weight: 600; }
.gone-card { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 24px; background: color-mix(in srgb, var(--bg) 70%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: aq-fade 220ms var(--aq-ease); }
.gone-box { width: 100%; max-width: 340px; padding: 26px 22px 20px; border-radius: var(--aq-r-xl); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-e3); text-align: center; }
.gone-box .ce-ico { margin: 0 auto 12px; }
.gone-box h2 { font-size: 20px; line-height: 26px; font-weight: 700; letter-spacing: -0.015em; }
.gone-box p { margin-top: 6px; font-size: 14.5px; line-height: 20px; color: var(--text-secondary); }
.gone-box .btn { margin-top: 18px; }

/* group info (customer): full-height panel with a hero */
.ginfo { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; background: var(--bg); animation: aq-pagein 240ms var(--aq-ease-emph); }
.ginfo.is-leaving { animation: aq-pageout 150ms var(--aq-ease) forwards; }
.ginfo-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: max(28px, env(safe-area-inset-bottom)); }
.ghero { position: relative; isolation: isolate; overflow: hidden; color: var(--text-primary); background: var(--bg); padding: max(6px, env(safe-area-inset-top)) 6px 18px; }
.ghero::before { content: ""; position: absolute; left: -30%; top: -60%; width: 90%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--hero-glow-2) 0%, transparent 64%); z-index: -1; }
.ghero::after { content: ""; position: absolute; right: -30%; top: -70%; width: 100%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--hero-glow) 0%, transparent 62%); z-index: -1; }
.ghero-doodle { display: none; }
.ghero-bar { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
.ghero .hbtn { color: var(--text-primary); }
.ghero .hbtn:hover { background: var(--aq-press); color: var(--text-primary); }
.ghero-id { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 20px; text-align: center; }
.ghero-avbtn { padding: 0; border: 0; background: none; border-radius: 30%; line-height: 0; cursor: zoom-in; box-shadow: var(--shadow-fab); }
.ghero-avbtn:disabled { cursor: default; }
.ghero h1 { margin-top: 10px; font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.018em; overflow-wrap: anywhere; }
.ghero-meta { font-size: 14px; line-height: 18px; color: var(--text-secondary); }
.ghero .privline { margin-top: 6px; min-height: 30px; padding: 0 14px; border-radius: 15px; background: var(--accent-soft); color: var(--accent-text); font-weight: 500; }
.gtiles { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 2px 16px 0; }
.gtile { min-width: 0; height: 66px; padding: 0 4px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-e2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: var(--accent-text); font-size: 12px; line-height: 14px; font-weight: 600; transition: transform 120ms var(--aq-ease); }
.gtile:active { transform: scale(.96); }
.gtile span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gtile.is-on { background: var(--accent-soft); border-color: transparent; }
.gcard { margin: 12px 16px 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--aq-r-card); box-shadow: var(--shadow-e1); overflow: hidden; }
.gcard-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 6px; font-size: 12.5px; line-height: 16px; font-weight: 600; color: var(--text-muted); }
.gcard-h .btn-text { min-height: 32px; padding: 0 8px; font-size: 13.5px; }
.gcard-p { padding: 2px 16px 14px; font-size: 14.5px; line-height: 20px; color: var(--text-primary); white-space: pre-wrap; overflow-wrap: anywhere; }
.gcard-sub { padding: 0 16px 14px; font-size: 13px; color: var(--text-secondary); }
.gpriv { display: flex; gap: 12px; padding: 4px 16px 16px; }
.gpriv-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-text); }
.gpriv b { display: block; font-size: 15.5px; line-height: 20px; font-weight: 600; }
.gpriv span { display: block; margin-top: 2px; font-size: 13.5px; line-height: 18px; color: var(--text-secondary); }
.gsrow { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 7px 16px; border: 0; background: none; color: var(--text-primary); text-align: left; text-decoration: none; }
.gsrow + .gsrow::before { content: ""; position: absolute; left: 62px; right: 0; top: 0; height: 1px; background: var(--divider); }
button.gsrow:hover, a.gsrow:hover { background: var(--accent-softer); color: var(--text-primary); }
.gsrow-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-text); }
.gsrow-tx { flex: 1; min-width: 0; }
.gsrow-tx b { display: block; font-size: 15.5px; line-height: 20px; font-weight: 500; }
.gsrow-tx span { display: block; font-size: 13px; line-height: 17px; color: var(--text-secondary); }
.gsrow-val { flex: none; font-size: 14px; color: var(--text-secondary); }
.gsrow .cm-switch { margin-left: 0; }
.gsrow.is-danger .gsrow-tx b { color: var(--danger-text); }
.gsrow.is-danger .gsrow-ic { background: var(--danger-tint); color: var(--danger-text); }
.gmore { padding: 4px 16px 14px; font-size: 13.5px; color: var(--text-secondary); }
.gtabs { display: flex; gap: 4px; margin: 4px 12px 8px; padding: 4px; border-radius: 14px; background: var(--surface-sunken); }
.gtabs button { flex: 1; min-height: 36px; border: 0; border-radius: 11px; background: none; color: var(--text-secondary); font-size: 13px; font-weight: 600; }
.gtabs button[aria-selected="true"] { background: var(--surface); color: var(--accent-text); box-shadow: var(--shadow-e2); }
.ggrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 0 12px 12px; }
.ggrid button { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--surface-sunken); cursor: zoom-in; }
.ggrid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.glist { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.glink { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-sunken); color: var(--text-primary); text-decoration: none; min-width: 0; }
.glink:hover { color: var(--text-primary); background: var(--accent-softer); }
.glink-ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); color: var(--accent-text); }
.glink-tx { min-width: 0; flex: 1; }
.glink-tx b { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.glink-tx span { display: block; font-size: 12.5px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.glist .fcard { width: 100%; }
.gempty { padding: 18px 16px 20px; text-align: center; font-size: 14px; color: var(--text-secondary); }
.gstar { display: block; width: 100%; padding: 10px 16px; border: 0; background: none; text-align: left; color: var(--text-primary); }
.gstar + .gstar { border-top: 1px solid var(--divider); }
.gstar:hover { background: var(--accent-softer); }
.gstar b { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent-text); }
.gstar b span { color: var(--text-muted); font-weight: 500; }
.gstar p { margin-top: 2px; font-size: 14.5px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gsearch { padding: 0 12px 12px; }
.gsearch .gc-search { margin: 0 0 8px; }

/* ---------- J. join page + QR page ---------- */
.join-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 16px max(24px, env(safe-area-inset-bottom)); background: radial-gradient(900px 520px at 80% -10%, var(--hero-glow), transparent 60%), radial-gradient(800px 480px at -10% 110%, var(--hero-glow-2), transparent 60%), var(--bg); }
.join-card { width: 100%; max-width: 420px; border-radius: var(--aq-r-xl); background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-e3); overflow: hidden; }
.join-hero { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 22px 22px; text-align: center; color: var(--text-primary); background: var(--card); }
.join-hero::before { content: ""; position: absolute; left: -35%; top: -75%; width: 95%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--hero-glow-2) 0%, transparent 64%); z-index: -1; }
.join-hero::after { content: ""; position: absolute; right: -35%; top: -85%; width: 105%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--hero-glow) 0%, transparent 62%); z-index: -1; }
.join-hero .ghero-doodle { display: none; }
.join-av { width: 84px; height: 84px; border-radius: 30%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: var(--bubble-own); color: #fff; box-shadow: var(--shadow-fab); }
.join-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.join-hero h1 { margin-top: 12px; font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: -0.018em; overflow-wrap: anywhere; }
.join-meta { font-size: 14px; color: var(--text-secondary); }
.join-hero .privline { margin-top: 6px; min-height: 30px; padding: 0 14px; border-radius: 15px; background: var(--accent-soft); color: var(--accent-text); font-size: 12.5px; }
.join-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.join-desc { font-size: 14.5px; line-height: 21px; color: var(--text-secondary); white-space: pre-wrap; overflow-wrap: anywhere; }
.join-form { display: flex; flex-direction: column; gap: 12px; }
.join-form .field { margin: 0; }
.join-done { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 4px 2px; text-align: center; }
.join-done .ce-ico { margin-bottom: 6px; }
.join-done b { font-size: 17px; font-weight: 600; }
.join-done p { font-size: 14px; color: var(--text-secondary); }
.join-trust { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 17px; color: var(--text-secondary); }
.join-trust svg { flex: none; margin-top: 1px; color: var(--success); }
.join-foot { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; color: var(--text-secondary); text-align: center; }
.join-foot b { color: var(--text-primary); font-weight: 600; }
.join-foot a { color: var(--text-secondary); text-decoration: none; }
.join-bad { padding: 34px 24px 26px; text-align: center; }
.join-bad .ce-ico { margin: 0 auto 14px; }
.join-bad h1 { font-size: 21px; line-height: 27px; font-weight: 700; letter-spacing: -0.015em; }
.join-bad p { margin-top: 8px; font-size: 14.5px; line-height: 21px; color: var(--text-secondary); }
.qr-card { width: 100%; max-width: 420px; padding: 26px 22px 22px; border-radius: var(--aq-r-xl); background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-e3); text-align: center; }
.qr-card h1 { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.018em; overflow-wrap: anywhere; }
.qr-card > p { margin-top: 4px; font-size: 14.5px; color: var(--text-secondary); }
.qr-box { display: flex; align-items: center; justify-content: center; width: 264px; height: 264px; max-width: 100%; margin: 18px auto 14px; padding: 14px; border-radius: 22px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-e2); }
.qr-box canvas, .qr-box img, .qr-box svg { width: 100% !important; height: auto !important; max-width: 236px; image-rendering: pixelated; }
.qr-url { display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 6px 6px 6px 14px; border-radius: 14px; background: var(--surface-sunken); font-size: 14px; color: var(--accent-text); text-align: left; }
.qr-url span { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.qr-url.is-big span { font-size: 17px; line-height: 23px; }
.qr-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
@media print {
  .join-page { background: #fff !important; padding: 0; }
  .qr-card { box-shadow: none; border: 0; }
  .qr-actions, .join-foot a { display: none !important; }
}

/* ---------- small screens, reduced motion ---------- */
@media (max-width: 359px) {
  .crow { gap: 12px; padding: 0 12px; }
  .crow + .crow::before { left: 12px; right: 12px; }
  .gtiles { gap: 6px; margin-left: 12px; margin-right: 12px; }
  .gtile { font-size: 11.5px; }
  .gcard, .gc-section { margin-left: 10px; margin-right: 10px; }
  .msg-bubble { max-width: 86%; }
  .fcard { width: 228px; }
  .vp { width: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  .gthread, .ginfo, .intro, .msg-in.msg-last, .chat-replybar, .chat-menu, .chat-attach { animation: aq-fade 150ms linear !important; }
  .chat-wall { opacity: calc(var(--doodle-opacity) * .9); }
}

/* ---------- K. v2.3 customer pages: page mode, join identity line, iOS install sheet, group info extras ---------- */
.guest-body.is-page { background: var(--bg); }
.guest.is-page { height: auto; min-height: 100vh; min-height: 100dvh; max-width: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; overflow: visible; background: transparent; }
@media (min-width: 640px) { .guest.is-page { height: auto; margin: 0; border: 0; border-radius: 0; box-shadow: none; } }
.join-as { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface-sunken); font-size: 14.5px; line-height: 20px; color: var(--text-secondary); }
.join-as b { color: var(--text-primary); font-weight: 600; }
.join-as-av { flex: none; width: 32px; height: 32px; font-size: 12px; }
.join-done .btn { margin-top: 10px; }
.qr-box .spinner { width: 28px; height: 28px; }
.ios-steps { list-style: none; margin: 14px 0 6px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ios-step { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px 8px 10px; border-radius: 16px; background: var(--surface-sunken); font-size: 15px; line-height: 20px; font-weight: 500; }
.ios-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--bubble-own); color: var(--on-accent); font-size: 13px; font-weight: 700; }
.ios-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); color: var(--accent-text); box-shadow: var(--shadow-e1); }
.ghero-priv { display: flex; justify-content: center; max-width: 100%; }
.gtabpanel { min-height: 64px; }
.ggrid .gskel { aspect-ratio: 1; border-radius: 12px; }
.gsearch-card .gsearch { padding-bottom: 6px; }
.gsearch-res .gstar { border-radius: 12px; }
.gsearch-res mark, .gstar mark { background: var(--accent-soft); color: var(--accent-text); border-radius: 4px; padding: 0 2px; }
.gmore { margin: 0; }
.gcard-sub:empty { display: none; }
.gtile:disabled { opacity: .5; }
.gc-empty .btn { display: inline-flex; align-items: center; gap: 8px; }
.webhead .hbtn.is-on::after { box-shadow: 0 0 0 2px var(--surface); }
.gthread:focus, .ginfo:focus { outline: none; }
.msg-av .av23 { border-radius: 50%; box-shadow: 0 0 0 1px var(--hairline); }
.gpriv .gpriv-ic { display: inline-flex; margin-top: 0; }
/* @mention picker (groups; hidden groups only offer staff) */
.chat-mention { position: absolute; left: max(10px, env(safe-area-inset-left)); right: max(68px, env(safe-area-inset-right)); bottom: calc(100% - 2px); z-index: 9; max-width: 360px; padding: 6px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-e3); transform-origin: bottom left; animation: aq-pop .16s var(--aq-ease); }
.cmn-opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 6px 10px; border: 0; border-radius: 12px; background: none; color: var(--text-primary); text-align: left; font-size: 15px; font-weight: 500; }
.cmn-opt.is-on, .cmn-opt:hover { background: var(--accent-softer); }
.cmn-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.join-bad .btn { margin-top: 18px; }
.doc-warn { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 2px; padding: 10px 12px; border-radius: 14px; background: var(--warning-tint); color: var(--warning-text); font-size: 13.5px; line-height: 19px; }
.doc-warn svg { flex: none; margin-top: 1px; }
.rcpt-more { width: 40px; height: 40px; align-items: center; justify-content: center; background: var(--surface-sunken); color: var(--text-secondary); }
.pwa-logo { color: var(--accent); }
.pwa-card { position: relative; padding-right: 36px; }
.pwa-card .cbtn { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; margin: 0; }
.pwa-tx b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 359px) { .pwa-tx b { white-space: normal; } .pwa-tx span { display: none; } }
/* REVIEW-WEB / REVIEW-PRIVACY: every name is its own bidi island, so a right-to-left name (Urdu) or a stray override can never reorder the tag, tick or text next to it */
.msg-sender-n, .crow-name, .gchat-name, .mrow-tx b > span:first-child, .viewer-name, .intro-name, .msg-quote-name, .rb-quote-name, .fcard-name, .cmn-name, .ename-t { unicode-bidi: isolate; }
/* REVIEW-WEB: time + ticks always read left-to-right ("06:10 PM ✓✓"), also inside an Urdu / Arabic (dir=auto -> rtl) message */
.msg-meta { direction: ltr; unicode-bidi: isolate; }
