@font-face { font-family: "PT Sans"; src: url(/assets/pt-sans-400.woff) format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "PT Sans"; src: url(/assets/pt-sans-700.woff) format("woff"); font-weight: 700; font-display: swap; }

:root {
  --bg: #F4F3F1;
  --panel: #FFFFFF;
  --ink: #2B2B2B;
  --muted: #6B665F;
  --line: #E2DED8;
  --accent: #FF9509;      /* логотип lizaalert.org */
  --accent-ink: #9A4A00;  /* оранжевый для текста: на белом читается */
  --accent-soft: #FFF1DD;
  --ok: #2F8F5B;
  --warn: #B7791F;
  --bad: #C8423B;
  --stale: #9A958E;
  --radius: 6px;
  --on-accent: #231400;
  --accent-hover: #F08A00;
  --field: #FFFFFF;
  --head: #FAF9F7;
  --bad-soft: #FBE9E7;
  --track: #C8423B;
  --map-bg: #E9E6E1;
  --pin-label: #FFFFFFF0;
  --chip-dark: #2B2B2B;
  --chip-dark-ink: #FFFFFF;
  --focus: #2B2B2B55;
  --tiles: none;
  color-scheme: light;
}

/* тёмная тема - по настройке системы, как в приложении */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131211;
    --panel: #1D1B19;
    --ink: #F2EFEA;
    --muted: #A39D94;
    --line: #34312D;
    --accent: #FF9F1F;
    --accent-ink: #FFB866;
    --accent-soft: #3A2A15;
    --ok: #55B985;
    --warn: #E0A04A;
    --bad: #E5645C;
    --stale: #7D776F;
    --accent-hover: #FFB042;
    --field: #252320;
    --head: #222019;
    --bad-soft: #3A1F1C;
    --track: #FF7A6E;
    --map-bg: #22201D;
    --pin-label: #1D1B19F0;
    --chip-dark: #F2EFEA;
    --chip-dark-ink: #131211;
    --focus: #F2EFEA66;
    /* карту не перекрашиваем (на поиске цвета леса и дорог важны), только приглушаем яркость */
    --tiles: brightness(0.8) contrast(1.05);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.45 "PT Sans", system-ui, sans-serif; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h2 { font-size: 15px; font-weight: 700; }
a { color: var(--accent-ink); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--bad); min-height: 1.4em; margin: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
.noscript { padding: 24px; }

/* кнопки */
.btn { font: inherit; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: var(--radius);
  padding: 7px 14px; cursor: pointer; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--bad); }
.btn.link { border: 0; background: none; padding: 4px 6px; color: var(--muted); }
.btn.link:hover { color: var(--ink); }
.btn:disabled { opacity: .45; cursor: default; }
.btn:focus-visible, input:focus-visible, select:focus-visible, .ptt:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

input, select, textarea { font: inherit; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 7px 9px; width: 100%; }
label { display: block; font-size: 13px; color: var(--muted); }
label > input, label > select { margin-top: 3px; color: var(--ink); font-size: 15px; }
input:disabled, select:disabled { background: var(--bg); color: var(--muted); }
input.check { width: 18px; height: 18px; margin: 0 6px 0 0; accent-color: var(--accent); }
label.row { color: var(--ink); font-size: 15px; margin-right: 14px; }

/* вход */
.login { min-height: 100dvh; display: flex; align-items: flex-start; justify-content: center; padding: 14vh 24px 24px; }
.login-box { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 12px; }
.login-box h1 { font-size: 30px; margin-top: 6px; }
.login-box .muted { margin: -6px 0 6px; }
.login-box .btn { padding: 10px; }

/* каркас */
.app { height: 100dvh; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 18px; padding: 0 14px; height: 48px; background: var(--panel); border-bottom: 1px solid var(--line); flex: none; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 17px; }
.tabs { display: flex; gap: 2px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.tabs a { padding: 13px 10px 11px; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 700; }
.me { display: flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--muted); font-size: 14px; }

