/* JalolBooks paneli – «Suhbatlar» moduli (Telegram ko‘rinishi), panel qobig‘i ichida.
   Manba: suhbatlar/final/suhbatlar.css (dizayn arxivi). Bu yerda: app.css tokenlari va qobig‘i ishlatiladi,
   modul qoidalari .sb ichida (umumiy klasslar bilan to‘qnashmaslik uchun: .crow, .bstack, .ftabs/.ftab, .sb-sk),
   menyu – .sb-menu, rasm oynasi – .sb-lbx, dialog matni – .sb-dp (dialog va toast – panelniki). CSP: inline yo‘q. */

/* ───────────── 1b. Suhbat tokenlari (Telegram ko‘rinishi, panel ranglari ustiga) ─────────────
   Kontrast: hamma matn juftliklari WCAG AA (4.5:1) dan yuqori – test_final.py tekshiradi. */
:root {
  --sb-list-w: 360px;
  --sb-info-w: 340px;
  --sb-thread: #e6e3dc;          /* fon – panelning iliq neytrali, Telegram fonidek */
  --sb-thread-meta: #4f5055;     /* fon ustidagi kichik yozuv (5.6:1) */
  --sb-thread-ok: #155c34;
  --sb-in: #ffffff;   --sb-in-meta: #5f6065;
  --sb-out: #dbe6fb;  --sb-out-meta: #3a4b72; --sb-who: #1d4aa9;
  --sb-ghost: #e9edf6; --sb-ghost-line: #2457c5;
  --sb-kb: rgba(255, 255, 255, .86); --sb-kb-text: #1d3f8f;
  --sb-pill: rgba(48, 46, 40, .74); --sb-pill-text: #ffffff;
  --sb-row-hover: #f1f0ec; --sb-row-sel: #2457c5; --sb-row-sel-text: #ffffff;
  --sb-badge-muted: #6b6c71; --sb-badge-muted-text: #ffffff;
  --sb-draft: #b42318;
  --sb-hl: #fff1a8; --sb-hl-text: #1b1c1e;
  --sb-flash: rgba(36, 87, 197, .22);
  --av-0: #c4423a; --av-1: #ad5810; --av-2: #6450cc; --av-3: #2c7d33; --av-4: #1c8084; --av-5: #2b70bd; --av-6: #bf467e;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sb-thread: #0e1621; --sb-thread-meta: #9aa7b4; --sb-thread-ok: #5fcb8e;
    --sb-in: #182533; --sb-in-meta: #9aabbd;
    --sb-out: #2b5278; --sb-out-meta: #c3d5ea; --sb-who: #b7cdfa;
    --sb-ghost: #17293b; --sb-ghost-line: #7ea4ff;
    --sb-kb: rgba(43, 82, 120, .62); --sb-kb-text: #e6eeff;
    --sb-pill: rgba(255, 255, 255, .14); --sb-pill-text: #eef2f6;
    --sb-row-hover: #222327; --sb-row-sel: #2b5278; --sb-row-sel-text: #ffffff;
    --sb-badge-muted: #4e5f70; --sb-badge-muted-text: #ffffff;
    --sb-draft: #ff8c80;
    --sb-hl: #6a5a12; --sb-hl-text: #fff7d1;
    --sb-flash: rgba(126, 164, 255, .25);
  }
}
:root[data-theme="dark"] {
  --sb-thread: #0e1621; --sb-thread-meta: #9aa7b4; --sb-thread-ok: #5fcb8e;
  --sb-in: #182533; --sb-in-meta: #9aabbd;
  --sb-out: #2b5278; --sb-out-meta: #c3d5ea; --sb-who: #b7cdfa;
  --sb-ghost: #17293b; --sb-ghost-line: #7ea4ff;
  --sb-kb: rgba(43, 82, 120, .62); --sb-kb-text: #e6eeff;
  --sb-pill: rgba(255, 255, 255, .14); --sb-pill-text: #eef2f6;
  --sb-row-hover: #222327; --sb-row-sel: #2b5278; --sb-row-sel-text: #ffffff;
  --sb-badge-muted: #4e5f70; --sb-badge-muted-text: #ffffff;
  --sb-draft: #ff8c80;
  --sb-hl: #6a5a12; --sb-hl-text: #fff7d1;
  --sb-flash: rgba(126, 164, 255, .25);
}

/* ───────────── 4. Suhbatlar moduli: 2 panel (+ yopiq profil) ───────────── */
.sb { position: relative; flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: var(--sb-list-w) minmax(0, 1fr); overflow: hidden; }
.sb.info-push { grid-template-columns: var(--sb-list-w) minmax(0, 1fr) var(--sb-info-w); }
.sb.solo { display: block; overflow-y: auto; }

/* Avatar – chat_id % 7, oq bosh harflar (kontrast ≥ 4.6:1) */
.sb .av { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 18px; letter-spacing: .3px; user-select: none; }
.sb .av-m { width: 40px; height: 40px; font-size: 15px; }
.sb .av-l { width: 88px; height: 88px; font-size: 32px; }
.sb .av-h0 { background: var(--av-0); } .sb .av-h1 { background: var(--av-1); } .sb .av-h2 { background: var(--av-2); } .sb .av-h3 { background: var(--av-3); }
.sb .av-h4 { background: var(--av-4); } .sb .av-h5 { background: var(--av-5); } .sb .av-h6 { background: var(--av-6); }

