/* © 2026 VanlifeFabrika, ALT — SPDX-License-Identifier: AGPL-3.0-or-later */
/* ALT 2.0-dev9: раздел «Эфир» и «Инструменты» веб-версии в облике приложения (app2: AirScreen.kt, ToolsScreen.kt,
   NetMap.kt, RadioSettings.kt, Repeater.kt; компоненты — Components.kt). Только токены из style.css (--bg, --surface,
   --air…), день и ночь — одной разметкой. Подключён после style.css: здесь правила главнее прежних .mcscreen/.tools. */

/* ===================== общие детали (Components.kt) ===================== */
.mcscreen { font-size: 16px; line-height: 1.4; }
.mcscreen .icon-btn { width: 48px; height: 48px; border-radius: 50%; color: var(--text); font-size: 24px; flex: none; }
.mcscreen .icon-btn:hover { background: var(--surface2); color: var(--text); }
.mcscreen .icon-btn .ic { width: 24px; height: 24px; }
/* кнопки AltButton: 48 / r12 / 16-600; sm — 36 / 14-600; txt — без фона, accent; danger — dangerSoft */
.mcscreen .btn, .aircf .btn { min-height: 48px; padding: 0 18px; border-radius: var(--r12); font-size: 16px; line-height: 20px; font-weight: 600; gap: 8px; background: var(--surface2); color: var(--text); border: 0; text-decoration: none; }
.mcscreen .btn .ic { width: 20px; height: 20px; flex: none; }
.mcscreen .btn.primary { background: var(--accent-fill); color: var(--on-accent); }
.mcscreen .btn.danger { background: var(--danger-soft); color: var(--danger); }
.mcscreen .btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.mcscreen .btn.sm .ic { width: 18px; height: 18px; }
.mcscreen .btn.txt, .aircf .btn.txt { min-height: 40px; padding: 0 8px; background: transparent; color: var(--accent); }
.mcscreen .btn.block { width: 100%; }
.mcscreen .btn[disabled] { opacity: .45; pointer-events: none; }
.mcscreen .btn.grow { flex: 1; min-width: 0; }
.mcscreen .btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* плитка со значком (IconTile): 36 — r8, от 44 — r12 */
.atile { display: inline-grid; place-items: center; flex: none; border-radius: var(--r12); background: var(--accent-soft); color: var(--accent); }
.atile.s36 { width: 36px; height: 36px; border-radius: var(--r8); } .atile.s36 .ic { width: 20px; height: 20px; }
.atile.s40 { width: 40px; height: 40px; border-radius: var(--r8); } .atile.s40 .ic { width: 20px; height: 20px; }
.atile.s44 { width: 44px; height: 44px; } .atile.s44 .ic { width: 22px; height: 22px; }
.atile.s48 { width: 48px; height: 48px; } .atile.s48 .ic { width: 24px; height: 24px; }
.atile.s64 { width: 64px; height: 64px; border-radius: var(--r16); } .atile.s64 .ic { width: 30px; height: 30px; }
.atile.t-neu { background: var(--accent-soft); color: var(--accent); }
.atile.t-neuf { background: var(--accent-fill); color: #fff; }
.atile.t-air { background: var(--air-soft); color: var(--air); }
.atile.t-airf { background: var(--air-fill); color: var(--on-air); }
.atile.t-near { background: var(--near-soft); color: var(--near); }
.atile.t-dng { background: var(--danger-soft); color: var(--danger); }
/* круглый аватар с инициалами (Avatar) */
.aav { display: inline-grid; place-items: center; flex: none; border-radius: 50%; color: #fff; font-weight: 700; }
.aav.s48 { width: 48px; height: 48px; font-size: 17px; } .aav.s40 { width: 40px; height: 40px; font-size: 14px; }
/* пилюля состояния (StatusPill): 28, точка 8, 13/600 */
.apill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--pill); font-size: 13px; font-weight: 600; white-space: nowrap; flex: none; }
.apill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.apill.ok { background: var(--near-soft); color: var(--near); }
.apill.off { background: var(--surface2); color: var(--muted); }
.apill.air { background: var(--air-soft); color: var(--air); }
.apill.err { background: var(--danger-soft); color: var(--danger); }
/* чип 20, r8, 12/600 (SmallChip) */
.achip { display: inline-flex; align-items: center; gap: 4px; min-height: 20px; padding: 1px 6px; border-radius: var(--r8); font-size: 12px; font-weight: 600; line-height: 16px; white-space: nowrap; background: var(--surface2); color: var(--muted); }
.achip .ic { width: 12px; height: 12px; }
.achip.air { background: var(--air-soft); color: var(--air); } .achip.near { background: var(--near-soft); color: var(--near); }
.achip.dng { background: var(--danger-soft); color: var(--danger); } .achip.mut { background: var(--surface2); color: var(--muted); }
/* карточка (AltCard): surface, рамка 1, r16, отступ 14 */
.acard { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r16); padding: 14px; color: var(--text); text-align: left; width: 100%; box-sizing: border-box; }
.acard.air { background: var(--air-soft); border-color: var(--air); }
.acol { display: flex; flex-direction: column; gap: 12px; }
.pad { padding-left: 16px; padding-right: 16px; }
.agh { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text2); padding: 24px 16px 8px; }
.agt { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text2); margin-top: 8px; }
.agtr { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text2); margin-top: 8px; }
.acap { margin: 0; color: var(--muted); font-size: 13px; line-height: 18px; text-align: left; }
.acap.t2 { color: var(--text2); } .acap.c { text-align: center; }
.aerr { margin: 0; color: var(--danger); font-size: 15px; line-height: 20px; }
.amsg { margin: 0; font-size: 15px; line-height: 20px; } .amsg:empty { display: none; } .amsg.ok { color: var(--near); } .amsg.bad { color: var(--danger); }
.akv { display: flex; gap: 12px; padding: 3px 0; font-size: 15px; line-height: 20px; align-items: baseline; }
.akv > span { flex: 1; color: var(--text2); min-width: 0; overflow-wrap: anywhere; }
.akv > b { flex: 1; font-weight: 600; text-align: right; overflow-wrap: anywhere; color: var(--text); }
.akv > .sigv { margin: 0; }
.abtns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.abtns.pad { margin: 4px 0 4px; }
.abar { flex: 1; height: 8px; border-radius: var(--pill); background: var(--surface2); overflow: hidden; }
.abar i { display: block; height: 100%; border-radius: var(--pill); background: var(--accent-fill); }
.abar i.hi { background: var(--near); } .abar i.mid { background: var(--air-fill); } .abar i.lo { background: var(--danger); }
/* пустое состояние (EmptyState): круг 96, значок 48, 17/600, текст 15 */
.aes { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 32px 24px; margin: auto; max-width: 360px; color: var(--text2); }
.aesic { width: 96px; height: 96px; border-radius: 50%; background: var(--surface2); color: var(--muted); display: grid; place-items: center; }
.aesic .ic { width: 48px; height: 48px; stroke-width: 1.5; }
.aes b { color: var(--text); font-size: 17px; line-height: 22px; font-weight: 600; }
.aes p { margin: 0; font-size: 15px; line-height: 20px; }
.aes .btn { margin-top: 4px; }
/* переключатель в строке (AltSwitch 52×32 — .sw из style.css) */
.aswrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 0; text-align: left; color: var(--text); background: none; border: 0; cursor: pointer; }
.aswrow .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.aswrow .mid b { font-size: 16px; line-height: 22px; font-weight: 400; }
.aswrow .mid small { font-size: 13px; line-height: 18px; color: var(--muted); }
.aswrow .sw { flex: none; }
/* поле ввода (как OutlinedTextField / RsPicker): подпись 13 muted сверху, рамка borderStrong, фокус — accent */
.afield { display: flex; flex-direction: column; gap: 1px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r12); padding: 7px 14px 8px; min-width: 0; box-sizing: border-box; transition: border-color .15s, box-shadow .15s; position: relative; }
.afield:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.afield > small { color: var(--muted); font-size: 13px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afield:focus-within > small { color: var(--accent); }
.afield input, .afield select, .afield textarea { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; line-height: 22px; padding: 2px 0; min-height: 26px; }
.afield input::placeholder { color: var(--muted); }
.afield select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 26px; }
.afield select option { background: var(--surface); color: var(--text); }
.afield.pick::after { content: ''; position: absolute; right: 14px; bottom: 15px; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); pointer-events: none; }
.afield.grow { flex: 1; }
.afield code { flex: 1; min-width: 0; font: 600 14px/1.35 Consolas, "JetBrains Mono", monospace; overflow-wrap: anywhere; color: var(--text); }
.afield .icon-btn { width: 40px; height: 40px; }
.afield .icon-btn .ic { width: 20px; height: 20px; }
.arow2 { display: flex; align-items: center; gap: 8px; }
.atwo { display: flex; gap: 8px; } .atwo > * { flex: 1; min-width: 0; }
.asearch { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: var(--r12); background: var(--surface2); margin: 4px 0 4px; }
.asearch .ic { width: 20px; height: 20px; color: var(--muted); flex: none; }
.asearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; padding: 10px 0; }
.asearch:focus-within { box-shadow: 0 0 0 2px var(--accent); }
/* кольцо «жду» */
.aspin { width: 20px; height: 20px; margin: 0 6px; border-radius: 50%; border: 2px solid var(--air); border-right-color: transparent; animation: aspin .8s linear infinite; flex: none; visibility: hidden; }
.aspin.on, .airpage.busy .aspin { visibility: visible; }
@keyframes aspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .aspin { animation-duration: 3s; } }
/* подтверждение (ConfirmDialog) */
.aircf { z-index: 130; }
.aircf .modal { width: min(400px, 100%); padding: 24px 24px 12px; }
.aircf .acft { font-size: 20px; line-height: 26px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.aircf .acfx { font-size: 15px; line-height: 20px; color: var(--text2); white-space: pre-line; }
.aircf .acfb { display: flex; justify-content: flex-end; gap: 4px; margin-top: 16px; }
.aircf .btn.txt.mut { color: var(--text2); } .aircf .btn.txt.dng { color: var(--danger); }
/* окна-модалки рации (Поделиться, Добавить канал…) */
.amod { display: flex; flex-direction: column; gap: 10px; }
.amod .amodname { font-size: 19px; font-weight: 700; margin: 10px 0 0; }
.amod .err:empty { display: none; }
.ahero { display: flex; align-items: center; gap: 14px; }
.ahero b { display: block; font-size: 19px; line-height: 24px; } .ahero small { color: var(--muted); font-size: 14px; }
.ahero .av { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 700; flex: none; }

/* ===================== раздел «Эфир» (AirScreen.kt) ===================== */
.mcscreen.air { background: var(--bg); }
.airsplit { flex: 1; min-height: 0; display: flex; }
.airside { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.airmain { display: none; flex: 1; min-width: 0; min-height: 0; flex-direction: column; background: var(--bg); }
.mcscreen.air.chatopen .airside { display: none; }
.mcscreen.air.chatopen .airmain { display: flex; }
@media (min-width: 840px) {
  .airside { flex: none; width: 360px; border-right: 1px solid var(--border); }
  .airmain { display: flex; }
  .mcscreen.air.chatopen .airside { display: flex; }
  .airmain .achback { display: none; }
}
@media (min-width: 1200px) { .airside { width: 400px; } }
/* шапка корня раздела: заголовок 28/700; справа — SOS (на телефоне), инструменты, ⋮ */
.airhead { display: flex; align-items: center; gap: 0; min-height: 64px; padding: 8px 4px 4px 16px; flex: none; }
.airhead h1 { flex: 1; min-width: 0; margin: 0; font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.airsos { height: 36px; padding: 0 12px; margin: 0 4px; border-radius: var(--pill); background: var(--danger-soft); color: var(--danger); border: 1.5px solid var(--danger); font-size: 13px; font-weight: 800; letter-spacing: .6px; flex: none; }
@media (min-width: 600px) { .airsos { display: none; } }
.airbody { flex: 1; min-height: 0; overflow-y: auto; }
.airwrap { max-width: 640px; margin: 0 auto; padding: 6px 0 24px; display: flex; flex-direction: column; }
.airwrap > .pad + .pad { margin-top: 0; }
/* карточка рации (RadioStateCard) */
.aradio { margin: 6px 0; }
.arow0 { display: flex; align-items: center; gap: 12px; }
.arow0 .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.arow0 .mid b { font-size: 16px; line-height: 22px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arow0 .mid small { display: flex; align-items: center; gap: 5px; color: var(--text2); font-size: 14px; line-height: 20px; min-width: 0; }
.arow0 .mid small .ic { width: 14px; height: 14px; flex: none; }
.arow0 .mid small span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.astate .arow0 .mid small { white-space: normal; display: block; }
.abatt { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--text2); font-size: 13px; line-height: 18px; }
.abatt > .ic { width: 18px; height: 18px; color: var(--muted); flex: none; }
.abatt > span { white-space: nowrap; }
.apend { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--air); font-size: 13px; line-height: 18px; }
.apend .ic { width: 14px; height: 14px; }
/* строка списка (AltRow ≥ 56): плитка 36 / аватар 48, название 16/600, подпись 13 muted */
.arow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 16px; text-align: left; color: var(--text); background: none; border: 0; box-sizing: border-box; font: inherit; }
button.arow { cursor: pointer; transition: background .12s; }
button.arow:hover { background: var(--surface2); }
.arow.on { background: var(--accent-soft); }
.arow .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.arow .mid b { font-size: 16px; line-height: 22px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.arow .mid small, .arow .mid > span { font-size: 13px; line-height: 18px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.arow.aadd .mid b { color: var(--accent); }
.arow .atr { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.arow .atr small { color: var(--muted); font-size: 13px; line-height: 18px; }
.arch { color: var(--muted); display: grid; place-items: center; flex: none; } .arch .ic { width: 20px; height: 20px; }
.aacc { color: var(--accent); font-size: 14px; font-weight: 600; flex: none; }
.arow .bdg { min-width: 22px; height: 22px; border-radius: var(--pill); background: var(--accent-fill); color: var(--on-accent); font-size: 12px; font-weight: 700; display: grid; place-items: center; padding: 0 7px; }
.abridge { margin-top: 2px; }
/* сегмент-контрол (Segmented): дорожка surface2 r12, отступ 3; сегменты 40, 15/600; выбранный — surface с рамкой (ночью surface3) */
.aseg { display: flex; gap: 3px; padding: 3px; border-radius: var(--r12); background: var(--surface2); margin: 8px 0; }
.aseg button { flex: 1; min-width: 0; height: 40px; padding: 0 8px; border-radius: 10px; color: var(--muted); font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1px solid transparent; background: transparent; transition: background .16s, color .16s; }
.aseg button.on { background: var(--surface); color: var(--text); border-color: var(--border); }
[data-theme="dark"] .aseg button.on { background: var(--surface3); border-color: transparent; }
.alist { display: flex; flex-direction: column; }
.alogl { padding: 0 0 8px; }
.alogr { display: flex; gap: 10px; padding: 4px 16px; font-size: 15px; line-height: 20px; }
.alogr small { color: var(--muted); font-size: 13px; line-height: 20px; flex: none; font-variant-numeric: tabular-nums; }
.alogr span { color: var(--text); overflow-wrap: anywhere; min-width: 0; }
/* SOS по рации (макет «Эфир»): красная рамка, плитка «SOS», кнопка «Открыть»; на ПК SOS — на рейке */
.asoswrap { padding: 12px 16px; }
.asoswrap .agt { margin: 8px 0 8px; }
.asoscard { display: flex; align-items: center; gap: 12px; background: var(--danger-soft); border-color: var(--danger); cursor: pointer; font: inherit; }
.asostile { width: 44px; height: 44px; border-radius: var(--r12); background: var(--danger-soft); color: var(--danger); display: grid; place-items: center; font-size: 12px; font-weight: 800; letter-spacing: .6px; flex: none; }
.asoscard .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.asoscard .mid b { font-size: 16px; line-height: 22px; font-weight: 600; } .asoscard .mid small { font-size: 14px; color: var(--text2); }
@media (min-width: 600px) { .asoswrap { display: none; } }
/* панель подключения (ConnectPanel) */
.aircon { display: flex; flex-direction: column; gap: 0; }
.aircon .agh { padding: 16px 0 8px; }
.aircon .aconlast { margin-top: 4px; }
.agroup { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r16); overflow: hidden; }
.aircon .mcopt.arow { border: 0; border-radius: 0; background: transparent; padding: 8px 14px; }
.aircon .mcopt.arow + .mcopt.arow, .aircon .mcopt.arow + .mctcp { border-top: 1px solid var(--border); }
.aircon .mcopt.arow .mid b { display: block; margin: 0; }
.aircon .mcopt.arow .mid span { display: block; color: var(--muted); font-size: 13px; line-height: 18px; }
.aircon .mcopt.off { opacity: .6; } .aircon .mcopt.off .atile { background: var(--surface2); color: var(--muted); }
.aircon .mcopt:not(.off):hover { background: var(--surface2); border-color: transparent; }
.aircon .mcble:empty { display: none; }
.aircon .mcble { display: flex; flex-direction: column; }
.aircon .mcble .agh { padding: 16px 0 8px; }
.aircon .mcble .mcopt.arow { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r16); margin-bottom: 8px; padding: 8px 14px; }
.aircon .ascan { display: flex; align-items: center; gap: 10px; color: var(--text2); font-size: 15px; margin: 12px 2px 4px; }
.aircon .ascan::before { content: ''; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; animation: aspin .8s linear infinite; flex: none; }
.aircon .mctcp { display: flex; gap: 8px; padding: 0 14px 12px 62px; }
.aircon .mctcp input { flex: 1; min-width: 0; min-height: 44px; padding: 10px 12px; border-radius: var(--r12); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; outline: 0; }
.aircon .mctcp input:focus { border-color: var(--accent); }
.aircon .mctcp input[type=number] { flex: none; width: 90px; }
.aircon > .acap { margin: 10px 2px 0; }

/* ---------- переписка канала / контакта (AirChat) ---------- */
.airchat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.achead { display: flex; align-items: center; height: 56px; padding: 0 8px 0 4px; gap: 0; flex: none; border-bottom: 1px solid var(--border); background: var(--bg); }
.achead > .atile, .achead > .aav { margin-left: 4px; }
@media (min-width: 840px) { .achead { padding-left: 16px; } .achead > .atile, .achead > .aav { margin-left: 0; } }
.achead .mid { flex: 1; min-width: 0; padding-left: 10px; display: flex; flex-direction: column; }
.achead .mid b { font-size: 17px; line-height: 22px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.achead .mid small { display: flex; align-items: center; gap: 4px; color: var(--air); font-size: 13px; line-height: 18px; min-width: 0; }
.achead .mid small .ic { width: 13px; height: 13px; flex: none; }
.achead .mid small span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acbox { flex: 1; min-height: 0; position: relative; display: flex; }
.acmsgs { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; }
.acmsgs > .aes { flex: 1; }
.acday { align-self: center; margin: 6px 0; } .acday span { display: inline-block; padding: 3px 10px; border-radius: var(--pill); background: var(--surface2); color: var(--text2); font-size: 12px; font-weight: 600; }
.abrow { display: flex; align-items: center; gap: 4px; } .abrow.out { justify-content: flex-end; }
/* 1.31: «⋮» у сообщения эфира — при наведении мышью (на телефоне — долгое нажатие) */
.abmore { width: 32px; height: 32px; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: grid; place-items: center; opacity: 0; cursor: pointer; transition: opacity .12s; }
.abmore .ic, .abmore svg { width: 18px; height: 18px; }
.abrow:hover .abmore, .abmore:focus-visible { opacity: 1; } .abmore:hover { background: var(--surface2); }
@media (hover: none) { .abmore { display: none; } }
.abub { cursor: default; }
.abub { max-width: min(520px, 82%); padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; box-sizing: border-box; overflow-wrap: anywhere; }
.abub.out { background: var(--bubble-out); color: var(--on-bubble-out); border-radius: 16px 16px 4px 16px; }
.abub.in { background: var(--bubble-in); color: var(--bubble-in-text); border: 1px solid var(--air-fill); border-radius: 16px 16px 16px 4px; box-shadow: inset 3px 0 0 var(--air-fill); padding-left: 13px; }
.abtx { font-size: 16px; line-height: 22px; white-space: pre-wrap; }
.abname { display: flex; align-items: center; gap: 4px; font-size: 13px; line-height: 18px; font-weight: 700; }
.abname .ic { width: 13px; height: 13px; color: var(--air); }
.abmeta { align-self: flex-end; display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; font-weight: 500; }
.abub.out .abmeta { color: var(--meta-out); gap: 4px; } .abub.out .abmeta .ic { width: 14px; height: 14px; }
.abub.out .abmeta.lit .ic, .abub.out .abmeta.lit span:not(.abt) { color: var(--ticks-read); }
.abub.in .abmeta .abp { color: var(--air); } .abub.in .abmeta .abt { color: var(--muted); }
.acfab { position: absolute; right: 14px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); color: var(--text); box-shadow: var(--shadow-2); display: grid; place-items: center; border: 1px solid var(--border); }
.acfab .ic { width: 22px; height: 22px; }
.acfab .bdg { position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--pill); background: var(--accent-fill); color: var(--on-accent); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
/* поле ввода-капсула (InputCapsule): r24, 48, кнопка 48 accentFill */
.accomp { display: flex; align-items: flex-end; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); flex: none; max-width: 720px; width: 100%; box-sizing: border-box; align-self: center; }
.acta { flex: 1; min-width: 0; min-height: 48px; max-height: 114px; padding: 13px 16px; border-radius: var(--r24); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; line-height: 22px; resize: none; outline: 0; box-sizing: border-box; }
.acta:focus { border-color: var(--accent); }
.acta::placeholder { color: var(--muted); }
.acsend { width: 48px; height: 48px; border-radius: 50%; background: var(--accent-fill); color: var(--on-accent); display: grid; place-items: center; flex: none; }
.acsend .ic { width: 22px; height: 22px; }
.acsend[disabled] { opacity: .5; cursor: default; }

/* ---------- страницы поверх раздела: «Настройки рации», «Управление», «Связь с ALT», «Карта контактов» ---------- */
.airpage { position: absolute; inset: 0; z-index: 5; background: var(--bg); display: flex; flex-direction: column; min-height: 0; }
.mcscreen.air { position: fixed; }
.rshead { display: flex; align-items: center; height: 56px; padding: 0 8px 0 4px; flex: none; border-bottom: 1px solid var(--border); }
.rshead .mid { flex: 1; min-width: 0; padding-left: 10px; display: flex; flex-direction: column; }
.rshead .mid b { font-size: 17px; line-height: 22px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rshead .mid small { font-size: 13px; line-height: 18px; color: var(--air); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.airpg { flex: 1; min-height: 0; overflow-y: auto; }
.airpgin { max-width: 640px; margin: 0 auto; padding: 12px 16px 32px; display: flex; flex-direction: column; gap: 12px; box-sizing: border-box; }
.airpgin .acard > .aswrow:first-child { padding-top: 0; }
.airpgin .acard > * + * { margin-top: 8px; }
.airpgin .acard > .akv + .akv { margin-top: 0; }
.arowt { display: block; font-size: 16px; line-height: 22px; font-weight: 600; }
.anrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.anrow > span { flex: 1; min-width: 160px; font-size: 15px; color: var(--text); }
.anrow input { width: 96px; min-height: 40px; padding: 6px 10px; border-radius: var(--r12); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; }
/* управление ретранслятором */
.rpbox { display: flex; flex-direction: column; gap: 12px; }
.rpgrid { display: flex; flex-direction: column; gap: 8px; }
.rprow { display: flex; align-items: center; gap: 8px; }
.rprow > .aswrow.grow { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r12); padding: 6px 14px; }
.rpacts { display: flex; flex-wrap: wrap; gap: 8px; }
.rpcon { display: flex; align-items: center; gap: 8px; }
.alog { padding: 10px 14px; }
.rplog { margin: 0; max-height: 280px; overflow: auto; white-space: pre-wrap; word-break: break-word; font: 12.5px/1.45 Consolas, "JetBrains Mono", monospace; color: var(--text); }
.rplog:empty::before { content: 'Пока пусто.'; color: var(--muted); font-family: inherit; }
.rpstat .akv { padding: 2px 0; }
/* карта контактов */
.airpage .mcmapwrap { flex: 1; min-height: 0; }
.airpage .mcchips { padding: 8px 16px; gap: 8px; }
.airpage .chip { min-height: 36px; padding: 0 14px; border-radius: var(--pill); font-size: 14px; }

/* ===================== «Инструменты» (ToolsScreen.kt) ===================== */
.mcscreen.tools { background: var(--bg); font-size: 15px; }
.mcscreen.tools .mchead { background: var(--bg); border-bottom: 1px solid var(--border); min-height: 56px; padding: 0 16px 0 4px; gap: 0; }
.mcscreen.tools .mchead .atile { margin-left: 4px; }
.mcscreen.tools .mchead .mct { padding-left: 10px; }
.mcscreen.tools .mchead .mct b { font-size: 20px; line-height: 26px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.2px; }
.mcscreen.tools .mchead.tbig { min-height: 64px; border-bottom: 0; }
.mcscreen.tools .mchead.tbig .mct { padding-left: 4px; }
.mcscreen.tools .mchead.tbig .mct b { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -.4px; }
.mcscreen.tools .mcbody { padding: 8px 16px 32px; max-width: 960px; display: flex; flex-direction: column; gap: 10px; }
.mcscreen.tools .mcbody > * { margin-top: 0; margin-bottom: 0; }
/* список инструментов: телефон — строки AltRow; от 600 — карточки по 2, от 900 — по 3 (не шире 960) */
.tools .tlistb { padding: 4px 0 24px; }
.tools .tlist { display: flex; flex-direction: column; gap: 0; }
.tools .tcard { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px; border: 0; border-radius: 0; background: transparent; color: var(--text); }
.tools .tcard:hover { background: var(--surface2); border-color: transparent; }
.tools .tcard .tic { width: 36px; height: 36px; border-radius: var(--r8); background: var(--accent-soft); color: var(--accent); }
.tools .tcard .tic .ic { width: 20px; height: 20px; }
.tools .tcard .tmid b { font-size: 16px; line-height: 22px; font-weight: 600; }
.tools .tcard .tmid small { font-size: 13px; line-height: 18px; color: var(--muted); }
.tools .tcard .tchev { color: var(--muted); display: grid; place-items: center; flex: none; } .tools .tcard .tchev .ic { width: 20px; height: 20px; }
@media (min-width: 600px) {
  .tools .tlistb { padding: 16px; }
  .tools .tlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tools .tcard { flex-direction: column; align-items: flex-start; gap: 0; min-height: 132px; padding: 16px; border: 1px solid var(--border); border-radius: var(--r16); background: var(--surface); }
  .tools .tcard:hover { border-color: var(--accent); background: var(--surface); }
  .tools .tcard .tic { width: 44px; height: 44px; border-radius: var(--r12); margin-bottom: 12px; }
  .tools .tcard .tic .ic { width: 22px; height: 22px; }
  .tools .tcard .tmid { gap: 4px; }
  .tools .tcard .tmid small { font-size: 14px; line-height: 20px; color: var(--text2); }
  .tools .tcard .tchev { display: none; }
}
@media (min-width: 900px) { .tools .tlist { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* группа (Group): AltCard r16, отступ 14, заголовок 14/600 text2 */
.tools .group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r16); padding: 14px; margin: 0; gap: 8px; }
.tools .group > label { color: var(--text2); font-size: 14px; line-height: 20px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.tools .hint { color: var(--muted); font-size: 13px; line-height: 18px; text-align: left; margin: 0; }
.tools .hint.air { color: var(--air); }
.tools .hint.err { color: var(--danger); font-size: 15px; line-height: 20px; }
.tools .btn { min-height: 36px; padding: 0 12px; font-size: 14px; }
.tools .btn.primary { align-self: flex-start; }
.tools .btn.block { align-self: stretch; min-height: 48px; font-size: 16px; }
.tools .trow { gap: 8px 14px; }
.tools .tchk { font-size: 15px; gap: 10px; }
.tools .tchk input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent-fill); }
.tools .tnum { color: var(--muted); font-size: 13px; gap: 4px; }
.tools input[type=number], .tools input.tq { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--r12); min-height: 48px; padding: 8px 12px; font: inherit; font-size: 16px; box-sizing: border-box; outline: 0; }
.tools input[type=number]:focus, .tools input.tq:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tools input[type=number] { width: 110px; }
.tools .tseg { margin: 0; min-width: 0; }
.tools .tnum .tseg { width: min(320px, 100%); }
.tools .trow .tseg { flex: 1; min-width: 200px; max-width: 320px; }
/* путь: пилюли 36 accentSoft с номером в круге 26 */
.tools .tchips { gap: 6px; }
.tools .tchip { height: 36px; padding: 0 0 0 4px; gap: 6px; border: 0; border-radius: var(--pill); background: var(--accent-soft); font-size: 14px; font-weight: 600; }
.tools .tchip em { width: 26px; height: 26px; background: var(--accent-fill); color: var(--on-accent); font-size: 12px; }
.tools .tchip .icon-btn.sm { width: 36px; height: 36px; font-size: 16px; color: var(--muted); }
.tools .tchip .icon-btn.sm .ic { width: 16px; height: 16px; }
/* ретрансляторы и узлы: строки 48 r12, плитка 36, номер у выбранных */
.tools .ulist.tl { gap: 2px; max-height: none; }
.tools .ulist .u { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 8px; border-radius: var(--r12); width: 100%; text-align: left; background: transparent; color: var(--text); }
.tools .ulist .u:hover { background: var(--surface2); }
.tools .ulist .u.sel { background: var(--accent-soft); }
.tools .ulist .tmid b { font-size: 15px; line-height: 20px; font-weight: 600; display: block; }
.tools .ulist .u small, .tools .ulist .tmid .hint { color: var(--muted); font-size: 13px; line-height: 18px; display: block; }
.tools .tav { width: 36px; height: 36px; border-radius: var(--r8); background: var(--air-soft); color: var(--air); }
.tools .u.sel .tav { background: var(--accent-fill); color: var(--on-accent); font-size: 14px; border-radius: var(--r12); }
/* «Ближайшие узлы» — карточки r16 с плиткой-антенками 40 */
.tools .mcbody > .ulist.tl > .u { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r16); padding: 10px 14px; gap: 12px; margin-bottom: 6px; }
.tools .mcbody > .ulist.tl > .u .tav { width: 40px; height: 40px; border-radius: var(--r12); background: var(--surface2); }
.tools .mcbody > .ulist.tl > .u .tmid b { font-size: 16px; line-height: 22px; }
/* маршрут трассировки: точка 12 и подпись */
.tools .route { display: flex; flex-direction: column; gap: 10px; }
.tools .rnode { display: flex; align-items: center; gap: 12px; }
.tools .rnode > i { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); flex: none; }
.tools .rnode.src > i { background: var(--air); } .tools .rnode.dst > i { background: var(--near); }
.tools .rnode b { display: block; font-size: 15px; line-height: 20px; font-weight: 600; }
.tools .rnode small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
/* вывод (Verdict): r16, мягкий фон и рамка цветом, значок 22 */
.tools .losv { display: flex; flex-direction: row; align-items: flex-start; gap: 12px; padding: 14px; margin: 0; border-radius: var(--r16); border: 1px solid currentColor; font-size: 15px; }
.tools .losv > .ic { width: 22px; height: 22px; flex: none; stroke-width: 2.2; }
.tools .losv .lvt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tools .losv .lvt b { color: var(--text); font-size: 16px; line-height: 22px; font-weight: 600; }
.tools .losv .lvt div { color: var(--text2); opacity: 1; font-size: 15px; line-height: 20px; }
.tools .losv.ok { background: var(--near-soft); color: var(--ok); } .tools .losv.mid { background: var(--air-soft); color: var(--air); } .tools .losv.bad { background: var(--danger-soft); color: var(--danger); }
.tools .losprof { border-radius: var(--r16); }
.tools .tmaphost { height: 50vh; min-height: 280px; max-height: 600px; border-radius: var(--r16); }
.tools .tmaphost.nmap { height: 55vh; min-height: 300px; max-height: 640px; }
/* журнал RX — карточки r12 */
.tools .rxlog { gap: 6px; }
.tools .rxi { border-radius: var(--r12); padding: 8px 12px; gap: 2px; }
.tools .rxi .rxk { font-size: 13px; }
.tools .rxi .rxp { font-size: 15px; line-height: 20px; }
/* шум */
.tools .noisebig { font-size: 40px; line-height: 46px; font-weight: 700; letter-spacing: -.5px; }
.tools .tcenter { align-items: center; text-align: center; }
.tools .tcenter .hint { text-align: center; }
.tools .noisegraph svg { border-radius: var(--r16); }
/* регионы — пилюли 36 */
.tools .rgchips { gap: 8px; }
.tools .rgchip { min-height: 36px; padding: 0 14px; border-radius: var(--pill); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; }
.tools .rgchip:hover { border-color: var(--accent); }
.tools .tprog { height: 6px; border-radius: var(--pill); background: var(--surface2); }
/* «Нужна рация» */
.tools .mccard.tneed { max-width: 360px; margin: 32px auto; gap: 12px; }
.tools .mccard.tneed .big { width: 96px; height: 96px; }
.tools .mccard.tneed .big .ic { width: 48px; height: 48px; }
.tools .mccard.tneed .btn { width: 100%; }
/* карта сети: чипы, значки узлов, линии по SNR, полёт */
.tools .nchips { display: flex; flex-wrap: wrap; gap: 6px; }
.tools .nctl { flex-wrap: nowrap; }
.tools .nctl .tseg { max-width: none; }
.tools .ncard { gap: 6px; }
.tools .nch { display: flex; align-items: center; gap: 12px; }
.tools .nch .tmid { flex: 1; min-width: 0; } .tools .nch .tmid b { display: block; font-size: 16px; line-height: 22px; } .tools .nch .tmid small { color: var(--muted); font-size: 13px; }
.tools .nbadge { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700; flex: none; }
.tools .nbadge.sq { border-radius: var(--r8); }
.tools .ndot { width: 10px; height: 10px; border-radius: 50%; background: var(--air); flex: none; } .tools .ndot.self { background: var(--accent); }
.tools .nev .nt { color: var(--muted); font-size: 13px; flex: none; }
.tools .nev .tmid small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tools .tok { color: var(--accent); }
.tm-m.sq { border-radius: 6px; }
.tm-m.faded { opacity: .45; }
.tm-ln.nl { stroke-dasharray: none; stroke-linecap: round; }
/* 1.36 (Г): приглушённые тона по SNR; толщина и прозрачность — по числу наблюдений участка (style из tools.js) */
.tm-ln.nl { stroke-width: 1.4; opacity: .3; }
.tm-ln.nl.lk0 { stroke: #6F9FCB; } .tm-ln.nl.lk4, .tm-ln.nl.lk3 { stroke: #4FA982; }
.tm-ln.nl.lk2 { stroke: #D9A54A; } .tm-ln.nl.lk1 { stroke: #D27A6A; }
.tm-ln.nl.guess { stroke-dasharray: 6 5; } .tm-ln.nl.fade { opacity: .3; }
/* 2.0-dev11: фильтры карты сети — чипы с цветной точкой и счётчиком (вкл/выкл) */
.tools .nfilt { display: flex; flex-wrap: wrap; gap: 6px; }
.tools .nfc { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: var(--pill); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; }
.tools .nfc i { width: 10px; height: 10px; border-radius: 50%; background: var(--nc); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--nc) 22%, transparent); }
.tools .nfc i.sq { border-radius: 3px; }
.tools .nfc em { font-style: normal; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.tools .nfc.off { background: transparent; color: var(--muted); border-style: dashed; } .tools .nfc.off i { background: transparent; box-shadow: inset 0 0 0 2px var(--nc); }
.tools .nfc:hover { border-color: var(--nc); }
.tools .ngw { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: var(--r8); background: var(--near-soft); color: var(--near); font-size: 12px; font-weight: 600; }
.tm-m .tm-st { position: absolute; right: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; background: #15803D; }
.tm-m .tm-st.dn { background: #C8102E; }
.tm-fly { position: absolute; left: 0; top: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--fc, #2B5FE0); box-shadow: 0 0 0 4px rgba(255, 255, 255, .85), 0 0 12px 4px var(--fc, #2B5FE0); z-index: 4; pointer-events: none; transition: opacity .35s; }
.tm-fly.end { opacity: 0; }
/* сигнал-антенки — те же .sig (style.css); цвета — из палитры */
.mcscreen .sig.g i.on { background: var(--ok); } .mcscreen .sig.y i.on { background: var(--air-fill); } .mcscreen .sig.r i.on { background: var(--danger); }

/* ===================== всплывающее меню ⋮ (как DropdownMenu приложения) ===================== */
.mcpop .it { gap: 12px; min-height: 48px; padding: 8px 12px; font-size: 15px; font-weight: 500; color: var(--text); }
.mcpop .it > .ic { box-sizing: content-box; width: 20px; height: 20px; padding: 8px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.mcpop .it.danger > .ic { background: var(--danger-soft); color: var(--danger); }
/* поправки раскладки: элементы страниц инструментов не сжимаются (прокручивается тело страницы) */
.mcscreen.tools .mcbody > *, .tools .tlist > .tcard { flex: none; }
.tools .tchk .tseg { width: 240px; flex: none; }
.astate .arow0 .mid b { white-space: normal; }
@media (min-width: 600px) { .tools .tcard .tmid { flex: none; width: 100%; } }
.tools .tlist { max-height: none; overflow: visible; }

/* 1.30: причина «не попало в чаты», привязка канала, значок типа узла у аватара */
.aissue { margin-top: 8px; border: 1px solid var(--air); }
.aissue small { white-space: normal; }
.abind .modal { max-height: 80vh; overflow: auto; }
.abind .arow { width: 100%; }
.abtns + .abtns { margin-top: 6px; }
.avwrap { position: relative; display: inline-flex; flex: none; }
.avwrap .avtype { position: absolute; right: -2px; bottom: -2px; width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  background: var(--surface, #fff); color: var(--air); box-shadow: 0 0 0 2px var(--surface, #fff); }
.avwrap .avtype .ic { width: 12px; height: 12px; }
.airinfo .acfx + .acfx { margin-top: 4px; }

/* ---------- 1.32: «Маршрут сообщения» — стрелки между кружками пути 1 → 2 → 3 и сила сигнала у SNR ---------- */
.rthops { gap: 0; }
.rtarr { display: flex; align-items: center; height: 22px; padding-left: 12px; }
.rtarl { position: relative; width: 2px; align-self: stretch; margin: 3px 0 8px; background: var(--text2); border-radius: 1px; }
.rtarl::after { content: ''; position: absolute; left: -4px; bottom: -6px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--text2); }
.rtarr.fan .rtarl, .rtarr.guess .rtarl { background: repeating-linear-gradient(to bottom, var(--muted) 0 3px, transparent 3px 6px); }
.rtarr.fan .rtarl::after, .rtarr.guess .rtarl::after { border-top-color: var(--muted); }
.rtarr small { margin-left: 12px; font-size: 12px; line-height: 16px; color: var(--muted); }
.rthop small { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.rthop small .rtsig { margin: 0; font-size: 13px; color: var(--text); }
/* пересылка в эфир через шлюз ALT */
.fwdlist .fwdgw small { color: var(--air); }
/* 1.32: «⋮» у сообщения эфира видна всегда (бледно), при наведении — ярче: во всех каналах рации, как просил владелец */
@media (hover: hover) and (pointer: fine) { .abmore { opacity: .5; } .abrow:hover .abmore { opacity: 1; } }
/* подпись «через шлюз» у имени отправителя в «Эфире» (это лишь подпись, не проверенная личность) */
.abname .abvia { font-weight: 500; color: var(--muted); }
/* 1.33: выбор нескольких сообщений «Эфира» (как в беседе): строка подсвечена, шапка — «Выбрано: N · копировать · удалить» */
.abrow.sel { background: var(--accent-soft, rgba(46, 107, 240, .12)); border-radius: 12px; }
.acselbar .icon-btn.danger { color: var(--danger); }
.acselbar .mid b { font-size: 17px; }
/* 1.33: «Соседи» ретранслятора — заметная карточка: карта с линиями связей (расстояние посередине), список, «без координат» */
.rpnb { border: 1px solid var(--air-fill); background: var(--air-soft); margin-top: 8px; }
.rpnb .tmaphost.rpnbmap { height: 260px; min-height: 220px; margin-top: 10px; }
.rpnb .nblist { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.rpnb .nbrow { display: flex; align-items: center; gap: 10px; }
.rpnb .nbrow .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rpnb .nbrow small { color: var(--muted); font-size: 12px; }
.rpnb .nbdot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.rpnb .arow0 .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rpnb .arow0 small { color: var(--text2); }

/* 1.38 (редизайн): группировка пузырей «Эфира» — подряд от одного автора в пределах 3 мин: 2 px внутри группы, 10 px между,
   имя у первого, хвостик у последнего; подпись пути — общая (pathsig.js, .meta.psig в style.css) */
.acmsgs { gap: 0; }
.acmsgs > .abrow { margin-top: 10px; }
.acmsgs > .abrow:not(.first) { margin-top: 2px; }
.acmsgs > .acday { margin-top: 10px; }
.abrow.out:not(.last) .abub { border-radius: 16px; }
.abrow.in:not(.last) .abub { border-radius: 16px; }
.abub.in .meta.psig, .abub.out .meta.psig { margin-top: 2px; }