.view { flex: 1; min-height: 0; }
.map-view { display: flex; }
.side { width: 330px; flex: none; display: flex; flex-direction: column; background: var(--panel); border-right: 1px solid var(--line); min-height: 0; }
.side-block { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.side-block.grow { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.side-block .muted.small { margin: 2px 0 8px; }
.map { flex: 1; min-width: 0; background: var(--map-bg); }
.leaflet-tile-pane { filter: var(--tiles); }

/* каналы */
.channel-list, .people-list { list-style: none; margin: 0; padding: 0; }
.channel-list { overflow-y: auto; flex: 1; min-height: 0; margin: 4px -14px 0; }
.channel-list > li.ch { border-bottom: 1px solid var(--line); }
.channel-list > li.ch.here > .ch-row { box-shadow: inset 3px 0 0 var(--accent); }
.channel-list > li.muted { padding: 8px 14px; }
.ch-row { display: flex; align-items: center; gap: 4px; padding: 4px 10px 4px 6px; }
.ch-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; font: inherit; color: var(--ink);
  background: none; border: 0; padding: 6px 4px; text-align: left; cursor: pointer; border-radius: var(--radius); }
.ch-open:hover { background: var(--bg); }
.ch-open .caret { width: 14px; flex: none; color: var(--muted); }
.ch-open .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ch-open .talking { margin-left: auto; }
.tog { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border: 1px solid var(--line);
  background: var(--panel); border-radius: var(--radius); color: var(--muted); cursor: pointer; padding: 0; }
.tog svg { width: 18px; height: 18px; fill: currentColor; }
.tog:hover { color: var(--ink); }
.tog.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.small-btn { padding: 3px 10px; font-size: 14px; }
.side-block .ch-new { margin: 8px 0 0; }
.talking { color: var(--accent-ink); font-weight: 700; font-size: 13px; white-space: nowrap; }
.talking::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 5px; vertical-align: 1px; }

/* люди */
.filter { margin: 8px 0; }
.people-list { margin: 0 0 6px; }
.people-list li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 14px 6px 30px; cursor: pointer; }
.people-list li:hover { background: var(--bg); }
.people-list li.selected { background: var(--accent-soft); }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--stale); }
.dot.online { background: var(--ok); }
.dot.talk { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.people-list .who { flex: 1; min-width: 0; }
.people-list .who b { font-weight: 700; }
.people-list .meta { font-size: 13px; color: var(--muted); }

/* кнопка эфира */
.ptt-block { padding: 12px 14px 14px; }
.voice-status { margin: 0 0 8px; min-height: 1.3em; }
.ptt { width: 100%; min-height: 76px; border: 2px solid var(--accent); background: var(--accent-soft); color: var(--ink); border-radius: 10px;
  font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  user-select: none; -webkit-user-select: none; touch-action: none; }
.ptt-main { font-size: 18px; font-weight: 700; }
.ptt-sub { font-size: 13px; color: var(--muted); }
.ptt.on { background: var(--accent); color: var(--on-accent); }
.ptt.on .ptt-sub { color: var(--on-accent); }
.ptt.busy { border-color: var(--bad); background: var(--bad-soft); }
.ptt:disabled { opacity: .5; cursor: default; }

/* метки на карте */
.pin { position: relative; display: flex; align-items: center; gap: 5px; white-space: nowrap; transform: translate(-7px, -7px); }
.pin i { width: 14px; height: 14px; border-radius: 50%; background: var(--stale); border: 2px solid var(--panel); box-shadow: 0 0 0 1px #0004; flex: none;
  transition: background-color .3s, transform .3s; animation: pin-in .4s cubic-bezier(.2, .9, .3, 1.3); }
.pin span { background: var(--pin-label); color: var(--ink); padding: 1px 5px; border-radius: 3px; font-size: 12px; box-shadow: 0 0 0 1px #0002;
  transition: background-color .3s, color .3s; animation: pin-in .4s ease-out; }
.pin:not(.online):not(.talk) span { opacity: .75; }
.pin.online i { background: var(--ok); }
.pin.talk i { background: var(--accent); transform: scale(1.25); }
.pin.talk span { background: var(--accent); color: var(--on-accent); font-weight: 600; }
/* говорящий: от точки расходятся волны, как от антенны */
.pin .waves { position: absolute; left: 0; top: 0; width: 14px; height: 14px; pointer-events: none; display: none; }
.pin.talk .waves { display: block; }
.pin .waves s { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); opacity: 0;
  animation: wave 1.8s cubic-bezier(.1, .6, .4, 1) infinite; }
