/* Copied from the Wicko UX kit, docs/wicko-ux/im/wicko-im.css in ramonscottf/wicko-stock, by docs/wicko-ux/tools/im_sync.py. Edit the kit, not this copy. */
/* ======================================================================================================================================
   wicko-im.css — Messages (customers) and Chat (the crew): the one place their styling lives, the Wicko UX kit's since Run 6 (Run 1 of the
   five-pass plan, Nov 20 2026; skippy-plans plans/2026-11-20-messaging-five-passes.md). Loaded last, after glow.css.
   Until Run 1 these rules were spread over office.css, kit/pk-native.css, glow.css and im.css, each layer beating the last. They were moved
   here in their original order (a screenshot diff of every state at four sizes in four themes came back unchanged), the ones that could no
   longer match anything were dropped, and nothing for Messages or Chat goes back into office.css or glow.css.
   Sizes: --im-tap 44 (floating phone buttons), --im-ctl 40 (composer buttons), 36 on the desk thread header, --im-head = the search box.
   Check every change with tests/im/im_matrix.py.
   ====================================================================================================================================== */
:root { --im-tap: 44px; --im-ctl: 40px; --im-head: 46px; --im-red-ui: #D9000B; --im-red-tx: #D9000B; }
html[data-theme=dark] { --im-red-ui: #D9000B; --im-red-tx: #FF5A6A; }
@media (max-width: 900px) { :root { --im-head: 44px; } }
/*  ---- from office.css (moved Nov 20 2026, Run 1; order kept) ----  */
.inbox { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 14px; height: calc(100vh - var(--top) - 40px); min-height: 520px; }
.ilist, .ithread { background: var(--card); border: 1px solid rgba(220,221,217,.8); border-radius: var(--r); box-shadow: var(--sh-1); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.iscroll { overflow-y: auto; flex: 1; }
.ihead { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--paper-2); }
.ihead .who { min-width: 0; }
.ihead .who b { display: block; font-size: 20px; line-height: 1.1; }
.ihead .who .sub { font-size: 12.5px; }
.ihead .spacer, .icompose .spacer { flex: 1; }
.ictx { padding: 8px 14px; font-size: 12.5px; color: var(--mute); border-bottom: 1px solid var(--paper-2); background: var(--paper); }
.ictx .req { margin-top: 4px; color: var(--text); }
.ibody { flex: 1; overflow-y: auto; padding: 16px 14px; }
.ibody .msgs { gap: 10px; }
.ibody .msg { max-width: 76%; white-space: pre-wrap; line-height: 1.45; }
.icompose { border-top: 1px solid var(--paper-2); padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.icompose textarea { width: 100%; resize: vertical; min-height: 72px; padding: 10px 12px; border: 1px solid var(--fog-2); border-radius: 10px; font: inherit; }
.icompose textarea:focus { border-color: var(--ink); outline: none; }
.icompose label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
@media (max-width: 900px) {
.inbox { grid-template-columns: 1fr; height: calc(100vh - var(--top) - 120px); }
.inbox:not(.has-thread) .ithread { display: none; }
.ibody .msg { max-width: 88%; } }
.icompose input[type=email] { height: 32px; padding: 0 10px; border: 1px solid var(--fog-2); border-radius: 8px; font: inherit; font-size: 13.5px; }
.icompose input[type=email]:focus { border-color: var(--ink); outline: none; }
.icompose .seg button[disabled] { opacity: .45; cursor: not-allowed; }
.itools #inew-btn { height: 28px; font-size: 12.5px; }
.itools .inew { flex: 1 1 100%; display: flex; gap: 6px; }
.itools .inew input { flex: 1; height: 34px; padding: 0 10px; border: 1px solid var(--fog-2); border-radius: 8px; background: var(--paper); }
.ihead .iav { display: none; }
.ihead .ihact { display: contents; }
.ih-more { display: none; }
.ih-call svg { width: 15px; height: 15px; }
@media (max-width: 900px) {
body.imsg .top, body.imsg .pnav, body.imsg .pnav-scrim { display: none; }
body.imsg .content { padding: 0; }
.ihead { position: relative; align-items: center; min-height: calc(52px + env(safe-area-inset-top, 0px)); padding: calc(6px + env(safe-area-inset-top, 0px)) 8px 6px; -webkit-backdrop-filter: blur(16px) saturate(1.3); border-bottom: 1px solid rgba(0,0,0,.12); }
.ihead .iav { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #C7C7CC; color: #fff; font: 700 15px var(--sans); font-style: normal; flex: none; }
.ihead .iav.web { background: #5E9CFF; }
.ihead .iav.mail { background: #0A84FF; }
.ihead .who { flex: 1; min-width: 0; }
.ihead .who b { font: 600 15px/1.2 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ihead .who .sub { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ihead .spacer { display: none; }
.ihead .btn.ih-call { height: 36px; border-radius: 50%; background: #34C759; border-color: #34C759; box-shadow: none; flex: none; }
.ih-call svg { width: 17px; height: 17px; }
.ih-call span { display: none; }
.ih-more { display: inline-flex; width: 34px; height: 34px; font-size: 20px; color: #0A84FF; flex: none; }
.ihead .ihact { display: none; width: 100%; gap: 6px; flex-wrap: wrap; padding-top: 6px; }
.ihead.more .ihact { display: flex; }
.ictx { font-size: 12px; white-space: nowrap; -webkit-overflow-scrolling: touch; padding: 6px 12px; }
.ictx .req { white-space: normal; }
.ibody { padding: 12px 10px; background: #fff; }
.ibody .msgs { gap: 3px; }
.ibody .msg { max-width: 78%; font-size: 16px; line-height: 1.3; padding: 8px 13px; border-radius: 18px; margin-bottom: 3px; }
.ibody .msg.customer, .ibody .msg.in { background: #E9E9EB; color: #000; border-bottom-left-radius: 5px; }
.ibody .msg.agent { background: #34C759; color: #fff; border-bottom-right-radius: 5px; border: 0; }
.ibody .msg small { font-size: 10.5px; opacity: .65; margin-top: 2px; }
.ibody .msg.agent small { color: rgba(255,255,255,.85); }
.ibody .msg.system { background: none; color: #8A8A8E; font-size: 12px; max-width: 100%; padding: 6px 0; }
.ibody .msg.vm { background: #E9E9EB; color: #000; border-bottom-left-radius: 5px; }
.ibody .msg.vm .vmh { color: #1F7A4D; }
.ibody .msg.vm audio { width: 240px; }
.icompose { position: sticky; bottom: 0; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); background: rgba(247,247,247,.94); -webkit-backdrop-filter: blur(16px); border-top: 1px solid rgba(0,0,0,.1); gap: 6px; }
.icompose[data-mode="email"] .btn.sendbtn, .icompose[data-mode="web"] .btn.sendbtn { background: #0A84FF; }
.icompose .hint { display: none; }
.icompose .sub:not(#m-quote-wrap):not(#m-count) { font-size: 11.5px; }
.icompose #m-count { font-size: 11px; }
.ilist { border-radius: 0; box-shadow: none; } }
html.native .ihead { padding-top: calc(6px + env(safe-area-inset-top, 0px)); }
html.native .icompose { padding-bottom: calc(8px + max(env(safe-area-inset-bottom, 0px), var(--kbpad, 0px))); }
.itools #inew-btn { width: 28px; height: 28px; }
.ichips { display: flex; flex-wrap: wrap; gap: 6px; }
.ichip { height: 24px; padding: 0 8px 0 10px; border-radius: 999px; border: 0; background: var(--ink); color: #fff; font: 600 12px var(--sans); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.ichip span { opacity: .7; }
.ichip:hover span { opacity: 1; }
.ilist .iscroll .iconv:nth-child(-n+12) { animation-delay: calc(var(--k, 0) * 1ms); }
.ilist .iscroll .iconv:nth-child(2) { --k: 20 }
.ilist .iscroll .iconv:nth-child(3) { --k: 40 }
.ilist .iscroll .iconv:nth-child(4) { --k: 60 }
.ilist .iscroll .iconv:nth-child(5) { --k: 80 }
.ilist .iscroll .iconv:nth-child(6) { --k: 100 }
.ilist .iscroll .iconv:nth-child(7) { --k: 120 }
.ilist .iscroll .iconv:nth-child(8) { --k: 140 }
.ilist .iscroll .iconv:nth-child(9) { --k: 160 }
.ilist .iscroll .iconv:nth-child(10) { --k: 180 }
.ihead .who { flex: 1 1 160px; min-width: 0; }
.ihead .who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ihead > .spacer { display: none; }
.ihead .ihprime { display: inline-flex; gap: 6px; }
.ihact .mob { display: none; }
.ictx .pstat { margin-right: 10px; }
.ictx .lnk { margin-right: 3px; }
.ihead .who b .urg { font: 700 11px var(--sans); letter-spacing: .04em; margin-left: 8px; vertical-align: 4px; }
.ihead .who b .dco { font: 500 12.5px var(--sans); text-transform: none; letter-spacing: 0; color: var(--mute); margin-left: 8px; vertical-align: 3px; }
.ihead .ih-more { display: inline-flex; width: 32px; height: 32px; font-size: 18px; color: var(--mute); }
.ihead .ihact { display: none; width: 100%; gap: 6px; flex-wrap: wrap; padding-top: 8px; animation: popin .16s var(--spring); transform-origin: top right; }
.ihead.more .ihact { display: flex; }
.ictx { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; }
.ictx .lnk { color: var(--text); font-weight: 600; cursor: pointer; }
.ictx .lnk:hover { text-decoration: underline; }
.ictx .req { flex-basis: 100%; }
.ibody.fresh .msg { animation: bubble .28s var(--spring) both; }
.ibody.fresh .msg:nth-last-child(1) { animation-delay: .05s }
.ibody.fresh .msg:nth-last-child(2) { animation-delay: .03s }
.icompose .crow { gap: 8px; flex-wrap: wrap; }
.icompose .cin { height: 32px; padding: 0 10px; border: 1px solid var(--fog-2); border-radius: 8px; font: inherit; font-size: 13.5px; background: var(--card); }
.icompose .cin:focus { border-color: var(--ink); outline: none; }
.icompose #m-to { flex: 1; }
.icompose #m-subject { width: 100%; }
.icompose .cnote { font-size: 12px; }
.icompose textarea { transition: border-color .15s, box-shadow .15s; }
.icompose textarea:focus { box-shadow: 0 0 0 3px rgba(15,16,19,.07); }
.iside { display: none; }
@media (min-width: 1180px) {
.inbox.has-thread { grid-template-columns: 330px minmax(0, 1fr) 290px; }
.inbox.has-thread .iside { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; animation: vin .3s var(--spring); } }
@media (max-width: 900px) {
.ihead .ihact { padding-top: 6px; }
.ihead .ihprime { display: none; }
.ihact .mob { gap: 6px; }
.icompose .crow { gap: 6px; } }
@media (prefers-reduced-motion: reduce) {
.ibody.fresh .msg, .ihead .ihact, .inbox.has-thread .iside { animation: none !important; } }
#iside-crm { display: flex; flex-direction: column; gap: 12px; }
.chat { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 14px; height: calc(100vh - var(--top) - 40px); }
.chlist, .chthread { background: var(--card); border: 1px solid rgba(220,221,217,.8); border-radius: var(--r); box-shadow: var(--sh-1); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.chlist { overflow-y: auto; }
.chrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; width: 100%; padding: 7px 10px; border: 0; background: transparent; border-radius: 10px; color: inherit; text-decoration: none; text-align: left; cursor: pointer; transition: background .12s; }
.chrow:hover { background: var(--paper); }
.chrow.on { background: var(--paper-2); box-shadow: inset 3px 0 0 var(--ink); }
.chrow .chn { display: flex; align-items: center; gap: 8px; min-width: 0; }
.chrow .chn b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.chrow.unread .chn b { font-weight: 700; }
.chrow .hash { color: var(--mute); font-weight: 600; width: 14px; text-align: center; }
.chrow .chp { grid-column: 1; color: var(--mute); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chrow .n { grid-column: 2; grid-row: 1 / span 2; font: 600 11px var(--mono); color: var(--mute); background: var(--paper-2); border-radius: 999px; padding: 1px 7px; }
@media (max-width: 900px) {
.chat { grid-template-columns: 1fr; height: calc(100vh - var(--top) - 120px); }
.chat.has-ch .chlist { display: none; }
.chat:not(.has-ch) .chthread { display: none; }
.chlist { border: 0; border-radius: 0; box-shadow: none; }
.chrow { padding: 10px 10px; }
.chrow .chn b { font-size: 15px; }
body.ichat .top, body.ichat .pnav, body.ichat .pnav-scrim { display: none; }
body.ichat .content { padding: 0; }
body.ichat .chat { height: 100dvh; gap: 0; }
body.ichat .chthread { position: fixed; inset: 0; border: 0; border-radius: 0; box-shadow: none; background: #fff; z-index: 25; } }
[data-theme=dark] .ilist, [data-theme=dark] .ithread, [data-theme=dark] .chlist, [data-theme=dark] .chthread { border-color: var(--fog); background-color: var(--card); }
[data-theme=dark] .ichip { color: #1E2127; }
[data-theme=dark] .icompose textarea:focus, [data-theme=dark] .icompose .cin:focus { border-color: #48303A; box-shadow: 0 0 0 3px rgba(255,41,67,.1); }
[data-theme=dark] .ihead { border-bottom-color: #1B1E24; }
[data-theme=dark] .ihead .who b { color: #F2F5F9; }
[data-theme=dark] .ictx { background: #10141A; border-bottom-color: #1B1E24; }
[data-theme=dark] .ictx .lnk { color: #E8EDF4; }
[data-theme=dark] .ibody { background: transparent; }
[data-theme=dark] .icompose { border-top-color: #1B1E24; }
[data-theme=dark] .icompose textarea { background: #10141A; border-color: var(--fog); }
[data-theme=dark] .chrow:hover { background: #171B21; }
[data-theme=dark] .chrow.on { background: linear-gradient(100deg, #24171D, #171B21 70%); box-shadow: inset 3px 0 0 var(--red); }
[data-theme=dark] .chrow .n { background: #1D232B; color: var(--mute); }
@media (max-width: 900px) {
[data-theme=dark] body.imsg .ithread, [data-theme=dark] body.ichat .chthread { background: #1E2127; }
[data-theme=dark] .ihead { border-bottom-color: #1B1E24; }
[data-theme=dark] .ihead .who b { color: #F2F5F9; }
[data-theme=dark] .ibody { background: #1E2127; }
[data-theme=dark] .ibody .msg.customer, [data-theme=dark] .ibody .msg.in, [data-theme=dark] .ibody .msg.customer.email, [data-theme=dark] .ibody .msg.bot, [data-theme=dark] .ibody .msg.vm { background: #262B33; color: #F2F5F9; border: 0; }
[data-theme=dark] .ibody .msg.agent { background: #30D158; color: #fff; border: 0; }
[data-theme=dark] .icompose { background: rgba(14,17,21,.94); border-top-color: #1B1E24; } }
@media (min-width: 1180px) {
.inbox.has-thread { grid-template-columns: 310px minmax(0, 1fr) 270px; } }
@media (min-width: 1180px) and (max-width: 1360px) {
.inbox.has-thread { grid-template-columns: 300px minmax(0, 1fr); }
.inbox.has-thread .iside { display: none; } }
.ihead { gap: 6px; row-gap: 8px; }
.ihead .who { flex: 1 1 200px; }
.ihead .who .sub { white-space: normal; }
@media (min-width: 901px) {
.ihead .ih-call span { display: none; }
.ihead .ih-call { width: 34px; padding: 0; }
.ihead .btn.sm { padding: 0 9px; } }
[data-theme=dark] .ihead .ih-call { border-color: rgba(61,214,140,.35); }
.ihead .who b { white-space: normal; overflow: visible; font-size: 19px; line-height: 1.05; }
.ihead .who { display: block; font-size: inherit; color: inherit; }
.ihead .who b { font-size: 20px; }
@media (min-width: 1361px) {
.inbox.has-thread { grid-template-columns: 324px minmax(0, 1fr) 270px; } }
.inbox:not(.has-thread) { grid-template-columns: 340px minmax(0, 1fr); }
.graphite[data-theme=dark] .ilist, .graphite[data-theme=dark] .ithread, .graphite[data-theme=dark] .chlist, .graphite[data-theme=dark] .chthread { background-color: #1B1E24; border-color: #343943; }
.graphite[data-theme=dark] .chrow.on { background: #F4F6F9; box-shadow: inset 3px 0 0 #FF2943; }
.graphite[data-theme=dark] .chrow.on .chn b { color: #0F1216; }
.graphite[data-theme=dark] .chrow.on .chp, .graphite[data-theme=dark] .chrow.on .hash { color: #4A5360; }
.graphite[data-theme=dark] .chrow:hover { background: #333942; }
.graphite[data-theme=dark] .ictx { background: #22252C; border-bottom-color: #2A2E37; }
.graphite[data-theme=dark] .ihead { border-bottom-color: #2A2E37; }
.graphite[data-theme=dark] .icompose { border-top-color: #2A2E37; }
.graphite[data-theme=dark] .icompose textarea { background: #1B1F25; border-color: #464E5A; }
.graphite[data-theme=dark] .chrow .n { background: #30353E; color: #DCE2E9; }
@media (max-width: 900px) {
.graphite[data-theme=dark] body.imsg .ithread, .graphite[data-theme=dark] body.ichat .chthread, .graphite[data-theme=dark] .ibody { background: #363B45; }
.graphite[data-theme=dark] .ibody .msg.customer, .graphite[data-theme=dark] .ibody .msg.in, .graphite[data-theme=dark] .ibody .msg.customer.email, .graphite[data-theme=dark] .ibody .msg.bot, .graphite[data-theme=dark] .ibody .msg.vm { background: #F4F6F9; color: #14171C; }
.graphite[data-theme=dark] .ibody .msg.agent { background: #30D158; color: #fff; border: 0; }
.graphite[data-theme=dark] .ihead, .graphite[data-theme=dark] .icompose { background: rgba(28,32,38,.94); } }
.ihead .who { flex: 1 1 140px; min-width: 0; }
@media (min-width: 901px) {
.ihead .ihact { flex-wrap: nowrap; } }
.icases { display: flex; flex-direction: column; gap: 6px; padding: 8px 14px; border-bottom: 1px solid var(--fog); background: var(--paper); }
.icases .cmore { align-self: flex-end; font-size: 12px; }
@media (max-width: 900px) {
.icases { padding: 6px 10px; } }
.graphite[data-theme=dark] .icases { background: #22252C; border-bottom-color: #2A2E37; }
.icompose { position: relative; }
.icases { gap: 4px; padding: 6px 12px; }
.icases .cmore { align-self: flex-end; font-size: 11.5px; color: var(--mute); text-decoration: none; padding: 0 4px; }
.icases .cmore:hover { color: var(--text); }
footer.icompose { position: relative; }
.ihead .who .sub b { display: inline; font: inherit; }
@media (max-width: 900px) {
html body .inbox, html body .inbox.has-thread, html body .inbox:not(.has-thread) { display: block; height: auto; min-height: 0; gap: 0; }
html body .inbox .ilist { display: flex !important; border-radius: 0; box-shadow: none; transition: transform .34s cubic-bezier(.2,.9,.25,1); }
html body .inbox .ilist .iscroll { overflow: visible; padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
html body .inbox .itools { padding: 8px 14px 8px; }
html body .inbox .itools .itop { flex-wrap: wrap; row-gap: 8px; }
html body .inbox .itools .imain { width: 100%; display: flex; }
html body .inbox .itools .imain button { flex: 1; }
html body .inbox .iconv { animation: none; }
html body .inbox .iconv::after { position: absolute; left: 70px; right: 0; bottom: 0; height: 1px; background: var(--fog); opacity: .6; }
html body .inbox .iconv:active { background: var(--paper-2); }
html body .inbox .iconv .sub { font-size: 14.5px; line-height: 1.3; -webkit-line-clamp: 2; margin-top: 1px; }
html body .inbox .iconv .tags { margin-top: 5px; }
html body .inbox .iconv .tag { font-size: 10.5px; padding: 1px 6px; }
html body .inbox .iconv.dealer { border-left: 0; padding-left: 10px; }
html body .inbox .iconv.dealer::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--ink); }
html body .inbox.has-thread .ilist { transform: translate3d(-24%, 0, 0); }
html body .inbox .ithread { display: flex !important; flex-direction: column; position: fixed; left: 0; right: 0; top: var(--vvt, 0px); height: var(--vvh, 100dvh); bottom: auto; width: 100%; max-width: 100vw; z-index: 25; overflow: hidden;
    border: 0; border-radius: 0; background: var(--paper); box-shadow: -10px 0 30px rgba(0,0,0,.28); transform: translate3d(104%, 0, 0); visibility: hidden; transition: transform .34s cubic-bezier(.2,.9,.25,1), visibility 0s linear .34s; will-change: transform; }
html body .inbox.has-thread .ithread { transform: translate3d(0, 0, 0); visibility: visible; transition: transform .34s cubic-bezier(.2,.9,.25,1), visibility 0s; }
html body .inbox .ithread.drag { transition: none; }
html body.imsg { overflow: hidden; overscroll-behavior: none; }
html body .ithread > * { flex: none; min-width: 0; max-width: 100%; }
html body .ithread .ihead { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; align-items: center; column-gap: 6px; row-gap: 0; padding: calc(4px + env(safe-area-inset-top, 0px)) 6px 6px; min-height: 0; }
html body .ithread .ihead .iback { grid-column: 1; height: 40px; padding: 0 2px 0 0; color: #0A84FF; background: none; border: 0; }
html body .ithread .ihead .iav { grid-column: 2; width: 36px; height: 36px; font-size: 15px; }
html body .ithread .ihead .who { grid-column: 3; min-width: 0; flex: none; }
html body .ithread .ihead .who b { display: block; font: 600 16px/1.2 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .ithread .ihead .who b .urg { font-size: 11px; vertical-align: 1px; }
html body .ithread .ihead .who b .dco { display: none; }
html body .ithread .ihead .who .sub { font-size: 12px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .ithread .ihead .ih-call { grid-column: 4; }
html body .ithread .ihead .ih-more { grid-column: 5; }
html body .ithread .ihead .ihprime, html body .ithread .ihead .spacer { display: none; }
html body .ithread .ihead .ihact { grid-column: 1 / -1; display: none; flex-wrap: wrap; gap: 6px; padding: 8px 4px 2px; }
html body .ithread .ihead.more .ihact { display: flex; }
html body .ithread .ictx { flex-wrap: nowrap; white-space: nowrap; scrollbar-width: none; padding: 5px 12px; font-size: 12px; }
html body .ithread .ictx::-webkit-scrollbar { display: none; }
html body .ithread .ictx .req { white-space: normal; }
html body .ithread .icases { max-height: 30vh; overflow-y: auto; }
html body .ithread .ibody { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: 8px 12px 10px; }
html body .ithread .ibody .msgs { gap: 0; }
html body .ithread .ibody .msg { max-width: 76%; font-size: 16.5px; line-height: 1.32; padding: 7px 13px 8px; border-radius: 19px; margin: 1px 0; overflow-wrap: anywhere; box-shadow: none; }
html body .ithread .ibody .msg.g-first { margin-top: 7px; }
html body .ithread .ibody .msg.customer, html body .ithread .ibody .msg.in, html body .ithread .ibody .msg.vm, html body .ithread .ibody .msg.bot { border-radius: 19px; }
html body .ithread .ibody .msg.customer.g-last, html body .ithread .ibody .msg.in.g-last, html body .ithread .ibody .msg.vm.g-last, html body .ithread .ibody .msg.bot.g-last { border-bottom-left-radius: 5px; }
html body .ithread .ibody .msg.agent { border-radius: 19px; }
html body .ithread .ibody .msg.agent.g-last { border-bottom-right-radius: 5px; }
html body .ithread .ibody .msg > small { display: none; font-size: 11px; margin-top: 3px; opacity: .75; }
html body .ithread .ibody .msg.meta > small, html body .ithread .ibody .msg.err > small, html body .ithread .ibody .msg.pending > small { display: block; }
html body .ithread .ibody .msg.vm > small, html body .ithread .ibody .msg.email > small { display: block; }
html body .ithread .ibody .msg.system { max-width: 92%; font-size: 12px; margin: 8px 0; padding: 0 8px; }
html body .ithread .ibody .msg.system > small { display: inline; margin-left: 6px; }
html body .ithread .ibody .msg.vm audio { width: min(240px, 100%); }
html body .ithread .ibody.fresh .msg { animation: none; }
html body .ithread .ibody .msg.pending { animation: sendup .28s cubic-bezier(.2,.9,.25,1) both; }
html body .ithread .icompose { position: relative; flex: none; padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); gap: 6px; max-width: 100%; }
html.kbd body .ithread .icompose { padding-bottom: 6px; }
html body .ithread .icompose .crow { display: none; flex-wrap: wrap; gap: 6px; padding: 2px 2px 4px; }
html body .ithread .icompose.tools .crow { display: flex; animation: popin .18s var(--spring); }
html body .ithread .icompose .crow .spacer { display: none; }
html body .ithread .icompose .crow .btn .sgl { display: inline; }
html body .ithread .icompose #m-to, html body .ithread .icompose #m-subject { width: 100%; min-width: 0; height: 36px; border-radius: 10px; }
html body .ithread .icompose .cbar { display: flex; align-items: flex-end; gap: 6px; }
html body .ithread .icompose .cplus { place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--paper-2); color: var(--mute); cursor: pointer; transition: transform .2s; }
html body .ithread .icompose.tools .cplus { transform: rotate(45deg); color: var(--text); }
html body .ithread .icompose textarea { flex: 1; width: auto; min-height: 36px; padding: 7px 14px; border-radius: 19px; font-size: 16px; line-height: 1.3; }
html body .ithread .icompose .sendbtn { width: 36px; height: 36px; flex: none; }
html body .ithread .icompose .cnote { font-size: 11.5px; padding: 0 4px; }
html body .ithread .formpop, html body .ithread .suggest.sugpop { position: absolute; left: 6px; right: 6px; bottom: calc(100% + 6px); max-height: min(60vh, calc(var(--vvh, 100dvh) - 160px)); overflow-y: auto; } }
@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
html body .inbox .ithread, html body .inbox .ilist, html body .ithread .ibody .msg.pending { transition: none !important; animation: none !important; } }
@media (max-width: 900px) {
html body .ithread .ihead .who .sub b { display: inline; font: inherit; white-space: nowrap; }
html body .ithread .icompose .crow .btn { gap: 6px; height: 34px; padding: 0 12px; }
html body .ithread .icompose .crow .btn packard-icon, html body .ithread .icompose .crow .btn .sgdot { display: none; } }
@media (max-width: 900px) {
html body .ithread .icompose .crow .btn, html body .ithread .icompose .crow .sugbtn { width: auto; min-width: 0; flex: none; padding: 0 12px; justify-content: center; } }
.icompose > #m-to { flex: none; width: 100%; height: 32px; }
@media (min-width: 901px) {
html body .ilist, html body .ithread { -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3); }
html[data-theme=dark] body .ilist, html[data-theme=dark] body .ithread { background-color: rgba(20,23,28,.8); }
html.graphite[data-theme=dark] body .ilist, html.graphite[data-theme=dark] body .ithread { background-color: rgba(44,49,57,.82); }
html:not([data-theme=dark]) body .ilist, html:not([data-theme=dark]) body .ithread { background-color: rgba(255,255,255,.8); } }
@media (prefers-reduced-transparency: reduce) {
html body .ilist, html body .ithread { -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (min-width: 901px) {
body.fit .content > .inbox, body.fit .content > .chat { flex: 1 1 auto; height: auto; min-height: 0; grid-template-rows: minmax(0, 1fr); } }
.iscroll, .ibody, .iside, .chlist { overscroll-behavior: contain; }
.ictx { flex-wrap: nowrap !important; white-space: nowrap; scrollbar-width: none; gap: 6px !important; align-items: center; }
.ictx::-webkit-scrollbar { display: none; }
.ictx > * { flex: none; }
.ictx .req { flex: 1 0 100%; white-space: normal; }
.ictx .ord-sep { width: 1px; height: 16px; background: var(--fog); margin: 0 4px; }
.ictx:has(.req) { flex-wrap: wrap !important; white-space: normal; }
.ictx.has-ord { -webkit-mask: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
@media (min-width: 1361px) {
.inbox.has-thread .ictx.has-ord { -webkit-mask: none; } }
@media (max-width: 900px) {
html.native body.imsg .toast, html.native body.ichat .toast { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
html.native .chat { height: calc(100vh - var(--top) - env(safe-area-inset-top, 0px) - 120px); }
html.native body.ichat .chat { height: 100dvh; } }
html.native body .ithread .icompose { padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)); }
html.native.kbd body .ithread .icompose { padding-bottom: 6px; }
@media (max-width: 900px) {
html body .inbox .itools .hubseg { margin: 0 0 10px; }
body.ichat .hubseg { display: none; }
.hubseg + .chat { height: calc(100vh - var(--top) - 166px); }
html.native .hubseg + .chat { height: calc(100vh - var(--top) - env(safe-area-inset-top, 0px) - 166px); }
html body .ithread .ihead .iback, body.ichat .chhead .iback { width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 50%; background: rgba(120,120,128,.16); border: 0; box-shadow: inset 0 0 0 .5px rgba(255,255,255,.12), 0 2px 8px rgba(0,0,0,.12); -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6); color: var(--text); }
html body .ithread .ihead .iback svg, body.ichat .chhead .iback svg { width: 22px; height: 22px; stroke-width: 2.4; margin-left: -2px; }
body.ichat .chhead .iback span { display: none; }
#ilist { position: relative; }
html body .inbox .iconv { z-index: 1; will-change: transform; } }
html body .ihead .iav, html body .ihead .iav.web, html body .ihead .iav.mail { background: #8E949D; }
.ihead .who b.ih-name { cursor: pointer; }
.ihead .who b.ih-name .ih-pen { width: 13px; height: 13px; margin-left: 6px; opacity: .35; vertical-align: 1px; }
.ihead .who b.ih-name:hover .ih-pen { opacity: .8; }
.ihead .nsrc { font-style: italic; }
html body .seg:not(.icompose .seg):not(.svc .seg):not(.ifilters .seg) { flex-wrap: nowrap;
  background: var(--bar-bg); box-shadow: inset 0 0 0 1px var(--bar-edge); overflow-x: auto; scrollbar-width: none; }
html body .seg:not(.icompose .seg):not(.svc .seg) > button {
  flex: 1 0 auto; gap: 5px;
  height: var(--bar-h) !important; min-height: 0; padding: 0 8px !important; border: 0 !important;
  font: 600 14px/1 var(--sans) !important; white-space: nowrap; text-decoration: none;
  color: var(--bar-ink) !important; box-shadow: none !important;
  transition: background .18s, color .18s, box-shadow .18s; -webkit-tap-highlight-color: transparent; }
html body .seg:not(.icompose .seg):not(.svc .seg) > button:hover:not(.on):not([disabled]) { color: var(--text) !important; background: rgba(127,127,127,.10) !important; }
html body .seg:not(.icompose .seg):not(.svc .seg) > button.on { color: var(--bar-on-ink) !important; box-shadow: var(--bar-on-sh) !important; }
html body .ibody .msg { font-size: 15.5px; line-height: 1.32; padding: 7px 13px 8px; border-radius: 19px; margin: 1px 0; max-width: min(64%, 560px); border: 0; box-shadow: none; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 900px) {
html body .ibody .msg { font-size: 17px; max-width: 78%; } }
html body .ibody .msg.agent, html body .ibody .msg.agent.email { background: var(--im-blue); color: #fff; }
html body .ibody .msg.customer, html body .ibody .msg.in, html body .ibody .msg.customer.email, html body .ibody .msg.bot, html body .ibody .msg.vm { background: var(--im-grey); color: var(--im-grey-ink); }
html body .ibody .msg.agent.g-last, html body .ibody .msg.agent:not(.g-first):not(.g-mid) { border-bottom-right-radius: 5px; }
html body .ibody .msg.customer.g-last, html body .ibody .msg.in.g-last, html body .ibody .msg.bot.g-last, html body .ibody .msg.vm.g-last { border-bottom-left-radius: 5px; }
html body .ibody .msg.g-first { margin-top: 8px; }
html body .ibody .msg small { color: var(--im-meta) !important; font-size: 11px; opacity: 1; }
html body .ibody .msg.agent small { color: rgba(255,255,255,.78); }
html body .ibody .msg .vmh { font: 600 11px var(--im-font); text-transform: uppercase; letter-spacing: .05em; opacity: .75; color: inherit; margin-bottom: 3px; }
html body .ibody .msg.system { background: none !important; color: var(--im-meta) !important; font: 500 12px var(--im-font); max-width: 92%; padding: 6px 8px; }
html body .ibody .msg.system.claim { border-left: 0 !important; color: var(--im-meta) !important; }
html body .ibody .msg.system.claim .lnk { color: var(--im-blue); }
html body .ibody .msg.err { box-shadow: 0 0 0 1.5px var(--red) !important; }
html body .ihead .who .dco { display: block; font: 600 13px/1.3 var(--sans); color: var(--text); opacity: .8; margin: 1px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) {
html body .ithread .icompose .crow { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 2px 6px; animation: none; }
html body .ithread .icompose .crow > .fpwrap { order: 1; margin-left: auto; }
html body .ithread .icompose .crow > #m-to { order: 5; flex: 1 1 100%; }
html body .ithread .icompose .fl-long { display: none; }
html body .ithread .icompose .fl-short { display: inline; }
html body .ithread .icompose #m-form { border-radius: 999px; }
html body .ithread .icompose .crow > #m-sug, html body .ithread .icompose .crow > #m-quote-wrap, html body .ithread .icompose .crow > #m-count, html body .ithread .icompose .crow > label:has(#m-keep) { display: none; order: 9; }
html body .ithread .icompose.tools .crow > #m-sug { display: inline-flex !important; order: 2; flex: 1 1 calc(50% - 6px); justify-content: center; height: 38px; border-radius: 12px; background: var(--paper-2); }
html body .ithread .icompose.tools .crow > #m-quote-wrap[style*="display: none"] { display: none !important; }
html body .ithread .icompose.tools .crow > label:has(#m-keep) { display: inline-flex !important; order: 3; }
html body .ithread .icompose.tools .crow > #m-sug { order: 7; } }
@media (max-width: 900px) {
html body .ithread .icompose.tools .crow::after { content: ''; order: 4; flex-basis: 100%; height: 0; }
html body .ithread .icompose.tools .crow > #m-sug { flex: 1 1 calc(50% - 3px); } }
html[data-theme][data-theme][data-theme] body .inbox .iscroll { padding: 10px 10px 14px; display: flex; flex-direction: column; gap: 8px; }
html[data-theme][data-theme][data-theme] body .itools :is(#inew-btn, #ifbtn) { width: 40px; height: 40px; font-size: 14px; }
html[data-theme][data-theme][data-theme] body .inbox .iconv.icard::before, html[data-theme][data-theme][data-theme] body .inbox .iconv.icard::after { display: none; content: none; }
html[data-theme][data-theme][data-theme] body .inbox .ilist, html[data-theme][data-theme][data-theme] body .inbox .ilist .iscroll, html[data-theme][data-theme][data-theme] body .inbox .itools { background: transparent; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-theme][data-theme][data-theme] body .inbox .itools { padding-left: 0; padding-right: 0; }
html[data-theme][data-theme][data-theme] body .inbox .ilist .iscroll { padding-left: 0; padding-right: 0; }
@media (max-width: 900px) {
html[data-theme][data-theme][data-theme] body .inbox .itools, html[data-theme][data-theme][data-theme] body .inbox .ilist .iscroll { padding-left: 2px; padding-right: 2px; } }
@media (max-width: 900px) {
html[data-theme][data-theme][data-theme] body .inbox .itools,
  html[data-theme][data-theme][data-theme] body .inbox .ilist .iscroll { padding-left: 0; padding-right: 0; } }
@media (min-width: 901px) {
html body #inbox.inbox { grid-template-rows: auto minmax(0, 1fr); grid-template-columns: var(--ilw, 340px) minmax(0, 1fr); }
html body #inbox.inbox.has-thread { grid-template-columns: var(--ilw, 324px) minmax(0, 1fr); }
html body #inbox .ifbar { grid-column: 1 / -1; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--fog); border-radius: 12px; background: var(--paper); }
html body #inbox .ifbar .spacer { flex: 1; }
html body #inbox .ifdd { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 4px 0 10px; border: 1px solid var(--fog-2); background: var(--card); cursor: pointer; }
html body #inbox .ifdd > span { font: 600 10.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
html body #inbox .ifdd select { border: 0; background: transparent; color: inherit; font: 600 12.5px var(--sans); height: 26px; padding: 0 4px; cursor: pointer; }
html body #inbox .ifdd select:focus { outline: none; }
html body #inbox .ifdd.on { border-color: var(--ink); background: var(--ink); color: #fff; }
html body #inbox .ifdd.on > span { color: rgba(255,255,255,.75); }
html body #inbox .ifdd.on select option { color: #111; }
html body #inbox .ifbar .chip-btn { height: 30px; }
html body #inbox .ifbar #isetbox { flex: 1 1 100%; }
html body #inbox #ifbtn, html body #inbox #ifilters, html body #inbox .ichips { display: none !important; }
html body #inbox .ilist { position: relative; }
html body :is(#inbox, #chat) .ilw-grip { position: absolute; top: 0; bottom: 0; right: 0; width: 10px; cursor: col-resize; z-index: 6; touch-action: none; }
html body :is(#inbox, #chat) .ilw-grip::after { content: ''; position: absolute; right: 3px; top: 50%; height: 46px; width: 4px; border-radius: 3px; background: var(--fog-2); transform: translateY(-50%); opacity: 0; transition: opacity .15s; }
html body :is(#inbox .ilist, #chat .chlist):hover .ilw-grip::after, html body :is(#inbox, #chat) .ilw-grip.drag::after { opacity: 1; } }
@media (min-width: 1361px) {
html body #inbox.inbox.has-thread { grid-template-columns: var(--ilw, 324px) minmax(0, 1fr) 270px; } }
@media (max-width: 900px) {
html.ntabs body.imsg .content, html.ntabs body.ichat .content { padding-bottom: 0; }
html.ntabs body .inbox .ilist .iscroll { padding-bottom: calc(24px + var(--nb)); }
html.ntabs .chat { height: calc(100vh - var(--top) - env(safe-area-inset-top, 0px) - var(--nb) - 30px); }
html.ntabs .hubseg + .chat { height: calc(100vh - var(--top) - env(safe-area-inset-top, 0px) - var(--nb) - 76px); }
html.ntabs body.ichat .chat { height: 100dvh; } }
.ithread.dropping .ibody { outline: 2px dashed #0A84FF; outline-offset: -10px; border-radius: 14px; }
html body .ibody .msg.email { max-width: min(76%, 660px); }
@media (max-width: 900px) {
html body .ibody .msg.email { max-width: 88%; } }
/*  ---- from kit/pk-native.css (moved Nov 20 2026, Run 1; order kept) ----  */
@media (max-width: 900px) {
body.imsg ~ * .newwrap, html.pk-and body:is(.imsg, .ichat) .top .newwrap { display: none; }
html.pk-ios body.imsg .ithread, html.pk-ios body.ichat .chthread { box-shadow: -10px 0 30px rgba(0,0,0,.28); } }
@media (max-width: 900px) {
html.nbar.nbar-fit body:not(.imsg):not(.ichat) .content { padding-top: calc(env(safe-area-inset-top, 0px) + 8px); } }
/*  ---- from glow.css (moved Nov 20 2026, Run 1; order kept) ----  */
html.pkl body .seg:not(.icompose .seg):not(.svc .seg) > button { padding: 0 14px !important; font: 700 14px/1 var(--sans) !important; }
html.pkl .inbox .ilist, html.pkl .inbox .ithread, html.pkl .inbox .iside { background: transparent; }
html.pkl .ithread .card, html.pkl .ithread > .empty { border-radius: 18px; }
.ichipsf { display: none; }
html.pkl .ichipsf { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
@media (min-width: 901px) {
html.pkl body .inbox .itools .hubseg { width: 100%; } }
html.pkl .ichipsf { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; align-items: center; gap: 5px; margin: 10px 0 0; padding: 1px; }
html.pkl .ichipsf::-webkit-scrollbar { display: none; }
html.pkl .ichipsf .fchip { flex: none; height: 30px; padding: 0 10px; font-size: 12.5px; gap: 4px; }
html.pkl .ichipsf .fchip.ico { width: 27px; height: 26px; padding: 0; justify-content: center; gap: 5px; color: var(--mute); border-color: transparent; background: transparent; }
html.pkl .ichipsf .fchip.ico:hover { background: var(--gx-card); }
html.pkl .ichipsf .fchip.ico svg { width: 15px; height: 15px; flex: none; }
html.pkl .ichipsf .fchip.ico span { display: none; }
html.pkl .ichipsf .fchip.ico.on { color: var(--gx-on-tx); background: var(--gx-on); }
html.pkl .ichipsf .fgrp { flex: none; display: inline-flex; align-items: center; gap: 1px; padding: 2px; height: 30px; border-radius: 999px; background: var(--gx-soft); }
html.pkl[data-theme] body #inbox.inbox { --ilw-d: 344px; }
@media (min-width: 901px) {
html.pkl body #inbox.inbox, html.pkl body #inbox.inbox.has-thread { grid-template-columns: var(--ilw, 344px) minmax(0, 1fr); } }
@media (min-width: 1361px) {
html.pkl body #inbox.inbox.has-thread { grid-template-columns: var(--ilw, 344px) minmax(0, 1fr) 270px; } }
html.pkl body .itools .ichips { margin-top: 8px; }
html.pkl body #ilist .iconv.gxm + .iconv.gxm { margin-top: 6px; }
html.pkl .ihead .ih-ctx { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
html.pkl .ih-ctx .gxt { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--gx-soft); color: var(--text); font: 600 12px var(--sans); white-space: nowrap; }
html.pkl .ih-ctx .gxt.tier { color: #1F7A4D; font-weight: 800; }
html.pkl[data-theme=dark] .ih-ctx .gxt.tier { color: #5FD08F; }
html.pkl .ih-ctx .gxt.k-sales { background: var(--gx-blue-tag); color: var(--gx-blue-tx); }
html.pkl .ih-ctx .gxt.k-support { background: var(--gx-amb-tag); color: var(--gx-amb-tx); }
html.pkl .ih-ctx .gxt .mono { font: 600 11.5px var(--mono); }
html.pkl body .itools #inew-btn.ich-ico { width: 36px !important; min-width: 0 !important; }
@media (min-width: 901px) {
html.pkl body .ithread .ihead { row-gap: 8px; }
html.pkl body .ithread .ihead .who { flex: 1 1 280px; min-width: 240px; } }
html.pkl body #inbox #ifilters:not([hidden]) { display: flex !important; }
html.pkl body #inbox .ichips { display: flex !important; flex-wrap: wrap; gap: 5px; }
@media (min-width: 901px) {
html.pkl body #inbox > .hubseg.gx-hubtop { grid-column: 1 / -1; margin: 0 0 2px !important; }
html.pkl body #inbox .itools .hubseg { display: none !important; }
html.pkl body #inbox .ilist { background: var(--gx-panel); border-radius: 22px; box-shadow: var(--gx-sh), inset 0 0 0 1px var(--gx-bd); padding: 14px 12px 0; overflow: hidden; }
html.pkl body #inbox .ilist .itools { padding: 0 2px 4px; }
html.pkl body #inbox .ilist .iscroll { padding: 8px 4px 14px; margin: 0 -4px; }
html.pkl body #inbox .ithread { background: var(--gx-card); border: 0; border-radius: 22px; box-shadow: var(--gx-sh); }
html.pkl body #inbox .iside .sidecard, html.pkl body #inbox .iside > .card, html.pkl body #inbox .iside #iside-crm > .card { background: var(--gx-card); border: 0; border-radius: 20px; box-shadow: var(--gx-sh); } }
html.pkl body #ilist .iconv.gxm + .iconv.gxm { margin-top: 8px; }
html.pkl body .ithread .ihead { padding: 14px 18px; gap: 10px; border-bottom: 1px solid var(--gx-bd); background: transparent; }
html.pkl body .ithread .ihead .who > b { font: 700 17px/1.2 var(--sans) !important; }
html.pkl body .ithread .ihead .who .sub { font-size: 13px; }
html.pkl body .ithread .ihead .who .urg { font: 700 12px var(--sans); color: var(--red-tx); margin-left: 8px; }
html.pkl body .ithread .ihead :is(.ih-call, .ihprime .btn) { height: 38px; padding: 0 14px; border-radius: 999px; font: 600 14px var(--sans); gap: 7px; }
html.pkl body .ithread .ihead :is(.ih-call, .ihprime .btn.ghost) { background: var(--gx-card); border: 1px solid var(--gx-bd2); box-shadow: none; }
html.pkl body .ithread .ihead .ihprime .btn.quiet { border: 0; }
html.pkl body .ithread .ihead .ih-more { width: 38px; height: 38px; border-radius: 999px; }
html.pkl body .ithread .ictx { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; scrollbar-width: none; padding: 10px 18px; background: var(--gx-band); border: 0; border-bottom: 1px solid var(--gx-bd); font: 500 13px var(--sans); color: var(--mute); min-height: 0; }
html.pkl body .ithread .ictx::-webkit-scrollbar { display: none; }
html.pkl body .ithread .ictx :is(.gx-bchip, .pstat, .opill) { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border-radius: 10px; background: var(--gx-card); border: 1px solid var(--gx-bd); color: var(--text); font: 600 13px var(--sans); text-decoration: none; }
html.pkl body .ithread .ictx .gx-bchip.k-sales { color: var(--gx-blue-tx); }
html.pkl body .ithread .ictx .gx-bchip.k-support { color: var(--gx-amb-tx); }
html.pkl body .ithread .ictx .opill::before { width: 8px; height: 8px; background: #FFC900; box-shadow: 0 0 0 3px rgba(255,201,0,.18); }
html.pkl body .ithread .ictx .opill.ok::before { background: #1F9D57; box-shadow: 0 0 0 3px rgba(31,157,87,.15); }
html.pkl body .ithread .ictx .opill.part::before { background: #FF9A2E; box-shadow: 0 0 0 3px rgba(255,154,46,.18); }
html.pkl body .ithread .ictx .opill.off::before { background: #A9B0BB; box-shadow: none; }
html.pkl body .ithread .ictx .opill span { text-transform: capitalize; }
html.pkl body .ithread .ictx .opill:hover { transform: translateY(-1px); border-color: var(--gx-bd2); }
html.pkl body .ithread .ictx .ord-sep, html.pkl body .ithread .ictx > .sep { display: none; }
html.pkl body .ithread .ictx .req { flex: 1 0 100%; }
html.pkl body .ithread .ibody { background: transparent; }
html.pkl body .ithread .icompose { position: relative; background: transparent; border: 0; padding: 8px 14px 12px; }
html.pkl body .ithread .icompose .crow { display: flex; gap: 8px; margin: 0 0 8px; }
html.pkl body .ithread .icompose .cbar { position: relative; display: flex; align-items: flex-end; gap: 8px; }
html.pkl body .ithread .icompose .cbar .fpwrap { position: static; display: inline-flex; flex: none; }
html.pkl body .ithread .icompose .formpop, html.pkl body .ithread .icompose .suggest.sugpop { position: absolute; left: 12px; right: 12px; bottom: calc(100% + 6px); width: auto; }
html.pkl body .ithread .gx-cb { flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--gx-soft); color: var(--mute); cursor: pointer; position: relative; transition: transform .25s var(--gx-spring), background .15s, color .15s; }
html.pkl body .ithread .gx-cb:hover { color: var(--text); background: var(--gx-tag); }
html.pkl body .ithread .gx-cb svg { width: 19px; height: 19px; }
html.pkl body .ithread .gx-cb[aria-expanded=true], html.pkl body .ithread .gx-cb.on { background: var(--gx-blue); color: #fff; }
html.pkl body .ithread .gx-cb.gx-plus[aria-expanded=true] { transform: rotate(45deg); }
html.pkl body .ithread .icompose .cbar textarea { flex: 1 1 auto; min-height: 40px; max-height: 150px; padding: 9px 16px; border-radius: 20px; border: 1px solid var(--gx-bd2); background: var(--gx-card); color: var(--text); font: 15.5px/1.35 var(--sans); resize: none; outline: 0; }
html.pkl body .ithread .icompose .cbar textarea:focus { border-color: var(--gx-blue); box-shadow: 0 0 0 3px rgba(10,132,255,.14); }
html.pkl body .ithread .icompose .cbar:has(.gx-clip) textarea { padding-right: 44px; }
html.pkl body .ithread .icompose .gx-clip { position: absolute; right: 52px; bottom: 4px; display: grid; z-index: 2; }
html.pkl body .ithread .icompose .gx-clip:hover { color: var(--text); background: var(--gx-soft); }
html.pkl body .ithread .icompose .gx-send { flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--gx-blue); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 16px -8px rgba(10,132,255,.8); transition: transform .12s, opacity .15s; }
html.pkl body .ithread .icompose .gx-send svg { width: 19px; height: 19px; }
html.pkl body .ithread .icompose .gx-send:disabled { opacity: .35; box-shadow: none; cursor: default; }
html.pkl body .ithread .icompose .gx-send:not(:disabled):active { transform: scale(.92); }
html.pkl body .ithread .gx-cnote { padding: 6px 4px 0; font: 500 12px var(--sans); color: var(--mute); }
html.pkl .icompose[data-mode=email] .gx-cnote .gx-n-em, html.pkl .icompose[data-mode=mail] .gx-cnote .gx-n-em { display: inline; }
html.pkl .icompose[data-mode=email] .gx-cnote .gx-n-tx, html.pkl .icompose[data-mode=mail] .gx-cnote .gx-n-tx { display: none; }
html.pkl body .ithread .icompose #m-subject { height: 38px; margin: 0 0 8px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--gx-bd2); background: var(--gx-card); font: 500 14px var(--sans); }
html.pkl body .ithread .ihead .who .sub b { font: 700 13px var(--sans) !important; }
@media (min-width: 901px) {
html.pkl body #inbox.inbox, html.pkl body #inbox.inbox.has-thread { grid-template-columns: var(--ilw, 356px) minmax(0, 1fr); } }
@media (min-width: 1361px) {
html.pkl body #inbox.inbox.has-thread { grid-template-columns: var(--ilw, 356px) minmax(0, 1fr) 256px; } }
html.pkl body .itools #inew-btn.ich-ico { width: 34px !important; height: 34px; }
html.pkl .ichipsf .fchip:not(.ico) { padding: 0 9px; }
html.pkl .ichipsf .fchip.ico { width: 25px; }
html.pkl body #ilist .iconv, html.pkl body #inbox .iscroll > * { flex: 0 0 auto; }
@media (min-width: 901px) {
html.pkl body #inbox.inbox, html.pkl body #inbox.inbox.has-thread { grid-template-columns: var(--ilw, clamp(356px, 24vw, 440px)) minmax(0, 1fr); } }
@media (min-width: 1361px) {
html.pkl body #inbox.inbox.has-thread { grid-template-columns: var(--ilw, clamp(356px, 24vw, 440px)) minmax(0, 1fr) clamp(270px, 21vw, 420px); } }
html.pkl body .ithread .ictx { flex-wrap: wrap; row-gap: 6px; }
html.pkl body .ithread .ibody .msg { max-width: min(76%, 760px); }
@media (max-width: 700px) {
html.pkl .ichipsf .fchip { height: 34px; }
html.pkl .ichipsf .fchip.ico { width: 34px; height: 34px; } }
@media (max-width: 900px) {
html.gpn:not(.ntabs) body #content #inbox > .hubseg.gx-hubtop, html.gpn:not(.ntabs) body #content #inbox .itools > .hubseg { display: none; } }
html.pkl .wh-head.im-head { flex-wrap: wrap; row-gap: 8px; }
html.pkl .wh-head.im-head > .gx-segw { flex: 1 1 100%; overflow: hidden; }
html.pkl .wh-head.im-head > .gx-sp { display: none; }
html.pkl .wh-head.im-head > .gx-find { flex: 1 1 0; min-width: 0; max-width: none; }
html.pkl .itools .im-head .gx-find input#isearch { width: auto; height: 100%; padding: 0; border-radius: 0; }
html.pkl .wh-head.im-head .gx-seg > button { padding: 0 9px; gap: 5px; font-size: 13.5px; }
html.pkl .im-head .wh-fw { position: static; }
html.pkl .im-head .wh-pop { left: 0; right: 0; width: auto; top: calc(100% + 8px); max-height: min(58vh, 560px); }
html.pkl .gx-stats.im-stats { gap: 8px; margin: 0; }
html.pkl .im-stats .card { padding: 9px 11px; align-content: start; }
html.pkl .im-stats small { font-size: 10px; letter-spacing: .05em; }
html.pkl .im-stats b { font-size: 24px; }
html.pkl .im-stats .card > span { font-size: 12px; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
@supports (grid-template-rows: subgrid) {
html.pkl .im-stats .card { grid-row: span 3; grid-template-rows: subgrid; } }
html.pkl .ch-tools .wh-bar { margin: 0; }
@media (min-width: 901px) {
html.pkl body #inbox .ilist, html.pkl body #chat.gx-chat .chlist { overflow: visible; }
html.pkl body #inbox .ilist .iscroll { border-radius: 0 0 18px 18px; } }
html.pkl .itools .im-set:not([hidden]) { display: grid; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--gx-card); box-shadow: var(--gx-sh); max-height: 60vh; overflow: auto; }
html.pkl .chat.gx-chat { grid-template-columns: 344px minmax(0, 1fr); }
html.pkl .gx-chat .chlist { background: transparent; border: 0; box-shadow: none; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
html.pkl .gx-chat .ch-tools { display: grid; gap: 8px; padding: 0 0 2px; position: relative; z-index: 3; }
html.pkl .gx-chat .ch-rows { overflow-y: auto; min-height: 0; flex: 1 1 auto; padding: 2px 2px 12px; }
html.pkl .gx-chat .ch-rows > .gx-sech { margin: 12px 4px 8px; }
html.pkl .gx-chat .ch-rows > .gx-sech:first-child { margin-top: 2px; }
html.pkl .gx-chat .ch-list { display: grid; gap: 8px; }
html.pkl .gx-chrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 11px 13px; border: 0; border-radius: 16px; background: var(--gx-card); box-shadow: var(--gx-sh); color: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: transform .2s var(--gx-spring), box-shadow .2s; }
html.pkl .gx-chrow:hover { background: var(--gx-card); box-shadow: var(--gx-sh), var(--gx-lift); transform: translateY(-1px); }
html.pkl .gx-chrow.on { background: var(--gx-card); box-shadow: 0 0 0 2px var(--gx-ring, var(--gx-on)), var(--gx-sh); }
html.pkl .gx-chrow .ch-av { position: relative; display: inline-flex; }
html.pkl .gx-chrow .ch-av .gx-av { width: 40px; height: 40px; font-size: 14px; }
html.pkl .gx-chrow .ch-av.here::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: #1FB868; box-shadow: 0 0 0 2px var(--gx-card); }
html.pkl .gx-chrow .ch-hash { background: var(--gx-soft); color: var(--text); font: 800 18px var(--sans); }
html.pkl .gx-chrow .chm { display: grid; gap: 2px; min-width: 0; }
html.pkl .gx-chrow .cht { display: flex; align-items: center; gap: 8px; min-width: 0; }
html.pkl .gx-chrow .cht b { font: 600 15px/1.25 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 auto; }
html.pkl .gx-chrow.unread .cht b { font-weight: 800; }
html.pkl .gx-chrow .chw { flex: none; font: 500 12px var(--sans); color: var(--mute); }
html.pkl .gx-chrow .chp { font-size: 13px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.pkl .gx-chrow.unread .chp { color: var(--text); }
html.pkl .gx-chrow .n { grid-column: 3; grid-row: 1; font: 700 11.5px var(--sans); min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--gx-soft); color: var(--text); }
html.pkl .gx-chat .chset { padding: 14px 6px 0; }
@media (max-width: 900px) {
html.pkl .chat.gx-chat { grid-template-columns: 1fr; height: auto; }
html.pkl .gx-chat .ch-rows { overflow: visible; padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
html.pkl .chat.gx-chat.has-ch .chlist { display: none; }
html.pkl .chat.gx-chat:not(.has-ch) .chthread { display: none; } }
html.pkl body .gxm-av.gxm-by.ch-phone { background: #2150C4; }
html.pkl body .gxm-av.gxm-by.ch-mail { background: #0F6E7A; }
html.pkl body .gxm-av.gxm-by.ch-web { background: #6B3FA0; }
@media (max-width: 900px) {
html.nbar.nbar-fit.gx-hubbed body:not(.imsg):not(.ichat) .content { padding-top: 6px; } }
html.pkl.native body .ithread .ihead { padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
@media (max-width: 900px) {
html.pkl body .ithread .ictx { flex-wrap: wrap; padding: 8px 12px; gap: 6px; }
html.pkl body .ithread .ictx :is(.gx-bchip, .pstat, .opill) { height: 28px; padding: 0 10px; border-radius: 9px; } }
/*  ---- im.css (Nov 20 2026, PRs #2, #3, #6), as it was ----  *//* ======================================================================================================================================
   Messaging, native-app pass (Nov 20 2026). Scott: "it needs to look like a native messaging app. like telegram or something … take it up a
   notch and make it function super smooth and slick. very clean ux that fits the rest of the app."
   One look for both: Chat (the crew) and Messages (customers). Loaded after glow.css. Everything sits under .imt (Chat thread) or
   #ithread (Messages thread) so nothing else in the Office moves.
   Colour: the wall is quiet, theirs is a raised grey, ours is blue ("sent"), the send button is Packard red (the one thing to do).
   ====================================================================================================================================== */
:root {
  --im-wall: #E7EBF0; --im-dots: rgba(20, 30, 45, .06);
  --im-in: #FFFFFF; --im-in-tx: #14171C; --im-in-meta: #8A93A0; --im-in-sh: 0 1px 1px rgba(16, 24, 40, .08);
  --im-out: #2F7BF5; --im-out2: #2563EB; --im-out-tx: #FFFFFF; --im-out-meta: rgba(255, 255, 255, .78); --im-out-link: #FFFFFF;
  --im-acc: #2F7BF5; --im-red: #E5303A; --im-red2: #C81E2A;
  --im-bar: #FFFFFF; --im-bar-bd: rgba(16, 24, 40, .08); --im-field: #F1F3F6; --im-field-bd: transparent; --im-tx: #14171C; --im-mute: #6B7480;
  --im-chip: rgba(30, 38, 50, .5); --im-chip-tx: #FFFFFF; --im-pop: #FFFFFF; --im-pop-bd: rgba(16, 24, 40, .1); --im-hover: rgba(16, 24, 40, .06);
  --im-q-in: rgba(47, 123, 245, .08); --im-q-out: rgba(255, 255, 255, .16); --im-flash: rgba(47, 123, 245, .18);
  --im-ease: cubic-bezier(.2, .9, .25, 1.15); --im-ease2: cubic-bezier(.25, .8, .25, 1);
}
html[data-theme=dark] {
  --im-wall: #0E1014; --im-dots: rgba(255, 255, 255, .035);
  --im-in: #23272F; --im-in-tx: #ECEFF4; --im-in-meta: #8C95A3; --im-in-sh: 0 1px 0 rgba(0, 0, 0, .35);
  --im-out: #2F74E8; --im-out2: #2560D4; --im-out-meta: rgba(255, 255, 255, .72);
  --im-acc: #5B9BFF;
  --im-bar: #15181D; --im-bar-bd: rgba(255, 255, 255, .06); --im-field: #1E2229; --im-field-bd: rgba(255, 255, 255, .06); --im-tx: #ECEFF4; --im-mute: #8C95A3;
  --im-chip: rgba(30, 34, 41, .82); --im-chip-tx: #DCE1E8; --im-pop: #1E2229; --im-pop-bd: rgba(255, 255, 255, .08); --im-hover: rgba(255, 255, 255, .06);
  --im-q-in: rgba(91, 155, 255, .1); --im-q-out: rgba(255, 255, 255, .14); --im-flash: rgba(91, 155, 255, .2);
}

/* ---------- the Chat thread frame ---------- */
.chthread:has(> .imt) { background: var(--im-wall) !important; }
.imt { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; color: var(--im-tx); background: var(--im-wall);
  background-image: radial-gradient(var(--im-dots) 1.1px, transparent 1.2px); background-size: 22px 22px; }
.imt button { color: inherit; }
.imt svg { width: 100%; height: 100%; display: block; }

/* header: back · circle · who (tap for people) · search, people */
.imh { flex: none; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 12px 10px 16px; background: var(--im-bar); border-bottom: 1px solid var(--im-bar-bd); position: relative; z-index: 3; }
.imh-back { display: none; width: 36px; height: 36px; margin-left: -8px; border-radius: 50%; color: var(--im-acc); flex: none; padding: 7px; }
.imh-av, .im-av, .im-empty .imh-av { position: relative; flex: none; display: inline-grid; place-items: center; border-radius: 50%; color: #fff; background: var(--c, var(--im-acc));
  background-image: linear-gradient(160deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 60%); }
.imh-av { width: 42px; height: 42px; padding: 10px; font: 700 21px/1 var(--sans, Inter, sans-serif); }
.imh-av.ch { padding: 0; }
.imh-av.sk { background: var(--im-field); }
.imh-dot { position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; border-radius: 50%; background: #2FBF71; border: 2.5px solid var(--im-bar); display: none; }
.imh-av.here .imh-dot, .im-person .imh-dot { display: block; }
.imh-who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.imh-who b { font: 700 16.5px/1.2 var(--sans, Inter, sans-serif); letter-spacing: -.01em; max-width: 100%; overflow-wrap: anywhere; }
.imh-who b.sk { width: 140px; border-radius: 6px; background: var(--im-field); }
.imh-sub { font: 500 13px/1.25 var(--sans, Inter, sans-serif); color: var(--im-mute); max-width: 100%; overflow-wrap: anywhere; }
.imh-sub.on { color: #2FBF71; }
.imh-sub.ty { color: var(--im-acc); display: inline-flex; align-items: center; gap: 6px; }
.imh-ty { display: inline-flex; gap: 3px; } .imh-ty i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: im-ty 1.2s infinite ease-in-out; }
.imh-ty i:nth-child(2) { animation-delay: .15s; } .imh-ty i:nth-child(3) { animation-delay: .3s; }
@keyframes im-ty { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.imh-act { display: flex; gap: 2px; flex: none; }
.imh-act button { width: 40px; height: 40px; padding: 9px; border: 0; border-radius: 50%; background: transparent; color: var(--im-mute); cursor: pointer; transition: background .15s, color .15s; }
.imh-act button:hover { background: var(--im-hover); color: var(--im-tx); }

/* pinned bar */
.impin { flex: none; align-items: center; gap: 6px; padding: 6px 8px 6px 14px; background: var(--im-bar); border-bottom: 1px solid var(--im-bar-bd); position: relative; z-index: 2; }
.impin-go { flex: 1 1 auto; min-width: 0; display: flex; align-items: stretch; gap: 10px; background: none; border: 0; padding: 2px 0; text-align: left; cursor: pointer; }
.impin-bars { display: flex; flex-direction: column; gap: 2px; width: 2.5px; flex: none; } .impin-bars i { flex: 1; min-height: 6px; border-radius: 2px; background: var(--im-acc); opacity: .3; } .impin-bars i.on { opacity: 1; }
.impin-t { min-width: 0; display: flex; flex-direction: column; } .impin-t b { font: 600 13px/1.3 var(--sans, Inter, sans-serif); color: var(--im-acc); }
.impin-t span { font: 400 13.5px/1.35 var(--sans, Inter, sans-serif); color: var(--im-tx); overflow-wrap: anywhere; }
.impin-all { width: 34px; height: 34px; padding: 8px; border: 0; border-radius: 50%; background: none; color: var(--im-mute); cursor: pointer; flex: none; } .impin-all:hover { background: var(--im-hover); }

/* in-chat search */
.imfind { flex: none; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; background: var(--im-bar); border-bottom: 1px solid var(--im-bar-bd); z-index: 2; animation: im-drop .2s var(--im-ease2); }
.imfind-ic { width: 18px; height: 18px; color: var(--im-mute); flex: none; }
.imfind input { flex: 1; height: 36px; border: 0; border-radius: 18px; background: var(--im-field); color: var(--im-tx); padding: 0 14px; font: 500 15px var(--sans, Inter, sans-serif); outline: none; }
.imfind-n { font: 500 12.5px var(--sans, Inter, sans-serif); color: var(--im-mute); white-space: nowrap; }
.imfind button { width: 34px; height: 34px; padding: 8px; border: 0; border-radius: 50%; background: none; color: var(--im-mute); cursor: pointer; }
.imfound { position: absolute; left: 0; right: 0; max-height: min(60%, 420px); overflow: auto; z-index: 6; background: var(--im-pop); border-bottom: 1px solid var(--im-pop-bd); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .45); }
.imt:has(.impin:not([hidden])) .imfound { --imfound-top: 168px; }
.imt .imfound { position: relative; flex: none; max-height: 45%; }
.imfound button { display: flex; gap: 10px; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--im-bar-bd); background: none; text-align: left; cursor: pointer; }
.imfound button:hover { background: var(--im-hover); }
.imfound-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; } .imfound-t b { font: 600 13.5px var(--sans, Inter, sans-serif); display: flex; gap: 8px; align-items: baseline; } .imfound-t b small { font-weight: 500; color: var(--im-mute); font-size: 12px; }
.imfound-t > span { font: 400 14px/1.35 var(--sans, Inter, sans-serif); color: var(--im-tx); overflow-wrap: anywhere; } .imfound mark, .im-hit mark { background: rgba(255, 201, 0, .45); color: inherit; border-radius: 3px; padding: 0 1px; }

/* the scroller */
.imbody { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 8px 0 14px; scroll-padding-bottom: 20px; -webkit-overflow-scrolling: touch; }
.imbody::-webkit-scrollbar { width: 10px; } .imbody::-webkit-scrollbar-thumb { background: rgba(127, 135, 148, .35); border: 3px solid transparent; background-clip: padding-box; border-radius: 10px; }
.imlist { display: flex; flex-direction: column; max-width: 860px; padding: 0 14px; }
.im-older { height: 36px; place-items: center; }
.im-older span { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--im-mute); border-top-color: transparent; opacity: 0; }
.im-older.busy span { opacity: .7; animation: im-spin .8s linear infinite; }
@keyframes im-spin { to { transform: rotate(360deg); } }

/* day chip that rides the top, the unread line */
.im-day { display: flex; justify-content: center; margin: 10px 0 8px; pointer-events: none; }
.imfloat { position: absolute; left: 0; right: 0; z-index: 4; display: flex; justify-content: center; pointer-events: none; margin-top: 8px; opacity: 0; transform: translateY(-4px); transition: opacity .25s, transform .25s; height: 0; }
.imfloat.on { opacity: 1; transform: none; }
.imfloat span { padding: 4px 11px; border-radius: 999px; background: var(--im-chip); color: var(--im-chip-tx); font: 600 12.5px/1.3 var(--sans, Inter, sans-serif); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); white-space: nowrap; }
.im-day span { padding: 4px 11px; border-radius: 999px; background: var(--im-chip); color: var(--im-chip-tx); font: 600 12.5px/1.3 var(--sans, Inter, sans-serif); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.im-unread { display: flex; justify-content: center; margin: 10px -14px 10px; padding: 5px 0; background: var(--im-q-in); }
.im-unread span { font: 600 12.5px var(--sans, Inter, sans-serif); color: var(--im-acc); }

/* a row: (avatar) · column (bubble, reactions) · hover tools */
.im-row { position: relative; display: flex; align-items: flex-end; gap: 8px; margin-top: 2px; transition: transform .18s var(--im-ease2), background .5s; border-radius: 12px; }
.im-row.g1 { margin-top: 8px; }
.im-row.mine { flex-direction: row-reverse; }
.im-col { display: flex; flex-direction: column; min-width: 0; max-width: min(78%, 620px); }
.im-row.mine .im-col { align-items: flex-end; } .im-row.their .im-col { align-items: flex-start; }
.im-av { width: 36px; height: 36px; padding: 8px; align-self: flex-end; } .im-av:empty { visibility: hidden; } .im-av.sm { width: 28px; height: 28px; padding: 6px; font: 700 14px var(--sans, Inter, sans-serif); }
.im-av.bot { --c: var(--im-red); }

/* the bubble */
.im-b { position: relative; min-width: 56px; max-width: 100%; padding: 6px 10px 7px 11px; border-radius: 18px; background: var(--im-in); color: var(--im-in-tx); box-shadow: var(--im-in-sh);
  font: 400 15px/1.38 var(--sans, Inter, sans-serif); overflow-wrap: anywhere; word-break: break-word; }
.im-row.mine .im-b { background: linear-gradient(180deg, var(--im-out), var(--im-out2)); color: var(--im-out-tx); box-shadow: none; }
/* grouping: tight corners between bubbles from the same person, a tail on the last one */
.im-row.their:not(.g1) .im-b { border-top-left-radius: 6px; } .im-row.their:not(.gl) .im-b { border-bottom-left-radius: 6px; }
.im-row.mine:not(.g1) .im-b { border-top-right-radius: 6px; } .im-row.mine:not(.gl) .im-b { border-bottom-right-radius: 6px; }
.im-row.their.gl .im-b { border-bottom-left-radius: 4px; } .im-row.mine.gl .im-b { border-bottom-right-radius: 4px; }
.im-row.gl .im-b::after { content: ''; position: absolute; bottom: 0; width: 12px; height: 16px; background: inherit; }
.im-row.their.gl .im-b::after { left: -6px; clip-path: path('M12 0 C12 9 9 14 0 16 L12 16 Z'); }
.im-row.mine.gl .im-b::after { right: -6px; clip-path: path('M0 0 C0 9 3 14 12 16 L0 16 Z'); background: var(--im-out2); }
.im-b.big, .im-b.bare { background: none !important; box-shadow: none; padding: 0; } .im-b.big::after, .im-b.bare::after { display: none; }
.im-b.big .im-t { font-size: 44px; line-height: 1.15; padding: 2px 2px 0; } .im-b.big .im-m { float: none; top: 0; vertical-align: bottom; margin: 0 0 4px 6px; height: 20px; padding: 0 7px; border-radius: 10px; background: var(--im-chip); color: var(--im-chip-tx) !important; font-size: 11px; }
.im-n { display: block; font: 600 13.5px/1.3 var(--sans, Inter, sans-serif); color: var(--c, var(--im-acc)); margin: 0 0 1px; }
.im-t { white-space: pre-wrap; position: relative; }
.im-t a { color: var(--im-acc); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; overflow-wrap: anywhere; }
.im-row.mine .im-t a { color: var(--im-out-link); }
.im-t .mention { font-weight: 600; color: var(--im-acc); background: none; padding: 0; } .im-t .mention.me { background: rgba(255, 201, 0, .28); border-radius: 4px; padding: 0 2px; color: inherit; }
.im-row.mine .im-t .mention { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .5); }
.im-b.del .im-t { color: var(--im-in-meta); font-style: italic; } .im-row.mine .im-b.del { background: var(--im-in) !important; color: var(--im-in-tx); } .im-row.mine .im-b.del::after { background: var(--im-in); }
/* the time + ticks sit inside the bubble, bottom right: floated after the words, so they share the last line when it has room and drop
   under it when it doesn't (how Telegram does it) */
.im-t { display: flow-root; }
.im-sp { display: none; }
.im-m { float: right; position: relative; top: 6px; margin: -2px -3px 0 10px; display: inline-flex; align-items: center; gap: 3px; height: 16px; font: 500 11.5px/1 var(--sans, Inter, sans-serif); color: var(--im-in-meta); white-space: nowrap; font-variant-numeric: tabular-nums; user-select: none; }
.im-row.mine .im-m { color: var(--im-out-meta); }
.im-t0 { height: 0; } .im-t0 .im-m { position: absolute; float: none; top: auto; margin: 0; bottom: 6px; right: 6px; height: 20px; padding: 0 7px; border-radius: 10px; background: rgba(0, 0, 0, .5); color: #fff !important; }
.im-b.med:not(.bare) .im-t0 { height: auto; } .im-b.med:not(.bare) .im-t0 .im-m { position: static; float: right; background: none; color: inherit !important; padding: 0; margin: 2px -3px 0 0; }
.im-tk { display: inline-block; width: 16px; height: 11px; } .im-tk.r { color: #fff; } .im-tk.p { width: 12px; height: 12px; opacity: .85; } .im-tk.f { width: 15px; height: 15px; color: #FF5A5F; }
.im-pinned { width: 12px; height: 12px; display: inline-block; opacity: .8; }
/* a reply quote: a bar in the sender's colour, their name, a line of what they said; tap to jump */
.im-q { display: flex; flex-direction: column; align-items: flex-start; width: 100%; min-width: 0; margin: 2px 0 5px; padding: 4px 10px 5px 10px; border: 0; border-left: 3px solid var(--c, var(--im-acc)); border-radius: 5px 8px 8px 5px; background: var(--im-q-in); text-align: left; cursor: pointer; }
.im-row.mine .im-q { background: var(--im-q-out); border-left-color: #fff; }
.im-q b { font: 600 13px/1.3 var(--sans, Inter, sans-serif); color: var(--c, var(--im-acc)); } .im-row.mine .im-q b { color: #fff; }
.im-q span { font: 400 13.5px/1.35 var(--sans, Inter, sans-serif); opacity: .9; overflow-wrap: anywhere; }
.im-q.gone { cursor: default; opacity: .7; }
/* photos: one keeps its shape, two to four share a grid; files are a chip */
.im-media { display: grid; gap: 2px; margin: 0 -10px 4px -11px; border-radius: 16px; overflow: hidden; max-width: 380px; }
.im-b.med:not(:has(.im-n, .im-q)) .im-media { margin-top: -6px; }
.im-b.bare .im-media { margin: 0; }
.im-media.n1 { grid-template-columns: 1fr; } .im-media.n2 { grid-template-columns: 1fr 1fr; } .im-media.n3 { grid-template-columns: 1fr 1fr; } .im-media.n4 { grid-template-columns: 1fr 1fr; }
.im-media.n3 .im-ph:first-child { grid-column: 1 / -1; }
.im-ph { position: relative; display: block; min-height: 90px; background: rgba(127, 135, 148, .25); overflow: hidden; }
.im-media.n1 .im-ph { max-height: 420px; min-width: 200px; } .im-media:not(.n1) .im-ph { aspect-ratio: 1; }
.im-ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s var(--im-ease2); }
.im-ph:hover img { transform: scale(1.02); } .im-ph.x { display: none; }
.im-ph-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #fff; font: 700 22px var(--sans, Inter, sans-serif); }
.im-file { display: flex; align-items: center; gap: 10px; min-width: 220px; margin: 2px 0 6px; color: inherit !important; text-decoration: none !important; }
.im-file-ic { position: relative; width: 44px; height: 44px; flex: none; padding: 9px; border-radius: 50%; background: var(--im-acc); color: #fff; }
.im-row.mine .im-file-ic { background: #fff; color: var(--im-out2); }
.im-file-ic i { position: absolute; left: 0; right: 0; bottom: 13px; text-align: center; font: 800 7px var(--sans, Inter, sans-serif); font-style: normal; letter-spacing: .02em; }
.im-file-t { min-width: 0; display: flex; flex-direction: column; } .im-file-t b { font: 600 14px/1.3 var(--sans, Inter, sans-serif); overflow-wrap: anywhere; } .im-file-t small { font: 500 12.5px var(--sans, Inter, sans-serif); opacity: .7; }
/* reactions under the bubble */
.im-r { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 0; }
.im-r button { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 9px 0 7px; border-radius: 14px; border: 1px solid transparent; background: var(--im-in); box-shadow: var(--im-in-sh); cursor: pointer; font: 600 13px var(--sans, Inter, sans-serif); color: var(--im-in-tx); transition: transform .15s var(--im-ease); }
.im-r button span { font-size: 16px; line-height: 1; } .im-r button i { font-style: normal; font-variant-numeric: tabular-nums; }
.im-r button.on { background: var(--im-acc); color: #fff; } .im-r button:active { transform: scale(.92); }
/* the bot card's button (Open in Messages …) */
.im-btn { display: block; margin-top: 4px; padding: 9px 14px; border-radius: 12px; background: var(--im-in); box-shadow: var(--im-in-sh); color: var(--im-acc) !important; font: 600 14px var(--sans, Inter, sans-serif); text-align: center; text-decoration: none !important; transition: background .15s; }
.im-btn:hover { background: var(--im-hover); }
.im-row.bot .im-b { max-width: 100%; } .im-row.bot .im-col { align-items: stretch; } .im-row.bot .im-col > .im-b { align-self: flex-start; }
/* failed send */
.im-fail { display: flex; gap: 6px; margin-top: 4px; } .im-fail button { border: 0; background: none; padding: 2px 4px; font: 600 12.5px var(--sans, Inter, sans-serif); color: #FF5A5F; cursor: pointer; } .im-fail button + button { color: var(--im-mute); }
.im-b.bad { opacity: .8; }
/* hover tools (desktop): react · reply · more, beside the bubble */
.im-tools { display: flex; gap: 2px; align-self: center; opacity: 0; pointer-events: none; transform: scale(.9); transition: opacity .12s, transform .12s; padding: 3px; border-radius: 18px; background: var(--im-pop); border: 1px solid var(--im-pop-bd); box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .35); }
.im-tools button { width: 30px; height: 30px; padding: 6px; border: 0; border-radius: 50%; background: none; color: var(--im-mute); cursor: pointer; } .im-tools button:hover { background: var(--im-hover); color: var(--im-tx); }
@media (hover: hover) { .im-row:hover .im-tools, .im-row.menu .im-tools { opacity: 1; pointer-events: auto; transform: none; } }
.im-row.menu .im-b { filter: brightness(1.04); }
/* swipe left to reply (phone) */
.im-row.swipe::after { content: ''; position: absolute; right: -40px; top: 50%; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%; background: var(--im-chip) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 8 5 12.5l5 4.5M5.5 12.5H14a5 5 0 0 1 5 5V19' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; }
/* jump here */
.im-row.flash { animation: im-flash 1.6s var(--im-ease2); }
@keyframes im-flash { 0%, 30% { background: var(--im-flash); box-shadow: 0 0 0 6px var(--im-flash); } 100% { background: transparent; box-shadow: 0 0 0 6px transparent; } }
/* a new message slides up into place */
.im-row.im-in { animation: im-in .32s var(--im-ease) both; }
.im-row.mine.im-in { transform-origin: 100% 100%; } .im-row.their.im-in { transform-origin: 0 100%; }
@keyframes im-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.imbody.fresh .im-row:nth-last-child(-n+6) { animation: im-in .36s var(--im-ease) both; }
@media (prefers-reduced-motion: reduce) { .im-row.im-in, .imbody.fresh .im-row, .im-row.flash { animation: none !important; } }
.im-empty { margin: 12vh auto 0; max-width: 300px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 22px 20px; border-radius: 22px; background: var(--im-chip); color: var(--im-chip-tx); }
.im-empty .imh-av { width: 64px; height: 64px; padding: 15px; font-size: 30px; } .im-empty b { font: 700 16px var(--sans, Inter, sans-serif); } .im-empty span:last-child { font: 400 13.5px/1.4 var(--sans, Inter, sans-serif); opacity: .8; }
.im-skel { gap: 10px; padding-top: 30px; } .im-skel i { display: block; height: 38px; width: 46%; border-radius: 18px; background: var(--im-in); opacity: .55; animation: im-pulse 1.2s infinite ease-in-out; } .im-skel i.m { align-self: flex-end; background: var(--im-out); opacity: .35; } .im-skel i.w { width: 30%; }
@keyframes im-pulse { 50% { opacity: .3; } }

/* jump-down button with a count */
.imfab { position: absolute; right: 18px; bottom: 92px; z-index: 5; width: 44px; height: 44px; padding: 10px; border: 1px solid var(--im-pop-bd); border-radius: 50%; background: var(--im-pop); color: var(--im-mute); cursor: pointer; box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .45);
  opacity: 0; transition: opacity .18s, transform .22s var(--im-ease); }
.imfab.on { opacity: 1; } .imfab[hidden] { pointer-events: none; }
.imfab em { position: absolute; top: -7px; left: 50%; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--im-acc); color: #fff; font: 700 12px/22px var(--sans, Inter, sans-serif); font-style: normal; }
.imt:has(.imc-ctx:not([hidden])) .imfab, .imt:has(.imc-tray:not([hidden])) .imfab { bottom: 150px; }

/* the composer: clip · field (emoji inside) · send */
.imc { flex: none; position: relative; z-index: 4; padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--im-bar); border-top: 1px solid var(--im-bar-bd); }
.imc-bar { display: flex; align-items: flex-end; gap: 8px; max-width: 900px; }
.imc-b, .imc-send { flex: none; width: 42px; height: 42px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.imc-b { padding: 10px; background: none; color: var(--im-mute); transition: background .15s, color .15s; } .imc-b:hover { background: var(--im-hover); color: var(--im-tx); }
.imc-field { flex: 1 1 auto; min-width: 0; position: relative; display: flex; align-items: flex-end; background: var(--im-field); border: 1px solid var(--im-field-bd); border-radius: 22px; transition: box-shadow .15s, border-color .15s; }
.imc-field:focus-within { border-color: color-mix(in srgb, var(--im-acc) 55%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--im-acc) 16%, transparent); }
.imc-field textarea { flex: 1; min-width: 0; min-height: 42px; max-height: 180px; resize: none; border: 0 !important; outline: 0; background: none !important; color: var(--im-tx); padding: 10px 6px 10px 16px; font: 400 15.5px/1.4 var(--sans, Inter, sans-serif); }
.imc-field textarea::placeholder { color: var(--im-mute); }
.imc-emo { flex: none; width: 38px; height: 38px; padding: 8px; border: 0; border-radius: 50%; background: none; color: var(--im-mute); cursor: pointer; } .imc-emo:hover { color: var(--im-tx); }
.imc-send { padding: 10px; background: var(--im-field); color: var(--im-mute); transition: background .2s, color .2s, transform .2s var(--im-ease); }
.imc-send.go { background: linear-gradient(180deg, var(--im-red), var(--im-red2)); color: #fff; transform: none; box-shadow: 0 6px 14px -6px rgba(229, 48, 58, .7); }
.imc-send.go:active { transform: scale(.9); }
.imt.editing .imc-send.go { background: linear-gradient(180deg, var(--im-out), var(--im-out2)); box-shadow: 0 6px 14px -6px rgba(47, 123, 245, .7); }
.imc-ctx { align-items: center; gap: 10px; max-width: 900px; margin: 0 auto 8px; padding: 0 2px 0 10px; animation: im-drop .18s var(--im-ease2); }
.imc-ctx-ic { width: 22px; height: 22px; color: var(--im-acc); flex: none; }
.imc-ctx-t { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 2px 0 2px 10px; border: 0; border-left: 3px solid var(--c, var(--im-acc)); background: none; text-align: left; cursor: pointer; }
.imc-ctx-t b { font: 600 13px/1.3 var(--sans, Inter, sans-serif); color: var(--c, var(--im-acc)); } .imc-ctx-t span { font: 400 13.5px/1.35 var(--sans, Inter, sans-serif); color: var(--im-mute); overflow-wrap: anywhere; }
.imc-ctx-x { width: 34px; height: 34px; padding: 8px; border: 0; border-radius: 50%; background: none; color: var(--im-mute); cursor: pointer; flex: none; } .imc-ctx-x:hover { background: var(--im-hover); }
@keyframes im-drop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.imc-tray { gap: 8px; overflow-x: auto; max-width: 900px; margin: 0 auto 8px; padding: 2px 2px 4px; scrollbar-width: none; }
.imc-f { position: relative; flex: none; width: 76px; height: 76px; border-radius: 14px; overflow: hidden; background: var(--im-field); animation: im-in .25s var(--im-ease) both; }
.imc-f img { width: 100%; height: 100%; object-fit: cover; display: block; }
.imc-f-doc { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 100%; padding: 8px; color: var(--im-mute); } .imc-f-doc svg { width: 24px; height: 24px; } .imc-f-doc b { font: 600 10.5px/1.2 var(--sans, Inter, sans-serif); text-align: center; overflow-wrap: anywhere; }
.imc-f button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; padding: 4px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; }
.imc-f.busy img { filter: brightness(.55); } .imc-f-spin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px; border-radius: 50%; border: 2.5px solid #fff; border-top-color: transparent; animation: im-spin .8s linear infinite; }
.imc-f.err { outline: 2px solid #FF5A5F; outline-offset: -2px; }
/* @mentions */
.im-men { left: 60px; right: 60px; bottom: calc(100% + 6px); max-width: 360px; padding: 6px; border-radius: 16px; border: 1px solid var(--im-pop-bd); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .5); z-index: 8; }
.im-men button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 10px; background: none; color: var(--im-tx); cursor: pointer; text-align: left; font: 600 14px var(--sans, Inter, sans-serif); }
.im-men button.on, .im-men button:hover { background: var(--im-hover); } .im-men small { margin-left: auto; font-weight: 500; color: var(--im-mute); } .im-men small.on { color: #2FBF71; }
/* drop a file anywhere on the thread */
.imdrop { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 18px; background: color-mix(in srgb, var(--im-wall) 70%, transparent); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .15s; }
.imdrop.on { opacity: 1; }
.imdrop > div { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; height: 100%; justify-content: center; border: 2.5px dashed var(--im-acc); border-radius: 22px; color: var(--im-acc); font: 700 17px var(--sans, Inter, sans-serif); }
.imdrop svg { width: 40px; height: 40px; }

/* pop-overs: the message menu, the emoji sheet */
.im-pop { position: fixed; z-index: 1000; background: var(--im-pop); color: var(--im-tx); border: 1px solid var(--im-pop-bd); border-radius: 18px; box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .12);
  opacity: 0; transform: scale(.92) translateY(6px); transform-origin: 50% 100%; transition: opacity .14s, transform .2s var(--im-ease); font-family: var(--sans, Inter, sans-serif); }
.im-pop.on { opacity: 1; transform: none; }
.im-pop svg { width: 100%; height: 100%; display: block; }
.im-menu { width: 300px; padding: 6px; }
.im-menu-r { display: flex; justify-content: space-between; gap: 2px; padding: 2px 2px 6px; }
.im-menu.only .im-menu-r { padding-bottom: 2px; }
.im-menu-r button { width: 32px; height: 36px; border: 0; border-radius: 12px; background: none; font-size: 22px; line-height: 1; cursor: pointer; transition: transform .15s var(--im-ease), background .15s; }
.im-menu-r button:hover { transform: scale(1.22); } .im-menu-r button.on { background: color-mix(in srgb, var(--im-acc) 22%, transparent); }
.im-menu-r button.plus { padding: 7px; color: var(--im-mute); }
.im-menu-l { border-top: 1px solid var(--im-pop-bd); padding-top: 4px; }
.im-menu-l button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; color: var(--im-tx); font: 500 14.5px var(--sans, Inter, sans-serif); text-align: left; cursor: pointer; }
.im-menu-l button svg { width: 19px; height: 19px; color: var(--im-mute); flex: none; }
.im-menu-l button:hover { background: var(--im-hover); } .im-menu-l button.bad, .im-menu-l button.bad svg { color: #FF5A5F; } .im-menu-l button.sure { background: rgba(255, 90, 95, .14); font-weight: 600; }
.im-emo { width: 316px; padding: 8px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.im-emo button { height: 36px; border: 0; border-radius: 10px; background: none; font-size: 22px; cursor: pointer; transition: transform .12s var(--im-ease); } .im-emo button:hover { background: var(--im-hover); transform: scale(1.15); }

/* drawer bits: pinned list, people */
.im-pinrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--im-bar-bd); }
.im-pinrow-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; color: inherit; }
.im-pinrow-t b { font: 600 14px var(--sans, Inter, sans-serif); } .im-pinrow-t span { font: 400 14px/1.4 var(--sans, Inter, sans-serif); overflow-wrap: anywhere; } .im-pinrow-t small { color: var(--im-mute); font-size: 12px; }
.im-people { display: flex; flex-direction: column; }
.im-person { display: flex; align-items: center; gap: 12px; padding: 8px 0; } .im-person > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.im-person b { font: 600 14.5px var(--sans, Inter, sans-serif); } .im-person b small { font-weight: 500; color: var(--im-mute); } .im-person small { font: 500 12.5px var(--sans, Inter, sans-serif); color: var(--im-mute); } .im-person small.on { color: #2FBF71; }
.im-person .imh-dot { border-color: var(--card, #fff); }

/* the empty thread pane */
.chthread > .im-pick { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 30px; color: var(--im-mute); background: var(--im-wall); background-image: radial-gradient(var(--im-dots) 1.1px, transparent 1.2px); background-size: 22px 22px; }
.chthread:has(> .im-pick) { padding: 0 !important; background: var(--im-wall) !important; }
.im-pick-ic { width: 72px; height: 72px; padding: 18px; border-radius: 50%; background: var(--im-chip); color: var(--im-chip-tx); } .im-pick-ic svg { width: 100%; height: 100%; }
.im-pick b { font: 700 17px var(--sans, Inter, sans-serif); color: var(--im-tx); } .im-pick > span:last-child { font: 400 14px var(--sans, Inter, sans-serif); }

/* phones: the thread fills the screen (body.ichat), the back arrow shows, the composer rides the keyboard */
@media (max-width: 900px) {
  .imh-back { display: grid; }
  .imh { min-height: calc(58px + env(safe-area-inset-top, 0px)); padding-top: calc(8px + env(safe-area-inset-top, 0px)); gap: 10px; }
  .imh-av { width: 38px; height: 38px; padding: 9px; font-size: 19px; }
  .imlist { padding: 0 8px; }
  .im-col { max-width: 84%; }
  .imt:not(.dm) .im-col { max-width: calc(100% - 64px); }
  .im-av { width: 30px; height: 30px; padding: 6.5px; }
  .im-b { font-size: 16px; }
  .im-tools { display: none; }
  .imfab { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); right: 12px; }
  .imc { padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px)); }
  .im-pop.im-menu { left: 10px !important; right: 10px; width: auto; }
  .im-media { max-width: 100%; }
  body.ichat .chthread:has(> .imt) { background: var(--im-wall) !important; }
}

/* ---------- the Chat list column: rows like a messaging app ---------- */
html.pkl body .chat.gx-chat .gx-chrow mark { background: rgba(255, 201, 0, .45); color: inherit; border-radius: 3px; }
html.pkl body .chat.gx-chat .gx-chrow.on { background: var(--im-acc) !important; color: #fff; box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--im-acc) 80%, transparent); }
html.pkl body .chat.gx-chat .gx-chrow.on :is(b, .chp, .chw, .chp b) { color: #fff; }
html.pkl body .chat.gx-chat .gx-chrow.on .ch-av .gx-av { background: rgba(255, 255, 255, .22); color: #fff; }
html.pkl body .chat.gx-chat .gx-chrow.on em.n { background: #fff !important; color: var(--im-acc) !important; }
html.pkl body .chat.gx-chat .gx-chrow { transition: background .15s, transform .15s; }
html.pkl body .chat.gx-chat .gx-chrow:active { transform: scale(.985); }

/* ======================================================================================================================================
   Messages (customers): the same bubbles, inside the existing thread. Specific selectors (#inbox #ithread) so the older theme rules
   in office.css / glow.css don't win.
   ====================================================================================================================================== */
/* layout: the list keeps its width, the thread gets the rest, and the customer panel comes and goes with the person button in the
   thread's header (it stays open on very wide screens unless you close it) */
@media (min-width: 901px) {
  html.pkl body #inbox.inbox.has-thread { grid-template-columns: var(--ilw, 344px) minmax(0, 1fr); }
  html.pkl body #inbox.inbox.has-thread:not(.side-on) .iside { display: none; }
  html.pkl body #inbox.inbox.has-thread.side-on { grid-template-columns: var(--ilw, 344px) minmax(0, 1fr) clamp(280px, 22vw, 360px) !important; }
}
@media (min-width: 1680px) {
  html.pkl body #inbox.inbox.has-thread:not(.side-off) { grid-template-columns: var(--ilw, 360px) minmax(0, 1fr) clamp(300px, 20vw, 380px) !important; }
  html.pkl body #inbox.inbox.has-thread:not(.side-off) .iside { display: block !important; }
}
html body #inbox #ithread { container-type: inline-size; }
@media (min-width: 901px) { html body #inbox #ithread { position: relative; } }
html body #inbox #ithread .ih-side { width: 38px; height: 38px; padding: 9px; border-radius: 50%; color: var(--mute); }
html body #inbox #ithread .ih-side svg { width: 20px; height: 20px; display: block; }
html body #inbox #ithread .ih-side.on { background: var(--im-acc) !important; color: #fff !important; }
@media (max-width: 900px) { html body #inbox #ithread .ih-side { display: none; } }
/* header: one line — circle · who · Call · Take · Done · Hand off · panel · ⋯ */
@media (min-width: 901px) {
  html.pkl body #inbox #ithread .ihead { gap: 8px; min-height: 66px; padding: 10px 12px 10px 16px; background: var(--im-bar); }
  html.pkl body #inbox #ithread .ihead .who { flex: 1 1 auto; min-width: 0; }
  html.pkl body #inbox #ithread .ihead .who .sub { display: block; overflow-wrap: anywhere; }
  html.pkl body #inbox #ithread .ihead :is(.ih-call, .ihprime .btn) { height: 36px; padding: 0 13px; border-radius: 18px; }
}
@container (max-width: 760px) {
  html.pkl body #inbox #ithread .ihead :is(.ih-call, .ihprime [data-act=handoff]) { font-size: 0; gap: 0; width: 36px; padding: 0; justify-content: center; }
  html.pkl body #inbox #ithread .ihead .ihprime .ih-take { max-width: 170px; overflow: hidden; }
}
/* the wall and the bubbles */
html body #inbox #ithread .ibody { background: var(--im-wall) !important; scroll-padding-bottom: 20px; }
html body #inbox #ithread .ibody .msgs { gap: 2px; max-width: 860px; padding: 6px 16px 16px; }
html body #inbox #ithread .ibody .msg { position: relative; max-width: min(78%, 640px); margin: 0; padding: 6px 10px 7px 11px; border: 0; border-radius: 18px !important;
  background: var(--im-in) !important; color: var(--im-in-tx) !important; box-shadow: var(--im-in-sh) !important; font: 400 15px/1.38 var(--sans, Inter, sans-serif) !important; white-space: pre-wrap; overflow-wrap: anywhere; display: flow-root; }
html body #inbox #ithread .ibody .msg.g-first { margin-top: 8px !important; }
html body #inbox #ithread .ibody .msg.agent { background: linear-gradient(180deg, var(--im-out), var(--im-out2)) !important; color: var(--im-out-tx) !important; box-shadow: none !important; }
html body #inbox #ithread .ibody .msg:not(.agent):not(.system):not(.g-first) { border-top-left-radius: 6px !important; }
html body #inbox #ithread .ibody .msg:not(.agent):not(.system).g-mid { border-bottom-left-radius: 6px !important; }
html body #inbox #ithread .ibody .msg:not(.agent):not(.system).g-last { border-bottom-left-radius: 4px !important; }
html body #inbox #ithread .ibody .msg.agent:not(.g-first) { border-top-right-radius: 6px !important; }
html body #inbox #ithread .ibody .msg.agent.g-mid { border-bottom-right-radius: 6px !important; }
html body #inbox #ithread .ibody .msg.agent.g-last { border-bottom-right-radius: 4px !important; }
html body #inbox #ithread .ibody .msg.g-last:not(.system)::after { content: ''; position: absolute; bottom: 0; width: 12px; height: 16px; background: var(--im-in); }
html body #inbox #ithread .ibody .msg.g-last:not(.system):not(.agent)::after { left: -6px; clip-path: path('M12 0 C12 9 9 14 0 16 L12 16 Z'); }
html body #inbox #ithread .ibody .msg.agent.g-last::after { right: -6px; left: auto; clip-path: path('M0 0 C0 9 3 14 12 16 L0 16 Z'); background: var(--im-out2); }
html body #inbox #ithread .ibody .msg.err { background: linear-gradient(180deg, #D9434B, #B8323A) !important; }
html body #inbox #ithread .ibody .msg.err::after { background: #B8323A !important; }
/* time + tick inside the bubble; the full line (who · when · channel) opens on a tap */
html body #inbox #ithread .ibody .msg .mt { float: right; position: relative; top: 6px; margin: -2px -3px 0 10px; display: inline-flex; align-items: center; gap: 3px; height: 16px; font: 500 11.5px/1 var(--sans, Inter, sans-serif); color: var(--im-in-meta); white-space: nowrap; font-variant-numeric: tabular-nums; }
html body #inbox #ithread .ibody .msg.agent .mt { color: var(--im-out-meta); }
html body #inbox #ithread .ibody .msg > small { display: none; clear: both; padding-top: 6px; font: 500 11.5px/1.35 var(--sans, Inter, sans-serif) !important; color: var(--im-in-meta) !important; opacity: 1; white-space: normal; }
html body #inbox #ithread .ibody .msg.agent > small { color: var(--im-out-meta) !important; }
html body #inbox #ithread .ibody .msg.meta > small { display: block !important; }
html body #inbox #ithread .ibody .msg.system > small { display: inline !important; padding: 0 0 0 6px; }
html body #inbox #ithread .ibody .msg .mn { display: block; font: 600 13px/1.3 var(--sans, Inter, sans-serif); color: rgba(255, 255, 255, .86); margin: 0 0 1px; white-space: normal; }
html body #inbox #ithread .ibody .msg .vmh { color: var(--im-acc) !important; font: 600 12px/1.3 var(--sans, Inter, sans-serif) !important; text-transform: none; letter-spacing: 0; margin: 0 0 3px; }
html body #inbox #ithread .ibody .msg.agent .vmh { color: rgba(255, 255, 255, .9) !important; }
html body #inbox #ithread .ibody .msg.vm audio { width: 280px; max-width: 100%; height: 36px; margin: 4px 0 6px; border-radius: 18px; }
html body #inbox #ithread .ibody .msg.vm .vmh::before { content: '● '; color: #2FBF71; }
/* system lines (a call, a claim) are a chip in the middle */
html body #inbox #ithread .ibody .msg.system { max-width: 86% !important; margin: 8px 0 !important; padding: 5px 12px !important; border-radius: 12px !important; background: var(--im-chip) !important; color: var(--im-chip-tx) !important; box-shadow: none !important; font: 500 12.5px/1.4 var(--sans, Inter, sans-serif) !important; white-space: normal; backdrop-filter: blur(8px); }
html body #inbox #ithread .ibody .msg.system.claim { border-left: 3px solid #FFC958 !important; text-align: left; } html body #inbox #ithread .ibody .msg.system.claim.hot { border-left-color: var(--im-red) !important; }
html body #inbox #ithread .ibody .msg.system small { color: inherit !important; opacity: .7 !important; }
html body #inbox #ithread .ibody .tsep { margin: 12px 0 6px; padding: 4px 11px; border-radius: 999px; background: var(--im-chip) !important; color: var(--im-chip-tx); font: 600 12.5px/1.3 var(--sans, Inter, sans-serif) !important; backdrop-filter: blur(10px); }
html body #inbox #ithread .ibody .dlv { display: none; }
html body #inbox #ithread .ibody .msg.email { max-width: min(84%, 680px) !important; }
html body #inbox #ithread .ibody .msg :is(.mq-t) { opacity: .8; }
html body #inbox #ithread .ibody .msg.piconly { background: none !important; box-shadow: none !important; padding: 0 !important; } html body #inbox #ithread .ibody .msg.piconly::after { display: none; }
/* new ones slide up into place; a thread opens with a soft cascade */
html body #inbox #ithread .ibody .msg.im-in { animation: im-in .32s var(--im-ease) both; }
html body #inbox #ithread .ibody.fresh .msg { animation: im-in .34s var(--im-ease) both !important; }
html body #inbox #ithread .ibody .msg.agent.im-in { transform-origin: 100% 100%; }
/* the jump-down button sits above the composer */
html body #inbox #ithread .ifab { position: absolute; bottom: auto; right: 22px; margin-top: -58px; }
/* the composer: same pill, red send */
html.pkl body #inbox #ithread .icompose { background: var(--im-bar) !important; border-top: 1px solid var(--im-bar-bd) !important; padding: 8px 12px 10px; }
html.pkl body #inbox #ithread .icompose .cbar textarea { background: var(--im-field) !important; border-color: var(--im-field-bd) !important; border-radius: 22px; min-height: 42px; font: 400 15.5px/1.4 var(--sans, Inter, sans-serif) !important; }
html.pkl body #inbox #ithread .icompose .cbar textarea:focus { border-color: color-mix(in srgb, var(--im-acc) 55%, transparent) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--im-acc) 16%, transparent) !important; }
html.pkl body #inbox #ithread .icompose .gx-send { width: 42px; height: 42px; background: linear-gradient(180deg, var(--im-red), var(--im-red2)) !important; box-shadow: 0 6px 14px -6px rgba(229, 48, 58, .7); transition: transform .2s var(--im-ease), opacity .2s; }
html.pkl body #inbox #ithread .icompose .gx-send:disabled { background: var(--im-field) !important; color: var(--im-mute) !important; box-shadow: none !important; opacity: 1 !important; transform: scale(.92); }
@media (max-width: 900px) {
  html body #inbox #ithread .ibody .msgs { padding: 6px 10px 14px; }
  html body #inbox #ithread .ibody .msg { max-width: 84% !important; font-size: 16px !important; }
  html body #inbox #ithread .ifab { right: 12px; }
}

/* ======================================================================================================================================
   Messages polish (Nov 20 2026, later). Scott: "That plus button for new message is horrible. settings next to it is a waste … make the
   filter cleaner. just use icons for how they reached … i want to make suggestions to the suggested replies."
   ====================================================================================================================================== */
/* a plain plus (the kinetic one drew hollow) */
.btn .im-plus { flex: none; width: 18px; height: 18px; }
#newbtn .im-plus { margin-right: -1px; }
/* the list head: search · filter · new message; New and Settings left the count line */
html.pkl body #inbox .im-head .im-compose { flex: none; }
html.pkl body #inbox .inew.im-new { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0 2px; padding: 10px 12px; border-radius: 16px; background: var(--gx-card, var(--im-pop)); box-shadow: inset 0 0 0 1px var(--im-pop-bd); animation: im-drop .18s var(--im-ease2); }
html.pkl body #inbox .inew.im-new b { flex: 1 0 100%; font: 600 13px var(--sans, Inter, sans-serif); color: var(--im-mute); }
html.pkl body #inbox .inew.im-new input { flex: 1 1 140px; min-width: 0; height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--im-field-bd); background: var(--im-field); color: var(--im-tx); font: 500 15px var(--sans, Inter, sans-serif); outline: none; }
html.pkl body #inbox .inew.im-new input:focus { border-color: color-mix(in srgb, var(--im-acc) 55%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--im-acc) 16%, transparent); }
html.pkl body #inbox .inew.im-new .btn { height: 40px; border-radius: 20px; padding: 0 16px; }

/* the filter sheet: icons for how they reached us, switches for on/off, Settings at the foot */
.wh-pop .wh-sec-ico h4 { display: flex; align-items: baseline; gap: 8px; }
.wh-pop .wh-sec-ico h4 b { font: 600 13px var(--sans, Inter, sans-serif); letter-spacing: 0; text-transform: none; color: var(--text); }
.wh-icos { display: flex; gap: 6px; }
.wh-ico { flex: 1 1 0; min-width: 0; max-width: 46px; aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: var(--gx-soft); color: var(--c, var(--text));
  transition: transform .2s var(--im-ease), background .15s, color .15s, box-shadow .15s; }
html[data-theme=dark] .wh-ico { color: color-mix(in srgb, var(--c, #C9D0DA) 55%, #fff); }
.wh-ico svg { width: 52%; height: 52%; display: block; }
.wh-ico:hover { transform: translateY(-1px); } .wh-ico:active { transform: scale(.92); }
.wh-ico.on { background: var(--c, var(--gx-on)); color: #fff; box-shadow: 0 0 0 2px var(--wh-pop, #fff), 0 0 0 4px var(--c, var(--gx-on)); }
.wh-ico.on:not([style]) { color: var(--gx-on-tx, #fff); }
.wh-sws { margin-top: 14px; border-radius: 16px; background: var(--gx-soft); overflow: hidden; }
.wh-sw { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 12px 8px 14px; border: 0; background: none; font: 600 14px var(--sans, Inter, sans-serif); text-align: left; cursor: pointer; }
.wh-sw + .wh-sw { box-shadow: inset 0 1px 0 var(--im-pop-bd); }
.wh-sw span { flex: 1; }
.wh-sw i { flex: none; position: relative; width: 44px; height: 26px; border-radius: 13px; background: rgba(127, 135, 148, .4); transition: background .2s; }
.wh-sw i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .22s var(--im-ease); }
.wh-sw.on i { background: #2FBF71; } .wh-sw.on i::after { transform: translateX(18px); }
.wh-foot { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 10px 10px 10px 12px; border: 0; border-radius: 16px; background: none; text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1px var(--im-pop-bd); }
.wh-foot:hover { background: var(--gx-soft); }
.wh-foot > svg:first-child { flex: none; color: var(--mute); }
.wh-foot span { flex: 1; min-width: 0; display: flex; flex-direction: column; } .wh-foot b { font: 600 14px var(--sans, Inter, sans-serif); } .wh-foot small { font: 500 12px/1.35 var(--sans, Inter, sans-serif); color: var(--mute); }
.wh-foot-go { flex: none; color: var(--mute); }

/* the suggested reply: a clean card, a line to steer it, one-tap asks */
html body #inbox #ithread .icompose .suggest { padding: 12px 14px 12px; border-radius: 20px; border: 1px solid var(--im-pop-bd) !important; background: var(--im-pop) !important; color: var(--im-tx);
  box-shadow: 0 24px 60px -22px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .12); max-height: min(70vh, 560px); overflow: auto; }
html body #inbox #ithread .icompose .suggest.busy { opacity: 1; }
html body #inbox #ithread .icompose .suggest.busy :is(.s-text, .s-order, .s-foot, .s-asked) { opacity: .45; transition: opacity .2s; }
html body #inbox #ithread .icompose .suggest.busy .s-text { background-image: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--im-acc) 22%, transparent) 50%, transparent 70%); background-size: 220% 100%; animation: s-shim 1.1s linear infinite; }
@keyframes s-shim { from { background-position: 120% 0; } to { background-position: -120% 0; } }
html body #inbox #ithread .suggest .s-head { gap: 8px; row-gap: 8px; }
html body #inbox #ithread .suggest .s-head > b { font: 700 13px var(--sans, Inter, sans-serif) !important; text-transform: none !important; letter-spacing: 0 !important; color: #8B6BFF !important; display: inline-flex; align-items: center; gap: 6px; }
html body #inbox #ithread .suggest .s-head > b::before { content: '✦'; font-size: 14px; }
html body #inbox #ithread .suggest .s-head .sub { font: 500 12px var(--sans, Inter, sans-serif); color: var(--im-mute); }
html body #inbox #ithread .suggest .s-head .btn { height: 34px; border-radius: 17px; padding: 0 14px; font: 600 13.5px var(--sans, Inter, sans-serif); }
html body #inbox #ithread .suggest .s-text { margin-top: 10px; padding: 10px 13px !important; border: 0 !important; border-radius: 16px !important; background-color: color-mix(in srgb, var(--im-tx) 6%, transparent) !important; color: var(--im-tx) !important; font: 400 15px/1.45 var(--sans, Inter, sans-serif) !important; display: block !important; -webkit-line-clamp: unset !important; cursor: text; user-select: text; }
html body #inbox #ithread .suggest .s-text.s-new { animation: im-in .3s var(--im-ease) both; }
html body #inbox #ithread .suggest .s-asked { display: flex; gap: 8px; align-items: baseline; margin-top: 10px; padding: 0 2px; font: 500 12.5px/1.4 var(--sans, Inter, sans-serif); color: var(--im-mute); }
html body #inbox #ithread .suggest .s-asked b { flex: none; font-weight: 600; color: var(--im-acc); } html body #inbox #ithread .suggest .s-asked span { overflow-wrap: anywhere; }
html body #inbox #ithread .suggest .s-order { margin-top: 8px; padding: 8px 12px; border-radius: 14px; background: color-mix(in srgb, #2FBF71 12%, transparent); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font: 500 13px var(--sans, Inter, sans-serif); }
html body #inbox #ithread .suggest .s-order a { color: var(--im-acc); font-weight: 600; }
html body #inbox #ithread .suggest .s-foot { margin-top: 8px; gap: 4px 14px; }
html body #inbox #ithread .suggest .s-foot details, html body #inbox #ithread .suggest .s-foot summary { font: 500 12.5px var(--sans, Inter, sans-serif); color: var(--im-mute); }
html body #inbox #ithread .suggest .s-foot .s-check summary { color: #E2A10B; }
html body #inbox #ithread .suggest .s-steer { display: flex; gap: 8px; margin-top: 10px; }
html body #inbox #ithread .suggest .s-steer input { flex: 1; min-width: 0; height: 40px; padding: 0 15px; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--im-tx) 14%, transparent); background: transparent; color: var(--im-tx); font: 400 14.5px var(--sans, Inter, sans-serif); outline: none; transition: box-shadow .15s, border-color .15s; }
html body #inbox #ithread .suggest .s-steer input::placeholder { color: var(--im-mute); }
html body #inbox #ithread .suggest .s-steer input:focus { border-color: color-mix(in srgb, #8B6BFF 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, #8B6BFF 18%, transparent); }
html body #inbox #ithread .suggest .s-steer .s-go { flex: none; height: 40px; padding: 0 16px; border: 0; border-radius: 20px; background: #7C5CFF; color: #fff; font: 600 14px var(--sans, Inter, sans-serif); transition: transform .15s var(--im-ease), opacity .15s; }
html body #inbox #ithread .suggest .s-steer .s-go:active { transform: scale(.95); } html body #inbox #ithread .suggest .s-steer .s-go:disabled { opacity: .6; }
html body #inbox #ithread .suggest .s-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
html body #inbox #ithread .suggest .s-quick button { height: 32px; padding: 0 12px; border: 0; border-radius: 16px; background: color-mix(in srgb, var(--im-tx) 8%, transparent); color: var(--im-tx); font: 600 13px var(--sans, Inter, sans-serif); cursor: pointer; transition: transform .15s var(--im-ease), background .15s; }
html body #inbox #ithread .suggest .s-quick button:hover { background: color-mix(in srgb, #8B6BFF 18%, var(--im-field)); } html body #inbox #ithread .suggest .s-quick button:active { transform: scale(.94); }
html body #inbox #ithread .suggest .s-row { flex-wrap: wrap; }
html.pkl body #inbox .im-head .im-compose { width: 46px; height: 46px; display: grid; }
html.pkl body #inbox .im-head .im-compose:active { transform: scale(.94); }
/* phones: the filter sheet on Messages and Chat rises from the bottom (it was being placed below the screen) */
@media (max-width: 900px) { html.pkl body .im-head .wh-pop { top: auto; left: 12px; right: 12px; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); max-height: 66vh; } }
html body #inbox #ithread .suggest .s-order > span:not(.chip) { flex: 1 1 140px; min-width: 0; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
@media (min-width: 901px) { html.pkl body .im-head .wh-pop { max-height: min(76vh, 680px); } }

/* ---- Messages, cleaned up (Nov 20 2026, 4:45 PM). Scott: "three icons on mobile is way too much. we need one icon and it opens forms or
   suggested messages. it needs to be way clean and slick and stay on the bottom in a popup. messages on mobile are so freaking cluttered.
   we need all of it in a ... type menu button up top." ---- */
/* one + in the composer: it carries the dot the ✦ used to (a suggested reply is ready) */
html.pkl body .ithread .gx-cb.gx-plus .sgdot { position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: #7C5CFF; box-shadow: 0 0 0 2px var(--card); display: none; }
html.pkl body .ithread .gx-cb.gx-plus.has:not([aria-expanded=true]) .sgdot { display: block; }
html.pkl body .ithread .gx-cb.gx-plus.urg .sgdot { background: var(--red); }
/* the pop-up over the composer: two tabs on top, the suggested reply or the forms under them. Glass, because it floats. */
html.pkl body .ithread .icompose { position: relative; }
html.pkl body .ithread .icompose .gx-csheet { position: absolute; left: 10px; right: 10px; bottom: calc(100% + 8px); z-index: 34; max-height: min(64vh, 560px); overflow: auto; overscroll-behavior: contain; padding: 10px; border-radius: 24px;
  background: linear-gradient(var(--wh-pop, rgba(255,255,255,.95)), var(--wh-pop, rgba(255,255,255,.95))), var(--paper, var(--card));   /* solid under the tint: the form list has to read over the bubbles */
  box-shadow: inset 0 0 0 1px var(--gx-bd), var(--g-shadow, 0 16px 40px -10px rgba(0,0,0,.45)); animation: im-sheet .2s var(--im-ease2, ease-out); transform-origin: 50% 100%; }
@keyframes im-sheet { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html.pkl body .ithread .icompose .gx-csheet { animation: none; } }
@media (min-width: 901px) { html.pkl body .ithread .icompose .gx-csheet { right: auto; width: min(520px, calc(100% - 20px)); } }
.gx-cs-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.gx-cs-top > b { font: 700 15px var(--sans); padding: 0 6px; }
.gx-cs-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--gx-soft); min-width: 0; }
.gx-cs-seg button { border: 0; background: transparent; color: var(--mute); font: 600 14px var(--sans); padding: 8px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.gx-cs-seg button.on { background: var(--gx-on, var(--text)); color: var(--gx-on-tx, var(--card)); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.gx-cs-x { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--gx-soft); color: var(--mute); display: grid; place-items: center; cursor: pointer; }
.gx-cs-x svg { width: 16px; height: 16px; transform: rotate(45deg); }
/* inside it the two pops are plain panels: the pop-up is the one floating thing */
html.pkl body #inbox #ithread .icompose .gx-csheet .suggest.sugpop, html.pkl body #inbox #ithread .icompose .gx-csheet .formpop, html.pkl body .ithread .icompose .gx-csheet .suggest.sugpop, html.pkl body .ithread .icompose .gx-csheet .formpop {
  position: static; left: auto; right: auto; bottom: auto; width: auto; max-height: none; overflow: visible; z-index: auto; box-shadow: none; animation: none; }
html.pkl body .ithread .icompose .gx-csheet .formpop { border: 0; background: transparent; padding: 2px; }
html.pkl body .ithread .icompose .gx-csheet .suggest.sugpop { border-radius: 16px; }
html.pkl body .ithread .icompose .gx-csheet .fpwrap { display: block; position: static; }
html.pkl body .ithread .icompose .gx-csheet .fpwrap > #m-form, html.pkl body .ithread .icompose .gx-csheet > #m-sug { display: none; }
/* the ⋯ beside the find box is for phones */
.im-more { display: none; }
@media (max-width: 900px) {
  /* the inbox: the find box, one ⋯ and the conversations */
  html.pkl body #inbox .im-head #wh-segw, html.pkl body #inbox .im-head #wh-fbtn, html.pkl body #inbox .im-head #inew-btn, html.pkl body #inbox #wh-stats { display: none; }
  html.pkl body #inbox .im-head .im-more { display: grid; }
  html.pkl body #inbox .im-head { flex-wrap: nowrap; }
  html.pkl body #inbox .im-head .gx-find { flex: 1 1 auto; }
  html.pkl:has(#inbox #im-more) #gx-hub { display: none; }
  .im-menu a.wh-chip { text-decoration: none; }
  .im-menu .wh-foot { margin-top: 8px; }
}

/* ---- The thread on a phone, floating (Nov 20 2026, 5:36 PM). Scott, with screenshots of the Claude app: "It needs to look and feel just
   like iOS native messaging … I want things floating just like this. In messages and chat." The top is four floating pieces over the
   conversation, the ⋯ is a floating menu, who it is opens a sheet from the foot of the screen, and the composer is one floating card. ---- */
.ih-id { display: contents; }
.ih-ren, .gx-how, .is-top { display: none; }
@keyframes im-sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes im-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 900px) {
  /* top */
  html.pkl body #inbox #ithread .ihead { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: flex; align-items: flex-start; gap: 8px; height: auto; min-height: 0; padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 0 !important; border: 0; -webkit-backdrop-filter: none; pointer-events: none; }
  html.pkl body #inbox #ithread .ihead > * { pointer-events: auto; }
  html.pkl body #inbox #ithread .ihead .iback, html.pkl body #inbox #ithread .ihead .ih-call, html.pkl body #inbox #ithread .ihead #ih-more, html.pkl body #inbox #ithread .ihead .ih-id {
    background: var(--g-bg, rgba(250,249,246,.74)) !important; -webkit-backdrop-filter: var(--g-blur, blur(22px) saturate(190%));
    box-shadow: var(--g-rim, inset 0 0 0 .5px rgba(255,255,255,.5)), var(--g-shadow, 0 12px 34px -10px rgba(0,0,0,.35)); border: 0; color: var(--text); }
  html.pkl body #inbox #ithread .ihead .iback, html.pkl body #inbox #ithread .ihead .ih-call, html.pkl body #inbox #ithread .ihead #ih-more { flex: none; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; display: grid; place-items: center; }
  html.pkl body #inbox #ithread .ihead #ih-more { font-size: 22px; line-height: 1; letter-spacing: 1px; }
  html.pkl body #inbox #ithread .ihead .ih-id { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 44px; margin: 0 auto; padding: 5px 16px 5px 5px; border-radius: 24px; cursor: pointer; }
  html.pkl body #inbox #ithread .ihead .ih-id .gx-hav { width: 34px; height: 34px; }
  html.pkl body #inbox #ithread .ihead .ih-id .who { min-width: 0; pointer-events: none; }
  html.pkl body #inbox #ithread .ihead .ih-id .who > b { display: block; font: 700 16px/1.15 var(--sans); white-space: normal; overflow: visible; color: var(--text); }
  html.pkl body #inbox #ithread .ihead .ih-id .who > .sub, html.pkl body #inbox #ithread .ihead .ih-id .ih-pen, html.pkl body #inbox #ithread .ihead .ih-id .dco { display: none; }
  html.pkl body #inbox #ithread .ihead .ih-id .urg { font-size: 0; }
  html.pkl body #inbox #ithread .ihead .ih-id .urg::before { content: '⚑'; font-size: 13px; color: var(--red); margin-left: 5px; }
  /* the ⋯ menu floats under its button */
  html.pkl body #inbox #ithread .ihead .ihact { display: none; }
  html.pkl body #inbox #ithread .ihead.more .ihact { display: flex !important; flex-direction: column; align-items: stretch; gap: 2px; position: absolute; top: calc(60px + env(safe-area-inset-top, 0px)); right: 10px; left: auto; width: min(292px, calc(100vw - 20px)); padding: 8px; border-radius: 26px; z-index: 9;
    background: linear-gradient(var(--wh-pop, rgba(255,255,255,.95)), var(--wh-pop, rgba(255,255,255,.95))), var(--paper, var(--card)); box-shadow: 0 26px 60px -18px rgba(10,12,20,.55), 0 2px 10px rgba(10,12,20,.12), inset 0 0 0 1px var(--gx-bd); animation: im-sheet .2s var(--im-ease2, ease-out); }
  html.pkl body #inbox #ithread .ihead .ihact .btn, html.pkl body #inbox #ithread .ihead .ihact .sel { display: flex; justify-content: flex-start; gap: 10px; width: 100%; height: auto; min-height: 48px; padding: 0 14px; border: 0 !important; border-radius: 16px; background: transparent !important; box-shadow: none; font: 500 16.5px var(--sans); color: var(--text); text-align: left; text-decoration: none; }
  html.pkl body #inbox #ithread .ihead .ihact .btn:active { background: var(--gx-soft) !important; }
  html.pkl body #inbox #ithread .ihead .ihact #m-urgent.red { color: var(--red-tx, var(--red)) !important; }
  /* what the band said lives in the customer sheet; an open case floats under the top */
  html.pkl body #inbox #ithread .ictx { display: none; }
  html.pkl body #inbox #ithread .icases { position: absolute; top: calc(60px + env(safe-area-inset-top, 0px)); left: 10px; right: 10px; z-index: 5; margin: 0; padding: 0; background: transparent !important; border: 0 !important; }
  html.pkl body #inbox #ithread .ibody { padding-top: calc(64px + env(safe-area-inset-top, 0px)); }
  html.pkl body #inbox #ithread:has(.icases) .ibody { padding-top: calc(118px + env(safe-area-inset-top, 0px)) !important; }
  /* the composer: one card */
  html.pkl body #inbox #ithread .icompose { background: transparent !important; border: 0 !important; -webkit-backdrop-filter: none; padding: 4px 8px calc(8px + env(safe-area-inset-bottom, 0px)) !important; }
  html.pkl body #inbox #ithread .icompose .cbar { display: grid !important; grid-template-columns: auto auto minmax(0, 1fr) auto auto; grid-template-areas: "ta ta ta ta ta" "plus how . clip send"; align-items: center; gap: 6px 8px; padding: 10px; border-radius: 28px; background: var(--gx-card, var(--card)); border: 1px solid var(--gx-bd); box-shadow: 0 10px 30px -14px rgba(10,12,20,.4), 0 1px 3px rgba(10,12,20,.06); }
  html.pkl body #inbox #ithread .icompose .cbar #m-body { grid-area: ta; width: 100%; min-height: 30px; padding: 4px 8px 2px; border: 0 !important; border-radius: 0 !important; background: transparent !important; font: 400 17px/1.35 var(--sans) !important; }
  html.pkl body #inbox #ithread .icompose .cbar #m-more { grid-area: plus; }
  html.pkl body #inbox #ithread .icompose .cbar .gx-how { grid-area: how; display: inline-flex; align-items: center; gap: 5px; height: 40px; padding: 0 11px 0 14px; border: 0; border-radius: 999px; background: var(--gx-soft); font: 600 14px var(--sans); white-space: nowrap; cursor: pointer; }
  html.pkl body #inbox #ithread .icompose .cbar .gx-how .gx-go { width: 14px; height: 14px; opacity: .55; }
  html.pkl body #inbox #ithread .icompose .cbar #m-clip { grid-area: clip; position: static; }
  html.pkl body #inbox #ithread .icompose .cbar #m-send { grid-area: send; }
  html.pkl body #inbox #ithread .icompose .gx-cnote { display: none; }
  /* Text / Email and which line: a floating menu from the chip */
  html.pkl body #inbox #ithread .icompose.tel .crow { display: none !important; }
  html.pkl body #inbox #ithread .icompose.tel.how-on .crow { display: flex !important; flex-direction: column; align-items: flex-start; gap: 10px; position: absolute; left: 10px; bottom: calc(100% + 6px); z-index: 30; margin: 0; padding: 12px; border-radius: 24px;
    background: linear-gradient(var(--wh-pop, rgba(255,255,255,.95)), var(--wh-pop, rgba(255,255,255,.95))), var(--paper, var(--card)); box-shadow: 0 26px 60px -18px rgba(10,12,20,.55), 0 2px 10px rgba(10,12,20,.12), inset 0 0 0 1px var(--gx-bd); animation: im-sheet .2s var(--im-ease2, ease-out); transform-origin: 10% 100%; }
  /* the + pop-up is a sheet from the foot of the screen */
  html.pkl body #inbox #ithread .icompose .gx-csheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 84vh; z-index: 50; padding: 22px 12px calc(16px + env(safe-area-inset-bottom, 0px)); border-radius: 30px 30px 0 0; animation: im-sheet-up .3s cubic-bezier(.2, .9, .3, 1); }
  html.pkl body #inbox #ithread .icompose .gx-csheet::before, html.pkl body #inbox.info-on #iside::before { content: ''; position: absolute; top: 8px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: color-mix(in srgb, var(--mute) 45%, transparent); }
  html.pkl body #inbox #ithread .icompose.sheet-on::before, html.pkl body #inbox.info-on::after { content: ''; position: fixed; inset: 0; z-index: 49; background: rgba(10,12,20,.36); animation: im-fade .2s ease-out; }
  .gx-cs-top, .is-top { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; margin-bottom: 10px; }
  .gx-cs-top .gx-cs-x, .is-top .gx-cs-x { grid-column: 1; grid-row: 1; width: 44px; height: 44px; }
  .gx-cs-top .gx-cs-seg, .gx-cs-top > b, .is-top > b { grid-column: 2; grid-row: 1; justify-self: center; text-align: center; }
  .is-top > b { font: 700 17px var(--sans); }
  .gx-cs-top .gx-sp { display: none; }
  /* who it is: the customer panel as a sheet */
  html.pkl body #inbox.info-on #iside { display: block; position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; height: auto; max-height: 86vh; overflow: auto; z-index: 80; padding: 22px 12px calc(18px + env(safe-area-inset-bottom, 0px)); border-radius: 30px 30px 0 0; background: var(--paper, var(--card)); box-shadow: 0 -18px 50px -20px rgba(0,0,0,.5); animation: im-sheet-up .3s cubic-bezier(.2, .9, .3, 1); }
  html.pkl body #inbox.info-on::after { z-index: 79; }
  /* the inbox ⋯ menu floats under its button */
  html.pkl body #inbox .im-head .im-menu { position: absolute; top: calc(100% + 8px); right: 0; left: auto; bottom: auto; width: min(340px, calc(100vw - 24px)); max-height: 72vh; border-radius: 26px; }
}
@media (max-width: 900px) { html.pkl body #inbox.info-on #iside .sidehead { display: none; } }   /* the sheet's own top says who it is */

/* ---- Team Chat on a phone, floating the same way (Nov 20 2026, 5:36 PM: "I want things floating just like this. In messages and chat.") ---- */
@media (max-width: 900px) {
  html.pkl body #imt .imh { position: absolute; top: 0; left: 0; right: 0; z-index: 8; display: flex; align-items: flex-start; gap: 8px; min-height: 0; padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 0 !important; background: transparent; border: 0; -webkit-backdrop-filter: none; pointer-events: none; }
  html.pkl body #imt .imh > * { pointer-events: auto; }
  html.pkl body #imt .imh .imh-back, html.pkl body #imt .imh .imh-act button, html.pkl body #imt .imh .imh-who, html.pkl body #imt #impin, html.pkl body #imt #imfind {
    background: var(--g-bg, rgba(250,249,246,.74)) !important; -webkit-backdrop-filter: var(--g-blur, blur(22px) saturate(190%));
    box-shadow: var(--g-rim, inset 0 0 0 .5px rgba(255,255,255,.5)), var(--g-shadow, 0 12px 34px -10px rgba(0,0,0,.35)); border: 0; }
  html.pkl body #imt .imh .imh-back, html.pkl body #imt .imh .imh-act button { flex: none; width: 44px; height: 44px; margin: 0; padding: 0; border-radius: 50%; display: grid; place-items: center; color: var(--text); }
  html.pkl body #imt .imh .imh-act { display: flex; gap: 8px; }
  /* the circle sits on the left end of the name pill */
  html.pkl body #imt .imh .imh-av { flex: none; width: 34px; height: 34px; margin: 5px -39px 0 auto; position: relative; z-index: 1; font-size: 17px; pointer-events: none; }
  html.pkl body #imt .imh .imh-who { flex: 0 1 auto; min-width: 0; min-height: 44px; margin: 0 auto 0 0; padding: 5px 16px 5px 48px; border-radius: 24px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left; }
  html.pkl body #imt .imh .imh-who b { font: 700 16px/1.15 var(--sans); overflow-wrap: anywhere; color: var(--text); }
  html.pkl body #imt .imh .imh-who .imh-sub { display: none; }
  html.pkl body #imt #impin { position: absolute; top: calc(60px + env(safe-area-inset-top, 0px)); left: 10px; right: 10px; z-index: 6; border-radius: 20px; overflow: hidden; }
  html.pkl body #imt #imfind { position: absolute; top: calc(60px + env(safe-area-inset-top, 0px)); left: 10px; right: 10px; z-index: 9; border-radius: 22px; }
  html.pkl body #imt #imfloat { top: calc(62px + env(safe-area-inset-top, 0px)); z-index: 5; }
  html.pkl body #imt:has(.impin-go) #imfloat { top: calc(138px + env(safe-area-inset-top, 0px)); }
  html.pkl body #imt #imbody { padding-top: calc(66px + env(safe-area-inset-top, 0px)); }
  html.pkl body #imt:has(.impin-go) #imbody { padding-top: calc(140px + env(safe-area-inset-top, 0px)) !important; }
  /* the composer: one card, the message on top, attach and send under it */
  html.pkl body #imt .imc { background: transparent; border: 0; -webkit-backdrop-filter: none; padding: 4px 8px calc(8px + env(safe-area-inset-bottom, 0px)) !important; }
  html.pkl body #imt .imc .imc-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "f f f" "att . send"; align-items: center; gap: 6px 8px; max-width: none; padding: 10px; border-radius: 28px; background: var(--gx-card, var(--card)); border: 1px solid var(--gx-bd); box-shadow: 0 10px 30px -14px rgba(10,12,20,.4), 0 1px 3px rgba(10,12,20,.06); }
  html.pkl body #imt .imc .imc-field { grid-area: f; min-height: 0; padding: 0 0 0 8px; border: 0; border-radius: 0; background: transparent; }
  html.pkl body #imt .imc .imc-field textarea { background: transparent; }
  html.pkl body #imt .imc #imc-att { grid-area: att; width: 40px; height: 40px; border-radius: 50%; background: var(--gx-soft); }
  html.pkl body #imt .imc #ch-send { grid-area: send; }
}
@media (max-width: 900px) {
  html.pkl body #imt .imh .imh-back svg, html.pkl body #imt .imh .imh-act button svg { width: 22px; height: 22px; }
  html.pkl body #imt #imfab { bottom: calc(132px + env(safe-area-inset-bottom, 0px)); }   /* clear of the taller composer card */
}

/* ======================================================================================================================================
   Run 1 (Nov 20 2026) — the fixes for Scott's three and the harness's finds (docs/messaging-punchlist.md). On html.im-next only: Scott's
   login first (IM_NEXT in boot(), office.js), everyone on his go. Runs 2 and 3 fold these into the parts they rewrite and drop the gate.
   ====================================================================================================================================== */
/* #2, #4: the list head — search, filter, new message, ⋯ — all the search box's height */
html.pkl.im-next body .im-head :is(#wh-fbtn, #inew-btn, .im-compose, .im-more) { width: var(--im-head); min-width: var(--im-head); height: var(--im-head); min-height: var(--im-head); }
/* #2, #6: the composer row — +, Text/Email, attach, send — one size, and the empty send button keeps it */
html.pkl.im-next body #inbox #ithread .icompose :is(#m-more, #m-clip, #m-send, .gx-how) { height: var(--im-ctl); min-height: var(--im-ctl); }
html.pkl.im-next body #inbox #ithread .icompose :is(#m-more, #m-clip, #m-send) { width: var(--im-ctl); min-width: var(--im-ctl); padding: 0; }
html.pkl.im-next body #inbox #ithread .icompose #m-send:disabled { transform: none; }
@media (min-width: 901px) { html.pkl.im-next body #inbox #ithread .icompose #m-clip { top: auto; bottom: 0; } }   /* sits on the composer's bottom line with + and send, however tall the message gets */
/* #2, #7: Chat's composer, and its header on a desk */
html.pkl.im-next body #imt .imc-bar :is(#imc-att, #imc-emo, #ch-send) { width: var(--im-ctl); min-width: var(--im-ctl); height: var(--im-ctl); padding: 9px; }
html.pkl.im-next body #imt .imc-send, html.pkl.im-next body #imt .imc-send.go { transform: none; }
html.pkl.im-next body #imt .imc-send.go:active { transform: scale(.92); }
@media (min-width: 901px) { html.pkl.im-next body #imt .imh .imh-who { min-height: var(--im-ctl); justify-content: center; } }
/* #5: the desk thread header — call, the text buttons, the panel button and ⋯ all 36 tall; the round ones 36 across */
@media (min-width: 901px) {
  html.pkl.im-next body #inbox #ithread .ihead :is(.ih-call, .ihprime .btn, .ih-side, #ih-more) { height: 36px; min-height: 36px; }
  html.pkl.im-next body #inbox #ithread .ihead :is(.ih-side, #ih-more) { width: 36px; min-width: 36px; padding: 0 !important; display: inline-grid; place-items: center; }
  html.pkl.im-next body #inbox #ithread .ihead .ih-call { min-width: 36px; }
}
/* #19: a long name on the phone's floating top stays on one line and stops short of the buttons */
@media (max-width: 900px) {
  html.pkl.im-next body #inbox #ithread .ihead .ih-id { min-width: 0; overflow: hidden; }
  html.pkl.im-next body #inbox #ithread .ihead .ih-id .who { flex: 1 1 auto; min-width: 0; overflow: hidden; display: block; }
  html.pkl.im-next body #inbox #ithread .ihead .ih-id .who > b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* #8: on a phone the conversation's wall runs the whole screen — behind the composer card and, in the app, behind the keyboard */
@media (max-width: 900px) {
  html.pkl.im-next body #inbox #ithread { background: var(--im-wall) !important; background-image: radial-gradient(var(--im-dots) 1.1px, transparent 1.2px) !important; background-size: 22px 22px !important; }
  html.pkl.im-next body #inbox #ithread .ibody { background: transparent !important; }
  html.pkl.im-next body.imsg, html.pkl.im-next:has(body.imsg) { background: var(--im-wall); }
  html.kbd.pkl.im-next body #inbox #ithread .icompose { padding-bottom: 8px !important; }   /* the keyboard is up: no room for the home bar under the card */
}
/* #3: scroll bars stay inside the rounded cards — thin, transparent track, the thumb kept clear of the corners (Edge on the shop PCs
   shows bars all the time). Firefox gets its own thin bar. */
@media (hover: hover) and (pointer: fine) {   /* a mouse: phones keep their own overlay bars */
  html.im-next :is(#inbox, #chat) ::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
  html.im-next :is(#inbox, #chat) ::-webkit-scrollbar-track { background: transparent; margin-block: 20px; }
  html.im-next :is(#inbox, #chat) ::-webkit-scrollbar-thumb { background: rgba(127, 135, 148, .42); border: 3px solid transparent; background-clip: padding-box; border-radius: 10px; }
  html.im-next :is(#inbox, #chat) ::-webkit-scrollbar-thumb:hover { background-color: rgba(127, 135, 148, .62); }
  html.im-next :is(#inbox, #chat) ::-webkit-scrollbar-corner { background: transparent; }
}
@supports not selector(::-webkit-scrollbar) { @media (hover: hover) and (pointer: fine) { html.im-next :is(#inbox, #chat) * { scrollbar-width: thin; scrollbar-color: rgba(127, 135, 148, .5) transparent; } } }
/* #14: Packard red that white words can sit on (4.5:1 and up), and red words that read on the card, inside Messages and Chat */
html.pkl.im-next body :is(#inbox, #chat, #imt) :is(.btn.red, #m-urgent.red, i.hot, em.hot) { background: var(--im-red-ui) !important; border-color: var(--im-red-ui) !important; color: #fff; }
html.pkl.im-next body :is(#inbox, #chat, #imt) .linkbtn { color: var(--im-red-tx); }
/* #14 (cont.): times on incoming bubbles, Chat names, the selected Chat row, the Draft button */
html.im-next:not([data-theme=dark]) { --im-in-meta: #687180; }
html.im-next .im-n { color: color-mix(in oklab, var(--c, var(--im-acc)) 72%, #000); }   /* the person's colour, deep enough to read on a white bubble */
html.im-next[data-theme=dark] .im-n { color: color-mix(in oklab, var(--c, var(--im-acc)) 62%, #fff); }
html.pkl.im-next body .chat.gx-chat .gx-chrow.on { background: var(--im-out2) !important; }
html.im-next body #inbox #ithread .suggest .s-steer .s-go { background: #6847F2; }

/* ======================================================================================================================================
   Run 2 (Nov 20 2026) — Messages on the phone. Behind html.im-next like Run 1; behaviours in public/wicko-im.js (was im-phone.js).
   ====================================================================================================================================== */
/* #9: the tail joins its bubble — the last bubble of a run squares the corner the tail grows out of, the way Messages does */
html.im-next body #inbox #ithread .ibody .msg.g-last:not(.system):not(.agent):not(.piconly) { border-bottom-left-radius: 5px !important; }
html.im-next body #inbox #ithread .ibody .msg.agent.g-last:not(.piconly) { border-bottom-right-radius: 5px !important; }
html.im-next body #inbox #ithread .ibody .msg.g-last:not(.system):not(.agent)::after { left: -5px; }
html.im-next body #inbox #ithread .ibody .msg.agent.g-last::after { right: -5px; }
/* #21: an email's "Earlier messages" gets its own line, and the time sits under the message, not beside the button */
html.im-next body #inbox #ithread .ibody .msg.email .mq-t { display: flex; margin: 10px 0 2px; }
html.im-next body #inbox #ithread .ibody .msg.email .mq-t ~ .mt, html.im-next body #inbox #ithread .ibody .msg.email .mq ~ .mt { float: none; display: flex; justify-content: flex-end; top: 0; margin: 6px -3px -2px 0; }
/* #16: a picture that can't load is a small file chip, not a big grey square */
html.im-next body #inbox #ithread .msg .mthumbs:has(.mthumb-x) { width: auto; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
html.im-next body #inbox #ithread .msg .mthumb-x { aspect-ratio: auto; min-height: 0; justify-content: flex-start; text-align: left; gap: 10px; padding: 10px 12px; border-radius: 14px; font-size: 13px; }
html.im-next body #inbox #ithread .msg .mthumb-x::before { content: ''; flex: none; width: 30px; height: 30px; border-radius: 8px; background: color-mix(in srgb, currentColor 14%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23889' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='3'/%3E%3Ccircle cx='9' cy='10' r='2'/%3E%3Cpath d='m21 16-5-5-9 9'/%3E%3C/svg%3E") center/18px no-repeat; }
html.im-next body #inbox #ithread .msg .mthumb-x br { display: none; }
html.im-next body #inbox #ithread .msg .mthumb-x span { display: flex; flex-direction: column; min-width: 0; }
@media (max-width: 900px) {
  /* #22: what scrolls under the floating top fades into the wall instead of reading through the pills */
  html.pkl.im-next body #inbox #ithread::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: calc(78px + env(safe-area-inset-top, 0px)); z-index: 5; pointer-events: none;
    background: linear-gradient(var(--im-wall) 0%, color-mix(in srgb, var(--im-wall) 82%, transparent) 55%, transparent 100%); }
  /* #19 (cont.): the name ends in an ellipsis */
  html.pkl.im-next body #inbox #ithread .ihead .ih-id .who, html.pkl.im-next body #inbox #ithread .ihead .ih-id .who > b { max-width: 100%; }
  html.pkl.im-next body #inbox #ithread .ihead .ih-id .who > b { display: block; }
  /* #23: an email's Subject is the top of the composer card, not a box of its own */
  html.pkl.im-next body #inbox #ithread .icompose:has(#m-subject:not([style*="none"])) #m-subject { margin: 0; padding: 13px 18px 9px; border: 1px solid var(--gx-bd); border-bottom: 1px solid color-mix(in srgb, var(--im-tx) 8%, transparent); border-radius: 28px 28px 0 0; box-shadow: 0 10px 30px -14px rgba(10,12,20,.4); font: 600 16px var(--sans); }
  html.pkl.im-next body #inbox #ithread .icompose:has(#m-subject:not([style*="none"])) .cbar { border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
  /* #15: in Safari, Messages has its own search box; the Office-wide search circle in the top bar is the second one */
  html.pkl.im-next body:has(#inbox) header.top label.search { display: none !important; }
  /* the edge swipe: the thread follows the finger over the list */
  html.pkl.im-next body #inbox #ithread.im-edge { box-shadow: -18px 0 40px -18px rgba(0,0,0,.45); }
}
/* press and hold a bubble: the held bubble lifts, Copy floats over it */
html.im-next .im-held { transform: scale(1.03); transition: transform .18s var(--im-ease, ease-out); box-shadow: 0 14px 34px -12px rgba(0,0,0,.4) !important; z-index: 2; }
.im-hold { position: fixed; z-index: 1000; display: flex; padding: 5px; border-radius: 16px; background: var(--im-pop); border: 1px solid var(--im-pop-bd); box-shadow: 0 18px 44px -14px rgba(0,0,0,.5); animation: im-sheet .16s var(--im-ease2, ease-out); }
.im-hold button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 12px; background: none; color: var(--im-tx); font: 600 15px var(--sans, Inter, sans-serif); cursor: pointer; }
.im-hold button:active { background: var(--im-hover); }
.im-hold svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
@media (prefers-reduced-motion: reduce) { html.im-next .im-held { transform: none; } .im-hold { animation: none; } }

/* ======================================================================================================================================
   Run 3 (Nov 21 2026) — Chat on the shared parts, and both tabs on a desk. Behind html.im-next; behaviours in public/wicko-im.js.
   No !important in this section: every rule here wins by being more specific than the one it replaces.
   ====================================================================================================================================== */
/* drafts: a conversation with a half-written reply says so in the list (punch list 24) */
html.im-next :is(#inbox, #chat) .im-draft { color: var(--im-red-tx); font-weight: 700; }

/* ---------- Chat on a desk: the list drags to any width; the conversation uses the whole width; a third column on wide screens ---------- */
html.pkl.im-next body #chat .chside { display: none; }
@media (min-width: 901px) {
  html.pkl.im-next body #chat.chat.gx-chat { grid-template-columns: var(--chw, 344px) minmax(0, 1fr); }
  html.pkl.im-next body #chat.gx-chat .chlist { position: relative; }
  html.pkl.im-next body #chat .imt .imlist { max-width: none; padding: 0 22px; }
}
@media (min-width: 1400px) {
  html.pkl.im-next body #chat.chat.gx-chat.side-on { grid-template-columns: var(--chw, 344px) minmax(0, 1fr) clamp(270px, 19vw, 340px); }
  html.pkl.im-next body #chat.gx-chat.side-on .chside:not([hidden]) { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 2px 14px; scrollbar-width: thin; }
}
html.pkl.im-next body #chat .chside :is(.chs-card, .chs-sec) { flex: none; padding: 14px 16px; border-radius: 20px; background: var(--gx-card, var(--card)); box-shadow: var(--gx-sh); }
html.pkl.im-next body #chat .chside .chs-about { display: grid; justify-items: center; gap: 4px; padding: 20px 16px 16px; text-align: center; }
html.pkl.im-next body #chat .chside .chs-about .imh-av { width: 56px; height: 56px; padding: 14px; margin-bottom: 6px; font-size: 26px; }
html.pkl.im-next body #chat .chside .chs-about b { font: 700 17px/1.25 var(--sans); overflow-wrap: anywhere; }
html.pkl.im-next body #chat .chside .chs-about small { font: 500 13px var(--sans); color: var(--mute); }
html.pkl.im-next body #chat .chside .chs-about p { margin: 6px 0 0; font: 400 13.5px/1.4 var(--sans); }
:is(#chat .chside, #drawer) .chs-mute { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; margin-top: 10px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--gx-soft, var(--im-hover)); font: 600 13.5px var(--sans); cursor: pointer; }
:is(#chat .chside, #drawer) .chs-mute svg { width: 18px; height: 18px; flex: none; }
:is(#chat .chside, #drawer) .chs-mute.on svg { color: var(--im-acc); }
#drawer .chs-dmute { margin: 0 0 14px; }
#drawer .chs-dmute .chs-mute { margin: 0; }
html.pkl.im-next body #chat .chside .chs-sec h4 { margin: 0 0 8px; font: 700 12px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
html.pkl.im-next body #chat .chside .chs-p { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 5px 0; }
html.pkl.im-next body #chat .chside .chs-p .im-av { align-self: center; }
html.pkl.im-next body #chat .chside .chs-p .imh-dot { display: block; width: 11px; height: 11px; border-color: var(--gx-card, var(--card)); }
html.pkl.im-next body #chat .chside .chs-pt { display: grid; min-width: 0; }
html.pkl.im-next body #chat .chside .chs-pt b { font: 600 14px/1.3 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.pkl.im-next body #chat .chside .chs-pt b small { font-weight: 500; color: var(--mute); }
html.pkl.im-next body #chat .chside .chs-pt > small { font: 500 12.5px var(--sans); color: var(--mute); }
html.pkl.im-next body #chat .chside .chs-dm { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: var(--gx-soft, var(--im-hover)); cursor: pointer; }
html.pkl.im-next body #chat .chside .chs-dm svg { width: 17px; height: 17px; }
html.pkl.im-next body #chat .chside .chs-pin { display: grid; gap: 2px; width: calc(100% + 20px); margin: 0 -10px; padding: 7px 10px; border: 0; border-radius: 12px; background: none; color: var(--text); text-align: left; cursor: pointer; }
html.pkl.im-next body #chat .chside .chs-pin:hover { background: var(--im-hover); }
html.pkl.im-next body #chat .chside .chs-pin b { font: 600 13px var(--sans); }
html.pkl.im-next body #chat .chside .chs-pin span { font: 400 13px/1.35 var(--sans); color: var(--mute); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html.pkl.im-next body #chat .chside .chs-ph { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
html.pkl.im-next body #chat .chside .chs-ph a { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--im-hover); }
html.pkl.im-next body #chat .chside .chs-ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
html.pkl.im-next body #chat .chside .chs-f { display: flex; align-items: center; gap: 8px; padding: 6px 0; color: var(--text); font: 500 13.5px var(--sans); text-decoration: none; }
html.pkl.im-next body #chat .chside .chs-f svg { flex: none; width: 18px; height: 18px; }
html.pkl.im-next body #chat .chside .chs-f span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.pkl.im-next body #chat .chside .chs-none { font: 400 13px/1.4 var(--sans); color: var(--mute); }
/* a muted conversation: a small bell with a line by its name, its count in grey */
html.pkl.im-next body #chat .gx-chrow .ch-muted { flex: none; display: inline-grid; width: 15px; height: 15px; color: var(--mute); }
html.pkl.im-next body #chat .gx-chrow .ch-muted svg { width: 15px; height: 15px; }

/* ---------- Chat on a phone: what scrolls under the floating name fades into the wall, the same part as Messages (#22) ---------- */
@media (max-width: 900px) {
  html.pkl.im-next body #chat #imt::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: calc(76px + env(safe-area-inset-top, 0px)); z-index: 4; pointer-events: none;
    background: linear-gradient(var(--im-wall) 0%, color-mix(in srgb, var(--im-wall) 82%, transparent) 55%, transparent 100%); }
  html.pkl.im-next body #chat #imt.im-edge { box-shadow: -18px 0 40px -18px rgba(0, 0, 0, .45); }
}

/* ---------- a card in a Chat message that opens a page of the Office (Share to Chat) ---------- */
html.im-next .imt .im-ref { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 38px; margin-top: 4px; padding: 0 14px 0 10px; border-radius: 14px; background: var(--im-in); box-shadow: var(--im-in-sh); color: var(--im-in-tx); font: 600 14px var(--sans, Inter, sans-serif); text-decoration: none; }
html.im-next .imt .im-ref:hover { background: color-mix(in srgb, var(--im-in) 92%, var(--im-acc)); }
html.im-next .imt .im-ref b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
html.im-next .imt .im-ref-ic { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--im-acc); color: #fff; }
html.im-next .imt .im-ref-ic svg { width: 14px; height: 14px; transform: scaleX(-1); }
#drawer .im-share-note { display: grid; gap: 6px; margin: 12px 0 16px; }
#drawer .im-share-note span { font: 500 13px var(--sans); color: var(--mute); }
#drawer .im-share-note textarea { width: 100%; resize: vertical; font: 400 15px/1.4 var(--sans); padding: 10px 12px; border-radius: 12px; }
#drawer .im-share-l { display: grid; gap: 2px; }
#drawer .im-share-t { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 14px; background: none; color: var(--text); text-align: left; cursor: pointer; }
#drawer .im-share-t:hover, #drawer .im-share-t:focus-visible { background: var(--im-hover); }
#drawer .im-share-t .im-av { align-self: center; }
#drawer .im-share-tt { display: grid; min-width: 0; }
#drawer .im-share-tt b { font: 600 15px var(--sans); }
#drawer .im-share-tt small { font: 400 13px var(--sans); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- the + sheet: Photo and Order link on top (punch list 25); on a phone the paperclip leaves the bar for it ---------- */
html.pkl.im-next body #inbox #ithread .gx-csheet .gx-cs-acts { display: flex; gap: 10px; padding: 2px 2px 12px; }
html.pkl.im-next body #inbox #ithread .gx-csheet .gx-cs-acts button { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 74px; padding: 12px 8px; border: 0; border-radius: 18px; background: var(--gx-soft, var(--im-hover)); font: 600 13.5px var(--sans); cursor: pointer; }
html.pkl.im-next body #inbox #ithread .gx-csheet .gx-cs-acts button:active { transform: scale(.97); }
html.pkl.im-next body #inbox #ithread .gx-csheet .gx-cs-acts svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) { html.pkl.im-next body #inbox #ithread .icompose .cbar:has(#m-more) #m-clip { display: none; } }

/* the name in a thread's header is its own span now (punch list 18); office.css hides spans in .who (that rule is for the old sub-lines) */
.ihead .who > b > .ih-nm { display: inline; }
/* ---------- desk: punch list 18 (the name stays on one line, ending in …) and 11 (the four tabs fit over the list at 1440) ---------- */
@media (min-width: 901px) {
  html.pkl.im-next body #inbox #ithread .ihead .who { min-width: 0; }
  html.pkl.im-next body #inbox #ithread .ihead .who > b { display: flex; align-items: center; white-space: nowrap; }
  html.pkl.im-next body #inbox #ithread .ihead .who > b .ih-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  html.pkl.im-next body #inbox #ithread .ihead .who > b :is(.ih-pen, .urg) { flex: none; }
  /* "⚑ Urgent" sits on its own line under the name, as it did before, so the name keeps the room (and the pencil stays beside it) */
  html.pkl.im-next body #inbox #ithread .ihead .who > b { flex-wrap: wrap; }
  html.pkl.im-next body #inbox #ithread .ihead .who > b .ih-nm { max-width: calc(100% - 22px); }
  html.pkl.im-next body #inbox #ithread .ihead .who > b .urg { flex-basis: 100%; margin-left: 0; }
  html.pkl.im-next body #inbox .im-head #wh-segw .gx-seg { width: 100%; }
  html.pkl.im-next body #inbox .im-head #wh-segw .gx-seg > button { flex: 1 1 auto; padding-left: 8px; padding-right: 8px; font-size: 13px; }
}

/* ---------- desk: the ⋯ menu floats under its button (punch list 30), the way it does on a phone; inside the header row it crushed the
   name column to one letter at 1440 ---------- */
@media (min-width: 901px) {
  html.pkl.im-next body #inbox #ithread .ihead { position: relative; }
  html.pkl.im-next body #inbox #ithread .ihead.more .ihact { position: absolute; top: calc(100% - 6px); right: 14px; z-index: 30; flex-direction: column; align-items: stretch; gap: 4px;
    width: max-content; min-width: 220px; max-width: 320px; padding: 8px; border: 1px solid var(--im-pop-bd); border-radius: 18px; background: var(--im-pop); box-shadow: 0 22px 50px -16px rgba(10, 12, 20, .5); animation: im-sheet .16s var(--im-ease2, ease-out); transform-origin: 92% 0; }
  html.pkl.im-next body #inbox #ithread .ihead.more .ihact > :is(.btn, a.btn, .sel, select, label) { justify-content: flex-start; width: 100%; }
}

/* ---------- desk: what the keyboard is on shows, everywhere in both tabs ---------- */
html.im-next :is(#inbox, #chat) :is(a, button, [tabindex], summary):focus-visible { outline: 2px solid var(--im-acc); outline-offset: 2px; }
html.im-next :is(#inbox, #chat) :is(.iconv, .gx-chrow):focus-visible { outline-offset: 3px; }

/* ---------- desk: Done and Take on a Messages row, on hover ---------- */
html.pkl.im-next body #inbox #ilist .wim-rt { position: absolute; right: 10px; bottom: 9px; display: flex; gap: 6px; }
html.pkl.im-next body #inbox #ilist .wim-rt button { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 11px; border: 0; border-radius: 999px; background: var(--gx-card, var(--card)); box-shadow: var(--gx-sh), 0 0 0 1px var(--gx-bd, transparent); color: var(--text); font: 600 12.5px var(--sans); cursor: pointer; opacity: 0; transition: opacity .12s; }
html.pkl.im-next body #inbox #ilist .wim-rt button[data-rt="done"] { padding: 0; width: 30px; }
html.pkl.im-next body #inbox #ilist .wim-rt svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
html.pkl.im-next body #inbox #ilist a.iconv:hover .wim-rt button, html.pkl.im-next body #inbox #ilist .wim-rt button:focus-visible { opacity: 1; }
html.pkl.im-next body #inbox #ilist a.iconv.wim-busy { opacity: .55; pointer-events: none; }

/* ---------- desk: ⌘K, jump to any conversation; ? the keys ---------- */
.wim-jump, .wim-keys { position: fixed; inset: 0; z-index: 1200; display: flex; justify-content: center; background: rgba(10, 12, 18, .3); animation: im-sheet .14s var(--im-ease2, ease-out); }
.wim-jump { align-items: flex-start; padding-top: 12vh; }
.wim-keys { align-items: center; }
.wim-jp, .wim-keys-c { width: min(620px, calc(100vw - 32px)); overflow: hidden; border-radius: 18px; border: 1px solid var(--im-pop-bd); background: var(--im-pop); color: var(--im-tx); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55); }
.wim-jp-q { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px; border-bottom: 1px solid var(--im-pop-bd); }
.wim-jp-q > svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--im-mute); stroke-width: 2.2; stroke-linecap: round; }
.wim-jp-q input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--im-tx); font: 500 17px var(--sans, Inter, sans-serif); }
.wim-jump kbd, .wim-keys kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border: 1px solid var(--im-pop-bd); border-radius: 6px; background: var(--im-hover); color: var(--im-mute); font: 600 11.5px var(--sans, Inter, sans-serif); }
.wim-jp-l { max-height: min(56vh, 520px); overflow-y: auto; padding: 6px; }
.wim-jp-i { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: none; color: inherit; text-align: left; cursor: pointer; }
.wim-jp-i.on, .wim-jp-i:hover { background: color-mix(in srgb, var(--im-acc) 12%, transparent); }
.wim-jp-t { flex: 1; display: grid; gap: 2px; min-width: 0; }
.wim-jp-t b { font: 600 15px var(--sans, Inter, sans-serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wim-jp-i.hot .wim-jp-t b::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 50%; background: var(--im-red-ui); vertical-align: 2px; }
.wim-jp-t small { font: 400 13px var(--sans, Inter, sans-serif); color: var(--im-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wim-jp-k { flex: none; font: 600 12px var(--sans, Inter, sans-serif); color: var(--im-mute); }
.wim-jp-none { padding: 18px 14px; font-size: 14px; color: var(--im-mute); }
.wim-jp-ft { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--im-pop-bd); font-size: 12.5px; color: var(--im-mute); }
.wim-jp-ft span { display: inline-flex; align-items: center; gap: 4px; }
.wim-keys-c { width: min(440px, calc(100vw - 32px)); display: grid; gap: 9px; padding: 18px 20px; }
.wim-keys-c > b { margin-bottom: 4px; font: 700 16px var(--sans, Inter, sans-serif); }
.wim-keys-c > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 14px; }
.wim-keys-c > div span:last-child { color: var(--im-mute); text-align: right; }
.wim-keys-x { justify-self: end; min-height: 36px; margin-top: 8px; padding: 0 16px; border: 0; border-radius: 999px; background: #2563EB; color: #fff; font: 600 14px var(--sans, Inter, sans-serif); cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .wim-jump, .wim-keys { animation: none; } }
/* ======================================================================================================================================
   Run 4 (Nov 21 2026) — information and speed: search every message, one timeline per customer, the customer panel. Behind html.im-next;
   the parts are in public/office.js (imHits, imLinkStrip, imCtx). Nothing in this section is flagged important; it wins by specificity.
   ====================================================================================================================================== */
/* accent as text, and the quiet labels on the wall: the matrix's 4.5:1 floor (--im-acc is 3.98:1 on white, --im-mute 3.95:1 on the wall) */
:root { --im-acc-tx: #1D5FD1; --im-quiet: #545C67; }
html[data-theme=dark] { --im-acc-tx: #86B6FF; --im-quiet: #A3ACB9; }
/* ---------- the list: "In messages", every message that says what was typed, under the conversations that match ---------- */
html.im-next #inbox .imhits { padding-bottom: 10px; }
html.im-next #inbox .imh-h { display: flex; align-items: baseline; gap: 8px; padding: 14px 16px 4px; }
html.im-next #inbox .imh-h b { font: 700 12px var(--sans, Inter, sans-serif); letter-spacing: .05em; text-transform: uppercase; color: var(--im-quiet); }
html.im-next #inbox .imh-h .aside { font: 600 12px var(--sans, Inter, sans-serif); color: var(--im-quiet); }
html.im-next #inbox .imh-f { display: flex; align-items: center; gap: 6px; padding: 6px 12px 8px; overflow-x: auto; scrollbar-width: none; }
html.im-next #inbox .imh-f::-webkit-scrollbar { display: none; }
html.im-next #inbox .imh-f button { flex: none; height: 28px; padding: 0 11px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--im-tx, #111) 7%, transparent); color: var(--im-tx, var(--text)); font: 600 12.5px var(--sans, Inter, sans-serif); white-space: nowrap; cursor: pointer; }
html.im-next #inbox .imh-f button.on { background: var(--im-acc-tx); color: #fff; }
html[data-theme=dark].im-next #inbox .imh-f button.on { background: #2F6FDC; }
html.im-next #inbox .imh-f button:focus-visible { outline: 2px solid var(--im-acc, #2563EB); outline-offset: 2px; }
html.im-next #inbox .imh-f i { flex: none; width: 1px; height: 18px; margin: 0 4px; background: var(--im-pop-bd, var(--paper-2)); }
html.im-next #inbox .imh-none { padding: 8px 16px 14px; }
html.im-next #inbox .imhit mark, html.im-next #inbox .imsq-r mark { padding: 0 1px; border-radius: 3px; background: color-mix(in srgb, #FFC24A 55%, transparent); color: inherit; }
html.im-next #inbox .imhit .ih-sj { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 600 13px var(--sans, Inter, sans-serif); color: var(--im-tx, var(--text)); }

/* ---------- the thread: their other conversations, and where the channel changes in one timeline ---------- */
html.im-next #inbox .imlink { display: flex; align-items: center; gap: 6px; padding: 7px 14px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--gx-bd, var(--paper-2)); font: 500 12.5px var(--sans, Inter, sans-serif); color: var(--im-mute, var(--mute)); }
html.im-next #inbox .imlink::-webkit-scrollbar { display: none; }
html.im-next #inbox .iml-l { flex: none; font-weight: 600; }
html.im-next #inbox .iml-k { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; background: color-mix(in srgb, var(--im-tx, #111) 7%, transparent); color: var(--im-tx, var(--text)); text-decoration: none; white-space: nowrap; }
html.im-next #inbox .iml-k svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html.im-next #inbox .iml-k small { color: var(--im-mute, var(--mute)); font-size: 11.5px; }
html.im-next #inbox .iml-k:hover { background: var(--im-hover, var(--paper-2)); }
html.im-next #inbox .iml-t { flex: none; margin-left: auto; height: 28px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: var(--im-acc-tx); font: 600 12.5px var(--sans, Inter, sans-serif); cursor: pointer; }
html.im-next #inbox .imsrc { display: flex; justify-content: center; align-items: baseline; gap: 8px; margin: 12px 0 4px; font: 600 11.5px var(--sans, Inter, sans-serif); color: var(--im-quiet); }
html.im-next #inbox .imsrc a { color: var(--im-acc-tx); text-decoration: none; }
html.im-next #inbox .msg.im-hit { animation: im-hit 2.6s ease-out; }
@keyframes im-hit { 0%, 35% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--im-acc, #2563EB) 75%, transparent); } 100% { box-shadow: 0 0 0 3px transparent; } }
@media (prefers-reduced-motion: reduce) { html.im-next #inbox .msg.im-hit { animation: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--im-acc, #2563EB) 75%, transparent); } }

/* ---------- the customer panel (desk side column; the phone's who-sheet) ---------- */
html.im-next #iside .imc h4 { align-items: baseline; gap: 8px; }
html.im-next #iside .imc-l { display: flex; align-items: flex-start; gap: 8px; margin-top: 9px; font-size: 13px; line-height: 1.4; color: var(--im-mute, var(--mute)); }
html.im-next #iside :is(.imc-l, .imc-acts .btn) > svg { flex: none; width: 15px; height: 15px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html.im-next #iside .imc-acts .btn { display: inline-flex; gap: 6px; }
html.im-next #iside .imc-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
html.im-next #iside .imc-keys .iml-k { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px; background: color-mix(in srgb, var(--im-tx, #111) 7%, transparent); color: var(--im-tx, var(--text)); font: 500 13px var(--sans, Inter, sans-serif); text-decoration: none; }
html.im-next #iside .imc-keys .iml-k svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html.im-next #iside .imc-keys .iml-k small { color: var(--im-mute, var(--mute)); font-size: 11.5px; }
html.im-next #iside .imc-keys .iml-t { height: 30px; padding: 0 8px; border: 0; background: none; color: var(--im-acc-tx); font: 600 13px var(--sans, Inter, sans-serif); cursor: pointer; }
@media (min-width: 901px) { html.im-next #iside .imc-keys { display: none; } }
@media (max-width: 900px) { html.im-next #inbox .imlink { display: none; } }
html.im-next #iside .imc-l b { color: var(--im-tx, var(--text)); font-weight: 600; }
html.im-next #iside .imc-vin { align-items: center; }
html.im-next #iside .imc-vin .mono { color: var(--im-tx, var(--text)); font-size: 12.5px; letter-spacing: .02em; }
html.im-next #iside .imc-vin .btn { margin-left: auto; }
html.im-next #iside .imc-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
html.im-next #iside .imc-acts:empty { display: none; }
html.im-next #iside .imsq { display: flex; align-items: center; gap: 8px; height: 38px; margin-top: 14px; padding: 0 14px; border-radius: 999px; background: var(--im-field, var(--paper)); color: var(--im-mute, var(--mute)); }
html.im-next #iside .imsq svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
html.im-next #iside .imsq input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: none; color: var(--im-tx, var(--text)); font: 400 14px var(--sans, Inter, sans-serif); }
html.im-next #iside .imsq:focus-within { box-shadow: 0 0 0 2px var(--im-acc, #2563EB); }
html.im-next #iside .imsq-r { margin: 6px -6px 0; }
html.im-next #iside .imsq-r a.imhit { display: flex; gap: 10px; padding: 8px 6px; border-radius: 10px; color: inherit; text-decoration: none; }
html.im-next #iside .imsq-r a.imhit:hover { background: var(--im-hover, var(--paper)); }
html.im-next #iside .imsq-r .gxm-av { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: color-mix(in srgb, var(--im-tx, #111) 7%, transparent); color: var(--im-tx, var(--text)); }
html.im-next #iside .imsq-r .gxm-av svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html.im-next #iside .imsq-r .gxm-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
html.im-next #iside .imsq-r .gxm-top { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
html.im-next #iside .imsq-r .gxm-top .spacer { flex: 1; }
html.im-next #iside .imsq-r .ic-when { color: var(--im-mute, var(--mute)); font-size: 12px; }
html.im-next #iside .imsq-r .ih-sj { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 600 12.5px var(--sans, Inter, sans-serif); }
html.im-next #iside .imsq-r .ic-prev { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.4; color: var(--im-mute, var(--mute)); }
html.im-next #iside .imsq-r .imh-none { padding: 6px; }
html.im-next #iside .imo { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--gx-bd, var(--paper-2)); cursor: pointer; }
html.im-next #iside .imc h4 + .imo { border-top: 0; }
html.im-next #iside .imo:focus-visible { outline: 2px solid var(--im-acc, #2563EB); outline-offset: 2px; border-radius: 6px; }
html.im-next #iside .imdot { flex: none; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: #9CA3AF; }
html.im-next #iside .imdot.st-ok { background: #16A34A; }
html.im-next #iside .imdot.st-part { background: #D97706; }
html.im-next #iside .imdot.st-open { background: var(--im-red-ui); }
html.im-next #iside .imo-m { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
html.im-next #iside .imo-t { display: flex; align-items: baseline; gap: 6px; font-size: 13.5px; }
html.im-next #iside .imo-t .spacer { flex: 1; }
html.im-next #iside .imo-s { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; line-height: 1.4; color: var(--im-mute, var(--mute)); }
html.im-next #iside :is(.imo-s, .imr) em { font-style: normal; font-weight: 600; }
html.im-next #iside em.st-ok { color: #15803D; }
html.im-next #iside em.st-part { color: #B45309; }
html.im-next #iside em.st-open { color: var(--im-red-tx); }
html[data-theme=dark].im-next #iside em.st-ok { color: #4ADE80; }
html[data-theme=dark].im-next #iside em.st-part { color: #FBBF24; }
html.im-next #iside .imtrk { align-self: flex-start; margin-top: 3px; font: 600 12.5px var(--sans, Inter, sans-serif); color: var(--im-acc-tx); text-decoration: none; }
html.im-next #iside .imr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: 8px; padding: 8px 0; border-top: 1px solid var(--gx-bd, var(--paper-2)); font-size: 13px; text-decoration: none; }
html.im-next #iside .imc h4 + .imr { border-top: 0; }
html.im-next #iside .imr > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--im-mute, var(--mute)); }
html.im-next #iside .imr > em { font-size: 12px; color: var(--im-mute, var(--mute)); }
html.im-next #iside .imr > a { color: var(--im-acc-tx); font-weight: 600; text-decoration: none; }
html.im-next #iside a.imr:hover > b { text-decoration: underline; }
/* ---------- desk: with the customer panel open the thread is narrow — Take and Hand off move into ⋯ so the name has room ---------- */
@container (max-width: 560px) {
  html.pkl.im-next body #inbox #ithread .ihead .who { min-width: 120px; }
  html.pkl.im-next body #inbox #ithread .ihead .ihprime :is(.ih-take, [data-act=handoff]) { display: none; }
  html.pkl.im-next body #inbox #ithread .ihead .ihact .mob { display: contents; }
}
/* ---------- the list: a person's other conversations on their row ---------- */
html.im-next #inbox .gxm-also { color: var(--im-acc-tx); font-weight: 600; }
/* the case strip over a thread: its red step label at 4.5:1 (it was the brand red, 3.99:1 on white) */
html.im-next #inbox #ithread .icases .cstep { color: var(--im-red-tx); }
/* ---------- phone: the Chat list scrolls with the page (Nov 21 2026). On a phone the list isn't its own scroller, and `overscroll-behavior:
   contain` on it kept a swipe over the rows from reaching the page, so the list wouldn't move. Contain stays on a desk, where it scrolls. ---------- */
@media (max-width: 900px) { html.pkl body #chat .chlist { overscroll-behavior: auto; } }
/* ---------- Run 5 (Nov 21 2026): a thread opens on its newest page; "Show earlier" fetches the page before it ---------- */
html.im-next #inbox #ithread .msgs .im-earlier { display: block; margin: 4px auto 14px; min-height: 36px; padding: 0 16px; border-radius: 18px; color: var(--im-acc-tx); }
html.im-next #inbox #ithread .msgs .im-earlier:disabled { color: var(--im-quiet); }
/* Run 5: Speed, in Messages settings: one card per kind of open, never a table */
#isetbox .imspd { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--paper-2); }
#isetbox .imspd-live { display: flex; align-items: center; gap: 8px; margin: 8px 0 6px; font-size: 13px; }
#isetbox .imspd-live i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--im-quiet, #8a929c); }
#isetbox .imspd-live i.on { background: var(--im-acc, #2563eb); box-shadow: 0 0 0 3px color-mix(in srgb, var(--im-acc, #2563eb) 22%, transparent); }
#isetbox .imspd-r { display: grid; grid-template-columns: minmax(120px, 160px) 1fr; gap: 2px 12px; padding: 8px 0; border-top: 1px solid var(--paper-2); font-size: 13px; }
#isetbox .imspd-r small { color: var(--im-quiet, inherit); }
#isetbox .imspd-w { grid-column: 2; font-size: 12px; color: var(--im-quiet, inherit); }
@media (max-width: 560px) { #isetbox .imspd-r { grid-template-columns: 1fr; } #isetbox .imspd-w { grid-column: 1; } }
