/* 0.16.0 — этап Б (T-16-01…11): логические свойства (письмо справа налево), кроме сегмента правши/левши */
.w16-page .primary, .w16-page .danger, .w16-page .secondary { min-height: 44px; }
.w16-exp .icon { min-width: 44px; min-height: 44px; }
.w16-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding-block: 10px; padding-inline: 14px; margin: 8px 12px 0;
  background: color-mix(in srgb, var(--brand) 8%, var(--bg)); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); font-size: 14px; }
.w16-banner b { font-size: 15px; }
.w16-banner.warn { background: color-mix(in srgb, #E65100 10%, var(--bg)); }
.w16-banner > span { min-width: 0; overflow-wrap: anywhere; }
.w16-banner button { min-height: 40px; }
.w16-via { font-size: 12px; color: var(--ink-2); margin-block-end: 2px; }
.w16-sens { position: relative; overflow: hidden; border-radius: 12px; }
.w16-sens-blur { filter: blur(32px); pointer-events: none; }
.w16-sens-btn { position: absolute; inset: 0; margin: auto; width: max-content; height: 44px; padding-inline: 16px; border-radius: 22px; border: 0;
  background: rgb(0 0 0 / 60%); color: #fff; font-weight: 600; cursor: pointer; }
.w16-sens-next { padding-block: 8px; padding-inline: 12px; font-size: 14px; }
.w16-inline { position: absolute; inset-inline: 8px; bottom: 100%; z-index: 30; max-height: 320px; overflow: auto; background: var(--bg); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); padding: 6px; }
.w16-inline-head { font-size: 12px; color: var(--ink-2); padding: 4px 8px; }
.w16-inline-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: start; padding: 8px; border: 0; background: none;
  border-radius: 10px; color: var(--ink); cursor: pointer; min-height: 44px; }
.w16-inline-item:hover, .w16-inline-item:focus-visible { background: var(--bg-2); }
.w16-inline-item small { color: var(--ink-2); }
.w16-cc { position: absolute; inset-inline-start: 12px; bottom: 96px; z-index: 6; max-width: min(420px, calc(100% - 24px)); display: flex; flex-direction: column; gap: 6px; }
.w16-cc-list { display: flex; flex-direction: column; gap: 4px; }
.w16-cc-item { background: rgb(0 0 0 / 55%); color: #fff; border-radius: 12px; padding-block: 6px; padding-inline: 10px; font-size: 14px; animation: w16-in .2s ease-out; overflow-wrap: anywhere; }
.w16-cc-item.mine { background: color-mix(in srgb, var(--brand) 70%, #000); }
.w16-cc-form { display: flex; gap: 6px; align-items: center; }
.w16-cc-form input { flex: 1; min-height: 40px; border-radius: 20px; border: 1px solid rgb(255 255 255 / 30%); background: rgb(0 0 0 / 45%); color: #fff; padding-inline: 12px; }
.w16-cc-form .icon { color: #fff; }
@keyframes w16-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .w16-cc-item { animation: none; } }
.w16-freeze { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(6px); padding: 16px; }
.w16-freeze-card { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 24px; max-width: 440px; width: 100%; display: flex; flex-direction: column; gap: 10px;
  align-items: stretch; text-align: center; box-shadow: var(--shadow); color: var(--ink); }
.w16-freeze-card svg { margin-inline: auto; color: var(--danger); }
.w16-freeze-card textarea { min-height: 96px; border-radius: 12px; border: 1px solid var(--line); padding: 10px; font: inherit; background: var(--bg); color: var(--ink); }
.w16-frozen-pill { position: fixed; top: 8px; inset-inline-start: 50%; transform: translateX(-50%); z-index: 150; border: 0; border-radius: 16px; padding-block: 6px; padding-inline: 14px;
  background: var(--danger); color: #fff; font-weight: 600; min-height: 36px; }
:root[dir="rtl"] .w16-frozen-pill { transform: translateX(50%); }
.w16-bigcode { font: 600 34px/1.2 ui-monospace, "IBM Plex Mono", monospace; letter-spacing: 4px; text-align: center; padding: 16px; border: 2px dashed var(--brand); border-radius: 14px; margin: 8px 0; }
.w16-code { font: 600 22px ui-monospace, monospace; letter-spacing: 3px; text-align: center; }
/* сегмент правши/левши: рука не зависит от языка — раскладка внутри сегмента всегда слева направо */
.w151-seg { direction: ltr; }
/* письмо справа налево: строка-превью в списке чатов — направление по первому сильному знаку (смешанный текст не «едет») */
:root[dir="rtl"] .chat-row .last, :root[dir="rtl"] .chat-item .last { unicode-bidi: plaintext; text-align: start; }
/* галочки в «Экспорте чата» и «18+ для следующего» — в строку */
[data-testid=w16_chat_export] label.row, .w16-sens-next { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; min-height: 40px; text-align: start; }
[data-testid=w16_chat_export] label.row input, .w16-sens-next input { width: 20px; height: 20px; margin: 0; }

/* ---- 0.16.0: индикаторы связи (002-З-1471, 002-З-1473 §7) ---- */
.netind { display: flex; align-items: center; gap: 6px; }
.netind-item { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); border-radius: 10px; padding: 4px 6px; min-height: 28px; font-size: 12px; line-height: 1.1; }
.netind-item:hover { background: var(--bg-3); color: var(--ink); }
.netind-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--bg) 70%, transparent); }
.netind-bars { flex: none; color: var(--ink-3, #999); }
.netind-ms { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* широкий экран: левая полоса — стопкой над кружком профиля */
.netind-rail { flex-direction: column; gap: 2px; margin-bottom: 4px; width: 100%; }
.netind-rail .netind-item { flex-direction: column; gap: 2px; padding: 4px 2px; width: 58px; font-size: 10px; }
.netind-rail .netind-item > :first-child { margin-bottom: 1px; }
.netind-rail .netind-label { font-weight: 600; max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* раскладки без полосы на широком экране — низ левой колонки */
.netind-side { display: none; border-top: 1px solid var(--line); padding: 4px 10px; gap: 4px; flex-wrap: wrap; }
@media (min-width: 761px) {
  :root:is([data-layout="telegram"], [data-bars="top"], [data-bars="bottom"]):not([data-hand]) .netind-side { display: flex; }
  .netind-head, .netind-chat { display: none; }
}
/* узкий экран: шапка списка и шапка чата */
.netind-head { gap: 2px; }
.netind-head .netind-item, .netind-chat .netind-item { padding: 6px 4px; min-height: 36px; }
.netind-chat { margin-inline-start: -4px; }
/* правша/левша — нижний угол напротив сегмента, над полем ввода (рука от языка не зависит) */
.netind-corner { position: fixed; bottom: 84px; z-index: 44; flex-direction: column; align-items: stretch; gap: 2px; padding: 4px; border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); border: 1px solid var(--line); box-shadow: 0 2px 10px rgb(0 0 0 / 12%); }
.netind-corner.right { left: 8px; }
.netind-corner.left { right: 8px; }
.netind-corner .netind-item { min-height: 32px; justify-content: center; }
/* карточка */
.netind-card .netind-card-in { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; min-width: 260px; max-width: min(360px, calc(100vw - 32px)); }
.netind-card-title { font-size: 14px; }
.netind-row { display: flex; align-items: flex-start; gap: 10px; }
.netind-row .netind-dot { margin-top: 4px; }
.netind-row small { display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--ink-2); }
.netind-fact { white-space: nowrap; }
/* страница настроек */
.w16-netind-page select { min-height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 0 8px; max-width: 60vw; }
.netind-snd, .netind-num { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; flex-wrap: wrap; }
.netind-num input { width: 110px; }
.netind-color { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.netind-color input { width: 36px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 6px; }

/* ---- Windows 0.5.0: своя верхняя полоса окна 40 px (как у Chrome), только в Tauri ---- */
:root[data-tauri] body { padding-top: 40px; box-sizing: border-box; }
.w16-titlebar { position: fixed; top: 0; left: 0; right: 0; height: 40px; z-index: 1000; display: flex; align-items: stretch;
  background: var(--bg-2); color: var(--ink); border-bottom: 1px solid var(--line); user-select: none; -webkit-user-select: none; direction: ltr; }
.w16-tb-brand { display: inline-flex; align-items: center; gap: 8px; padding-inline: 12px; font-size: 13px; }
.w16-tb-brand img { pointer-events: none; }
.w16-tb-btn { width: 46px; height: 40px; display: grid; place-items: center; color: var(--ink); background: transparent; border: 0; border-radius: 0; }
.w16-tb-btn:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.w16-tb-btn.close:hover { background: #C42B1C; color: #fff; }
.w16-tb-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }

/* значки меню вложений: классы .poll и .vnote совпадают с карточками сообщений (опрос, видеосообщение) — размер значка не наследовать */
.attach-menu .att-ic { width: 34px; height: 34px; min-width: 0; max-width: none; min-height: 0; max-height: none; padding: 0; margin: 0;
  display: grid; flex-direction: row; aspect-ratio: auto; border-radius: 50%; }
.attach-menu.w152-tiles .att-ic { width: 52px; height: 52px; border-radius: 14px; }