.pin .waves s:nth-child(2) { animation-delay: .6s; }
.pin .waves s:nth-child(3) { animation-delay: 1.2s; }
@keyframes wave { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(5); opacity: 0; } }
@keyframes pin-in { from { transform: scale(.3); opacity: 0; } }
.track-start { animation: fade-in .4s ease-out; }
@keyframes fade-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .pin i, .pin span, .track-start { animation: none; }
  .pin .waves s { animation: none; opacity: .6; transform: scale(2); }
  .pin .waves s + s { display: none; }
}
.leaflet-container { font: inherit; }
.leaflet-popup-content { margin: 10px 12px; font-size: 14px; }
/* элементы Leaflet в цветах темы: иначе в тёмной теме на карте белые пятна */
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--ink); }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-bar a, .leaflet-bar a:hover { background: var(--panel); color: var(--ink); border-bottom-color: var(--line); }
.leaflet-bar { border-color: var(--line) !important; }
.leaflet-container .leaflet-control-attribution { background: color-mix(in srgb, var(--panel) 80%, transparent); color: var(--muted); }
.leaflet-control-attribution a { color: var(--accent-ink); }
.leaflet-popup-content p { margin: 4px 0; }

/* страницы администрирования */
.page { overflow-y: auto; padding: 18px 20px 40px; }
.page-inner { max-width: 1100px; margin: 0 auto; }
.page h1 { font-size: 22px; margin-bottom: 4px; }
.page .lead { margin: 0 0 16px; color: var(--muted); max-width: 60em; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 0 0 14px; }
.toolbar label { min-width: 150px; }
table { border-collapse: collapse; width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 400; background: var(--head); }
tr:last-child td { border-bottom: 0; }
td .btn { padding: 4px 10px; font-size: 14px; }
.tag { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 3px; background: var(--bg); color: var(--muted); }
.tag.admin { background: var(--chip-dark); color: var(--chip-dark-ink); }
.tag.dispatcher { background: var(--accent-soft); color: var(--accent-ink); }
.tag.off { background: var(--bad-soft); color: var(--bad); }
.form-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 0 0 16px; max-width: 760px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 12px; }
.form-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.secret { font-family: ui-monospace, monospace; background: var(--accent-soft); padding: 10px; border-radius: var(--radius); word-break: break-all; margin: 8px 0; }
.settings-list { max-width: 640px; }
.settings-list .item { display: grid; grid-template-columns: 1fr 120px; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.settings-list .item .muted { font-size: 13px; }
audio { width: 260px; height: 32px; }

.toast { position: fixed; left: 16px; bottom: 16px; max-width: min(420px, calc(100vw - 32px)); background: var(--chip-dark); color: var(--chip-dark-ink);
  padding: 10px 14px; border-radius: var(--radius); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 2000; }
.toast.show { opacity: 1; }

/* раздел "Каналы": список слева, выбранный канал справа */
.ch-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; max-width: 1240px; margin: 0 auto; align-items: start; }
.ch-side { position: sticky; top: 0; }
.ch-side h1 { margin-bottom: 4px; }
.ch-side > .muted { margin: 0 0 12px; }
.ch-new, .sg-new { display: flex; gap: 6px; margin: 0 0 10px; }
.ch-new input, .sg-new input { flex: 1; min-width: 0; }
.ch-side input[type=search] { width: 100%; margin: 0 0 8px; }
.ch-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ch-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; text-align: left; font: inherit; color: var(--ink);
  background: none; border: 0; border-bottom: 1px solid var(--line); padding: 9px 10px; cursor: pointer; }
