/* Review v2 «Мессенджер» — web client. Tokens from the ТЗ (docs/ui-v2/ТЗ.txt, «Раскладка и основа»). Dark only. */
:root {
  --chat-bg: #151A21; --surface: #1A1F27; --raised: #222935; --raised-2: #2A3240; --line: #2C3441;
  --text: #E9ECF1; --text-2: #C7CDD6; --muted: #8C95A3; --faint: #5C6573;
  --amber: #F2B84B; --on-amber: #1F1604; --on-amber-meta: #5A410C;
  --coral: #FF6B5B; --on-coral: #1E0A07; --mint: #5ED3A0; --link: #8EC5FF;
  --tile-in: #4FC8D8; --tile-sr: #A99CF0; --tile-ef: #F5A97F; --tile-su: #7FD6A6; --tile-none: #6B717C;
  --hover: #323B4B; --sep: #222935;
  --font: Geologica, system-ui, "Segoe UI", sans-serif;
  --mono: Consolas, ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--chat-bg); color: var(--text); font: 15px/21px var(--font); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
::selection { background: rgba(242, 184, 75, .35); }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.s14 { width: 14px; height: 14px; } .ic.s15 { width: 15px; height: 15px; } .ic.s20 { width: 20px; height: 20px; } .ic.s22 { width: 22px; height: 22px; }
mark { background: rgba(242, 184, 75, .25); color: inherit; border-radius: 3px; padding: 0 1px; }
.me mark { background: rgba(31, 22, 4, .15); }
kbd { font-family: var(--font); font-size: 12px; padding: 3px 7px; border-radius: 6px; background: var(--raised); border: 1px solid var(--line); color: var(--text); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------------------------------------------ buttons */
.ib { width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 0; position: relative; }
.ib:hover { background: var(--raised); color: var(--text); }
.ib.on { background: var(--raised); color: var(--text); }
.ib.sm { width: 28px; height: 28px; border-radius: 8px; }
.btn-primary { border: 0; background: var(--amber); color: var(--on-amber); font-weight: 600; border-radius: 999px; height: 44px; padding: 0 20px; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:disabled { opacity: .5; cursor: default; }
.btn-line { height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid #3A4352; background: transparent; color: var(--text); font-size: 13px; font-weight: 600; white-space: nowrap; }
.btn-line:hover { background: var(--raised); }
.btn-soft { height: 40px; padding: 0 16px; border-radius: 12px; border: 0; background: var(--raised); color: var(--text); font-size: 14px; font-weight: 500; }
.btn-soft:hover { background: var(--raised-2); }

/* ------------------------------------------------------------------ login (first launch) */
.login { min-height: 100%; display: flex; justify-content: center; background: var(--chat-bg); }
.login-box { width: 100%; max-width: 420px; min-height: 100vh; display: flex; flex-direction: column; padding: 0 24px 28px; }
.login-hero { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding-top: 40px; }
.login-hero h1 { margin: 0; font-size: 40px; line-height: 44px; font-weight: 700; letter-spacing: -0.02em; }
.login-sub { margin: 6px 0 0; font-size: 16px; line-height: 23px; color: var(--text-2); }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.fld input { height: 48px; padding: 0 16px; border-radius: 14px; border: 0; background: var(--raised); color: var(--text); font-size: 15px; }
.fld input[readonly] { color: var(--text-2); }
.fld input:focus-visible { outline: none; box-shadow: inset 0 0 0 1.5px var(--amber); }
#login-token { box-shadow: inset 0 0 0 1.5px var(--amber); }
.login-error { margin: 0; color: var(--coral); font-size: 13px; line-height: 18px; min-height: 0; }
.login-error:empty { display: none; }
.login-note { margin: 0; font-size: 13px; line-height: 18px; color: var(--muted); }
.login-btn { height: 52px; margin-top: 6px; border-radius: 26px; font-size: 16px; }

/* ------------------------------------------------------------------ frame: three columns ≥ 1100 px */
.app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.cols { flex: 1; min-height: 0; display: flex; }
.side { width: 340px; flex: none; background: var(--surface); display: flex; flex-direction: column; position: relative; min-height: 0; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; border-left: 1px solid var(--sep); background: var(--chat-bg); min-height: 0; position: relative; }
.info { width: 300px; flex: none; background: var(--surface); border-left: 1px solid var(--sep); display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.netbar { flex: none; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 8px 16px; background: var(--coral); color: var(--on-coral); font-size: 14px; font-weight: 500; }
.netbar button { height: 30px; padding: 0 14px; border-radius: 15px; border: 1px solid rgba(30, 10, 7, .45); background: transparent; color: var(--on-coral); font-weight: 600; font-size: 13px; }
.netbar button:hover { background: rgba(30, 10, 7, .1); }
.app.nonet .main .chat-scroll, .app.nonet .main .pinned { opacity: .6; }

/* ------------------------------------------------------------------ list column */
.side-top { position: relative; flex: none; padding: 12px 10px 0; }
.side-head { display: flex; align-items: center; gap: 8px; padding: 0 4px 8px; }
.sfield { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 20px; background: var(--raised); color: var(--muted); font-size: 14px; border: 0; text-align: left; }
.sfield:hover { color: var(--text-2); }
.sfield.on { padding: 0 6px 0 14px; box-shadow: inset 0 0 0 1.5px var(--amber); color: var(--text); }
.sfield input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--text); font-size: 14px; }
.sfield input::placeholder { color: var(--muted); }
.sfield input::-webkit-search-cancel-button { display: none; }
.loadbar { position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; overflow: hidden; z-index: 2; }
.loadbar::before { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; background: var(--amber); animation: loadbar 1.1s ease-in-out infinite; }
@keyframes loadbar { 0% { left: -40%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .loadbar::before { animation: none; left: 0; width: 100%; opacity: .6; } }
.side-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 10px 96px; display: flex; flex-direction: column; gap: 4px; }
.side-plaque { position: absolute; left: 12px; right: 12px; bottom: 16px; z-index: 3; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--raised); box-shadow: 0 6px 24px rgba(0, 0, 0, .45); font-size: 14px; line-height: 20px; color: var(--text); }
.side-plaque .ic { color: var(--muted); margin-top: 1px; }
.side-plaque.coral { background: #3A2326; }
.fab { position: absolute; right: 16px; bottom: 20px; z-index: 4; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--amber); color: var(--on-amber); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
.fab:hover { filter: brightness(1.06); }
.app[data-mode="search"] .fab { display: none; }

/* PC strip: collapsed timeline of the two slots */
.pc { margin: 0 4px 8px; padding: 10px 12px; border-radius: 14px; background: var(--chat-bg); display: flex; flex-direction: column; gap: 7px; cursor: default; position: relative; border: 0; color: inherit; text-align: left; width: auto; }
.pc-l1 { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 18px; min-width: 0; }
.pc-l1 b { font-weight: 600; }
.pc-l1 .r { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pc-lanes { position: relative; display: flex; flex-direction: column; gap: 4px; cursor: pointer; padding: 3px 0; margin: -3px 0; }
.pc-lanes.dim { opacity: .4; }
.lane { position: relative; height: 6px; border-radius: 3px; background: var(--raised); }
.seg { position: absolute; top: 0; height: 6px; border-radius: 3px; display: block; padding: 0; border: 0; cursor: pointer; }
.seg:hover { filter: brightness(1.25); }
.seg.q { background: transparent; border: 1px dashed; box-sizing: border-box; }
.pc-now { position: absolute; top: -3px; bottom: -3px; width: 2px; border-radius: 1px; background: var(--text); transform: translateX(-1px); pointer-events: none; }
.pc-hatch { position: absolute; top: 0; bottom: 0; right: 0; pointer-events: none; border-radius: 0 3px 3px 0;
  background: repeating-linear-gradient(135deg, rgba(255, 107, 91, .25) 0 3px, transparent 3px 6px); }
.pc-times { position: relative; height: 14px; font-size: 11px; line-height: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pc-times span { position: absolute; top: 0; white-space: nowrap; }
.pc-pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; padding: 12px 14px; border-radius: 14px; background: var(--raised); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); font-size: 13px; line-height: 18px; display: flex; flex-direction: column; gap: 8px; }
.pc-pop .slot { display: flex; gap: 8px; align-items: flex-start; }
.pc-pop .slot b { font-weight: 600; width: 16px; flex: none; color: var(--muted); }
.pc-pop .slot .t { color: var(--text); }
.pc-pop .slot .m { color: var(--muted); }

/* filters */
.filters { display: flex; gap: 6px; padding: 0 4px 6px; font-size: 13px; flex-wrap: wrap; }
.pill { position: relative; height: 31px; padding: 0 12px; border-radius: 999px; background: var(--raised); color: var(--muted); border: 0; font-size: 13px; line-height: 31px; white-space: nowrap; }
.pill.hot { color: var(--text); }
.pill:hover { color: var(--text); }
.pill.on { background: var(--text); color: var(--chat-bg); font-weight: 600; }
.daychip { display: flex; align-items: center; gap: 6px; margin: 0 4px 6px; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--raised); font-size: 13px; color: var(--text-2); }
.daychip span { flex: 1; }

/* chat row */
.row { display: flex; gap: 12px; padding: 9px 12px; border-radius: 12px; align-items: center; color: var(--text); background: transparent; border: 0; width: 100%; text-align: left; min-height: 66px; text-decoration: none; position: relative; flex: none; }
.row:hover { background: var(--raised); text-decoration: none; }
.row.sel { background: var(--raised-2); }
.row.sel .mut, .row.sel .rt, .row.sel .pv:not(.amb):not(.txt):not(.cor), .mi.on .s, .sumrow:hover .meta { color: var(--text-2); }
.row.sel .rt .amb { color: var(--amber); }
.row.drag-over { box-shadow: inset 0 2px 0 var(--amber); }
.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-l { display: flex; gap: 6px; align-items: center; min-width: 0; }
.row-l .ic { width: 14px; height: 14px; }
.nm { flex: 1; min-width: 0; font-size: 15px; line-height: 21px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nm.q { color: var(--text-2); }
.rt { font-size: 12px; line-height: 16px; flex: none; font-variant-numeric: tabular-nums; color: var(--muted); }
.pv { flex: 1; min-width: 0; font-size: 14px; line-height: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.mut { color: var(--muted); } .amb { color: var(--amber); } .cor { color: var(--coral); } .mnt { color: var(--mint); } .txt { color: var(--text); } .t2 { color: var(--text-2); } .lnk { color: var(--link); }
.cnt { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--coral); color: var(--on-coral); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; font-variant-numeric: tabular-nums; }
.dots { display: inline-flex; gap: 3px; flex: none; align-items: center; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--amber); opacity: .4; }
.dots i:nth-child(2) { opacity: 1; }
@keyframes dots { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .dots i { animation: dots 1.2s infinite; opacity: .25; }
  .dots i:nth-child(2) { animation-delay: .15s; }
  .dots i:nth-child(3) { animation-delay: .3s; }
}
.grp { font-size: 13px; color: var(--muted); padding: 12px 12px 6px; }

/* avatar: 36 px tile + 3 px ring (48 px), 88 px in Info */
.av { position: relative; width: 48px; height: 48px; flex: none; }
.av svg { position: absolute; inset: 0; }
.av .tile { position: absolute; inset: 6px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--chat-bg); line-height: 1; }
.av.xl { width: 88px; height: 88px; }
.av.xl .tile { inset: 10px; font-size: 22px; }
.av.md { width: 40px; height: 40px; }
.av.md .tile { inset: 5px; font-size: 11px; }
.tile.sm { position: static; width: 40px; height: 40px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--chat-bg); }

