html:has(body.chat-view){overflow-x:hidden}
.chat-view{min-height:100vh;overflow-x:hidden}
.chat-page{padding-top:22px;padding-bottom:94px}
.chat-shell{display:grid;grid-template-columns:400px minmax(0,1fr);grid-template-rows:minmax(0,1fr);height:min(760px,calc(100dvh - 155px));min-height:580px;overflow:hidden;border:1px solid var(--line);border-radius:18px;background:#090f14;color:var(--text)}
.chat-sidebar{display:flex;min-width:0;min-height:0;overflow:hidden;flex-direction:column;border-right:1px solid var(--line);background:#0a1016}
.chat-toolbar{display:grid;grid-template-columns:50px minmax(0,1fr) 50px;gap:12px;padding:18px 18px 14px}
.chat-square-button,.chat-search{height:50px;border:1px solid #27333e;border-radius:13px;background:#111923;color:var(--text)}
.chat-square-button{position:relative;display:grid;place-items:center}.chat-square-button svg{width:24px;height:24px;stroke-width:1.8}.chat-square-button:hover{background:#17212b}
.chat-square-button i{position:absolute;right:8px;top:7px;width:10px;height:10px;border:2px solid #111923;border-radius:50%;background:var(--blue)}
.chat-search{display:flex;align-items:center;gap:10px;padding:0 14px}.chat-search>svg{width:20px;height:20px;color:#91a2b8}
.chat-search input{min-width:0;width:100%;border:0;background:transparent;color:var(--text);font-size:14px;outline:0}.chat-search input::placeholder{color:#8f9eaf}
.chat-list{min-height:0;flex:1 1 auto;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:0 18px 18px;scrollbar-color:#44515d #111920;scrollbar-width:thin}.chat-list::-webkit-scrollbar{width:6px}.chat-list::-webkit-scrollbar-track{border-radius:999px;background:#111920}.chat-list::-webkit-scrollbar-thumb{border:1px solid #111920;border-radius:999px;background:#44515d}.chat-list.is-mouse-dragging{cursor:grabbing;user-select:none}
.chat-row{display:grid;grid-template-columns:62px minmax(0,1fr) auto;gap:13px;width:100%;min-height:88px;align-items:center;border-top:1px solid #202a33;padding:12px 2px;color:var(--text);text-align:left}.chat-row:hover,.chat-row.is-active{background:rgba(255,255,255,.025)}
.avatar-wrap{position:relative;display:block;width:max-content;flex:none}.chat-avatar{display:grid;width:60px;height:60px;place-items:center;overflow:hidden;border:1px solid #2d3a45;border-radius:18px;background:#18232d;color:#b8c4ce;font-size:18px;font-weight:800}.chat-avatar.is-support{background:#0e1c30}.chat-avatar img{width:100%;height:100%;object-fit:cover}
.avatar-wrap>i,#thread-presence{position:absolute;right:-2px;bottom:-2px;width:15px;height:15px;border:3px solid #0a1016;border-radius:50%;background:#778697}.avatar-wrap>i.is-online,#thread-presence.is-online{background:#20d968}
.chat-row-copy{min-width:0}.chat-row-title{display:flex;align-items:center;gap:7px}.chat-row-title strong{overflow:hidden;font-size:15px;text-overflow:ellipsis;white-space:nowrap}.chat-row-copy p{margin:6px 0 0;overflow:hidden;color:#94a3b5;font-size:13px;text-overflow:ellipsis;white-space:nowrap}.chat-row.has-unread .chat-row-title strong,.chat-row.has-unread .chat-row-copy p{color:#fff;font-weight:700}
.verified-badge[hidden]{display:none}
.chat-row-meta{display:grid;min-width:80px;justify-items:end;gap:8px;color:#91a2b5;font-size:11px}.unread-count{display:grid;min-width:21px;height:21px;place-items:center;border-radius:999px;background:var(--blue);padding:0 6px;color:#fff;font-weight:800}
.order-badge{border-radius:999px;padding:6px 10px;font-size:10px;font-weight:800;white-space:nowrap}.order-badge.processing,.order-badge.waiting_confirmation{background:#4b351e;color:#ffb229}.order-badge.refund{background:#482126;color:#ff6a70}.order-badge.completed{background:#123b2b;color:#25dd83}.chat-empty{margin:28px;color:var(--muted);text-align:center}
.chat-shell.is-state-view{grid-template-columns:minmax(0,1fr)}.chat-shell.is-state-view .chat-sidebar{border-right:0}.chat-shell.is-state-view .chat-thread{display:none}.chat-list.has-state{display:grid;overflow:hidden;place-items:center;padding:28px}.chat-state{display:flex;width:min(440px,100%);align-items:center;justify-content:center;flex-direction:column;text-align:center}.chat-state-icon{display:grid;width:62px;height:62px;margin-bottom:16px;place-items:center;border:1px solid #2a3945;border-radius:20px;background:#111923;color:#8ea2b3}.chat-state-icon svg{width:30px;height:30px;stroke-width:1.6}.chat-state p{max-width:420px;margin:0;color:#cbd5dd;font-size:15px;line-height:1.5}.chat-state-action{min-width:142px;min-height:42px;margin-top:18px;border-radius:10px;background:var(--blue);padding:0 20px;color:#fff;font-size:14px;font-weight:700}.chat-state-action:hover{background:#2084ff;color:#fff}.chat-state.is-guest .chat-state-icon{display:none}.chat-row.is-preview-product .chat-avatar{border-color:#215e98;background:#111a22}.chat-row.is-preview-product .avatar-wrap>i{display:none}
.chat-thread{position:relative;min-width:0;min-height:0;overflow:hidden;background:#080e13}.chat-thread-placeholder{display:grid;height:100%;place-content:center;color:#82919f;text-align:center}.chat-thread-placeholder p{margin:0;font-size:14px}.chat-thread-placeholder[hidden],.chat-thread-content[hidden]{display:none}
.chat-thread-content{display:grid;height:100%;min-height:0;overflow:hidden;grid-template-rows:auto auto auto minmax(0,1fr) auto auto}
.chat-thread-content.is-entering{animation:thread-content-in .2s ease-in-out}
.thread-header{position:relative;grid-row:1;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;min-height:86px;border-bottom:1px solid #202a33;padding:12px 20px;background:#0b1117}
.thread-back,.thread-more{display:grid;width:50px;height:50px;place-items:center;border:0;border-radius:13px;background:transparent;color:var(--blue);font-size:25px;line-height:1;transition:background-color .18s ease,color .18s ease}.thread-back:hover,.thread-more:hover{background:#17212b;color:var(--blue)}.thread-back:active,.thread-more:active{background:#202d38;color:var(--blue)}
.thread-peer{display:flex;min-width:0;align-items:center;gap:12px;color:var(--text);text-align:left}.thread-peer .chat-avatar{width:54px;height:54px;border-radius:17px}.thread-peer-copy{display:grid;min-width:0}.thread-peer-name{display:inline-flex;width:fit-content;max-width:100%;min-width:0;align-items:center;gap:6px}.thread-peer-name strong{min-width:0;overflow:hidden;font-size:17px;text-overflow:ellipsis;white-space:nowrap}.thread-peer-name .verified-badge{flex:none}.thread-peer small{margin-top:4px;color:#93a1b0;font-size:12px}.thread-peer small.is-online{color:#2bd779}
.thread-menu{position:absolute;z-index:20;right:18px;top:69px;width:270px;border:1px solid #34414e;border-radius:15px;background:#111923;padding:8px;box-shadow:0 18px 40px rgba(0,0,0,.45);animation:menu-in .18s ease-out}.thread-menu[hidden],.thread-menu button[hidden]{display:none}
.thread-menu button{display:flex;width:100%;align-items:center;gap:13px;border-radius:10px;padding:12px;color:#e9eef3;font-size:13px;text-align:left}.thread-menu button:hover{background:#1a2530}.thread-menu button>span:first-child{display:grid;width:23px;place-items:center;color:var(--blue)}.thread-menu svg{width:22px;height:22px;stroke-width:1.8}
.order-card,.listing-context{grid-row:2;display:flex;align-items:center;gap:14px;margin:14px 18px 0;border:1px solid #283540;border-radius:16px;background:#121920;padding:12px 14px;color:var(--text)}.order-card[hidden],.listing-context[hidden]{display:none}
.order-card img{width:58px;height:58px;border-radius:14px;object-fit:cover}.order-card>span,.listing-context>span:last-child{display:grid;min-width:0;flex:1}.order-card strong,.listing-context b{overflow:hidden;font-size:15px;text-overflow:ellipsis;white-space:nowrap}.order-card small,.listing-context small{margin-top:5px;color:#94a3b4;font-size:12px}.order-card>b{border-radius:999px;padding:7px 11px;font-size:11px}.order-card>i{color:#91a2b2;font-size:27px}.listing-context>span:first-child{display:grid;width:28px;height:28px;place-items:center;border:1px solid #526b7d;border-radius:50%;color:#b4c1cb}.listing-context b{margin-top:7px;color:#66b9ff;font-size:12px}
.message-list{grid-row:4;min-height:0;overflow-y:auto;padding:22px 24px 16px;scrollbar-color:#28506f transparent;scrollbar-width:thin}.message-row{display:flex;align-items:flex-end;gap:9px;margin:0 0 14px}.message-row.is-own{justify-content:flex-end}.message-avatar{display:grid;width:38px;height:38px;place-items:center;overflow:hidden;border-radius:12px;background:#18232d;color:#aab8c5;font-weight:800}.message-avatar img{width:100%;height:100%;object-fit:cover}
@keyframes message-in{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
.message-row.is-new-message{transform-origin:bottom center;animation:message-in 230ms ease-out both}
.message-bubble{max-width:min(72%,620px);border:1px solid #222c35;border-radius:18px 18px 18px 7px;background:#151b21;padding:11px 14px;color:#f2f4f6;font-size:14px;line-height:1.45;overflow-wrap:anywhere}.message-row.is-own .message-bubble{border-color:#086bcf;border-radius:18px 18px 7px;background:#075ebc;color:#fff}.message-row.is-system{justify-content:center}.message-row.is-system .message-bubble{border:0;border-radius:999px;background:#161e25;color:#aab7c3;font-size:11px}.message-author{display:flex;align-items:center;gap:5px;margin-bottom:5px;color:#b8c3cd;font-size:11px;font-weight:700}.message-meta{display:flex;align-items:center;justify-content:flex-end;gap:4px;margin-top:5px;line-height:1}.message-time{display:block;margin:0;color:#b6c1cb;font-size:10px;text-align:right}.message-status{display:block;flex:none;width:18px;height:14px;color:#d9efff}.message-status.is-read{color:#75d3ff}.message-status svg{display:block;width:18px;height:14px;fill:none;stroke:currentColor;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round}
.message-attachments{display:grid;gap:8px;margin-top:8px}.message-attachment{display:flex;align-items:center;gap:9px;border-radius:11px;background:rgba(0,0,0,.16);padding:9px;color:inherit}.message-attachment img,.message-attachment video{max-width:270px;max-height:220px;border-radius:9px}.message-attachment span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.completion-card{grid-row:5;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:13px;margin:0 18px 14px;border:1px solid #2b3540;border-radius:16px;background:#151c22;padding:14px}.completion-card[hidden]{display:none}.completion-icon{display:grid;width:38px;height:38px;place-items:center;border-radius:50%;background:var(--blue);color:#fff;font-size:18px}.completion-card>span:nth-child(2){display:grid;gap:4px}.completion-card strong{font-size:14px}.completion-card small{color:#9caab7;font-size:12px;line-height:1.45}.completion-card button{min-height:42px;border-radius:9px;background:var(--blue);padding:0 17px;color:#fff;font-size:13px;font-weight:800}
.composer{position:relative;grid-row:6;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:9px;margin:0 18px 15px;border:1px solid #293541;border-radius:17px;background:#0e151b;padding:8px}.composer textarea{max-height:120px;min-height:40px;resize:none;overflow-y:hidden;border:1px solid #2a3540;border-radius:14px;background:#12191f;padding:10px 13px;color:var(--text);font:inherit;font-size:14px;line-height:1.35;outline:0}.composer textarea:focus{border-color:#3f6079}
.composer textarea.is-support-draft{max-height:min(320px,45dvh)}
.composer-icon,.send-button{display:grid;width:40px;height:40px;place-items:center;border-radius:50%;color:#b9c5cf}.composer-icon:hover{background:#1a252e}.composer-icon svg{width:24px;height:24px;stroke-width:1.8}.send-button{background:var(--blue);color:#fff}.send-button svg{width:22px;height:22px;stroke-width:2}
.attachment-preview{position:absolute;left:8px;right:8px;bottom:61px;display:flex;gap:6px;overflow:auto;border:1px solid #30404c;border-radius:10px;background:#111a22;padding:7px}.attachment-preview[hidden]{display:none}.attachment-chip{max-width:160px;overflow:hidden;border-radius:8px;background:#1e2b35;padding:6px 9px;color:#dce6ed;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
@media(prefers-reduced-motion:reduce){.message-row.is-new-message{animation:none}.message-list{scroll-behavior:auto}}
.chat-modal-layer{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:20px}.chat-modal-layer[hidden]{display:none}.chat-modal-backdrop{position:absolute;inset:0;background:rgba(2,7,11,.76);backdrop-filter:blur(3px)}.chat-modal{position:relative;width:min(520px,100%);max-height:calc(100dvh - 40px);overflow:auto;border:1px solid #2d3945;border-radius:17px;background:#0d141c;color:var(--text);box-shadow:0 24px 70px rgba(0,0,0,.55);animation:modal-in .22s ease-out}
.chat-modal>header{display:flex;align-items:center;justify-content:space-between;padding:20px 22px 0}.chat-modal h2{margin:0;font-size:23px}.chat-modal header button{color:#9eafc0;font-size:27px}#chat-modal-body{padding:20px 22px 23px}.notification-settings-copy{margin:0 0 19px;color:#9dacbe;font-size:14px;line-height:1.5}
.integration-list{display:grid;gap:12px}.integration-button{position:relative;display:flex;align-items:center;justify-content:center;gap:14px;width:100%;min-height:70px;border:1px solid #293542;border-radius:14px;background:#111925;padding:10px 14px;color:#f2f4f6;font-size:14px;font-weight:800;text-align:center}.integration-button:hover{background:#17222d}.integration-icon{position:absolute;left:14px;top:50%;display:block;width:22px;height:22px;overflow:hidden;transform:translateY(-50%)}.integration-icon img{width:100%;height:100%;display:block}.integration-button>span:nth-child(2){flex:none}.integration-button>i{position:absolute;right:14px;top:50%;color:#dce4eb;font-size:26px;font-style:normal;transform:translateY(-50%)}
.notification-list{display:grid;gap:9px}.notification-item{display:grid;grid-template-columns:36px 1fr auto;gap:10px;align-items:start;border:1px solid #293845;border-radius:12px;padding:11px;color:var(--text);text-align:left}.notification-item strong{color:var(--text)}.notification-item.is-unread{border-color:#196ba9;background:#0e2131}.notification-item>span:first-child{display:grid;width:34px;height:34px;place-items:center;border-radius:10px;background:#172c3e;color:#5bb8ff}.notification-item p{margin:4px 0;color:#9fb0bf;font-size:12px}.notification-item time{color:#8496a6;font-size:10px}
.chat-info-peer{display:flex;align-items:center;gap:13px;padding-bottom:16px}.chat-info-peer .chat-avatar{width:52px;height:52px}.chat-info-peer>span:last-child{display:grid;gap:4px}.chat-info-peer small,.chat-info-list dt{color:#8f9eae;font-size:12px}.chat-info-peer strong{font-size:16px}.chat-info-list{margin:0}.chat-info-list>div{display:grid;grid-template-columns:minmax(120px,.8fr) minmax(0,1.2fr);gap:16px;border-top:1px solid #25313b;padding:13px 0}.chat-info-list dt,.chat-info-list dd{margin:0}.chat-info-list dd{color:var(--text);font-size:13px;text-align:right;overflow-wrap:anywhere}.chat-info-presence{display:flex;align-items:center;justify-content:flex-end;gap:7px}.chat-info-presence i{width:9px;height:9px;border-radius:50%;background:#778697}.chat-info-presence i.is-online{background:#20d968}.light .chat-info-list>div{border-color:#d6e0e7}.light .chat-info-peer small,.light .chat-info-list dt{color:#687b8c}
.modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:18px}.modal-actions button{min-height:39px;border:1px solid #34434f;border-radius:9px;padding:0 15px;color:var(--text);font-weight:700}.modal-actions .primary{border-color:var(--blue);background:var(--blue);color:#fff}.chat-toast{position:fixed;z-index:1400;left:50%;bottom:25px;transform:translate(-50%,15px);border:1px solid #34424f;border-radius:11px;background:#151f27;padding:11px 15px;color:#fff;opacity:0;transition:.22s ease}.chat-toast.is-visible{transform:translate(-50%,0);opacity:1}.chat-toast[hidden]{display:none}
.light .chat-shell,.light .chat-sidebar,.light .chat-thread{background:#f7fafc}.light .thread-header{background:#fff}.light .chat-square-button,.light .chat-search,.light .order-card,.light .listing-context,.light .completion-card,.light .composer,.light .composer textarea,.light .chat-modal,.light .integration-button{border-color:#cbd6df;background:#fff;color:#17212c}.light .chat-row{color:#17212c}.light .chat-row-copy p,.light .chat-row-meta,.light .thread-peer small,.light .order-card small,.light .listing-context small,.light .completion-card small{color:#526a80}.light .chat-row.has-unread .chat-row-title strong{color:#17212c}.light .chat-row.has-unread .chat-row-copy p{color:#30485b}.light .message-bubble{border-color:#d2dce4;background:#fff;color:#17212c}.light .message-author{color:#30485b}.light .message-row:not(.is-own) .message-time{color:#526a80}.light .message-row.is-system .message-bubble{background:#e7edf2;color:#526a80}.light .completion-card strong{color:#17212c}.light .notification-settings-copy{color:#526a80}.light .notification-item:not(.is-unread) p,.light .notification-item:not(.is-unread) time{color:#526a80}.light .notification-item.is-unread strong{color:#f4f8fb}.light .notification-item.is-unread p{color:#b8c7d3}.light .notification-item.is-unread time{color:#c7d3dd}.light .thread-menu{border-color:#c7d3dd;background:#fff}.light .thread-menu button{color:#17212c}.light .thread-menu button:hover{background:#eaf0f4}.light .thread-back,.light .thread-more{border:0;background:transparent;color:var(--blue)}.light .thread-back:hover,.light .thread-more:hover{background:#eaf0f4;color:var(--blue)}.light .thread-back:active,.light .thread-more:active{background:#dce7ef;color:var(--blue)}.light .avatar-wrap>i,.light #thread-presence{border-color:#fff}
.light .chat-state p{color:#30485b}.light .chat-state-icon{border-color:#cbd6df;background:#fff;color:#526a80}
@keyframes menu-in{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}@keyframes modal-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}@keyframes thread-content-in{from{opacity:.7;transform:translateX(10px)}to{opacity:1;transform:none}}
@media(max-width:767px){.chat-page.container{width:100%;padding:0 0 95px}.chat-shell{position:relative;display:block;height:calc(100dvh - 190px);min-height:0;border-right:0;border-left:0;border-radius:0}.chat-sidebar,.chat-thread{position:absolute;inset:0;height:100%;transition:opacity .2s ease-in-out,transform .2s ease-in-out,visibility 0s linear .2s;will-change:opacity,transform}.chat-sidebar{z-index:2;border-right:0;opacity:1;transform:none;visibility:visible}.chat-thread{display:block;z-index:1;opacity:0;transform:translateX(10px);visibility:hidden;pointer-events:none}.chat-shell.is-thread-open .chat-sidebar{opacity:0;transform:translateX(-10px);visibility:hidden;pointer-events:none}.chat-shell.is-thread-open .chat-thread{z-index:3;opacity:1;transform:none;visibility:visible;pointer-events:auto;transition-delay:0s}.chat-toolbar{grid-template-columns:46px minmax(0,1fr) 46px;gap:9px;padding:12px}.chat-square-button,.chat-search{height:46px}.chat-list{padding:0 12px 14px}.chat-row{grid-template-columns:58px minmax(0,1fr) auto;gap:11px;min-height:82px;padding:10px 2px}.chat-avatar{width:56px;height:56px;border-radius:17px}.chat-row-meta{min-width:73px}.thread-back,.thread-more{width:46px;height:46px}.thread-header{min-height:70px;gap:9px;padding:8px 10px}.thread-peer .chat-avatar{width:46px;height:46px;border-radius:14px}.thread-peer strong{font-size:15px}.order-card,.listing-context{margin:10px 10px 0;padding:10px}.order-card img{width:50px;height:50px}.order-card strong{font-size:13px}.order-card>b{padding:6px 8px;font-size:10px}.order-card>i{font-size:22px}.message-list{padding:16px 10px 10px}.message-bubble{max-width:83%;font-size:13px}.completion-card{grid-template-columns:auto 1fr;margin:0 10px 8px;padding:11px}.completion-card button{grid-column:2;width:max-content}.composer{margin:0 8px 8px;padding:6px}.composer textarea{font-size:16px}.thread-menu{right:8px;top:61px;width:260px}.chat-modal-layer{align-items:end;padding:0}.chat-modal{width:100%;max-height:88dvh;border-radius:18px 18px 0 0}.chat-modal h2{font-size:21px}.chat-view .site-footer{display:none}}
@media(max-width:767px){.chat-shell.is-thread-open .chat-thread-content{position:relative;min-height:0;overflow:hidden;padding-bottom:calc(58px + max(8px,env(safe-area-inset-bottom),var(--chat-visual-bottom,0px)))}.chat-shell.is-thread-open .composer{position:absolute;right:0;bottom:0;left:0;z-index:5;grid-row:auto;margin-bottom:max(8px,env(safe-area-inset-bottom),var(--chat-visual-bottom,0px))}}
@media(prefers-reduced-motion:reduce){.thread-menu,.chat-modal,.chat-toast,.chat-thread-content{animation:none;transition:none}.chat-sidebar,.chat-thread{transition:none}}

/* Approved chat mockup alignment */
.chat-page-title{margin:0 0 18px;font-size:24px;line-height:1.2}
.chat-avatar,.thread-peer .chat-avatar,.message-avatar{border-radius:50%}
.mute-indicator{display:inline-flex;color:#8e9baa}.mute-indicator svg{width:17px;height:17px;stroke-width:1.8}
.order-badge{display:inline-flex;align-items:center;gap:5px}.order-badge span{font-size:11px}
.date-divider{width:max-content;margin:0 auto 18px;border-radius:999px;background:#151d24;padding:6px 12px;color:#b4c1cc;font-size:11px}

@media(max-width:767px){
  body.chat-view{display:grid;height:100dvh;min-height:0;grid-template-rows:auto minmax(0,1fr);overflow:hidden}
  .chat-view .header.container{grid-template-rows:46px;row-gap:0}
  .chat-view .header .search{display:none!important}
  .chat-page.container{display:grid;min-height:0;grid-template-rows:auto minmax(0,1fr);padding:16px 0 0}
  .chat-page-title{margin:0 12px 12px;font-size:24px}
  .chat-shell{grid-row:2;height:auto;min-height:0}
  .chat-sidebar{display:flex;min-height:0;overflow:hidden;flex-direction:column}
  .chat-toolbar{position:relative;z-index:2;flex:0 0 auto;background:#0a1016}
  .chat-list{min-height:0;flex:1 1 0;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch}
  .light .chat-toolbar{background:#f7fafc}
  body.chat-thread-open{display:grid;height:100dvh;min-height:0;grid-template-rows:auto minmax(0,1fr);overflow:hidden;padding-bottom:0}
  body.chat-thread-open .mobile-bottom-nav{display:none}
  body.chat-thread-open .chat-page.container{height:100%;min-height:0;padding-bottom:0}
  .chat-shell.is-thread-open{height:auto;min-height:0;align-self:stretch}
  .chat-page:has(.chat-shell.is-thread-open){padding-top:0}
  .chat-page:has(.chat-shell.is-thread-open) .chat-page-title{display:none}
  .chat-modal-layer{place-items:center;padding:16px}
  .chat-modal{width:100%;max-height:calc(100dvh - 32px);border-radius:18px}
  .chat-info-list>div{grid-template-columns:minmax(105px,.8fr) minmax(0,1.2fr);gap:12px}
}

/* Chat header controls: keep the hit area, but show only the blue icons at rest. */
button.thread-back,
button.thread-more{
  appearance:none;
  -webkit-appearance:none;
  padding:0;
  border:0;
  outline-offset:3px;
  background-color:transparent;
  box-shadow:none;
}
button.thread-back:hover,
button.thread-more:hover{background-color:#17212b}
button.thread-back:active,
button.thread-more:active{background-color:#202d38}
.light button.thread-back,
.light button.thread-more{border:0;background-color:transparent;box-shadow:none}
.light button.thread-back:hover,
.light button.thread-more:hover{background-color:#eaf0f4}
.light button.thread-back:active,
.light button.thread-more:active{background-color:#dce7ef}

/* Keep the chat viewport intact, then place the shared footer after it. */
@media(max-width:767px){
  html:has(body.chat-view.has-global-footer){overflow-y:auto}
  body.chat-view.has-global-footer,
  body.chat-view.has-global-footer.chat-thread-open{
    display:block;
    height:auto;
    min-height:100dvh;
    overflow-x:hidden;
    overflow-y:auto;
  }
  body.chat-view.has-global-footer .chat-page.container,
  body.chat-view.has-global-footer.chat-thread-open .chat-page.container{
    display:grid;
    height:calc(100dvh - 64px);
    min-height:0;
    grid-template-rows:auto minmax(0,1fr);
  }
  body.chat-view.has-global-footer .chat-list{overscroll-behavior-y:auto}
  body.chat-view.has-global-footer .site-footer{display:block}
}