.ch-item:hover { background: var(--head); }
.ch-item.active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.ch-item .ch-name { font-weight: 600; }
.ch-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.ch-head h2 { font-size: 22px; margin: 0; }
.ch-head .muted { margin: 2px 0 0; }
.ch-main h3 { font-size: 16px; margin: 0 0 8px; }
.sg-block { margin: 0 0 22px; }
.sg { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin: 0 0 8px; transition: border-color .15s; }
.sg.drop { border-color: var(--accent); background: var(--accent-soft); }
.sg-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sg-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; }
.sg-count { padding: 2px 4px; }
.sg-actions { margin-left: auto; display: flex; gap: 2px; align-items: center; flex-wrap: wrap; }
.sg-files { list-style: none; margin: 8px 0 0; padding: 0; }
.sg-files li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 0 4px 20px; border-top: 1px dashed var(--line); }
.sg-files li.off .f-name { color: var(--muted); text-decoration: line-through; }
.sg-files .f-name { font-weight: 600; word-break: break-all; }
.sg-files .f-actions { margin-left: auto; }
.sg-hint { margin: 6px 0 0 20px; }
.people-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 8px; }
.people-head h3 { margin: 0; }
.toolbar label.grow { flex: 1; min-width: 200px; }
.toolbar label.grow input { width: 100%; }
.bulk { position: sticky; top: -18px; z-index: 5; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--accent); border-radius: var(--radius); padding: 8px 12px; margin: 0 0 10px; }
table.people td { vertical-align: middle; padding: 6px 10px; }
table.people tr.picked td { background: var(--accent-soft); }
table.people tbody tr:hover td { background: var(--head); }
table.people tr.picked:hover td { background: var(--accent-soft); }
.c-pick { width: 34px; }
.c-pick input { width: 18px; height: 18px; }
.sg-cell { display: inline-flex; align-items: center; gap: 6px; }
.sg-select { padding: 3px 6px; min-width: 120px; }
.dot.inline { display: inline-block; margin: 0; vertical-align: middle; }
@media (max-width: 860px) {
  .ch-layout { grid-template-columns: 1fr; }
  .ch-side { position: static; }
  .ch-list { max-height: 30dvh; overflow-y: auto; }
  .bulk { top: -14px; }
}