/* ── Ro‘yxat ── */
.sb .lp { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--surface); border-right: 1px solid var(--line); }
.sb .lp-top { height: 56px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 12px; }
.sb .srch { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; height: 40px; border-radius: var(--r-pill); background: var(--surface-2); padding: 0 6px 0 14px; gap: 8px; }
.sb .srch:focus-within { box-shadow: inset 0 0 0 2px var(--accent); background: var(--surface); }
.sb .srch-ic { font-size: 14px; }
.sb .srch input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; height: 38px; }
.sb .srch input::placeholder { color: var(--text-3); }
.sb .srch input::-webkit-search-cancel-button { display: none; }
.sb .srch-x { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--surface-3); cursor: pointer; font-size: 12px; visibility: hidden; flex: none; }
.sb .srch.has-q .srch-x { visibility: visible; }
.sb .next-btn { width: 64px; height: 40px; flex: none; border: 0; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-variant-numeric: tabular-nums; }
.sb .next-btn:hover { background: var(--accent-hover); }
.sb .next-btn.is-zero { background: var(--surface-2); color: var(--text-3); cursor: default; }

.sb .tabs-wrap { position: relative; height: 44px; flex: none; border-bottom: 1px solid var(--line); }
.sb .ftabs { height: 44px; display: flex; gap: 0; padding: 0 6px; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.sb .ftabs::-webkit-scrollbar { display: none; }
.sb .tabs-wrap.more-r .ftabs { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); }
.sb .tabs-wrap.more-l .ftabs { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); }
.sb .tabs-wrap.more-l.more-r .ftabs { -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 56px), transparent); }
.sb .tabs-more { position: absolute; right: 4px; top: 8px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 16px; line-height: 1; cursor: pointer; display: none; place-items: center; box-shadow: var(--shadow-1); }
.sb .tabs-wrap.more-r .tabs-more { display: grid; }
.sb .ftab { position: relative; flex: none; height: 44px; padding: 0 5px; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 500; font-size: 14px; white-space: nowrap; }
.sb .ftab:hover { color: var(--text); }
.sb .ftab[aria-selected="true"] { color: var(--accent); font-weight: 650; }
.sb .ftab[aria-selected="true"]::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.sb .ftab .tn { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); font-size: 12px; line-height: 20px; font-weight: 700; text-align: center; background: var(--surface-3); color: var(--text-2); font-variant-numeric: tabular-nums; }
.sb .ftab .tn.acc { background: var(--accent); color: var(--on-accent); }
.sb .ftabs.is-search { align-items: center; padding-left: 16px; font-size: 13px; color: var(--text-3); font-weight: 600; }