/* empty states */
.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 24px 28px 80px; color: var(--muted); font-size: 14px; line-height: 20px; }
.empty h3 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 600; color: var(--text); }
.empty .btn-primary { margin-top: 4px; }
.keys { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------------ chat column */
.chead { height: 60px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 12px 0 20px; background: var(--surface); }
.chead-t { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0; text-align: left; color: inherit; cursor: default; display: block; }
.chead-t .h { font-size: 16px; line-height: 22px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chead-t .s { font-size: 13px; line-height: 18px; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; color: var(--muted); }
.chead-t .s.amb { color: var(--amber); } .chead-t .s.cor { color: var(--coral); } .chead-t .s.mnt { color: var(--mint); }
.chead-t .s span.e { overflow: hidden; text-overflow: ellipsis; }
.chead .back { display: none; }
.chead .badge { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--coral); color: var(--on-coral); font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
.chead .av.md { display: none; }
.findbar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.findbar .sfield { flex: 1; }
.findbar .n { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.pinned { flex: none; display: flex; align-items: center; gap: 12px; padding: 8px 20px; background: var(--surface); border-top: 1px solid var(--sep); font-size: 13px; line-height: 18px; cursor: pointer; border-left: 0; border-right: 0; border-bottom: 0; color: inherit; text-align: left; width: 100%; }
.pinned:hover { background: #1E242D; }
.pinned .bar { width: 3px; align-self: stretch; border-radius: 2px; flex: none; }
.pinned .pb { flex: 1; min-width: 0; }
.pinned .pb .a { font-weight: 600; }
.pinned .pb .c { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pinned .tm { color: var(--muted); font-variant-numeric: tabular-nums; }
.banner { flex: none; display: flex; align-items: center; gap: 14px; padding: 12px 20px; background: var(--raised); border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; }
.banner .bi { width: 36px; height: 36px; border-radius: 50%; background: var(--chat-bg); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.banner .bt { flex: 1; min-width: 0; }
.banner .bt b { font-weight: 600; }
.banner .bt span { color: var(--text-2); }
.banner.coral { background: rgba(255, 107, 91, .1); border-top-color: rgba(255, 107, 91, .25); }
.banner.coral .bi { color: var(--coral); }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.chat-inner { min-height: 100%; padding: 20px; display: flex; flex-direction: column; gap: 8px; justify-content: flex-end; }
.chat-inner.center { align-items: center; }
/* «Новые сообщения»: reading above while new ones came — a zero-height sticky strip, nothing moves */
.newmsgs { position: sticky; bottom: 0; height: 0; display: flex; justify-content: center; pointer-events: none; }
.newmsgs button { pointer-events: auto; transform: translateY(calc(-100% - 12px)); display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px 0 10px; border-radius: 17px; border: 1px solid var(--line); background: var(--raised-2); color: var(--text);
  font: inherit; font-size: 13px; font-weight: 600; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); cursor: pointer; }
.newmsgs button:hover { background: var(--hover); }
.newmsgs .ic { width: 16px; height: 16px; color: var(--amber); }
.dplq { align-self: center; font-size: 12px; line-height: 16px; padding: 4px 10px; border-radius: 999px; background: var(--raised); color: var(--text-2); margin: 6px 0; }
.dplq:first-child { margin-top: 0; }

/* bubbles */
.b { max-width: 480px; padding: 9px 13px 7px; border-radius: 16px; font-size: 15px; line-height: 21px; background: var(--raised); border-bottom-left-radius: 6px; align-self: flex-start; overflow-wrap: anywhere; position: relative; }
.b .tx { white-space: pre-wrap; }
.b .tx, .b .det, .b .fw { user-select: text; -webkit-user-select: text; cursor: text; }   /* chat text is copied (Федор 10.11.2026) */
.b.me { align-self: flex-end; background: var(--amber); color: var(--on-amber); border-bottom-left-radius: 16px; border-bottom-right-radius: 6px; }
.b.me a { color: #3D2A05; text-decoration: underline; }
/* a Windows path in a message: opens in Explorer on the PC (right click — copy) */
.pl { overflow-wrap: anywhere; }
.pl .ic { width: 14px; height: 14px; vertical-align: -2px; margin-right: 3px; }
.b.me .pl .ic { color: #3D2A05; }
.b.ask { box-shadow: inset 0 0 0 1px rgba(255, 107, 91, .4); }
.b.hit { box-shadow: 0 0 0 3px var(--chat-bg), 0 0 0 5px var(--amber); }
.b .fw { display: block; font-size: 12px; line-height: 16px; color: var(--link); margin-bottom: 2px; white-space: normal; }
.b .det { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 13px; line-height: 19px; color: var(--text-2); white-space: pre-wrap; }
.meta { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 11px; line-height: 15px; margin-top: 2px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.b.me .meta { color: var(--on-amber-meta); }
.meta button.more { border: 0; background: transparent; padding: 0; font-size: 11px; color: var(--muted); text-decoration: underline; }
.meta button.more:hover { color: var(--text); }
/* «Трекер»: a results table in Claude's message (a row per clip, details open under the row) */
.b.hastrk { width: 100%; max-width: 480px; box-sizing: border-box; }
.b .tx + .trk { margin-top: 8px; }
.trk { margin: 2px -4px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.trk-h { padding: 8px 12px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--text-2); border-bottom: 1px solid var(--line); }
.trk-r + .trk-r { border-top: 1px solid var(--line); }
.trk-r > .trk-i, .trk-b > .trk-i { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.trk-r:not(.has) { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; }
.trk-b { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 8px 12px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.trk-b:hover { background: var(--hover); }
.trk-t { flex: 1; min-width: 0; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.trk-t b { font-weight: 700; }
.trk-i circle { fill: none; stroke-width: 1.8; }
.trk-i path { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.trk-i.ok circle, .trk-i.ok path { stroke: var(--mint); }
.trk-i.bad circle, .trk-i.bad path { stroke: var(--coral); }
.trk-ch { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.trk-b[aria-expanded="true"] .trk-ch { transform: rotate(180deg); }
.trk-d { padding: 0 12px 9px 40px; font-size: 13px; line-height: 19px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.meta .clk { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.hint { align-self: flex-end; font-size: 12px; line-height: 16px; color: var(--muted); margin-top: -4px; }
.skel { height: 52px; border-radius: 16px; background: var(--raised); border-bottom-left-radius: 6px; align-self: flex-start; }
.skel.me { align-self: flex-end; border-bottom-left-radius: 16px; border-bottom-right-radius: 6px; background: var(--raised); opacity: .7; }
@keyframes skel { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) { .skel { animation: skel 1.4s ease-in-out infinite; } }

/* permission request as a message + inline buttons */
.apr { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 3px; align-self: flex-start; }
.apr .b { max-width: none; min-width: 0; align-self: stretch; border-radius: 16px 16px 6px 6px; }
.apr .kbs, .apr .kb { min-width: 0; }
#n-card { display: flex; }
#n-card:empty { display: none; }
.pc-l1[data-act] { cursor: pointer; }
.apr.closed .b { border-radius: 16px 16px 16px 6px; }
.apr-h { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; color: var(--coral); font-weight: 600; margin-bottom: 4px; white-space: nowrap; }
.apr-h .left { margin-left: auto; color: var(--amber); font-variant-numeric: tabular-nums; }
.apr.closed .apr-h { color: var(--muted); }
.cmd { display: block; width: 100%; margin-top: 8px; padding: 6px 10px; border-radius: 8px; background: var(--chat-bg); font-family: var(--mono); font-size: 12px; line-height: 17px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; border: 0; cursor: pointer; }
.cmd.open { white-space: pre; overflow: auto; text-overflow: clip; max-height: calc(17px * 30 + 12px); cursor: text; user-select: text; }
.kbs { display: flex; gap: 3px; }
.kb { flex: 1; height: 42px; border: 0; background: var(--raised-2); color: var(--text); font-size: 15px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; white-space: nowrap; }
.kb:hover { background: var(--hover); }
.kb:disabled { opacity: .55; cursor: default; }
.kb.l { border-radius: 6px 6px 6px 16px; } .kb.r { border-radius: 6px 6px 16px 6px; } .kb.m { border-radius: 6px; }
.kb.only { border-radius: 6px 6px 16px 16px; }
.kb.ok { color: var(--mint); font-weight: 600; } .kb.no { color: var(--coral); } .kb.am { color: var(--amber); font-weight: 600; }
.deny-box { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 6px 6px 16px 16px; background: var(--raised-2); }
.deny-box textarea { width: 100%; resize: vertical; min-height: 60px; max-height: 200px; padding: 8px 10px; border-radius: 10px; border: 0; background: var(--chat-bg); color: var(--text); font-size: 14px; line-height: 20px; }
.deny-box textarea:focus-visible { outline: none; box-shadow: inset 0 0 0 1.5px var(--coral); }
.deny-box .r { display: flex; gap: 6px; justify-content: flex-end; }
.deny-box .r button { height: 36px; padding: 0 14px; border-radius: 10px; border: 0; background: var(--raised); color: var(--text); font-size: 14px; }
.deny-box .r button.no { background: var(--coral); color: var(--on-coral); font-weight: 600; }
.verdict { font-size: 13px; line-height: 18px; padding: 2px 4px 0; }

/* quick replies + composer */
.quick { flex: none; display: flex; gap: 8px; padding: 6px 16px 8px; flex-wrap: wrap; }
.qr { height: 38px; padding: 0 16px; border-radius: 19px; border: 1px solid var(--amber); background: transparent; color: var(--amber); font-size: 14px; font-weight: 600; white-space: nowrap; }
.qr:hover { background: rgba(242, 184, 75, .12); }
.composer { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 10px 16px 16px; }
.quick + .composer { padding-top: 4px; }
.linkrow { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px 0 14px; border-radius: 20px; background: var(--raised); }
.linkrow .ic { color: var(--muted); }
.linkrow input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--text); font-size: 14px; }
.comp-row { display: flex; align-items: flex-end; gap: 8px; }
.cbox { flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 6px; min-height: 48px; padding: 4px 4px; border-radius: 24px; background: var(--raised); }
.cbox.q { box-shadow: inset 0 0 0 1.5px var(--amber); }
.cbox.urg { box-shadow: inset 0 0 0 1.5px var(--coral); }
.cbox textarea { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; resize: none; color: var(--text); font-size: 15px; line-height: 21px; padding: 9px 2px; max-height: calc(21px * 5 + 18px); min-height: 40px; overflow-y: auto; }
.cbox textarea::placeholder { color: var(--muted); }
.cbox .ib { color: var(--muted); }
.cbox .ib.urg-on { color: var(--coral); }
.send { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--amber); color: var(--on-amber); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.send:hover { filter: brightness(1.06); }
.send:disabled { opacity: .5; cursor: default; }
.comp-hint { font-size: 12px; line-height: 16px; color: var(--muted); padding-left: 18px; }
.foot-pill { flex: none; padding: 14px 20px 18px; display: flex; justify-content: center; }
.foot-pill > div { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; background: var(--surface); font-size: 14px; line-height: 20px; color: var(--text-2); max-width: 100%; }
.foot-pill .ic { color: var(--muted); }

/* new task */
.newhelp { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 20px; overflow-y: auto; }
.newhelp > div { max-width: 400px; display: flex; flex-direction: column; gap: 16px; }
.newhelp h3 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 600; }
.step { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 20px; color: var(--text-2); }
.step b { width: 24px; height: 24px; border-radius: 50%; background: var(--raised); color: var(--text); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.wcard { align-self: flex-start; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; line-height: 18px; max-width: 100%; }
.wcard .wi { width: 32px; height: 32px; border-radius: 8px; background: var(--raised); color: var(--link); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.wcard b { display: block; font-weight: 600; }
.wcard .mut { display: block; }
.newbox { flex: 1; min-width: 0; display: block; }
.newbox textarea { display: block; width: 100%; resize: none; padding: 12px 18px; border-radius: 22px; border: 0; background: var(--raised); box-shadow: inset 0 0 0 1.5px var(--amber); color: var(--text); font-size: 15px; line-height: 21px; outline: none; min-height: 87px; max-height: 40vh; }
.ring-new { position: relative; width: 40px; height: 40px; flex: none; color: var(--amber); }
.ring-new > svg { position: absolute; inset: 0; }
.ring-new span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }

/* Итоги дня */
.sum { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 3px; }
.sumcard { background: var(--raised); border-radius: 16px 16px 6px 6px; padding: 12px 14px 8px; font-size: 15px; line-height: 22px; user-select: text; white-space: normal; overflow-wrap: anywhere; }
.sumcard.solo { border-radius: 16px; }
.sumcard .hd { font-size: 13px; color: var(--mint); font-weight: 600; margin-bottom: 2px; }
.sumcard .blk { padding: 6px 0; }
.sumcard .blk b { font-weight: 600; }
.sumcard .lk { color: var(--muted); }
.sumcard .meta { margin-top: 0; }
.sumrow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border-radius: 16px; background: var(--raised); border: 0; color: inherit; text-align: left; font-size: 15px; line-height: 21px; }
.sumrow:hover { background: var(--raised-2); }
.sumrow .mnt { flex: none; }
.sumrow .t2 { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------ Info column */
.info-in { padding: 24px 20px; display: flex; flex-direction: column; gap: 20px; min-height: 100%; }
.info-top { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.info-top h2 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 600; overflow-wrap: anywhere; }
.info-top .sub { font-size: 13px; line-height: 18px; color: var(--muted); }
.info-top .sub.ph { display: none; }
.info .back-x { display: none; }
.acts { display: flex; gap: 6px; }
.act { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; color: var(--text-2); flex: 1; min-width: 0; background: transparent; border: 0; padding: 0; text-align: center; }
.act > .bx { width: 44px; height: 44px; border-radius: 14px; background: var(--raised); display: inline-flex; align-items: center; justify-content: center; color: var(--text); }
.act:hover > .bx { background: var(--raised-2); }
.act .lb { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.olinks { display: flex; flex-direction: column; gap: 2px; margin-top: -8px; }
.olink { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; color: var(--text-2); border: 0; background: transparent; text-align: left; min-height: 32px; }
.olink:hover { color: var(--text); }
.olink .ic { color: var(--link); width: 16px; height: 16px; }
.olink span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-h { font-size: 13px; line-height: 18px; color: var(--muted); margin-bottom: 4px; display: flex; }
.sec-h .r { margin-left: auto; color: var(--text); }
.prow { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 19px; padding: 6px 0; width: 100%; border: 0; background: transparent; text-align: left; color: var(--text); }
.prow .g { flex: 1; min-width: 0; }
.prow .d { font-size: 12px; flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.prow.now { color: var(--amber); } .prow.now .d { color: var(--amber); }
.prow .sg { width: 14px; flex: none; text-align: center; }
button.prow:hover .g { text-decoration: underline; }
.timebar { display: flex; height: 6px; gap: 2px; border-radius: 3px; overflow: hidden; }
.timebar span { min-width: 2px; }
.tlabels { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 12px; line-height: 16px; color: var(--muted); }
.notesbtn { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--raised); color: var(--text); font-size: 14px; border: 0; width: 100%; text-align: left; min-height: 44px; }
.notesbtn:hover { background: var(--raised-2); }
.notesbtn .g { flex: 1; }
.notesbtn .d { color: var(--muted); font-size: 12px; }
.tacts { margin-top: auto; display: flex; flex-direction: column; font-size: 14px; }
.tact { font-size: 14px; text-align: left; padding: 10px 0; border: 0; background: transparent; color: var(--text); min-height: 40px; }
.tact:hover { text-decoration: underline; }
.tact.cor { color: var(--coral); }
.tact:disabled { opacity: .5; cursor: default; text-decoration: none; }
.notes-head { display: flex; align-items: center; gap: 6px; margin-left: -10px; }
.notes-head .g { flex: 1; min-width: 0; }
.notes-head .g div:first-child { font-size: 16px; line-height: 22px; font-weight: 600; }
.notes-head .g div:last-child { font-size: 12px; line-height: 16px; color: var(--muted); }
.nh { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.nl { font-size: 14px; line-height: 20px; padding: 3px 0; color: var(--text); overflow-wrap: anywhere; }
.np { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; width: 100%; border: 0; background: transparent; text-align: left; color: var(--text-2); min-height: 32px; }
.np .ic { color: var(--link); }
.np span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np:hover span { color: var(--text); text-decoration: underline; }
.md { font-size: 14px; line-height: 20px; color: var(--text); overflow-wrap: anywhere; }
.md h4 { margin: 12px 0 4px; font-size: 13px; color: var(--muted); font-weight: 500; }
.md p { margin: 4px 0; }
.md ul { margin: 4px 0; padding-left: 18px; }
.md code { font-family: var(--mono); font-size: 12px; background: var(--chat-bg); padding: 1px 4px; border-radius: 4px; }
.notes-foot { margin-top: auto; font-size: 12px; line-height: 16px; color: var(--muted); }

/* ------------------------------------------------------------------ menu ☰ (drawer) */
.drawer { position: fixed; inset: 0; z-index: 50; display: flex; }
.drawer .dim { position: absolute; inset: 0; background: rgba(11, 14, 18, .7); }
.dmenu { position: relative; z-index: 2; width: 360px; max-width: 100%; background: var(--surface); padding: 20px 12px; display: flex; flex-direction: column; gap: 4px; box-shadow: 8px 0 32px rgba(0, 0, 0, .4); overflow-y: auto; }
.dmenu-h { display: flex; align-items: center; gap: 12px; padding: 0 12px 16px; }
.dmenu-h .avf { width: 48px; height: 48px; border-radius: 50%; background: var(--amber); color: var(--on-amber); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; flex: none; }
.dmenu-h .g { flex: 1; min-width: 0; }
.dmenu-h .g div:first-child { font-size: 16px; line-height: 22px; font-weight: 600; }
.dmenu-h .g div:last-child { font-size: 13px; line-height: 18px; color: var(--muted); }
.stbox { margin: 0 4px 8px; padding: 14px; border-radius: 14px; background: var(--chat-bg); display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 19px; }
.stbox .st-r { display: flex; align-items: flex-start; gap: 8px; }
.stbox .st-r .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 6px; }
.stbox .st-r .k { flex: 1; min-width: 0; }
.stbox .st-r .v { text-align: right; max-width: 60%; color: var(--muted); }
.stbox .st-err { font-size: 12px; line-height: 16px; color: var(--coral); margin: -4px 0 0 16px; overflow-wrap: anywhere; }
.mi { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; font-size: 15px; line-height: 21px; color: var(--text); border: 0; background: transparent; width: 100%; text-align: left; min-height: 60px; }
.mi:hover, .mi.on { background: var(--raised-2); }
label.mi:hover { background: var(--raised); }
.mi .s { font-size: 13px; line-height: 17px; color: var(--muted); }
.mi .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--raised); display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); flex: none; }
.mi .g { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mi .accseg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mi.out { margin-top: auto; color: var(--coral); }
.mi.out .ico { color: var(--coral); }
.sw { position: relative; flex: none; width: 44px; height: 26px; }
.sw input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.sw .tr { display: block; width: 44px; height: 26px; border-radius: 999px; background: var(--line); transition: background .15s; }
.sw .kn { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: left .15s, background .15s; }
.sw input:checked ~ .tr { background: var(--amber); }
.sw input:checked ~ .kn { left: 21px; background: var(--on-amber); }
.sw input:focus-visible ~ .tr { outline: 2px solid var(--amber); outline-offset: 2px; }
.dpanel { position: relative; z-index: 2; width: 520px; max-width: 100%; background: var(--surface); border-left: 1px solid var(--sep); padding: 20px 24px; overflow-y: auto; }
.dpanel h1 { margin: 0 0 4px; font-size: 18px; line-height: 24px; font-weight: 600; }
.dpanel .ph-back { display: none; }
.dpanel .sub { font-size: 13px; line-height: 18px; color: var(--muted); margin-bottom: 12px; }
.hrow { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--sep); align-items: flex-start; width: 100%; background: transparent; border-left: 0; border-right: 0; border-bottom: 0; color: inherit; text-align: left; }
button.hrow:hover .w { text-decoration: underline; }
.hrow .g { flex: 1; min-width: 0; }
.hrow .w { font-size: 14px; line-height: 19px; overflow-wrap: anywhere; }
.hrow .m { font-size: 12px; line-height: 16px; color: var(--muted); overflow-wrap: anywhere; }
.chip { font-size: 12px; line-height: 16px; font-weight: 600; padding: 3px 8px; border-radius: 6px; flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip.amb { color: var(--amber); background: rgba(242, 184, 75, .12); }
.chip.mnt { color: var(--mint); background: rgba(94, 211, 160, .12); }
.chip.cor { color: var(--coral); background: rgba(255, 107, 91, .12); }
.chip.mut { color: var(--muted); background: var(--raised); }
.pbody { display: flex; flex-direction: column; gap: 12px; font-size: 14px; line-height: 20px; color: var(--text-2); }
.pbody p { margin: 0; }
.pbody .row2 { display: flex; gap: 8px; flex-wrap: wrap; }

/* popup menu (right click on a chat) + toast */
.menu { position: fixed; z-index: 60; min-width: 220px; padding: 6px; border-radius: 14px; background: var(--raised); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); display: flex; flex-direction: column; }
.menu button { text-align: left; padding: 0 12px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--text); font-size: 14px; }
.menu button:hover, .menu button:focus-visible { background: var(--raised-2); }
.menu button.cor { color: var(--coral); }
.menu button:disabled { opacity: .5; cursor: default; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; max-width: min(520px, calc(100vw - 32px)); padding: 10px 16px; border-radius: 14px; background: #2F3746; color: var(--text); font-size: 14px; line-height: 20px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }

/* ------------------------------------------------------------------ narrow: one screen at a time (< 1100 px) */
@media (max-width: 1099px) {
  .side, .main, .info { display: none; width: 100%; border-left: 0; }
  .app[data-screen="list"] .side { display: flex; }
  .app[data-screen="chat"] .main { display: flex; }
  .app[data-screen="info"] .info { display: flex; background: var(--chat-bg); }
  .info.hidden { display: none !important; }
  .app[data-screen="info"] .info.hidden { display: flex !important; }
  .side { background: var(--chat-bg); }
  .side-body { padding-bottom: 110px; }
  .chead { padding: 0 8px 0 4px; gap: 8px; height: 64px; }
  .chead .back { display: inline-flex; }
  .chead .av.md { display: block; }
  .chead-t { cursor: pointer; }
  .chead .info-btn { display: none; }
  .chead .info-btn.always { display: inline-flex; }
  .pinned { padding: 8px 16px; }
  .chat-inner { padding: 16px 12px; }
  .b { max-width: 300px; }
  .apr { max-width: 340px; }
  .qr { height: 40px; }
  .quick { flex-wrap: nowrap; overflow-x: auto; padding: 6px 12px 8px; scrollbar-width: none; }
  .quick::-webkit-scrollbar { display: none; }
  .composer { padding: 8px 12px 12px; }
  .info-in { padding: 8px 16px 24px; gap: 16px; }
  .info .back-x { display: flex; }
  .av.xl { width: 96px; height: 96px; }
  .av.xl .tile { inset: 11px; font-size: 24px; }
  .info-top .sub.wd { display: none; }
  .info-top .sub.ph { display: block; }
  .acts { gap: 8px; }
  .act > .bx { width: 56px; height: 56px; border-radius: 16px; }
  .grpbox { background: var(--surface); border-radius: 16px; padding: 12px 16px; }
  .tacts { margin-top: 0; background: var(--surface); border-radius: 16px; padding: 4px 16px; }
  .tact { min-height: 44px; border-top: 1px solid var(--sep); }
  .tact:first-child { border-top: 0; }
  .notesbtn { min-height: 48px; }
  .dmenu { width: 100%; }
  .dpanel { position: absolute; inset: 0; width: 100%; z-index: 3; border-left: 0; padding: 12px 16px; }
  .dpanel .ph-back { display: inline-flex; margin: 0 0 8px -8px; color: var(--text); }
  .drawer .dim { display: none; }
  .ib { width: 44px; height: 44px; }
  .chead-t { min-height: 44px; display: flex; flex-direction: column; justify-content: center; }
  .sfield { height: 44px; border-radius: 22px; }
  .cbox textarea { min-height: 44px; padding: 11px 2px; }
  .pc-lanes { padding: 14px 0; margin: -14px 0; }
  .qr { position: relative; }
  .qr::after { content: ""; position: absolute; left: 0; right: 0; top: -3px; bottom: -3px; }
  .ib.sm { width: 36px; height: 36px; }
  .pill::after, .kb::after, .tact::after, .olink::after, .np::after, .cmd::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
  .pill, .olink, .np { position: relative; }
  .banner { padding: 10px 16px; flex-wrap: wrap; }
  .banner .btn-line { height: 44px; border-radius: 22px; }
  .netbar { flex-wrap: wrap; font-size: 13px; }
  .netbar button { height: 44px; border-radius: 22px; }
  .empty { padding-bottom: 120px; }
  .tasks-btn { display: none !important; }
  .sum .kb.l { border-radius: 6px 6px 16px 16px; }
  .act .lb { white-space: normal; overflow-wrap: anywhere; }
  .side-plaque { right: 84px; }
  .kb { padding: 0 8px; font-size: 14px; }
}
@media (min-width: 1100px) {
  .side-plaque { display: none !important; }
}

/* ------------------------------------------------------------------ pictures in the chats (16.10.2026) */
.pics { display: grid; gap: 4px; margin: 2px 0 4px; }
.pics.n1 { grid-template-columns: min(260px, 62vw); }
.pics.n2 { grid-template-columns: repeat(2, min(150px, 34vw)); }
.pics.n3 { grid-template-columns: repeat(3, min(112px, 24vw)); }
.pic { display: block; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--raised-2); cursor: zoom-in; height: 120px; }
.pics.n1 .pic { height: 180px; }
.pics.n3 .pic { height: 100px; }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pic.ld { animation: picload 1.2s ease-in-out infinite; }
@keyframes picload { 50% { opacity: .55; } }
.pic.gone { display: flex; align-items: center; justify-content: center; padding: 8px; text-align: center; font-size: 12px; line-height: 16px; color: var(--muted); cursor: default; }
.b.me .pic { background: rgba(0, 0, 0, .12); }
.b.me .pic.gone { color: var(--on-amber-meta); }
.b.onlypics { padding: 4px 4px 6px; }
.b.onlypics .meta, .b.onlypics .fw { padding: 0 8px; }
.attrow { display: flex; gap: 8px; flex-wrap: wrap; }
.att { position: relative; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--raised); flex: none; }
.att img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0; background: rgba(0, 0, 0, .65); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.main.dropping::after { content: "Отпусти — картинка прикрепится к сообщению"; position: absolute; inset: 12px; z-index: 30; display: flex; align-items: center; justify-content: center; border: 2px dashed var(--amber); border-radius: 16px; background: rgba(21, 26, 33, .85); color: var(--text); font-size: 16px; pointer-events: none; }
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .9); cursor: zoom-out; }
.lightbox img { max-width: 96vw; max-height: 92vh; object-fit: contain; border-radius: 8px; }
.lightbox .ib { position: absolute; top: 12px; right: 12px; color: #fff; }
.b.me .fw { color: var(--on-amber-meta); }

/* result media (docs/media-messages.md): covers whole, clip videos (a player; «видео готовится» on the cover) */
.pic.res img { object-fit: contain; background: #0E1217; }
.pic.vid { position: relative; height: auto; max-height: 360px; cursor: default; background: #0E1217; }
.pics .pic.vid { height: auto; }
.pic.vid video, .pic.vid img { width: 100%; height: 100%; max-height: 360px; object-fit: contain; display: block; background: #0E1217; }
.pic.vid.wait { min-height: 120px; }
.pic.vid video { -webkit-touch-callout: none; }
/* the speed (25.10): the button top right (amber when not 1×), the pill at the top while held / after «>» «<» */
.pic.vid .vspd { position: absolute; top: 8px; right: 8px; z-index: 2; min-width: 36px; height: 24px; padding: 0 8px; border: 0; border-radius: 12px; font: inherit; font-size: 12px; line-height: 24px; font-weight: 600; font-variant-numeric: tabular-nums; color: #E9ECF1; background: rgba(0, 0, 0, .6); cursor: pointer; opacity: .85; }
.pic.vid .vspd:hover, .pic.vid .vspd:focus-visible { opacity: 1; }
.pic.vid .vspd.on { color: #F2B84B; }
.pic.vid .vhold { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 2; display: none; padding: 2px 12px; border-radius: 12px; font-size: 13px; line-height: 20px; font-weight: 600; font-variant-numeric: tabular-nums; color: #E9ECF1; background: rgba(0, 0, 0, .6); pointer-events: none; }
.pic.vid.holding .vhold, .pic.vid.flash .vhold { display: block; }
.pic.vid .vcap { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 10px; font-size: 12px; line-height: 18px; color: #E9ECF1; background: rgba(0, 0, 0, .6); }
a.ln { overflow-wrap: anywhere; }
