/* HiBiker Chat 2.0 — shared presentation, independent of account identity. */
:root{--chat-accent:#e6661b;--chat-text:#27231f;--chat-muted:#766d65;--chat-rule:#ebe5de;--chat-incoming:#fff;--chat-outgoing:#fff0e5}
.chat-shell{background:#f7f5f2}
.chat-shell .chat-topbar{background:rgba(255,255,255,.97);border-bottom:1px solid var(--chat-rule);box-shadow:0 3px 14px rgba(32,25,19,.035);gap:8px;min-height:65px;animation:chat-chrome-enter .19s ease-out both}
.chat-shell .chat-topbar .icon-btn{width:44px;height:44px;min-width:44px;border-radius:14px}
.chat-shell .chat-topbar .brand{gap:10px;min-width:0;flex:1;justify-content:flex-start}
.chat-shell .chat-topbar .brand img{width:42px;height:42px;flex:none;border-radius:50%;object-fit:cover;background:#f0e8e0}
.chat-shell .chat-topbar .brand .name{font-size:15px;letter-spacing:-.015em;line-height:1.25;font-weight:800;color:var(--chat-text)}
.chat-shell .chat-topbar .brand small{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:3px;font-size:11px;letter-spacing:.015em;color:var(--chat-muted);font-weight:550;text-transform:none}
.chat-shell .chat{position:relative;background:linear-gradient(180deg,#faf8f5 0%,#f5f3f0 100%)}
.chat-shell .messages,.bc-messages{display:flex;flex-direction:column;gap:7px;scrollbar-width:thin;scrollbar-color:#d8cfc5 transparent;overflow-anchor:auto}
.chat-shell .messages{padding:17px 13px 24px}
.chat-shell .bubble,.bc-messages .bubble{position:relative;max-width:83%;width:fit-content;min-width:52px;align-self:flex-start;margin:0;padding:10px 13px 7px;background:var(--chat-incoming);color:var(--chat-text);border:1px solid #e9e4dd;border-radius:17px 17px 17px 5px;box-shadow:0 2px 7px rgba(39,32,26,.045);font-size:15px;font-weight:450;line-height:1.48;overflow-wrap:anywhere;word-break:normal;animation:chat-message-arrive .18s cubic-bezier(.2,.75,.25,1) both}
.chat-shell .bubble.mine,.bc-messages .bubble.mine{align-self:flex-end;background:var(--chat-outgoing);border-color:#f3d2b9;border-radius:17px 17px 5px 17px}
.chat-shell .bubble.chat-message-established,.bc-messages .bubble.chat-message-established{animation:none}
.chat-shell .bubble.chat-message-grouped,.bc-messages .bubble.chat-message-grouped{margin-top:-4px}
.chat-shell .bubble .chat-bubble-text,.bc-messages .bubble .chat-bubble-text{display:block;white-space:pre-wrap}
.chat-shell .bubble time.meta,.bc-messages .bubble time.meta{display:block;margin-top:4px;text-align:right;font-size:10.5px;line-height:1.2;color:#87766a;font-variant-numeric:tabular-nums}
.chat-shell .bubble .chat-staff-author,.bc-messages .bubble .chat-staff-author{display:block;margin-top:3px;font-size:10px;line-height:1.2;font-weight:700;letter-spacing:.02em;color:#865634}
/* Contextual Ride attachment lives inside one message, never in the room header. */
.chat-shell .bubble:has(.chat-ride-card),.bc-messages .bubble:has(.chat-ride-card){min-width:0}
.chat-ride-card{display:grid;grid-template-columns:65px minmax(0,1fr) 16px;align-items:center;gap:9px;width:min(275px,calc(100vw - 90px));max-width:100%;min-height:68px;box-sizing:border-box;margin-top:8px;padding:6px;border:1px solid #ead7c4;border-radius:13px;background:rgba(255,255,255,.86);color:var(--chat-text);text-decoration:none;box-shadow:0 2px 7px rgba(44,30,16,.035);overflow:hidden;transition:border-color .15s,background .15s}
.chat-ride-card:hover{border-color:#e9a16b;background:#fff}
.chat-ride-card:focus-visible,.chat-ride-attachment-remove:focus-visible{outline:3px solid #eea06d;outline-offset:2px}
.chat-ride-card-image{display:block;width:65px;height:65px;aspect-ratio:1;object-fit:cover;background:#f6ede5;border-radius:9px}
.chat-ride-card-copy{display:flex;flex-direction:column;justify-content:center;gap:3px;min-width:0}
.chat-ride-card-eyebrow{font-size:9px;font-weight:850;letter-spacing:.055em;color:#c25a15}
.chat-ride-card-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13px;line-height:1.25;font-weight:790;overflow-wrap:anywhere}
.chat-ride-card-detail{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;color:#746c64}
.chat-ride-card-arrow{font-size:16px;align-self:center;color:#c66325}
.chat-shell .composer.chat-ride-compose{display:grid;grid-template-columns:minmax(0,1fr) 45px;align-items:end;column-gap:9px;row-gap:8px}
.chat-shell .composer.chat-ride-compose .chat-compose-input{grid-column:1;grid-row:2;width:100%}
.chat-shell .composer.chat-ride-compose .chat-send-button{grid-column:2;grid-row:2}
.chat-ride-attachment{display:grid;grid-column:1/-1;grid-row:1;grid-template-columns:45px minmax(0,1fr) 34px;align-items:center;gap:10px;min-width:0;box-sizing:border-box;padding:6px 7px;border:1px solid #e9ded3;border-radius:13px;background:#faf6f1}
.chat-ride-attachment-image{width:45px;height:45px;object-fit:cover;border-radius:9px;background:#f1e4d8}
.chat-ride-attachment-copy{display:flex;min-width:0;flex-direction:column;gap:3px}
.chat-ride-attachment-copy small{color:#c3621f;font-size:9.5px;font-weight:800;letter-spacing:.05em}
.chat-ride-attachment-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#322a24;font-size:12.5px;font-weight:750}
.chat-ride-attachment-remove{display:grid;place-items:center;width:32px;height:32px;padding:0;border:0;border-radius:50%;background:#f1e6db;color:#5b5047;font-size:22px;line-height:1;cursor:pointer}
.chat-day-divider{align-self:center;flex:none;margin:10px auto;padding:6px 12px;border:1px solid #ede7df;border-radius:99px;background:rgba(255,255,255,.9);color:#776d64;font-size:11px;font-weight:750;line-height:1.3;box-shadow:0 2px 6px rgba(30,24,20,.03)}
.chat-room-empty{margin:auto;max-width:270px;padding:24px 12px;text-align:center;color:#847b73;font-size:13px;line-height:1.55}
.chat-shell .composer,.bc-composer{gap:9px;align-items:flex-end;background:#fff;border-top:1px solid var(--chat-rule);box-shadow:0 -4px 16px rgba(36,29,24,.045)}
.chat-shell .composer{padding:10px 12px calc(10px + env(safe-area-inset-bottom));animation:chat-chrome-enter .19s ease-out both}
.chat-composer-enhanced .chat-compose-input{display:block;flex:1;min-width:0;min-height:43px;max-height:132px;resize:none;overflow-y:auto;box-sizing:border-box;border:1px solid #e6ded6;border-radius:21px;background:#f8f7f5;padding:11px 15px;color:var(--chat-text);font:inherit;font-size:15px;line-height:1.35;outline:none;transition:background .16s,border-color .16s,box-shadow .16s}
.chat-composer-enhanced .chat-compose-input:focus{background:#fff;border-color:#eda875;box-shadow:0 0 0 3px rgba(230,102,27,.09)}
.chat-composer-enhanced .chat-compose-input::placeholder{color:#8a827c}
.chat-composer-enhanced .chat-send-button{display:grid;place-items:center;align-self:flex-end;flex:0 0 45px;min-width:45px;width:45px;height:45px;min-height:45px;padding:0;border:0;border-radius:50%;color:#fff;background:var(--chat-accent);box-shadow:0 4px 10px rgba(230,102,27,.18);cursor:pointer;transition:transform .16s cubic-bezier(.2,.8,.2,1),background .16s,opacity .16s}
.chat-composer-enhanced .chat-send-button svg{width:21px;height:21px;transform:translateX(1px)}
.chat-composer-enhanced .chat-send-button:active:not(:disabled){transform:scale(.92)}
.chat-composer-enhanced .chat-send-button:disabled{background:#dfd3c9;box-shadow:none;cursor:default;opacity:.85}
.chat-composer-enhanced .chat-send-button:focus-visible,.chat-jump-latest:focus-visible,.chat-message-retry:focus-visible{outline:3px solid #ef985b;outline-offset:2px}
.chat-shell .chat-jump-latest,.bc-content .chat-jump-latest{position:absolute;z-index:42;right:16px;bottom:calc(var(--chat-composer-offset,75px) + 10px);display:grid;place-items:center;width:43px;height:43px;padding:0;border:1px solid #e9ddd1;border-radius:50%;background:#fff;color:#b95618;box-shadow:0 5px 18px rgba(25,20,18,.14);font-size:20px;font-weight:800;cursor:pointer;animation:chat-jump-enter .16s ease-out}
.chat-shell .chat-jump-latest[hidden],.bc-content .chat-jump-latest[hidden]{display:none!important}
.chat-message-pending{opacity:.72}.chat-message-failed{border-color:#e6a09a!important;background:#fff6f4!important}
.chat-message-retry{margin:5px 0 0 auto;display:block;background:transparent;border:0;color:#aa3e31;font-size:11px;font-weight:800;cursor:pointer}
.view-matches button.chat-thread,.bow-workspace button.chat-thread{min-height:76px;padding:11px 12px;gap:11px;border-radius:17px;border-color:#eae5df;box-shadow:0 2px 10px rgba(30,24,19,.035);transition:background .15s,border-color .15s,transform .15s}
.view-matches button.chat-thread:active,.bow-workspace button.chat-thread:active{transform:scale(.992)}
.view-matches .chat-thread-copy,.bow-workspace .chat-thread-copy{gap:3px}
.view-matches .chat-thread-copy .name,.bow-workspace .chat-thread-copy .name{font-size:14px;line-height:1.3}
.view-matches .chat-thread-copy .meta,.bow-workspace .chat-thread-copy .meta{font-size:12px;color:#756d65;line-height:1.35}
.view-matches .chat-thread-copy .chat-thread-context,.bow-workspace .chat-thread-copy .chat-thread-context{font-size:10.5px;color:#968b81;line-height:1.2}
.chat-thread-tail{display:flex;flex:none;min-width:39px;align-items:flex-end;flex-direction:column;gap:8px;align-self:stretch;justify-content:center}
.chat-thread-time{font-size:10.5px;font-weight:650;color:#8c8177;font-variant-numeric:tabular-nums}
.chat-thread-unread{min-width:21px;height:21px;padding:2px 6px;display:grid;place-items:center;border-radius:20px;background:var(--chat-accent);color:white;font-size:11px;font-weight:800}
.chat-thread-chevron{display:none!important}
.bc-content{position:relative}
.bc-messages{gap:7px;min-height:180px;max-height:54dvh;padding:12px 3px 20px}
.bc-composer{margin-top:8px;padding:12px 0 0;min-height:65px}
.bc-content .chat-jump-latest{right:19px}
.bc-panel{background:#f9f7f4}
.bc-header{background:#fff}
.bc-message{border-radius:17px}
.bc-feedback{min-height:0}
@keyframes chat-message-arrive{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
@keyframes chat-chrome-enter{from{opacity:.88;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}
@keyframes chat-jump-enter{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:430px){.chat-shell .chat-topbar .brand{justify-content:flex-start}.chat-shell .bubble,.bc-messages .bubble{max-width:87%;font-size:14.5px}.chat-shell .messages{padding:13px 10px 21px}.chat-shell .composer{gap:8px;padding-left:10px;padding-right:10px}.view-matches button.chat-thread,.bow-workspace button.chat-thread{min-height:74px;padding:10px}}
@media(prefers-reduced-motion:reduce){.chat-shell .bubble,.bc-messages .bubble,.chat-shell .chat-jump-latest,.bc-content .chat-jump-latest,.chat-shell .chat-topbar,.chat-shell .composer{animation:none!important}.chat-composer-enhanced .chat-send-button,.chat-composer-enhanced .chat-compose-input,.view-matches button.chat-thread,.bow-workspace button.chat-thread{transition:none!important}}

/* Chat 2.1 — layered app/peer navigation, route-inspired surfaces and breathing room. */
.chat-shell.chat-chrome-premium{
  --chat-accent:#e76b24;
  --chat-text:#29241f;
  --chat-muted:#777067;
  --chat-rule:#e9dfd3;
  --chat-incoming:#fff;
  --chat-outgoing:#fff0e5;
  background:#f6f3ee;
}
.chat-shell.chat-chrome-premium > .topbar-home.chat-appbar-real{
  flex:0 0 auto;position:relative;top:auto;z-index:43;
  /* App chrome is the exact home component, with all of its native controls. */
}
.chat-shell.chat-chrome-premium .chat-topbar{
  flex:0 0 auto;position:relative;top:auto;z-index:42;
  min-height:82px;padding:12px 18px!important;gap:12px;
  background:rgba(255,255,255,.98);
  border-bottom:1px solid #ebdfd4;
  box-shadow:0 5px 16px rgba(57,39,27,.045);
}
.chat-shell.chat-chrome-premium .chat-topbar>.icon-btn{
  flex:0 0 41px;min-width:41px;width:41px;height:41px;border-radius:14px;
  border:1px solid #ebe2d9;background:#f9f6f2;color:#3a3028;
}
.chat-shell.chat-chrome-premium .chat-peer-identity{min-width:0;flex:1;gap:12px;align-items:center}
.chat-shell.chat-chrome-premium .chat-peer-identity img{
  flex:0 0 49px;width:49px!important;height:49px!important;
  border:3px solid #fff;outline:1px solid #eed6c3;
  border-radius:17px;box-shadow:0 3px 11px rgba(101,61,32,.13);
  background:#f5e9dd;
}
.chat-shell.chat-chrome-premium .chat-peer-identity .name{
  font-size:16px;font-weight:850;letter-spacing:-.025em;line-height:1.2;
  max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.chat-shell.chat-chrome-premium .chat-peer-identity small{
  margin-top:5px;font-size:11px;letter-spacing:0;font-weight:550;color:#827366;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.chat-peer-overline{display:flex;align-items:center;gap:6px;margin-bottom:4px;
  font-size:9px;line-height:1.1;font-weight:850;letter-spacing:.14em;color:#b15b27}
.chat-peer-overline::before{content:"";width:12px;height:2px;border-radius:4px;background:#ee8a4e}
.chat-actions{position:relative;flex:0 0 auto;z-index:48}
.chat-shell.chat-chrome-premium .chat-actions-trigger{
  width:42px;min-width:42px;height:42px;padding:10px;
  display:grid;place-items:center;cursor:pointer;
  background:#fff7f0;color:#b75b20;border:1px solid #f4decf;border-radius:14px;
  transition:background .16s,transform .16s,border-color .16s;
}
.chat-actions-trigger svg{display:block;width:19px;height:19px}
.chat-actions-trigger:hover,.chat-actions-trigger.is-open{background:#ffefe1;border-color:#eac5a8}
.chat-actions-trigger:active{transform:scale(.96)}
.chat-actions-menu{
  position:absolute;right:0;top:calc(100% + 11px);width:min(258px,calc(100vw - 38px));
  padding:7px;border:1px solid #eee1d4;border-radius:18px;
  background:#fff;box-shadow:0 16px 36px rgba(48,32,22,.17);
  animation:chat-actions-reveal .16s cubic-bezier(.2,.8,.2,1) both;
}
.chat-actions-menu[hidden],.chat-search-panel[hidden]{display:none!important}
.chat-action-option{
  display:flex;align-items:center;gap:11px;width:100%;min-height:43px;
  padding:8px 10px;border:0;border-radius:11px;background:transparent;
  font-size:13px;font-weight:680;line-height:1.2;text-align:left;color:#302923;cursor:pointer;
}
.chat-action-option:hover,.chat-action-option:focus-visible{background:#fff2e8;outline:none}
.chat-action-symbol{flex:0 0 28px;display:grid;place-items:center;width:28px;height:28px;border-radius:9px;
  font-size:16px;font-weight:650;background:#faf2e9;color:#bb652e}
.chat-search-panel{flex:0 0 auto;position:relative;z-index:41;
  padding:12px 18px;background:#fffdfa;border-bottom:1px solid #efdfd1;
  animation:chat-chrome-enter .18s ease-out both}
.chat-search-row{display:flex;align-items:center;gap:6px}
.chat-search-input{flex:1;min-width:0;height:42px;padding:0 13px;border:1px solid #e8d8cb;border-radius:14px;
  outline:none;background:#fff;color:#312820;font-size:14px}
.chat-search-input:focus{border-color:#e59864;box-shadow:0 0 0 3px rgba(232,113,43,.08)}
.chat-search-step,.chat-search-close{
  flex:0 0 35px;display:grid;place-items:center;width:35px;height:35px;padding:0;
  border:1px solid #f1e1d4;border-radius:11px;background:#fff6f0;
  color:#975329;font-size:18px;font-weight:700;cursor:pointer}
.chat-search-step:disabled{opacity:.34;cursor:default}
.chat-search-result{display:block;margin:7px 0 0 3px;font-size:11px;color:#8c796a}
.chat-shell.chat-chrome-premium .chat{
  background:radial-gradient(ellipse 75% 36% at 50% -6%,rgba(247,209,177,.24),transparent 85%),
    linear-gradient(180deg,#f8f6f2 0%,#f5f2ed 100%);
}
.chat-shell.chat-chrome-premium .messages{gap:9px;padding:24px 24px 30px;scrollbar-gutter:stable}
.chat-shell.chat-chrome-premium .bubble,.bc-messages .bubble{
  max-width:min(76%,460px);padding:12px 15px 9px;
  border-radius:21px 21px 21px 8px;
  border:1px solid #ece5dd;background:#fff;
  box-shadow:0 3px 12px rgba(58,39,26,.055);line-height:1.53;
}
.chat-shell.chat-chrome-premium .bubble.mine,.bc-messages .bubble.mine{
  border-radius:21px 21px 8px 21px;border-color:#f3d6c0;
  background:linear-gradient(147deg,#fff4ec,#ffeadb);
  box-shadow:0 3px 12px rgba(169,92,42,.07);
}
.chat-shell.chat-chrome-premium .bubble.chat-message-grouped,.bc-messages .bubble.chat-message-grouped{margin-top:-5px}
.chat-shell.chat-chrome-premium .bubble time.meta,.bc-messages .bubble time.meta{margin-top:7px;font-size:10px;color:#8b7c72}
.chat-shell.chat-chrome-premium .bubble.chat-search-match{outline:1px solid #f3b984;outline-offset:1px}
.chat-shell.chat-chrome-premium .bubble.chat-search-current{outline:2px solid #ea7a36;outline-offset:2px}
.chat-shell.chat-chrome-premium .composer{
  padding:12px 20px calc(13px + env(safe-area-inset-bottom));
  background:rgba(255,255,255,.96);border-top:1px solid #ebdfd5;
  box-shadow:0 -9px 25px rgba(56,38,25,.055);gap:11px;
}
.chat-shell.chat-chrome-premium .chat-compose-input{
  min-height:46px;padding:12px 17px;
  border-radius:22px;border-color:#e5ddd4;background:#f7f5f2;
  box-shadow:inset 0 1px 2px rgba(50,37,27,.025);
}
.chat-shell.chat-chrome-premium .chat-send-button{
  flex-basis:47px;min-width:47px;width:47px;height:47px;border-radius:17px;
  background:linear-gradient(145deg,#fb873e,#dc5a15);
  box-shadow:0 5px 12px rgba(220,90,21,.20);
}
.chat-shell.chat-chrome-premium .chat-send-button:disabled{background:#e1d6ca;box-shadow:none}
.bc-messages{padding:16px 19px 24px;gap:9px}
.bc-content .chat-jump-latest{right:26px}
.chat-actions-trigger:focus-visible,.chat-search-step:focus-visible,.chat-search-close:focus-visible{outline:3px solid #ec9c65;outline-offset:2px}
@keyframes chat-actions-reveal{from{opacity:0;transform:translateY(-5px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:430px){
  .chat-shell.chat-chrome-premium .chat-topbar{padding:10px 12px!important;min-height:75px;gap:9px}
  .chat-shell.chat-chrome-premium .chat-topbar>.icon-btn{width:38px;height:38px;min-width:38px;flex-basis:38px}
  .chat-shell.chat-chrome-premium .chat-peer-identity{gap:9px}
  .chat-shell.chat-chrome-premium .chat-peer-identity img{width:45px!important;height:45px!important;flex-basis:45px}
  .chat-shell.chat-chrome-premium .chat-peer-identity .name{font-size:14.5px}
  .chat-peer-overline{font-size:8px;letter-spacing:.09em}
  .chat-shell.chat-chrome-premium .chat-actions-trigger{min-width:39px;width:39px;height:39px}
  .chat-shell.chat-chrome-premium .messages{padding:19px 19px 24px}
  .chat-shell.chat-chrome-premium .bubble,.bc-messages .bubble{max-width:79%;padding:11px 13px 8px;font-size:14.5px}
  .chat-shell.chat-chrome-premium .composer{padding:10px 13px calc(11px + env(safe-area-inset-bottom));gap:8px}
  .chat-search-panel{padding-left:12px;padding-right:12px}
  .bc-messages{padding-left:16px;padding-right:16px}
}
@media(max-width:350px){
  .chat-shell.chat-chrome-premium .chat-peer-identity img{width:41px!important;height:41px!important;flex-basis:41px}
  .chat-shell.chat-chrome-premium .chat-peer-identity small{font-size:10px}
  .chat-shell.chat-chrome-premium .messages{padding-left:16px;padding-right:16px}
}
@media(prefers-reduced-motion:reduce){
  .chat-actions-menu,.chat-search-panel{animation:none!important}
  .chat-actions-trigger{transition:none!important}
}


/* Chat 2.2 — message inbox as a first-class messaging surface, shared by
   rider, business-only and Biker + Business identity. */
:is(.view-matches,.bow-workspace) .chat-inbox-list{
  display:flex;flex-direction:column;gap:9px;margin-top:11px;
}
:is(.view-matches,.bow-workspace) button.chat-thread{
  position:relative;display:flex;align-items:center;min-width:0;min-height:89px;
  padding:14px 15px;gap:13px;overflow:visible;
  border:1px solid #e9e0d7;border-radius:20px;
  background:linear-gradient(145deg,#fff 0%,#fff 70%,#fffcf9 100%);
  box-shadow:0 3px 14px rgba(57,38,24,.045),0 1px 2px rgba(57,38,24,.025);
  transition:transform .16s cubic-bezier(.2,.7,.3,1),border-color .16s,box-shadow .16s,background .16s;
}
:is(.view-matches,.bow-workspace) button.chat-thread:hover{
  border-color:#e4c8b3;box-shadow:0 7px 24px rgba(99,58,29,.09);
  background:linear-gradient(125deg,#fff 70%,#fff7f0 100%);
}
:is(.view-matches,.bow-workspace) button.chat-thread:active{transform:scale(.991)}
:is(.view-matches,.bow-workspace) button.chat-thread:focus-visible{
  outline:3px solid #e9945b;outline-offset:3px;
}
:is(.view-matches,.bow-workspace) button.chat-thread.chat-thread-has-unread{
  border-color:#edd4bf;
  background:linear-gradient(108deg,#fff8f2 0%,#fff 47%);
  box-shadow:inset 3px 0 0 #eb7b35,0 4px 15px rgba(138,74,32,.07);
}
:is(.view-matches,.bow-workspace) button.chat-thread > img.avatar{
  width:55px!important;height:55px!important;min-width:55px;flex:0 0 55px;
  object-fit:cover;border-radius:19px;
  border:3px solid #fff;outline:1px solid #e5d7c9;
  box-shadow:0 3px 11px rgba(45,31,22,.115);background:#f6ede4;
}
:is(.view-matches,.bow-workspace) button.chat-thread > .chat-thread-copy{
  display:flex;flex:1;min-width:0;flex-direction:column;gap:5px;align-items:flex-start;
  text-align:left;
}
:is(.view-matches,.bow-workspace) button.chat-thread .chat-thread-copy .name{
  display:block;min-width:0;max-width:100%;font-size:15.25px;line-height:1.22;
  font-weight:850;letter-spacing:-.022em;color:#2d2721;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
:is(.view-matches,.bow-workspace) button.chat-thread.chat-thread-has-unread .name{
  color:#1e1b18;
}
:is(.view-matches,.bow-workspace) button.chat-thread .chat-thread-copy .meta{
  display:block;max-width:100%;font-size:12.6px;line-height:1.38;
  font-weight:500;color:#706860;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;
}
:is(.view-matches,.bow-workspace) button.chat-thread.chat-thread-has-unread .meta{
  color:#433930;font-weight:650;
}
:is(.view-matches,.bow-workspace) button.chat-thread .chat-thread-copy .chat-thread-context{
  display:inline-flex;max-width:100%;align-items:center;gap:4px;
  padding:3px 8px;border-radius:8px;
  background:#f7f2ed;color:#87694f;font-size:10px;line-height:1.3;font-weight:700;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
:is(.view-matches,.bow-workspace) button.chat-thread .chat-thread-tail{
  display:flex;align-items:flex-end;justify-content:space-between;
  min-height:48px;min-width:42px;flex:0 0 auto;gap:6px;
  align-self:center;flex-direction:column;
}
:is(.view-matches,.bow-workspace) button.chat-thread .chat-thread-time{
  white-space:nowrap;font-size:10.75px;line-height:1.3;
  font-weight:700;font-variant-numeric:tabular-nums;color:#8e8278;
}
:is(.view-matches,.bow-workspace) button.chat-thread.chat-thread-has-unread .chat-thread-time{
  color:#c15d21;
}
:is(.view-matches,.bow-workspace) button.chat-thread .chat-thread-unread{
  display:grid;place-items:center;min-width:22px;min-height:22px;
  border-radius:99px;background:#e76822;color:#fff;
  font-size:10.5px;font-weight:850;line-height:1.2;
  box-shadow:0 3px 7px rgba(231,104,34,.21);
}
:is(.view-matches,.bow-workspace) button.chat-thread .chat-thread-chevron{
  display:none!important;
}
/* Club conversations share the same spacing and avatar treatment. */
.club-inbox-list button.club-inbox-thread{
  display:flex;align-items:center;gap:13px;min-height:83px;
  padding:13px 15px;border-radius:19px;border:1px solid #e9e0d7;
  background:#fff;box-shadow:0 3px 14px rgba(57,38,24,.045);
  transition:border-color .16s,box-shadow .16s;
}
.club-inbox-list button.club-inbox-thread:hover{border-color:#e4c8b3;box-shadow:0 6px 20px rgba(99,58,29,.075)}
.club-inbox-list button.club-inbox-thread img{
  width:55px;height:55px;flex:none;object-fit:cover;
  border:3px solid #fff;outline:1px solid #e5d7c9;border-radius:19px;
  box-shadow:0 3px 11px rgba(45,31,22,.11);
}
.club-inbox-list button.club-inbox-thread strong{font-size:15px;font-weight:850;letter-spacing:-.02em}
.club-inbox-list button.club-inbox-thread small{color:#8c796b}
@media(max-width:430px){
  :is(.view-matches,.bow-workspace) .chat-inbox-list{gap:8px}
  :is(.view-matches,.bow-workspace) button.chat-thread{min-height:84px;padding:12px 11px;gap:11px;border-radius:17px}
  :is(.view-matches,.bow-workspace) button.chat-thread > img.avatar{width:50px!important;height:50px!important;min-width:50px;flex-basis:50px;border-radius:16px}
  :is(.view-matches,.bow-workspace) button.chat-thread .chat-thread-copy .name{font-size:14px}
  :is(.view-matches,.bow-workspace) button.chat-thread .chat-thread-copy .meta{font-size:12px}
  :is(.view-matches,.bow-workspace) button.chat-thread .chat-thread-copy .chat-thread-context{font-size:9.75px;padding:3px 6px}
  :is(.view-matches,.bow-workspace) button.chat-thread .chat-thread-tail{min-width:37px}
}
@media(prefers-reduced-motion:reduce){
  :is(.view-matches,.bow-workspace) button.chat-thread,
  .club-inbox-list button.club-inbox-thread{transition:none!important}
}

/* Chat 2.3 — preserve the exact shared Home header on narrow devices.
   Older .chat-shell .brand/.topbar rules are for the peer header only. */
@media(max-width:430px){
  .chat-shell > .topbar-home{padding:8px 11px}
  .chat-shell > .topbar-home .brand-home{flex:0 1 auto;justify-content:flex-start}
}
/* Entry stays non-blocking: no hidden state and no async reveal callback.
   If the animation fails, the chat remains fully visible and interactive. */
.chat-shell.chat-chrome-premium > .chat-topbar{animation:chat-room-open .18s ease-out both}
.chat-shell.chat-chrome-premium > .chat{animation:chat-room-open .22s ease-out both}
.chat-shell.chat-chrome-premium .composer{animation:none}
@keyframes chat-room-open{from{opacity:.88;transform:translate3d(0,4px,0)}to{opacity:1;transform:translate3d(0,0,0)}}
@media(prefers-reduced-motion:reduce){
  .chat-shell.chat-chrome-premium > .chat-topbar,.chat-shell.chat-chrome-premium > .chat{animation:none!important}
}

/* Chat 2.4 — retained conversations never replay their entrance animation.
   Focus, scroll, decoded avatar and message bubbles remain the same DOM nodes. */
.chat-shell.chat-chrome-premium.chat-room-resumed > .chat-topbar,
.chat-shell.chat-chrome-premium.chat-room-resumed > .chat{animation:none!important}
.chat-shell.chat-chrome-premium .chat-peer-identity{border-radius:12px}
.chat-shell.chat-chrome-premium .chat-peer-identity:focus-visible{
  outline:2px solid #d66b29;outline-offset:3px
}
.chat-shell.chat-chrome-premium .chat-peer-identity small{font-variant-numeric:tabular-nums}
@media(max-width:430px){
  .chat-shell.chat-chrome-premium .chat-peer-identity{overflow:hidden}
  .chat-shell.chat-chrome-premium .chat-peer-identity > div{min-width:0}
  .chat-shell.chat-chrome-premium .chat-peer-identity .name,
  .chat-shell.chat-chrome-premium .chat-peer-identity small{
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap
  }
}

/* Chat 2.5 — compact, information-first inbox shared across all identities. */
:is(.view-matches,.bow-workspace) .chat-inbox-list{gap:6px;margin-top:8px}
:is(.view-matches,.bow-workspace) button.chat-thread{
  min-height:68px;padding:9px 11px;gap:10px;border-radius:15px;
  box-shadow:0 1px 5px rgba(57,38,24,.035);background:#fff;
}
:is(.view-matches,.bow-workspace) button.chat-thread:hover{
  box-shadow:0 3px 10px rgba(57,38,24,.07);background:#fffaf5;
}
:is(.view-matches,.bow-workspace) button.chat-thread.chat-thread-has-unread{
  box-shadow:inset 3px 0 0 #e77931;background:#fffaf6;
}
:is(.view-matches,.bow-workspace) button.chat-thread > img.avatar{
  width:45px!important;height:45px!important;min-width:45px;flex-basis:45px;
  border:1px solid #e7ded5;border-radius:14px;box-shadow:none;
}
:is(.view-matches,.bow-workspace) button.chat-thread > .avatar:not(img){
  width:45px;height:45px;min-width:45px;flex-basis:45px;border-radius:14px;
}
:is(.view-matches,.bow-workspace) button.chat-thread > .chat-thread-copy{
  gap:2px;justify-content:center;
}
:is(.view-matches,.bow-workspace) button.chat-thread .chat-thread-copy .name{
  font-size:14px;line-height:1.25;font-weight:800;letter-spacing:-.013em;
}
:is(.view-matches,.bow-workspace) button.chat-thread .chat-thread-copy .meta{
  font-size:12px;line-height:1.32;font-weight:450;color:#766b63;
}
:is(.view-matches,.bow-workspace) button.chat-thread .chat-thread-copy .chat-thread-context{
  padding:0;background:transparent;border-radius:0;color:#9a7660;
  font-size:10.5px;line-height:1.2;font-weight:600;
}
:is(.view-matches,.bow-workspace) button.chat-thread .chat-thread-tail{
  min-width:39px;min-height:42px;gap:4px;align-self:stretch;
  justify-content:space-between;padding:3px 0;
}
:is(.view-matches,.bow-workspace) button.chat-thread .chat-thread-time{
  font-size:10.5px;line-height:1.2;color:#877c72;font-weight:650;
}
:is(.view-matches,.bow-workspace) button.chat-thread .chat-thread-unread{
  min-width:19px;min-height:19px;font-size:10px;box-shadow:none;
}
/* Club manager uses the same two-line, timestamp-first treatment. */
.club-inbox-list{display:grid;gap:6px}
.club-inbox-list button.club-inbox-thread{
  width:100%;min-height:67px;padding:9px 11px;gap:10px;
  border-radius:15px;box-shadow:0 1px 5px rgba(57,38,24,.035);text-align:left;
}
.club-inbox-list button.club-inbox-thread img{
  width:45px;height:45px;border:1px solid #e7ded5;border-radius:14px;box-shadow:none;
}
.club-inbox-list button.club-inbox-thread .club-inbox-copy{
  display:grid;gap:3px;min-width:0;flex:1;
}
.club-inbox-list button.club-inbox-thread strong{
  display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  font-size:14px;line-height:1.2;font-weight:800;
}
.club-inbox-list button.club-inbox-thread small{
  display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  font-size:12px;line-height:1.3;
}
.club-inbox-list button.club-inbox-thread time{
  align-self:flex-start;flex:none;color:#877c72;font-size:10.5px;font-weight:650;
}
/* Staff filter hierarchy: search, audience segmented group, independent status control. */
.view-matches .staff-chat-filter-panel{display:grid;gap:10px;margin-bottom:12px}
.view-matches .staff-chat-filter-panel .chat-inbox-search{width:100%}
.view-matches .staff-chat-toolbar{
  display:flex;align-items:flex-end;justify-content:space-between;gap:12px;min-width:0;
}
.view-matches .staff-chat-type-wrap{flex:1;min-width:0}
.view-matches .staff-chat-status-wrap{flex:0 0 140px;min-width:0}
.view-matches .staff-chat-filter-caption{
  display:block;margin:0 0 6px 2px;color:#84766b;font-size:10.5px;
  font-weight:750;letter-spacing:.025em;
}
.view-matches .staff-chat-type-tags{
  display:flex;gap:4px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;
  max-width:100%;padding:3px;border:1px solid #e9e0d8;border-radius:12px;background:#f8f5f2;
}
.view-matches .staff-chat-type-tags::-webkit-scrollbar{display:none}
.view-matches .staff-chat-type-tags button{
  min-height:34px;flex:1;min-width:max-content;border:0;border-radius:9px;
  padding:7px 10px;background:transparent;color:#716760;font-size:11.5px;font-weight:750;
}
.view-matches .staff-chat-type-tags button.active{
  background:#fff;color:#a64c1b;box-shadow:0 1px 5px rgba(56,38,27,.11);
}
.view-matches .staff-chat-status-wrap select{
  width:100%;height:40px;border:1px solid #e4d7cc;border-radius:11px;
  background:#fff;color:#3f3832;padding:0 28px 0 11px;font:inherit;font-size:12px;font-weight:700;
}
.view-matches .staff-chat-status-wrap select:focus-visible{
  outline:3px solid rgba(230,102,27,.3);outline-offset:1px;
}
@media(max-width:430px){
  :is(.view-matches,.bow-workspace) button.chat-thread{min-height:64px;padding:8px 9px;gap:9px;border-radius:13px}
  :is(.view-matches,.bow-workspace) button.chat-thread > img.avatar{width:43px!important;height:43px!important;min-width:43px;flex-basis:43px;border-radius:13px}
  :is(.view-matches,.bow-workspace) button.chat-thread .chat-thread-copy .name{font-size:13.5px}
  :is(.view-matches,.bow-workspace) button.chat-thread .chat-thread-copy .meta{font-size:11.5px}
  :is(.view-matches,.bow-workspace) button.chat-thread .chat-thread-copy .chat-thread-context{font-size:10px}
  .view-matches .staff-chat-toolbar{gap:8px}
  .view-matches .staff-chat-status-wrap{flex-basis:118px}
  .view-matches .staff-chat-type-tags button{padding:7px 8px;font-size:11px}
}
@media(max-width:360px){
  .view-matches .staff-chat-toolbar{display:grid;grid-template-columns:minmax(0,1fr)}
  .view-matches .staff-chat-status-wrap{width:100%}
}

/* Chat 2.5 — immersive conversation on touch phones/tablets.
   Keep the peer bar and safe status area; the global Home header belongs to the inbox. */
@media(max-width:1024px), (max-width:1366px) and (pointer:coarse){
  .chat-shell:not(.chat-intro-shell) > .topbar-home{display:none!important}
  .chat-shell:not(.chat-intro-shell) > .chat-topbar{
    padding-top:calc(8px + env(safe-area-inset-top))!important;
    padding-bottom:9px!important;
  }
  .chat-shell:not(.chat-intro-shell).chat-chrome-premium .composer{
    padding-bottom:max(8px,env(safe-area-inset-bottom))!important;
  }
  .chat-shell:not(.chat-intro-shell).chat-chrome-premium.chat-keyboard-open .composer{
    padding-bottom:6px!important;
  }
  .chat-shell:not(.chat-intro-shell) .messages{padding-bottom:12px}
}

/* Chat 2.6 — hold peer header steady through iOS keyboard transitions.
   The viewport listener resizes the room; it must not animate or reposition chrome. */
@media(max-width:1024px), (max-width:1366px) and (pointer:coarse){
  .chat-shell:not(.chat-intro-shell) > .chat-topbar{
    animation:none!important;
    transition:none!important;
    transform:none!important;
  }
}

/* Chat 3.0 — native-like keyboard discipline for iOS.
   The peer header never changes position. Composer focus uses touchend
   preventScroll to avoid WebKit's synthetic-click blur; only room height varies. */
@media(max-width:1024px), (max-width:1366px) and (pointer:coarse){
  .chat-shell.chat-header-static:not(.chat-intro-shell){
    position:fixed!important;
    top:0!important;
    height:100dvh!important;
    min-height:0!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
    transform:translateX(-50%)!important;
    animation:none!important;
    transition:none!important;
  }
  .chat-shell.chat-header-static:not(.chat-intro-shell) > .chat-topbar{
    position:relative!important;
    top:0!important;
    left:auto!important;
    right:auto!important;
    width:100%!important;
    flex:0 0 auto!important;
    z-index:70;
    transform:none!important;
    animation:none!important;
    transition:none!important;
  }
  .chat-shell.chat-header-static:not(.chat-intro-shell) > .chat{
    position:relative!important;
    top:auto!important;
    left:auto!important;
    right:auto!important;
    width:100%!important;
    height:var(--chat-room-height,calc(100dvh - 78px))!important;
    min-height:0!important;
    flex:0 0 auto!important;
    display:flex!important;
    flex-direction:column!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain;
    scroll-padding-bottom:8px;
    transform:none!important;
    animation:none!important;
    transition:none!important;
  }
  .chat-shell.chat-header-static:not(.chat-intro-shell) .messages{
    min-height:0!important;
    flex:1 1 auto!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
  }
  html:has(body.chat-open .chat-header-static){overflow:hidden}
  body.chat-open:has(.chat-header-static){
    overflow:hidden;
    overscroll-behavior:none;
  }
}
