/* Final release polish: light-mode parity, stable messaging and animated emoji. */

/* Release-critical layering: notices live in the browser top layer and stay
   readable above dialogs, sticky headers and blurred media. */
#toast,#toast:popover-open {
  position:fixed!important;
  inset:auto max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) auto!important;
  z-index:2147483647!important;
  max-width:min(460px,calc(100vw - 32px));
  margin:0!important;
  border:1px solid rgba(255,255,255,.16)!important;
  color:#fff!important;
  background:#17171b!important;
  box-shadow:0 22px 70px rgba(0,0,0,.65),0 0 0 1px rgba(255,255,255,.04)!important;
  filter:none!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
  isolation:isolate;
}
#toast.error,#toast.error:popover-open { color:#fff!important; border-color:rgba(255,105,129,.48)!important; background:#35151d!important; }
.topbar { background:#070708!important; -webkit-backdrop-filter:none!important; backdrop-filter:none!important; isolation:isolate; }
.listing-media-placeholder { width:58px; height:58px; display:grid; place-items:center; color:#777780; border:1px solid rgba(255,255,255,.09); border-radius:16px; background:#121216; }
.listing-media-placeholder .ui-icon { width:24px; height:24px; }
.deposit-route-fields { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.deposit-route-fields input[readonly] { cursor:default; opacity:.82; }
.deposit-qr { width:148px; height:148px; padding:8px; object-fit:contain; border-radius:12px; background:#fff; }
@media(max-width:560px){
  #toast,#toast:popover-open { inset:auto 12px calc(76px + env(safe-area-inset-bottom)) 12px!important; max-width:none; }
  .deposit-route-fields { grid-template-columns:1fr; }
}
html[data-theme="light"] .screen[data-screen="opportunities"] {
  --resell-panel:#fff;
  --resell-line:rgba(20,20,26,.12);
  --resell-accent-soft:rgba(109,90,230,.1);
}
html[data-theme="light"] .resell-command {
  color:#15151a;
  border-color:var(--resell-line);
  background:radial-gradient(circle at 86% 18%,rgba(109,90,230,.14),transparent 32%),linear-gradient(145deg,#fff,#f1efff 72%);
  box-shadow:0 18px 55px rgba(32,25,70,.08);
}
html[data-theme="light"] .resell-command::after { border-color:rgba(109,90,230,.2); box-shadow:0 0 0 55px rgba(109,90,230,.035),0 0 0 110px rgba(109,90,230,.018); }
html[data-theme="light"] .resell-command h2 { color:#15151a; }
html[data-theme="light"] .resell-command .kicker,html[data-theme="light"] .resell-section-heading .kicker { color:#655b92 !important; }
html[data-theme="light"] .resell-command-copy>p { color:#5f5f69; }
html[data-theme="light"] .resell-summary { border-color:var(--resell-line); background:var(--resell-line); }
html[data-theme="light"] .resell-summary>div,html[data-theme="light"] .resell-summary .accent { color:#17171c; background:rgba(255,255,255,.86); }
html[data-theme="light"] .resell-summary span,html[data-theme="light"] .resell-summary small { color:#696973; }
html[data-theme="light"] .resell-summary .accent strong { color:#5c49d0; }
html[data-theme="light"] .resell-flow,html[data-theme="light"] .resell-toolbar,
html[data-theme="light"] .resell-card,html[data-theme="light"] .resell-empty,
html[data-theme="light"] .resell-active-card,html[data-theme="light"] .resell-dialog-product,
html[data-theme="light"] .resell-dialog-math,html[data-theme="light"] .resell-dialog-math>div { color:#17171c; border-color:var(--resell-line); background:#fff; }
html[data-theme="light"] .resell-flow>div+div { border-color:var(--resell-line); }
html[data-theme="light"] .resell-flow b { color:#5c49d0; background:rgba(109,90,230,.1); }
html[data-theme="light"] .resell-flow small,html[data-theme="light"] .resell-section-heading p,
html[data-theme="light"] .resell-card-description,html[data-theme="light"] .resell-active-copy small { color:#686872; }
html[data-theme="light"] .resell-toolbar input,html[data-theme="light"] .resell-toolbar select { color:#17171c !important; border-color:var(--resell-line) !important; background:#f7f7f9 !important; }
html[data-theme="light"] .resell-toolbar .text-button { color:#555560; }
html[data-theme="light"] .resell-toolbar .text-button:hover { color:#17171c; background:#eeeeF2; }
html[data-theme="light"] .resell-card { background:linear-gradient(145deg,#fff,#f8f8fa); box-shadow:0 12px 36px rgba(20,20,28,.05); }
html[data-theme="light"] .resell-card-media,html[data-theme="light"] .resell-card-placeholder { color:#777381; background:linear-gradient(145deg,#ebe9f5,#f5f4f8); }
html[data-theme="light"] .resell-supplier button { color:#5c49d0; }
html[data-theme="light"] .resell-price-strip { border-color:var(--resell-line); background:var(--resell-line); }
html[data-theme="light"] .resell-price-strip>div { color:#17171c; background:#f8f8fa; }
html[data-theme="light"] .resell-price-strip .profit { background:rgba(109,90,230,.1); }
html[data-theme="light"] .resell-price-strip .profit strong { color:#5c49d0; }
html[data-theme="light"] .resell-card-meta span { color:#62626d; background:#eeeeF2; }
html[data-theme="light"] .resell-empty h3 { color:#17171c; }
html[data-theme="light"] .resell-active-image,html[data-theme="light"] .resell-dialog-product-media { background:#eeedf2; }
html[data-theme="light"] .resell-active-actions a { color:#25252b; border-color:var(--resell-line); }
html[data-theme="light"] .resell-profit-picks button { color:#555560; border-color:var(--resell-line); background:#f7f7f9; }
html[data-theme="light"] .resell-dialog-note { color:#51468a; background:rgba(109,90,230,.1); }

html[data-theme="light"] .profile-popup-avatar { color:#17171c; border-color:var(--line); background:#eeeeF2; }
html[data-theme="light"] .profile-popup-identity>p { color:#4f4f58; }
html[data-theme="light"] .profile-popup-identity>strong { color:#686872; }
html[data-theme="light"] .profile-popup-stats>div { color:#17171c; border-color:var(--line); background:#f5f5f7; }
html[data-theme="light"] .profile-popup-badges span { color:#5947c7; background:rgba(109,90,230,.1); }
html[data-theme="light"] .user-search-result { color:#17171c; border-color:var(--line); background:#f7f7f8; }
html[data-theme="light"] .user-search-profile { color:#17171c; }
html[data-theme="light"] .user-search-message { color:#17171c; border-color:var(--line); background:#ededf0; }

.account-level { margin:18px 0 22px; padding:18px; display:grid; gap:12px; border:1px solid var(--line); border-radius:16px; background:radial-gradient(circle at 92% 0,rgba(111,95,231,.2),transparent 42%),#0c0c0f; }
.account-level>div:first-child { display:grid; grid-template-columns:auto 1fr auto; gap:9px; align-items:center; }
.account-level>div:first-child span { padding:6px 9px; border-radius:999px; color:#d8d3ff; background:rgba(111,95,231,.18); font-size:11px; font-weight:800; }
.account-level>div:first-child strong { font-size:14px; }
.account-level>div:first-child small,.account-level p { color:var(--muted); font-size:10px; }
.account-level p { margin:0; }
.account-level-track { height:8px; overflow:hidden; border-radius:999px; background:rgba(255,255,255,.09); }
.account-level-track i { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,#7058e8,#a795ff); box-shadow:0 0 16px rgba(139,119,255,.45); transition:width .5s cubic-bezier(.2,.8,.2,1); }
html[data-theme="light"] .account-level { color:#17171c; border-color:var(--line); background:radial-gradient(circle at 92% 0,rgba(111,95,231,.13),transparent 42%),#f7f7f9; }
html[data-theme="light"] .account-level-track { background:#dfdfe5; }

.profile-level { display:grid; gap:7px; padding:13px 14px; border:1px solid var(--line); border-radius:13px; background:#0c0c0f; }
.profile-level>div { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.profile-level span { color:#cbc5ff; font-size:11px; font-weight:800; }
.profile-level small { color:var(--muted); }
.profile-level-track { height:6px; overflow:hidden; border-radius:999px; background:rgba(255,255,255,.09); }
.profile-level-track i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#7058e8,#a795ff); }
html[data-theme="light"] .profile-level { color:#17171c; border-color:var(--line); background:#f5f5f7; }
html[data-theme="light"] .profile-level-track { background:#dfdfe5; }

.customer-credit { margin-bottom:18px; padding:20px; display:grid; grid-template-columns:minmax(220px,.8fr) minmax(420px,1.2fr); gap:22px; align-items:end; border:1px solid var(--line); border-radius:18px; background:radial-gradient(circle at 90% 0,rgba(111,95,231,.16),transparent 44%),#0b0b0e; }
.customer-credit h3 { margin:5px 0 7px; }
.customer-credit p { max-width:520px; margin:0; color:var(--muted); line-height:1.55; }
.customer-credit form { display:grid; grid-template-columns:1fr 130px 1fr auto; gap:9px; align-items:end; }
.customer-credit label { display:grid; gap:6px; color:var(--muted); font-size:10px; }
.customer-credit input { min-width:0; height:44px; padding:0 12px; color:var(--text); border:1px solid var(--line); border-radius:11px; background:#111115; }
.customer-credit button { min-height:44px; white-space:nowrap; }
html[data-theme="light"] .customer-credit { color:#17171c; border-color:var(--line); background:radial-gradient(circle at 90% 0,rgba(111,95,231,.11),transparent 44%),#fff; }
html[data-theme="light"] .customer-credit input { color:#17171c; border-color:var(--line); background:#f7f7f9; }
@media(max-width:1050px){.customer-credit{grid-template-columns:1fr}.customer-credit form{grid-template-columns:1fr 120px 1fr auto}}
@media(max-width:720px){.customer-credit{padding:16px}.customer-credit form{grid-template-columns:1fr 1fr}.customer-credit form label:nth-child(3),.customer-credit form button{grid-column:1/-1}}

/* Presence is clear without changing avatar geometry. */
.thread-avatar>i { width:11px!important; height:11px!important; right:-1px!important; bottom:-1px!important; border:2px solid #0d0d0f!important; background:#3ddc84!important; box-shadow:0 0 0 2px rgba(61,220,132,.12),0 0 10px rgba(61,220,132,.45)!important; }
.conversation-person small.online { color:#57d992; }
html[data-theme="light"] .thread-avatar>i { border-color:#fff!important; background:#1ebf6b!important; box-shadow:0 0 0 2px rgba(30,191,107,.12)!important; }

/* Fixed tracks and stable media dimensions stop polling/image loads moving DMs. */
.messenger { contain:layout paint; }
.thread-list { overflow-anchor:none; scrollbar-gutter:stable; }
.message-stream { overflow-anchor:none; scrollbar-gutter:stable; }
.message-media { width:min(420px,78vw); aspect-ratio:4/3; object-fit:contain!important; background:#08080a; }
.message-unit { flex:none; }
.composer:not(.ticket-composer) { grid-template-columns:44px 44px minmax(0,1fr) auto!important; }
.composer:not(.ticket-composer) .composer-attach { grid-column:1!important; }
.composer:not(.ticket-composer) .composer-emoji { grid-column:2!important; }
.composer:not(.ticket-composer)>input { grid-column:3!important; }
.composer:not(.ticket-composer)>.solid-button { grid-column:4!important; }
.composer-emoji { width:44px; height:44px; display:grid; place-items:center; border:1px solid var(--line); border-radius:12px; color:var(--muted); background:transparent; cursor:pointer; }
.composer-emoji:hover { color:var(--text); background:rgba(255,255,255,.05); }
.composer-emoji .ui-icon { width:18px; height:18px; }
.emoji-picker { max-height:310px; padding:12px; overflow:auto; border-top:1px solid var(--line); background:#0a0a0c; }
.emoji-picker-head { margin-bottom:10px; display:flex; align-items:center; justify-content:space-between; }
.emoji-picker-head strong { font-size:12px; }
.emoji-picker-head>span { display:flex; align-items:center; gap:4px; }
.emoji-picker-head button { width:30px; height:30px; border:0; border-radius:8px; color:var(--muted); background:transparent; font-size:20px; cursor:pointer; }
.emoji-picker-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(56px,1fr)); gap:6px; }
.emoji-picker-grid>button { min-height:58px; display:grid; place-items:center; border:1px solid transparent; border-radius:12px; background:transparent; cursor:pointer; }
.emoji-picker-grid>button:hover { border-color:var(--line); background:rgba(255,255,255,.05); }
.animated-emoji { display:block; width:124px; height:124px; object-fit:contain; }
.animated-emoji.compact { width:44px; height:44px; }
.message-unit.emoji-only .animated-emoji { width:132px; height:132px; }
.emoji-pack-empty { min-height:92px; display:grid; place-items:center; gap:5px; color:var(--muted); text-align:center; }
.emoji-pack-empty strong { color:var(--text); font-size:12px; }
.emoji-pack-empty span,.emoji-picker-loading { font-size:10px; }
.emoji-pack-empty .outline-button { min-height:38px; margin-top:5px; }
.emoji-ready { display:flex; align-items:center; gap:8px; }
html[data-theme="light"] .emoji-picker { color:#17171c; border-color:var(--line); background:#fff; }
html[data-theme="light"] .composer-emoji { color:#5f5f69; border-color:var(--line); background:#f7f7f8; }
html[data-theme="light"] .message-media { background:#f0f0f2; }
html[data-theme="light"] .messenger,html[data-theme="light"] .thread-list,html[data-theme="light"] .conversation { background:#fff; }
html[data-theme="light"] .thread.active { color:#17171c; border-color:rgba(22,22,28,.14); background:#ededf0; }
html[data-theme="light"] .thread:hover { background:#f3f3f5; }
html[data-theme="light"] .composer:not(.ticket-composer) { border-color:var(--line)!important; background:#f0f0f2!important; }
html[data-theme="light"] .composer:not(.ticket-composer) .composer-attach { color:#5f5f69!important; border-color:var(--line)!important; background:#f8f8f9!important; }
html[data-theme="light"] .composer:not(.ticket-composer)>input { color:#17171c!important; border-color:var(--line)!important; background:#fff!important; }
html[data-theme="light"] .composer:not(.ticket-composer)>input::placeholder { color:#8a8a94!important; }
html[data-theme="light"] .composer:not(.ticket-composer)>.solid-button { color:#fff!important; background:#17171c!important; }

@media(max-width:760px) {
  .composer:not(.ticket-composer) { grid-template-columns:40px 40px minmax(0,1fr) auto!important; }
  .composer:not(.ticket-composer) .composer-emoji { width:40px; height:40px; }
  .animated-emoji { width:106px; height:106px; }
}
@media(max-width:420px) {
  .composer:not(.ticket-composer) { grid-template-columns:38px 38px minmax(0,1fr) 54px!important; gap:6px!important; }
  .composer:not(.ticket-composer) .composer-attach,.composer:not(.ticket-composer) .composer-emoji { width:38px!important; height:38px!important; }
  .composer:not(.ticket-composer)>input,.composer:not(.ticket-composer)>.solid-button { height:38px!important; min-width:0!important; padding-inline:8px!important; }
}

/* Mobile navigation, notifications and withdrawal reliability. */
.nav-link,.mobile-dock button,.notification-button { position:relative; }
[data-notification-badge] { position:absolute; z-index:3; top:7px; right:8px; min-width:8px; height:8px; padding:0; border:2px solid #0a0a0c; border-radius:999px; color:#fff; background:#ef445f; box-shadow:0 0 0 2px rgba(239,68,95,.12),0 3px 10px rgba(239,68,95,.4); font-size:0; line-height:1; }
.nav-link [data-notification-badge] { top:50%; right:11px; transform:translateY(-50%); }
.notification-button { width:38px; height:38px; display:grid; place-items:center; border:1px solid var(--line); border-radius:50%; color:var(--muted); background:#101012; cursor:pointer; }
.notification-button:hover { color:var(--text); border-color:var(--line-strong); }
.notification-button .ui-icon { width:17px; height:17px; }
.notification-button [data-notification-badge] { top:-1px; right:-1px; }
.mobile-menu-dialog { width:min(520px,calc(100% - 18px)); max-height:min(760px,92dvh); padding:20px; overflow:auto; }
.mobile-menu-head,.mobile-notifications>header { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.mobile-menu-head h2,.mobile-notifications h3 { margin:4px 0 0; }
.mobile-menu-head>button { width:40px; height:40px; border:1px solid var(--line); border-radius:50%; color:var(--muted); background:transparent; font-size:22px; }
.mobile-menu-grid { margin-top:18px; display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.mobile-menu-grid>button { min-width:0; min-height:72px; padding:13px; display:flex; align-items:center; gap:11px; text-align:left; border:1px solid var(--line); border-radius:13px; color:var(--text); background:#111113; }
.mobile-menu-grid>button .ui-icon { width:19px; height:19px; flex:none; color:#a89cff; }
.mobile-menu-grid>button span,.mobile-menu-grid>button strong,.mobile-menu-grid>button small { display:block; min-width:0; }
.mobile-menu-grid>button strong { font-size:12px; }
.mobile-menu-grid>button small { margin-top:4px; color:var(--muted); font-size:9px; }
.mobile-notifications { margin-top:20px; padding-top:18px; border-top:1px solid var(--line); }
.mobile-notifications>header>button { min-height:36px; padding:0 10px; border:0; border-radius:9px; color:var(--muted); background:transparent; font-size:10px; }
.mobile-notifications>header>button:hover { color:var(--text); background:rgba(255,255,255,.05); }
#mobileNotificationList { margin-top:12px; display:grid; gap:7px; }
#mobileNotificationList>p { margin:14px 0; color:var(--muted); font-size:11px; text-align:center; }
.notification-row { width:100%; min-height:66px; padding:11px 12px; display:grid; grid-template-columns:36px minmax(0,1fr) auto; align-items:center; gap:10px; text-align:left; border:1px solid var(--line); border-radius:12px; color:var(--text); background:#0d0d0f; }
.notification-row.unread { border-color:rgba(139,124,255,.25); background:rgba(139,124,255,.07); }
.notification-row>i { width:34px; height:34px; display:grid; place-items:center; border-radius:10px; color:#bbb2ff; background:rgba(139,124,255,.11); }
.notification-row>i .ui-icon { width:16px; height:16px; }
.notification-row span,.notification-row strong,.notification-row small { display:block; min-width:0; }
.notification-row strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; }
.notification-row span>small { margin-top:4px; overflow:hidden; color:var(--muted); font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.notification-row>small { color:var(--muted); font-size:8px; white-space:nowrap; }
html[data-theme="light"] [data-notification-badge] { border-color:#fafafa; }
html[data-theme="light"] .notification-button,html[data-theme="light"] .mobile-menu-grid>button,html[data-theme="light"] .notification-row { color:#17171c; border-color:var(--line); background:#fff; }
html[data-theme="light"] .notification-row.unread { border-color:rgba(92,73,208,.22); background:rgba(109,90,230,.08); }

@media(max-width:760px) {
  button,a,summary { touch-action:manipulation; }
  .mobile-dock { grid-template-columns:repeat(5,minmax(0,1fr))!important; }
  .mobile-dock button { min-height:52px!important; }
  .mobile-dock [data-notification-badge] { top:5px; right:max(7px,18%); }
  #appDialog { max-height:calc(100dvh - 18px)!important; padding:22px 18px calc(22px + env(safe-area-inset-bottom))!important; overflow-x:hidden!important; overflow-y:auto!important; }
  #appDialog form { min-width:0; display:grid; gap:13px; }
  #appDialog form label { min-width:0; }
  #appDialog form input,#appDialog form select,#appDialog form textarea { width:100%; min-width:0; min-height:48px; font-size:16px; }
  #appDialog form>.solid-button { width:100%; min-height:50px; }
  .store-fund-row { grid-template-columns:38px minmax(0,1fr)!important; gap:10px!important; }
  .store-fund-mark { grid-column:1; grid-row:1/3; }
  .store-fund-name { grid-column:2; grid-row:1; }
  .store-fund-available { grid-column:2!important; grid-row:2!important; text-align:left!important; }
  .store-fund-row>[data-store-withdraw] { grid-column:1/-1!important; grid-row:3!important; width:100%!important; min-height:48px!important; margin-top:4px; }
  .money-action summary { min-height:62px; }
  .money-action form .solid-button { min-height:48px; }
  .top-actions { gap:7px; }
}
@media(max-width:390px) {
  .mobile-menu-grid { grid-template-columns:1fr; }
  .mobile-menu-grid>button { min-height:64px; }
  .mobile-dock button span { font-size:8px!important; }
}

/* Stable segmented controls and switches across touch sizes. */
.inbox-switch,.subnav,.theme-tabs{min-width:0;overflow:hidden}.inbox-switch button,.subnav button,.theme-tabs button{min-width:0;min-height:42px;display:flex;align-items:center;justify-content:center;gap:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;touch-action:manipulation}.setting-toggle{min-width:0}.setting-toggle>span{min-width:0}.setting-toggle>input{position:relative;display:block;flex:none}.setting-toggle>input::before{position:absolute;inset:2px auto auto 2px;margin:0!important}
@media(max-width:390px){.inbox-switch button{padding-inline:5px!important;font-size:9px!important}.inbox-switch b{min-width:16px;height:16px;margin-left:2px}}

/* Message requests. */
.inbox-switch{grid-template-columns:repeat(3,minmax(0,1fr))!important;min-width:0;overflow:hidden}.inbox-switch button{min-width:0;padding-inline:6px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:clamp(9px,1.05vw,11px)}.inbox-switch b{min-width:18px;height:18px;margin-left:4px;display:inline-grid;place-items:center;border-radius:999px;color:#fff;background:#ef445f;font-size:9px}.request-review{max-width:640px;margin:auto;padding:clamp(28px,6vw,70px);display:grid;gap:16px;align-content:center}.request-review h3{margin:0;font-size:clamp(24px,4vw,40px)}.request-review>p{margin:0;color:var(--muted);line-height:1.6}.request-preview{padding:22px;border:1px solid var(--line);border-radius:16px;color:var(--text);background:var(--surface);font-size:15px;line-height:1.6}.request-actions{display:flex;gap:9px}.request-actions button{min-width:130px;min-height:48px}.request-thread .thread-copy>span:last-child{font-style:normal}html[data-theme="light"] .request-preview{background:#f4f4f6}@media(max-width:760px){.inbox-switch button{font-size:10px!important}.request-review{padding:26px 20px}.request-actions{display:grid;grid-template-columns:1fr 1fr}.request-actions button{min-width:0;width:100%}}

/* Full-bleed messaging workspace and deliberate scroll ownership. */
html,body{width:100%;max-width:100%;overflow-x:hidden;overflow-x:clip}
.app-shell,.workspace,.workspace main{min-width:0;max-width:100%}
.screen{min-width:0}
.workspace main{overflow-x:hidden;overflow-x:clip}
.screen>*{min-width:0;max-width:100%}
img,video,canvas{max-width:100%}
input,select,textarea{max-width:100%}
.store-ops-tabs,.money-tabs,.subnav{overscroll-behavior-inline:contain}
#appDialog,.mobile-menu-dialog,.emoji-picker{overflow-x:hidden}

body:has(.screen[data-screen="messages"].active){height:100dvh;min-height:0;overflow:hidden!important}
body:has(.screen[data-screen="messages"].active) .app-shell,
body:has(.screen[data-screen="messages"].active) .workspace{height:100dvh;min-height:0;overflow:hidden}
.workspace main:has(>.screen[data-screen="messages"].active){height:calc(100dvh - 74px);min-height:0;padding:0!important;overflow:hidden!important}
.screen[data-screen="messages"]{width:100%;height:100%;min-height:0;max-width:none!important;margin:0!important;padding:0!important;overflow:hidden!important}
.screen[data-screen="messages"].active{display:block!important;animation:none!important}
.screen[data-screen="messages"] .messenger{width:100%;height:100%!important;min-height:0!important;max-width:none;margin:0;overflow:hidden;border:0!important;border-radius:0!important;box-shadow:none!important}
.screen[data-screen="messages"] .thread-column,
.screen[data-screen="messages"] .conversation{height:100%;min-height:0;overflow:hidden}
.screen[data-screen="messages"] .thread-list,
.screen[data-screen="messages"] .message-stream{min-height:0;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain}
.screen[data-screen="messages"] .conversation{display:flex;flex-direction:column}
.screen[data-screen="messages"] .conversation-head,
.screen[data-screen="messages"] .composer,
.screen[data-screen="messages"] .composer-media-preview,
.screen[data-screen="messages"] .emoji-picker{flex:none}

@media(max-width:760px){
  body:has(.screen[data-screen="messages"].active){padding-bottom:0!important}
  .workspace main:has(>.screen[data-screen="messages"].active){height:calc(100dvh - 68px - 66px - env(safe-area-inset-bottom));padding:0!important}
  .screen[data-screen="messages"] .messenger{border-radius:0!important}
  .screen[data-screen="messages"] .thread-column,
  .screen[data-screen="messages"] .conversation{width:100%}
}

.route-error{min-height:180px;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:28px;text-align:center}.route-error strong{color:var(--text);font-size:15px}.route-error span{max-width:460px;color:var(--muted);font-size:12px;line-height:1.55}.route-error button{margin-top:4px;min-height:44px}