/* цвета подгрупп (набор сервера store.SubgroupColors): классом, строку style запрещает CSP */
.sgc-2F6FDB { background: #2F6FDB; }
.sgc-C2338A { background: #C2338A; }
.sgc-1E9C8C { background: #1E9C8C; }
.sgc-8A5CD6 { background: #8A5CD6; }
.sgc-C0392B { background: #C0392B; }
.sgc-7A8B1E { background: #7A8B1E; }
.sgc-0B7FA8 { background: #0B7FA8; }
.sgc-B5651D { background: #B5651D; }
/* панель слоёв карты */
.lv-layers { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.lv-layers-btn { font: inherit; font-weight: 700; font-size: 14px; color: var(--ink); background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 7px 14px; cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.lv-layers-btn[aria-expanded="true"] { border-color: var(--accent); }
.lv-layers-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px 12px;
  min-width: 240px; max-width: min(360px, calc(100vw - 80px)); max-height: 60dvh; overflow-y: auto; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.lv-layers-title { font-size: 13px; color: var(--muted); margin: 6px 0 6px; }
.lv-layers-title:first-child { margin-top: 0; }
.lv-seg { display: flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lv-seg button { flex: 1; font: inherit; font-size: 14px; color: var(--ink); background: none; border: 0; padding: 6px 10px; cursor: pointer; white-space: nowrap; }
.lv-seg button + button { border-left: 1px solid var(--line); }
.lv-seg button.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.lv-task { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 14px; color: var(--ink); cursor: pointer; line-height: 1.3; }
.lv-task input { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--accent); }
.lv-task .sg-dot { flex: none; }
.ya-logo { font-weight: 700; color: #d00 !important; }

/* предпросмотр GPX */
.gpx-dialog { width: min(1100px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 16px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--panel); color: var(--ink); }
.gpx-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.gpx-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 0 0 10px; }
.gpx-head p { margin: 2px 0 0; }
.gpx-map { height: min(62dvh, 640px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--map-bg); }
.gpx-points { margin: 10px 0 0; }
.gpx-points ul { margin: 6px 0 0; padding-left: 18px; max-height: 20dvh; overflow: auto; }

/* узкие экраны: карта сверху, панель снизу, вкладки прокручиваются */
@media (max-width: 760px) {
  .top { gap: 8px; padding: 0 8px; }
  .brand span, .me span { display: none; }
  .map-view { flex-direction: column-reverse; }
  .side { width: auto; border-right: 0; border-top: 1px solid var(--line); max-height: 55dvh; }
  .map { min-height: 45dvh; }
  .page { padding: 14px 12px 32px; }
  table { font-size: 14px; }
  .hide-narrow { display: none; }
}
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }


/* роли: строки - права, столбцы - роли; на узком экране таблица листается вбок внутри себя */
.table-scroll { overflow-x: auto; }
table.roles-table { min-width: 560px; }
table.roles-table td { vertical-align: middle; }
table.roles-table .role-col { text-align: center; width: 110px; }
table.roles-table .role-col .check { margin: 0; }
table.roles-table th .btn.link { padding: 0; font-weight: 600; color: var(--ink); }
.people-list .mute-btn { margin-top: 6px; padding: 3px 10px; font-size: 13px; }
.leaflet-popup .mute-btn { margin-top: 4px; }

/* меню канала по правому клику */
.ctx-menu { position: fixed; z-index: 2000; min-width: 210px; padding: 4px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 6px 20px #0003; display: flex; flex-direction: column; }
.ctx-menu button { font: inherit; text-align: left; background: none; border: 0; color: var(--ink); padding: 8px 12px; border-radius: 4px; cursor: pointer; }
.ctx-menu button:hover, .ctx-menu button:focus-visible { background: var(--accent-soft); outline: none; }
.ch-open .muted.small { margin: 0 0 0 4px; }

/* группы внутри канала на карте */
.channel-list .grp { display: flex; align-items: center; gap: 6px; padding: 6px 14px 2px 30px; font-size: 14px; font-weight: 600; }
.channel-list .grp .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel-list .grp.none .name { font-weight: 400; }
.channel-list .grp + .people-list li { padding-left: 46px; }
.swatch { width: 10px; height: 10px; border-radius: 2px; flex: none; }

/* окно выбора людей */
.modal-back { position: fixed; inset: 0; z-index: 2100; background: #0006; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  width: min(420px, 100%); max-height: 80dvh; display: flex; flex-direction: column; gap: 10px; }
.pick-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; }
.pick-list li { padding: 4px 0; }

/* настройки: блоки одной колонкой, у полей с длинным значением поле шире */
.settings-list .form-actions { margin-top: 14px; }
.settings-list .item.wide { grid-template-columns: 1fr minmax(0, 300px); }
.settings-list .item.wide .muted { overflow-wrap: anywhere; }
.settings-section { max-width: 640px; margin-top: 36px; }
.settings-section h2 { font-size: 18px; margin: 0 0 4px; }
.settings-section > .muted.small { margin: 0 0 4px; }
.settings-list .form-actions .muted.small { align-self: center; }
@media (max-width: 560px) { .settings-list .item.wide { grid-template-columns: 1fr; } }

/* настройки разделами, как Каналы: слева список, справа раздел */
.set-layout { display: grid; grid-template-columns: 220px minmax(0, 640px); gap: 32px; max-width: 900px; margin: 0 auto; align-items: start; }
.set-side { position: sticky; top: 0; }
.set-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }
.set-tab { font: inherit; color: var(--ink); text-align: left; background: none; border: 0; border-radius: var(--radius); padding: 9px 12px; cursor: pointer; }
.set-tab:hover { background: var(--head); }
.set-tab.active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); font-weight: 600; }
.set-main h2 { font-size: 18px; margin: 4px 0 2px; }
.set-main > div > h2 { margin-top: 4px; }
@media (max-width: 720px) {
  .set-layout { grid-template-columns: 1fr; gap: 12px; }
  .set-side { position: static; }
  .set-nav { flex-direction: row; overflow-x: auto; gap: 6px; margin-top: 8px; }
  .set-tab { white-space: nowrap; border: 1px solid var(--line); }
}
.set-side, .set-main { min-width: 0; }

/* полоса внизу: бренд, лицензия, что работает, время. Тонкая, как подпись источников карты */
.statusbar { flex: none; display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; padding: 2px 12px;
  font-size: 12px; line-height: 18px; color: var(--muted); background: var(--panel); border-top: 1px solid var(--line); }
.statusbar a { color: var(--muted); }
.statusbar a:hover { color: var(--ink); }
.sb-brand { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--ink); }
.sb-sys { margin-left: auto; display: inline-flex; gap: 10px; }
.sb-ind { display: inline-flex; align-items: center; gap: 4px; cursor: default; }
.sb-ind i { width: 7px; height: 7px; border-radius: 50%; background: var(--stale); }
.sb-ind i.ok { background: var(--ok); }
.sb-ind i.down { background: var(--bad, #C8423B); }
.sb-time { font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .sb-wide { display: none; } }
@media (max-width: 560px) { .sb-sys { margin-left: 0; } .statusbar { gap: 2px 10px; } }

/* слои: задачи и треки деревом канал - группа */
.lv-tree { max-height: 50vh; overflow-y: auto; }
.lv-ch { font-weight: 700; font-size: 14px; margin: 8px 0 2px; }
.lv-grp { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.lv-task.task { font-weight: 600; }
.sg-line { width: 14px; height: 3px; border-radius: 2px; flex: none; }
.ctx-menu button:disabled { color: var(--muted); cursor: default; background: none; }

/* карточка поисковика */
.info-title { font-size: 18px; }
.info-row { display: grid; grid-template-columns: 130px 1fr; gap: 8px; font-size: 14px; }
.info-row .copy { padding: 0; color: var(--accent-ink); text-align: left; }
.sb-studio { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
.sb-studio picture { display: inline-flex; }

/* находки на карте */
.find-pin { transform: translate(-13px, -13px); }
.find-pin b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; transform: rotate(45deg);
  color: #fff; font-weight: 700; font-size: 15px; border: 2px solid #fff; box-shadow: 0 0 0 1px #0005; }
.find-pin b { line-height: 1; }
.find-card p { margin: 4px 0; }
.find-note { font-size: 15px; }
.find-photos { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.find-photos img { width: 96px; height: 96px; object-fit: cover; border-radius: 4px; cursor: zoom-in; background: var(--head); }
.modal-back.photo img { max-width: 96vw; max-height: 92dvh; border-radius: 4px; }
.find-pin b i { font-style: normal; transform: rotate(-45deg); }
.task-label { font-weight: 700; }
.hidden-color { position: fixed; left: 50%; top: 40%; opacity: 0; width: 1px; height: 1px; }
.ctx-menu .row { gap: 8px; }