.sb .rows { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sb .grp-h { height: 32px; display: flex; align-items: center; padding: 0 16px; font-size: 13px; font-weight: 600; color: var(--text-3); background: var(--surface-2); }
/* papka ostidagi qator – har papkada 32px (filtr / izoh), ro‘yxat aylansa ham joyida turadi */
.sb .lp { container-type: inline-size; container-name: lp; }
.sb .subl { height: 32px; flex: none; border-bottom: 1px solid var(--line); }
.sb .row-hint { height: 32px; display: flex; align-items: center; gap: 6px; padding: 0 12px 0 16px; font-size: 12px; line-height: 16px; color: var(--text-3); white-space: nowrap; overflow: hidden; }
.sb .row-hint > span { overflow: hidden; text-overflow: ellipsis; }
.sb .row-hint b { color: var(--text-2); font-weight: 600; }
.sb .row-hint.is-sub { padding-left: 10px; padding-right: 10px; }
.sb .sub { flex: none; height: 24px; padding: 0 7px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.sb .sub b { color: var(--text); font-variant-numeric: tabular-nums; }
.sb .sub:hover { background: var(--surface-2); }
.sb .sub.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sb .sub.on b { color: var(--on-accent); }
.sb .hint-ord, .sb .sub-x { margin-left: auto; flex: none; }
@container lp (max-width: 355px) { .sb .hint-ord { display: none; } 
}
.sb .grp-empty { padding: 10px 16px; font-size: 13px; color: var(--text-3); }
.sb .crow { position: relative; height: 72px; width: 100%; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-rows: 22px 22px; column-gap: 12px; align-content: center; padding: 0 12px; border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--text); }
.sb .crow:hover { background: var(--sb-row-hover); }
.sb .crow .av { grid-row: 1 / 3; }
.sb .r-name { display: flex; align-items: center; gap: 4px; min-width: 0; }
.sb .r-name b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb .r-ic { flex: none; font-size: 14px; }
.sb .r-time { display: flex; align-items: center; gap: 4px; justify-content: flex-end; font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sb .r-stage { font-size: 14px; }
.sb .r-time.w-warn { color: var(--warn); font-weight: 600; }
.sb .r-time.w-bad { color: var(--bad); font-weight: 600; }
.sb .r-prev { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: 14px; }
.sb .r-pre { color: var(--accent); }
.sb .r-pre.draft { color: var(--sb-draft); font-weight: 600; }
.sb .r-pre.warn { color: var(--warn); font-weight: 600; }
.sb .r-badge { justify-self: end; align-self: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--r-pill); font-size: 12px; line-height: 22px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.sb .r-badge.acc { background: var(--accent); color: var(--on-accent); }
.sb .r-badge.ic { padding: 0; width: 26px; height: 26px; line-height: 26px; font-size: 14px; background: var(--bad-soft); box-shadow: inset 0 0 0 1.5px var(--bad); }
.sb .r-badge.ic.pay { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.sb .r-badge.ic.warn { background: var(--warn-soft); box-shadow: inset 0 0 0 1.5px var(--warn); }
.sb .r-badge.ic.dr { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); font-size: 13px; }
.sb .r-badge.muted { background: var(--sb-badge-muted); color: var(--sb-badge-muted-text); }
.sb .r-badge.pinned { background: transparent; font-size: 13px; padding: 0; }
.sb .r-badge.done { background: transparent; color: var(--ok); font-size: 16px; padding: 0; }
.sb .r-badge.none { visibility: hidden; }
.sb .crow.is-sel { background: var(--sb-row-sel); }
.sb .crow.is-sel .r-name, .sb .crow.is-sel .r-time, .sb .crow.is-sel .r-prev, .sb .crow.is-sel .r-pre, .sb .crow.is-sel .r-badge.done { color: var(--sb-row-sel-text); }
.sb .crow.is-sel .r-badge.acc { background: var(--sb-row-sel-text); color: var(--sb-row-sel); }
.sb .crow.is-sel .r-badge.ic { background: #ffffff; }
.sb .crow.is-sel .r-badge.muted { background: rgba(255, 255, 255, .28); }
.sb .crow.is-done:not(.is-sel) .r-prev { color: var(--text-3); }
.sb .crow.pin-last { border-bottom: 1px solid var(--line); }
.sb .crow mark { background: var(--sb-hl); color: var(--sb-hl-text); border-radius: 3px; }
.sb .crow.sb-sk { cursor: default; pointer-events: none; }
.sb .sk-b { display: block; height: 12px; border-radius: 6px; background: var(--surface-3); }
.sb .sk-b.w1 { width: 60%; } .sb .sk-b.w2 { width: 85%; }
.sb .crow.sb-sk .av { background: var(--surface-3); }
.sb .state { min-height: 320px; padding: 48px 24px; text-align: center; color: var(--text-2); display: grid; align-content: center; justify-items: center; gap: 4px; }
.sb .state .big { font-size: 44px; line-height: 56px; }
.sb .state b { color: var(--text); font-size: 16px; }
.sb .state .btn { margin-top: 12px; }

/* ── Suhbat ── */
.sb .cp { position: relative; min-width: 0; min-height: 0; background: var(--sb-thread); display: flex; flex-direction: column; container-type: inline-size; container-name: cp; }
.sb .cp-empty { flex: 1; display: grid; place-items: center; }
.sb .cp-in { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sb .pill-svc { display: inline-block; padding: 3px 12px; border-radius: var(--r-pill); background: var(--sb-pill); color: var(--sb-pill-text); font-size: 13px; line-height: 20px; font-weight: 500; }
.sb .ch { height: 56px; flex: none; display: flex; align-items: center; gap: 4px; padding: 0 8px 0 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.sb .ch-back { display: none; height: 44px; min-width: 44px; padding: 0 8px; border: 0; background: transparent; border-radius: var(--r-pill); cursor: pointer; color: var(--accent); font-size: 22px; font-weight: 600; align-items: center; gap: 2px; }
.sb .ch-back b { font-size: 15px; min-width: 14px; font-variant-numeric: tabular-nums; }
.sb .ch-who { flex: 1; min-width: 0; height: 48px; display: flex; align-items: center; gap: 12px; border: 0; background: transparent; cursor: pointer; text-align: left; padding: 4px 8px 4px 0; border-radius: var(--r-md); }
.sb .ch-who:hover .ch-n b { text-decoration: underline; text-decoration-color: var(--line-strong); }
.sb .ch-n { min-width: 0; display: grid; line-height: 20px; }
.sb .ch-n b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb .ch-st { font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb .ch-st.warn { color: var(--warn); }
.sb .ibtn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; background: transparent; border-radius: 50%; cursor: pointer; font-size: 20px; color: var(--text-2); }
.sb .ibtn:hover { background: var(--surface-2); }

/* qadalgan xabar paneli – 48px, chat ochilganda bir marta hisoblanadi, keyin yo‘qolmaydi */
.sb .pin { height: 48px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.sb .pin.is-none { display: none; }
.sb .pin-segs { width: 3px; height: 34px; display: flex; flex-direction: column; gap: 2px; flex: none; }
.sb .pin-segs i { flex: 1; border-radius: 2px; background: var(--accent); opacity: .35; }
.sb .pin-segs i.on { opacity: 1; }
.sb .pin.t-bad .pin-segs i { background: var(--bad); }
.sb .pin.t-warn .pin-segs i { background: var(--warn); }
.sb .pin.t-ok .pin-segs i { background: var(--ok); }
.sb .pin-body { flex: 1; min-width: 0; border: 0; background: transparent; text-align: left; cursor: pointer; display: grid; line-height: 18px; padding: 4px 0; color: var(--text); }
.sb .pin-body b { font-size: 14px; color: var(--accent); white-space: nowrap; display: flex; align-items: center; gap: 6px; min-width: 0; }
.sb .pin-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sb .pin-n { flex: none; margin-left: auto; height: 20px; padding: 0 8px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text-2); font-size: 12px; line-height: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sb .pin-body:hover .pin-n { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.sb .pin.t-bad .pin-body b { color: var(--bad); }
.sb .pin.t-warn .pin-body b { color: var(--warn); }
.sb .pin.t-ok .pin-body b { color: var(--ok); }
.sb .pin-body span { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb .pin-act { flex: none; height: 36px; min-width: 120px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent); white-space: nowrap; }
.sb .pin-act:hover { background: var(--accent-soft); }
.sb .pin-act.pri { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sb .stp4 { display: inline-flex; flex: none; gap: 3px; }
.sb .stp4 i { width: 14px; height: 4px; border-radius: 2px; background: var(--surface-3); }
.sb .stp4 i.done { background: var(--accent); }

.sb .thr-wrap { position: relative; flex: 1; min-height: 0; }
.sb .thr { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 0 12px; outline: none; }
.sb .thr-in { max-width: 760px; min-height: 100%; margin: 0 auto; padding: 0 16px; display: flex; flex-direction: column; justify-content: flex-end; }
.sb .thr-in > * { flex: none; }
.sb .day-pill { display: flex; justify-content: center; margin: 12px 0 8px; }
.sb .float-date { position: absolute; top: 8px; left: 0; right: 0; display: flex; justify-content: center; pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 2; }
.sb .float-date.on { opacity: 1; }
.sb .svc { display: flex; justify-content: center; margin: 8px 0; }
.sb .svc .pill-svc { font-size: 12px; line-height: 18px; max-width: 90%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb .svc button.pill-svc { border: 0; cursor: pointer; }
.sb .svc button.pill-svc:hover { filter: brightness(1.15); }
.sb .unread-sep { margin: 10px -16px; height: 28px; display: grid; place-items: center; background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 600; }

.sb .msg { display: flex; margin-top: 2px; }
.sb .msg.g-first { margin-top: 8px; }
.sb .msg.out { justify-content: flex-end; }
.sb .bub { position: relative; max-width: min(520px, 76%); padding: 6px 10px 7px 12px; border-radius: 14px; background: var(--sb-in); box-shadow: 0 1px 1px rgba(0, 0, 0, .08); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 21px; }
.sb .msg.out .bub { background: var(--sb-out); }
.sb .msg.in.g-last .bub { border-bottom-left-radius: 4px; }
.sb .msg.out.g-last .bub { border-bottom-right-radius: 4px; }
.sb .msg.in.g-last > .bub::before, .sb .msg.out.g-last > .bub::before, .sb .msg.g-last > .bstack > .bub::before { content: ""; position: absolute; bottom: 0; width: 10px; height: 14px; background: inherit; }
.sb .msg.in.g-last > .bub::before, .sb .msg.in.g-last > .bstack > .bub::before { left: -6px; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.sb .msg.out.g-last > .bub::before, .sb .msg.out.g-last > .bstack > .bub::before { right: -6px; clip-path: polygon(0 0, 100% 100%, 0 100%); }
.sb .msg.in.g-last > .bstack > .bub { border-bottom-left-radius: 4px; }
.sb .msg.out.g-last > .bstack > .bub { border-bottom-right-radius: 4px; }
.sb .bub .who { display: block; font-size: 13px; font-weight: 650; color: var(--sb-who); line-height: 18px; margin-bottom: 1px; white-space: nowrap; }
.sb .m-sp { display: inline-flex; gap: 3px; visibility: hidden; height: 1px; vertical-align: top; padding-left: 14px; font-size: 11px; }
.sb .meta { position: absolute; right: 10px; bottom: 4px; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; line-height: 16px; color: var(--sb-in-meta); white-space: nowrap; font-variant-numeric: tabular-nums; cursor: default; }
.sb .msg.out .meta { color: var(--sb-out-meta); }
.sb .meta .sig { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.sb .meta .gl { min-width: 14px; text-align: center; font-size: 12px; }
.sb .meta .gl.ok { font-weight: 700; }
.sb .meta .gl.bad { color: var(--bad); font-weight: 800; }
.sb .bub.flash { animation: flash 1.2s ease; }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 4px var(--sb-flash), 0 0 0 999px var(--sb-flash) inset; } 100% { box-shadow: 0 1px 1px rgba(0, 0, 0, .08); } }
.sb .msg.failed .bub { box-shadow: inset 0 0 0 1.5px var(--bad); }
.sb .fail-row { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 4px; font-size: 13px; color: var(--bad); font-weight: 600; }
.sb .fail-row button { height: 32px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--bad); background: var(--surface); color: var(--bad); font-weight: 600; cursor: pointer; }
.sb .msg.queued .bub { outline: 1.5px dashed var(--warn); outline-offset: -1.5px; }
.sb .q-cap { display: block; font-size: 12px; color: var(--warn); font-weight: 600; margin-top: 2px; }
.sb .msg.out .q-cap { color: var(--sb-out-meta); }
.sb .mono-c { font-family: var(--mono); font-size: 13px; padding: 0 4px; border-radius: 4px; background: rgba(127, 127, 127, .16); cursor: copy; border: 0; color: inherit; }
.sb .undo-inline { border: 0; background: transparent; color: var(--accent); font-weight: 700; font-size: 12px; cursor: pointer; padding: 0 2px; pointer-events: auto; }
.sb .msg.out .undo-inline { color: var(--sb-out-meta); text-decoration: underline; }

/* media – o‘lcham oldindan band (aspect-ratio), yuklanganda sakramaydi */
.sb .bub.has-media { padding: 3px; }
.sb .bub.has-media .cap { display: block; padding: 4px 8px 2px; }
.sb .bub.has-media .who { padding: 3px 8px 0; }
.sb .bub.has-media:not(.is-file) { width: min-content; }
.sb .ph { position: relative; display: block; border: 0; padding: 0; cursor: zoom-in; border-radius: 11px; overflow: hidden; width: 230px; max-width: 100%; background: transparent; }
.sb .cover { aspect-ratio: 3 / 4; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px; color: #fff; text-align: left; font-weight: 700; font-size: 15px; line-height: 19px; white-space: normal; }
.sb .cover small { display: block; font-weight: 600; font-size: 11px; margin-bottom: 2px; text-transform: uppercase; letter-spacing: .6px; }
.sb .cv0 { background: linear-gradient(160deg, #3e6fd8, #1b3b85); }
.sb .cv1 { background: linear-gradient(160deg, #c8553d, #7a2416); }
.sb .cv2 { background: linear-gradient(160deg, #2f8f6b, #144a37); }
.sb .cv3 { background: linear-gradient(160deg, #8a5fc9, #46287a); }
.sb .cv4 { background: linear-gradient(160deg, #a87618, #5c3d06); }
.sb .album { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 280px; max-width: 100%; border-radius: 11px; overflow: hidden; }
.sb .album .ph { width: auto; border-radius: 0; }
.sb .album .cover { aspect-ratio: 1 / 1; font-size: 13px; line-height: 16px; padding: 8px; }
.sb .album.n3 .ph:first-child { grid-column: 1 / 3; }
.sb .album.n3 .ph:first-child .cover { aspect-ratio: 2 / 1; }
.sb .bub.media-only .meta { right: 9px; bottom: 9px; padding: 0 6px; border-radius: var(--r-pill); background: rgba(0, 0, 0, .6); color: #fff; }
.sb .bub.media-only .m-sp { display: none; }
/* vaqt belgisi rasm ostki o‘ng burchagida – rasmdagi yozuv undan yuqorida turadi (ustma-ust tushmaydi) */
.sb .bub.media-only .cover { padding-bottom: 34px; }
.sb .rcpt { width: 100%; aspect-ratio: 3 / 4; background: linear-gradient(#f7f9fc, #e9eef5); color: #1d2a3a; padding: 40px 16px 18px; display: grid; align-content: start; gap: 6px; text-align: left; font-size: 12px; line-height: 16px; white-space: normal; }
.sb .rcpt .r-logo { font-weight: 800; font-size: 16px; color: #0f6a3d; letter-spacing: .5px; }
.sb .rcpt .r-ok { width: 40px; height: 40px; border-radius: 50%; background: #1d7a4a; color: #fff; display: grid; place-items: center; font-size: 22px; margin: 8px auto 2px; }
.sb .rcpt .r-sum { text-align: center; font-size: 22px; line-height: 28px; font-weight: 800; }
.sb .rcpt .r-l { display: flex; justify-content: space-between; border-top: 1px dashed #b9c3cf; padding-top: 6px; }
.sb .rc-chip { position: absolute; left: 8px; top: 8px; padding: 0 8px; border-radius: var(--r-pill); background: rgba(0, 0, 0, .66); color: #fff; font-size: 12px; line-height: 22px; font-weight: 600; }
.sb .rc-flag { display: block; margin: 3px 0 0; padding: 6px 10px; border-radius: 0 0 11px 11px; background: var(--warn-soft); color: var(--warn); font-size: 13px; line-height: 18px; font-weight: 600; border-left: 3px solid var(--warn); white-space: normal; }
.sb .file { display: flex; align-items: center; gap: 12px; padding: 4px 8px 4px 4px; min-width: 230px; }
.sb .file .f-ic { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 20px; flex: none; }
.sb .file b { display: block; font-size: 14px; line-height: 20px; }
.sb .file span span { font-size: 13px; color: var(--sb-in-meta); }
.sb .msg.out .file span span { color: var(--sb-out-meta); }
.sb .file .rc-mini { display: inline-block; margin-top: 2px; padding: 0 8px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); font-size: 12px; line-height: 20px; font-weight: 600; }

/* bot tugmalari (Telegram inline keyboard) */
.sb .bstack { display: flex; flex-direction: column; align-items: stretch; width: min(460px, 86%); }
.sb .msg.in .bstack { width: 236px; max-width: 86%; }
.sb .msg.in .bstack.file-stack { width: 300px; }
.sb .bstack .bub { max-width: 100%; }
.sb .kb { display: grid; gap: 4px; margin-top: 4px; }
.sb .kb-r { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.sb .kb button, .sb .kb .kb-txt { height: 44px; border: 0; border-radius: 10px; background: var(--sb-kb); color: var(--sb-kb-text); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px; position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; }
.sb .kb button:hover { filter: brightness(.97); }
.sb .kb button.pri { background: var(--accent); color: var(--on-accent); }
.sb .kb button.pri:hover { background: var(--accent-hover); filter: none; }
.sb .kb button.ok { background: var(--ok); color: var(--bg); }
.sb .kb button[aria-disabled="true"] { cursor: not-allowed; opacity: .6; }
.sb .kb .kb-txt { display: block; line-height: 44px; text-align: center; cursor: default; font-weight: 500; color: var(--text-2); background: var(--sb-kb); }
.sb .kb .kb-txt.ok { color: var(--ok); font-weight: 600; }
.sb .kb .kb-txt.bad { color: var(--bad); font-weight: 600; }
.sb .kb .s { display: none; }
.sb .kb kbd { font: 600 11px/16px var(--font); padding: 0 4px; border-radius: 4px; background: rgba(0, 0, 0, .2); }
.sb .kb button:not(.pri) kbd { background: rgba(127, 127, 127, .16); }
.sb .kb-done { height: 44px; margin-top: 4px; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--text-2); border-radius: 10px; background: var(--sb-kb); padding: 0 10px; text-align: center; }
.sb .kb-done.ok { color: var(--ok); font-weight: 600; }
.sb .undo-btn i { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: currentColor; opacity: .55; transform-origin: left; animation: shrink 5s linear forwards; }
@keyframes shrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ── Sevinch qoralamasi – uzuq chegarali «hali yuborilmagan» xabar ── */
.sb .msg.out.ghost .bub { background: var(--sb-ghost); outline: 1.5px dashed var(--sb-ghost-line); outline-offset: -1.5px; box-shadow: none; }
.sb .ghost .bub::before { display: none; }
.sb .g-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; line-height: 18px; font-weight: 650; color: var(--accent); margin-bottom: 2px; white-space: nowrap; }
.sb .g-head span:last-child { color: var(--sb-in-meta); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.sb .q-reply { display: block; border-left: 3px solid var(--accent); padding: 2px 8px; margin: 2px 0 6px; border-radius: 4px; background: rgba(36, 87, 197, .08); font-size: 13px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; border-top: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; color: var(--text-2); }
.sb .q-reply b { display: block; color: var(--accent); }
.sb .msg.out .bub.has-reply .q-reply { border-left-color: var(--sb-who); background: rgba(29, 74, 169, .08); color: var(--sb-out-meta); }
.sb .msg.out .bub.has-reply .q-reply b { color: var(--sb-who); }
.sb .bub.has-media .q-reply { margin: 4px 6px 6px; width: calc(100% - 12px); }
.sb .ph-img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.sb .g-note { display: block; font-size: 13px; line-height: 18px; color: var(--warn); font-weight: 600; margin-bottom: 4px; white-space: normal; }
.sb .g-note.bad { color: var(--bad); }
/* .g-txt va .g-ed – AYNAN bir xil quti (padding + chegara), tahrirga o‘tganda hech narsa sakramaydi */
.sb .g-txt, .sb .g-ed { display: block; margin: -5.5px -9.5px; padding: 4px 8px; border: 1.5px solid transparent; border-radius: 8px; font-size: 15px; line-height: 21px; }
.sb .g-txt { cursor: text; }
.sb .g-txt:hover { background: rgba(127, 127, 127, .08); border-color: var(--line-strong); }
.sb .g-txt.is-old { color: var(--text-2); cursor: default; }
.sb .g-txt.is-old:hover { background: transparent; border-color: transparent; }
.sb .g-note + .g-txt, .sb .g-note + .g-ed { margin-top: -3px; }
.sb .gap { display: inline-block; padding: 0 6px; border: 1.5px dotted var(--warn); border-radius: 6px; background: var(--warn-soft); color: var(--warn); font-weight: 650; cursor: pointer; font-size: 14px; line-height: 19px; }
.sb .g-media { display: block; margin: 6px 0 2px; }
.sb .g-media .album { width: 248px; }
.sb .g-ed { width: calc(100% + 19px); resize: none; border-color: var(--accent); background: var(--surface); color: var(--text); font-family: inherit; outline: none; overflow: hidden; }
.sb .g-foot { height: 18px; margin-top: 6px; display: flex; justify-content: flex-end; font-size: 12px; line-height: 18px; color: var(--sb-thread-meta); white-space: nowrap; overflow: hidden; }
.sb .g-foot.warn { color: var(--warn); font-weight: 600; }
.sb .g-foot.ok { color: var(--sb-thread-ok); font-weight: 600; }
.sb .ghost .kb { height: 92px; align-content: start; }
.sb .ghost.is-rejecting .g-txt { text-decoration: line-through; color: var(--text-2); }
.sb .msg.out.ghost.is-stale .bub { outline-color: var(--warn); }
.sb .ghost.is-stale .g-txt { color: var(--text-2); }
.sb .typing { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.sb .typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: dot 1s infinite ease-in-out; }
.sb .typing i:nth-child(2) { animation-delay: .15s; } .sb .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-3px); opacity: 1; } }
.sb .shake { animation: shake .2s; }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

.sb .fab { position: absolute; right: 16px; bottom: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface); color: var(--text-2); box-shadow: var(--shadow-2); font-size: 22px; cursor: pointer; z-index: 3; }

/* yozish maydoni – bitta qator */
.sb .cmp-zone { position: relative; flex: none; background: var(--surface); border-top: 1px solid var(--line); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
/* xabar yo‘li – yozish maydoni ustida DOIMIY 18px qator (suzib chiqmaydi, hech narsani yopmaydi) */
.sb .cmp-route { max-width: 760px; height: 18px; margin: 0 auto 6px; padding: 0 56px; font-size: 12px; line-height: 18px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb .cmp-route.warn { color: var(--warn); font-weight: 600; }
.sb .cmp-route.bad { color: var(--bad); font-weight: 600; }
.sb .cmp { display: flex; align-items: flex-end; gap: 8px; max-width: 760px; margin: 0 auto; }
.sb .cmp-clip { width: 44px; height: 44px; flex: none; border: 0; background: transparent; border-radius: 50%; cursor: pointer; font-size: 20px; }
.sb .cmp-clip:hover { background: var(--surface-2); }
.sb .cmp-clip[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.sb .cmp textarea { flex: 1; min-width: 0; height: 44px; min-height: 44px; max-height: 152px; resize: none; border: 1px solid var(--line); border-radius: 22px; padding: 10px 16px; color: var(--text); background: var(--surface-2); outline: none; line-height: 22px; overflow-y: auto; }
.sb .cmp textarea:focus { border-color: var(--accent); background: var(--surface); }
.sb .cmp textarea::placeholder { color: var(--text-3); }
.sb .cmp textarea:disabled { cursor: not-allowed; }
.sb .cmp-send { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 19px; cursor: pointer; display: grid; place-items: center; }
.sb .cmp-send:disabled { background: var(--surface-3); color: var(--text-3); cursor: default; }
.sb .cmp-send.q { background: var(--warn); color: var(--bg); }

/* ── Mijoz haqida ── */
.sb .ip { background: var(--surface); border-left: 1px solid var(--line); overflow-y: auto; min-height: 0; }
.sb .ip-h { height: 56px; display: flex; align-items: center; gap: 4px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.sb .ip-h b { flex: 1; font-size: 16px; }
.sb .ip-back { display: none; }
.sb .hero { display: grid; justify-items: center; gap: 4px; padding: 20px 16px 16px; text-align: center; }
.sb .hero .av { margin-bottom: 8px; }
.sb .hero b { font-size: 18px; line-height: 24px; }
.sb .hero > span:not(.av) { font-size: 13px; color: var(--text-3); }
.sb .isec { border-top: 8px solid var(--surface-2); padding: 4px 0; }
.sb .isec-h { display: flex; align-items: center; height: 40px; padding: 0 16px; font-size: 14px; font-weight: 650; color: var(--accent); }
.sb .irow { display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 6px 16px; width: 100%; border: 0; background: transparent; text-align: left; color: var(--text); }
.sb button.irow { cursor: pointer; }
.sb button.irow:hover { background: var(--surface-2); }
.sb .irow .ii { width: 24px; text-align: center; font-size: 18px; flex: none; }
.sb .irow .iv { flex: 1; min-width: 0; display: grid; line-height: 20px; }
.sb .irow .iv b { font-weight: 500; font-size: 15px; overflow-wrap: anywhere; }
.sb .irow .iv span { font-size: 13px; color: var(--text-3); line-height: 18px; }
.sb .irow .iv span.warn { color: var(--warn); }
.sb .irow .iv span.bad { color: var(--bad); }
.sb .sw { width: 46px; height: 26px; flex: none; border-radius: 13px; background: var(--surface-3); position: relative; border: 0; cursor: pointer; }
.sb .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .15s; }
.sb .sw[aria-checked="true"] { background: var(--ok); }
.sb .sw[aria-checked="true"]::after { transform: translateX(20px); }
.sb .sw[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.sb .ord { padding: 10px 16px; display: grid; gap: 6px; border: 0; background: transparent; width: 100%; text-align: left; cursor: pointer; color: var(--text); }
.sb .ord:hover { background: var(--surface-2); }
.sb .ord-1 { display: flex; justify-content: space-between; font-weight: 650; font-variant-numeric: tabular-nums; }
.sb .ord-it { font-size: 13px; color: var(--text-2); }
.sb .stp { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.sb .stp i { height: 4px; border-radius: 2px; background: var(--surface-3); }
.sb .stp i.done { background: var(--accent); }
.sb .ord-st { font-size: 13px; color: var(--text-2); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sb .flag { color: var(--warn); font-weight: 600; }
.sb .mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 0 16px 12px; }
.sb .mgrid .ph { width: auto; border-radius: 6px; }
.sb .mgrid .cover { aspect-ratio: 1 / 1; font-size: 11px; line-height: 13px; padding: 6px; }
.sb .mgrid .cover small { font-size: 9px; }
.sb .lead { margin: 8px 16px 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--ok-soft); font-size: 14px; line-height: 20px; display: grid; gap: 4px; }
.sb .lead b { color: var(--ok); }
.sb .ph-empty { padding: 0 16px 12px; font-size: 13px; color: var(--text-3); min-height: 32px; }
.sb .qbox { margin: 0 16px 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--warn-soft); font-size: 14px; line-height: 20px; }
.sb .qbox p { margin: 0 0 8px; color: var(--text); }
.sb .qbox .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.sb details.more summary { list-style: none; cursor: pointer; height: 48px; display: flex; align-items: center; padding: 0 16px; font-weight: 600; color: var(--text-2); }
.sb details.more summary::-webkit-details-marker { display: none; }
.sb details.more summary::after { content: "▾"; margin-left: auto; }
.sb details.more[open] summary::after { content: "▴"; }
.sb .sb-scrim { position: absolute; inset: 0; background: var(--scrim); z-index: 5; }

/* ── menyu, dialog, toast, lightbox ── */
.sb-menu { position: fixed; z-index: 50; min-width: 260px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-2); }
.sb-menu button { display: flex; align-items: center; gap: 12px; width: 100%; height: 44px; padding: 0 12px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; text-align: left; font-size: 15px; color: var(--text); }
.sb-menu button:hover, .sb-menu button:focus-visible { background: var(--surface-2); }
.sb-menu button[aria-disabled="true"] { color: var(--text-3); cursor: not-allowed; }
.sb-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
/* toast ro‘yxat ustunining pastida turadi – qoralama tugmalari va yozish maydonini hech qachon yopmaydi */

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sb-lbx { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .86); display: grid; place-items: center; }
.sb-lbx-in { width: min(420px, 86vw); }
.sb-lbx-in .ph, .sb-lbx-in .rcpt { width: 100%; cursor: default; }
.sb-lbx-x { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: #fff; font-size: 20px; cursor: pointer; }
.sb-lbx-x:hover { background: rgba(255, 255, 255, .12); }
.sb-dp .keys { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; align-items: baseline; }
.sb-dp .keys kbd { display: inline-block; min-width: 20px; height: 22px; padding: 0 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); color: var(--text); font: 600 12px/19px var(--font); text-align: center; white-space: nowrap; }

/* ───────────── 5. Kenglik qoidalari ───────────── */
/* Tor suhbat paneli (768 da ~384px): tugmalar qisqa yozuvda */
@container cp (max-width: 560px) {
  .sb .kb .l { display: none; } .sb .kb .s { display: inline; }
  .sb .kb kbd { display: none; }
  .sb .kb button, .sb .kb .kb-txt { font-size: 13px; padding: 0 4px; gap: 4px; }
  .sb #ghost .bstack { width: 100%; }
  .sb .kb-r { display: flex; }
  .sb .kb-r > * { flex: 1 1 auto; min-width: 0; }
  .sb .cmp-route { padding: 0 4px; }
  .sb .pin-act { min-width: 0; padding: 0 12px; }
  .sb .stp4 { display: none; }

}
@media (max-width: 1399px) {
  .sb.info-push { grid-template-columns: var(--sb-list-w) minmax(0, 1fr); }
  .sb .ip { position: absolute; top: 0; right: 0; bottom: 0; width: var(--sb-info-w); z-index: 6; box-shadow: var(--shadow-2); }

}
@media (max-width: 1099px) {
  :root { --sb-list-w: 340px; }

}
@media (max-width: 760px) {
  body.in-chat .top, body.in-chat .bnav, body.in-chat #banners { display: none; }
  /* Telegram mobil kabi: ro‘yxatga qaytganda tanlangan qator bo‘yalmaydi */
  .sb .crow.is-sel { background: transparent; }
  .sb .crow.is-sel .r-name, .sb .crow.is-sel .r-prev { color: var(--text); }
  .sb .crow.is-sel .r-prev { color: var(--text-2); }
  .sb .crow.is-sel .r-time { color: var(--text-3); }
  .sb .crow.is-sel .r-pre { color: var(--accent); }
  .sb .crow.is-sel .r-pre.draft { color: var(--sb-draft); }
  .sb .crow.is-sel .r-badge.ic { background: var(--bad-soft); }
  .sb .crow.is-sel .r-badge.ic.dr, .sb .crow.is-sel .r-badge.ic.pay { background: var(--accent-soft); }
  .sb .crow.is-sel .r-badge.muted { background: var(--sb-badge-muted); }
  .sb .crow.is-sel .r-badge.done { color: var(--ok); }
  .sb .crow.is-sel .r-time.w-warn { color: var(--warn); } .sb .crow.is-sel .r-time.w-bad { color: var(--bad); }
  .sb, .sb.info-push { display: block; }
  .sb .lp, .sb .cp, .sb .ip { position: absolute; inset: 0; width: auto; border: 0; }
  .sb .lp { --sb-list-w: 100%; transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
  .sb .cp { transform: translateX(100%); transition: transform .22s cubic-bezier(.2, .8, .2, 1); z-index: 2; box-shadow: var(--shadow-2); visibility: hidden; }
  .sb.pane-chat .lp { transform: translateX(-20%); }
  .sb.pane-chat .cp { transform: translateX(0); visibility: visible; }
  .sb .ip { z-index: 7; box-shadow: none; }
  .sb .sb-scrim { display: none; }
  .sb .ch { padding: 0 4px; }
  .sb .ch-back { display: inline-flex; }
  .sb .ip-back { display: grid; }
  .sb .ip-x { display: none; }
  .sb .thr-in { padding: 0 8px; }
  .sb .unread-sep { margin: 10px -8px; }
  .sb .bub { max-width: 86%; }
  .sb .bstack { width: 90%; }
  .sb .ph { width: 220px; } .sb .msg.in .bstack { width: 226px; } .sb .msg.in .bstack.file-stack { width: 280px; }
  .sb .album, .sb .g-media .album { width: 232px; }
  .sb .cmp-zone { padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
  .sb .cmp { gap: 4px; }
  body.in-chat .toasts { top: 64px; bottom: auto; }
  .sb-lbx-in { width: 86vw; }
  .sb-menu { min-width: 0; width: min(300px, calc(100vw - 16px)); }

}
@media (hover: none) { .sb .kb kbd, .sb .hint-kbd { display: none; } 
}
@media (prefers-reduced-motion: reduce) {
  .sb *, .sb *::before, .sb *::after { animation: none !important; transition: none !important; }

}

/* ───────────── 6. Panel ichida (qobiq bilan ulanish) ───────────── */
/* toast – panelning yagona toast komponenti; Suhbatlarda ro‘yxat ustunining pastida turadi (qoralama tugmalari va yozish maydonini yopmaydi) */
@media (min-width: 761px) {
  body.on-chat .toasts { left: calc(var(--side-w) + 12px); right: auto; width: min(400px, calc(var(--sb-list-w) - 24px)); }
}
/* panelning umumiy klasslari modul ichida ham bir xil ko‘rinadi */
.sb .btn.sm { flex: none; }
.sb .state { padding: 48px 24px; }
.sb-dp { display: grid; gap: 12px; }
.sb-dp p { margin: 0; }
.sb-dp .items td.hk { width: 1%; white-space: nowrap; padding-right: 12px; }
/* panelning umumiy <kbd> uslubi tugma ichida rangni buzmasin – tugma matni rangida */
.sb .pin-act[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.sb .kb kbd { color: inherit; border: 0; min-width: 0; height: auto; display: inline; }
