
:root {
  --bg: #f2f4f8; --surface: #ffffff; --surface-2: #eef1f6; --border: #e2e6ee;
  --text: #1a1f29; --text-dim: #6b7280; --accent: #2f6fed; --accent-soft: rgba(47,111,237,.10);
  --long: #16a34a; --long-soft: rgba(22,163,74,.12); --short: #dc2626; --short-soft: rgba(220,38,38,.10);
  --watch: #d97706; --watch-soft: rgba(217,119,6,.12);
  --sb-bg: #161a23; --sb-bg-active: #1f2536; --sb-border: #262c3b; --sb-text: #aab2c5; --sb-dim: #626a7d; --sb-active: #ffffff;
  --tg: #2aabee; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 6px 20px rgba(16,24,40,.06);
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, ui-monospace, monospace;
  --sans: "Segoe UI", -apple-system, system-ui, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1117; --surface: #161a22; --surface-2: #1c212c; --border: #272e3c;
    --text: #e7eaf1; --text-dim: #8d95a7; --accent: #5b8cff; --accent-soft: rgba(91,140,255,.16);
    --long: #34c26b; --long-soft: rgba(52,194,107,.15); --short: #f25555; --short-soft: rgba(242,85,85,.14);
    --watch: #f0a23a; --watch-soft: rgba(240,162,58,.15);
    --sb-bg: #0b0e13; --sb-bg-active: #1a2030; --sb-border: #1e2432;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1117; --surface: #161a22; --surface-2: #1c212c; --border: #272e3c;
  --text: #e7eaf1; --text-dim: #8d95a7; --accent: #5b8cff; --accent-soft: rgba(91,140,255,.16);
  --long: #34c26b; --long-soft: rgba(52,194,107,.15); --short: #f25555; --short-soft: rgba(242,85,85,.14);
  --watch: #f0a23a; --watch-soft: rgba(240,162,58,.15);
  --sb-bg: #0b0e13; --sb-bg-active: #1a2030; --sb-border: #1e2432;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
.dim { color: var(--text-dim); }
._unused_proto { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 7px 16px; font-size: 12px;
  background: var(--watch-soft); color: var(--text); border-bottom: 1px solid var(--border); }
._unused_proto b { color: var(--watch); }
._unused_proto .sp { flex: 1; }
._unused_proto button { border: 1px solid var(--border); background: var(--surface); border-radius: 6px; padding: 2px 9px; font-size: 12px; }

/* ---------- экран входа ---------- */
.login { min-height: calc(100% - 34px); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.login-brand { background: var(--sb-bg); color: var(--sb-text); padding: 40px clamp(20px, 5vw, 64px); display: flex; flex-direction: column; gap: 28px; }
.brandline { display: flex; align-items: center; gap: 12px; }
.brandline img { width: 42px; height: 42px; border-radius: 10px; }
.brandline .t1 { color: #fff; font-weight: 700; font-size: 18px; letter-spacing: .02em; }
.brandline .t2 { font-size: 11px; letter-spacing: .18em; color: var(--sb-dim); }
.login-brand h1 { color: #fff; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.15; max-width: 16ch; }
.login-brand p { max-width: 52ch; margin: 0; }
.tape { border: 1px solid var(--sb-border); border-radius: 12px; overflow: hidden; }
.tape-h { padding: 8px 14px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--sb-dim); border-bottom: 1px solid var(--sb-border); }
.tape-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--sb-border); font-size: 13px; align-items: center; }
.tape-row:last-child { border-bottom: 0; }
.tape-row .tm { font-family: var(--mono); color: var(--sb-dim); font-size: 12px; }
.tape-row .nm { color: #fff; font-weight: 600; }
.tape-row .ev { font-size: 12px; }
.up { color: #34c26b; } .dn { color: #f25555; }
.login-form { padding: 40px clamp(20px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; gap: 18px; max-width: 520px; }
.steps { display: flex; gap: 8px; font-size: 12px; color: var(--text-dim); }
.steps span { padding: 3px 10px; border-radius: 999px; background: var(--surface-2); }
.steps span.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.tg-btn { display: inline-flex; align-items: center; gap: 10px; background: var(--tg); color: #fff; border: 0; border-radius: 22px;
  padding: 11px 22px 11px 16px; font-size: 15px; font-weight: 600; align-self: flex-start; }
.tg-btn:hover { filter: brightness(1.05); }
.tg-btn svg { width: 22px; height: 22px; }
.note { font-size: 12px; color: var(--text-dim); }
.sheet { border: 1px solid var(--border); background: var(--surface); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.sheet .row { display: flex; gap: 12px; align-items: center; }
.ava { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #3a7bd5, #2aabee); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.btn { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 7px 14px; font-weight: 600; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.06); background: var(--accent); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--short); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- приложение ---------- */
.app { display: flex; min-height: calc(100% - 34px); }
.side { width: 232px; flex: none; background: var(--sb-bg); color: var(--sb-text); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; }
.side .brandline { padding: 4px 8px 16px; }
.side .grp { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--sb-dim); padding: 14px 10px 6px; }
.nav { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--sb-text); border: 0; background: transparent; text-align: left; width: 100%; font-size: 13.5px; }
.nav:hover { background: var(--sb-bg-active); color: #fff; }
.nav.on { background: var(--sb-bg-active); color: var(--sb-active); box-shadow: inset 2px 0 0 var(--accent); }
.nav .ic { width: 18px; text-align: center; opacity: .9; }
.nav .badge { margin-left: auto; font-size: 11px; font-family: var(--mono); color: var(--sb-dim); }
.side .me { margin-top: auto; border-top: 1px solid var(--sb-border); padding: 12px 8px 0; display: flex; gap: 10px; align-items: center; font-size: 12.5px; }
.side .me .ava { width: 32px; height: 32px; font-size: 13px; }
.side .me b { color: #fff; font-weight: 600; display: block; }
.main { flex: 1; min-width: 0; padding: 22px clamp(16px, 3vw, 36px) 40px; display: flex; flex-direction: column; gap: 18px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.head h2 { font-size: 22px; }
.head p { margin: 4px 0 0; color: var(--text-dim); max-width: 70ch; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.card h3 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 12px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.long { background: var(--long-soft); color: var(--long); }
.pill.short { background: var(--short-soft); color: var(--short); }
.pill.neutral { background: var(--surface-2); color: var(--text-dim); }
.pill.warn { background: var(--watch-soft); color: var(--watch); }
.pill.acc { background: var(--accent-soft); color: var(--accent); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip:disabled { opacity: .5; cursor: not-allowed; }

/* лента */
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.sig { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.sig img { display: block; width: 100%; aspect-ratio: 760 / 470; object-fit: cover; object-position: left top; background: #fff; cursor: zoom-in; border-bottom: 1px solid var(--border); }
.sig .body { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.sig .top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.sig .nm { font-weight: 700; }
.sig .tm { font-family: var(--mono); font-size: 12px; color: var(--text-dim); }
.sig .lv { font-family: var(--mono); font-size: 12.5px; }
.sig .prev { font-size: 11.5px; color: var(--text-dim); }
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }

/* уведомления */
.est { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.est .big { font-family: var(--mono); font-size: 30px; font-weight: 700; line-height: 1; }
.meter { flex: 1; min-width: 180px; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--long); border-radius: 99px; transition: width .2s; }
.matrix td.inst { font-weight: 600; white-space: nowrap; }
.matrix td.inst small { display: block; font-weight: 400; color: var(--text-dim); font-size: 11.5px; }
.matrix td.c { text-align: center; }
.matrix td.rate { font-family: var(--mono); font-size: 12px; color: var(--text-dim); text-align: right; white-space: nowrap; }
.matrix tr.grp td { background: var(--surface-2); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); font-weight: 600; padding: 6px 10px; }
.tog { position: relative; display: inline-block; width: 36px; height: 20px; }
.tog input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.tog span { position: absolute; inset: 0; border-radius: 99px; background: var(--border); transition: background .15s; }
.tog span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.tog input:checked + span { background: var(--accent); }
.tog input:checked + span::after { transform: translateX(16px); }
.tog input:disabled + span { opacity: .35; }
.tog input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.soon { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.soon div { border: 1px dashed var(--border); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.soon div b { display: block; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.opt input[type=radio] { margin-top: 4px; }
.timein { width: 86px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }

/* подписка / админ */
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; font-size: 13.5px; }
.kv dt { color: var(--text-dim); }
.kv dd { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.stat .v { font-family: var(--mono); font-size: 24px; font-weight: 700; }
.stat .l { font-size: 12px; color: var(--text-dim); }
.ex { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--watch); background: var(--watch-soft); border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }
textarea { width: 100%; min-height: 96px; border: 1px solid var(--border); border-radius: 8px; padding: 10px; background: var(--surface); font: inherit; resize: vertical; }
.tgprev { background: #e7eef7; border-radius: 12px; padding: 12px; }
:root[data-theme="dark"] .tgprev { background: #0f1722; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tgprev { background: #0f1722; } }
.bubble { background: var(--surface); border-radius: 12px 12px 12px 4px; padding: 9px 12px; max-width: 420px; white-space: pre-wrap; font-size: 13px; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.bubble .who { color: var(--tg); font-weight: 600; font-size: 12.5px; margin-bottom: 2px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: #1a1f29; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow); z-index: 60; max-width: calc(100vw - 32px); }
.lb { position: fixed; inset: 0; background: rgba(8,10,14,.82); display: grid; place-items: center; z-index: 50; padding: 16px; cursor: zoom-out; }
.lb img { max-width: min(1100px, 100%); max-height: 90vh; border-radius: 10px; background: #fff; }
.mtop { display: none; }

@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-form { order: -1; max-width: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.login { min-height: 100%; }
.app { min-height: 100%; }
form.inline { display: inline; margin: 0; }
.flash { padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--text); }
select.sel, input.inp { padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.nav { text-decoration: none; }
a { color: var(--accent); }
.qr { display: flex; gap: 14px; align-items: center; }
.spin { width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; display: inline-block; animation: sp .8s linear infinite; vertical-align: -2px; }
@keyframes sp { to { transform: rotate(360deg); } }

[hidden] { display: none !important; }
img { max-width: 100%; }

/* ---------- переключатель темы ---------- */
body { transition: background-color .2s ease, color .2s ease; }
.card, .sig, .stat, .side, .tb, .ed, .chip, .btn { transition: background-color .2s ease, border-color .2s ease, color .2s ease; }
.side .theme-btn { margin: -8px 0 6px; }
.theme-btn .ic { display: inline-flex; justify-content: center; }
.theme-float { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); right: 16px; z-index: 40; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); display: none; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.theme-float:hover { background: var(--surface-2); }
.login ~ .theme-float, body:has(.login) .theme-float { display: inline-flex; }
@media (max-width: 860px) { .theme-lbl { display: none; } .side .theme-btn { margin-top: 0; } }
@media (prefers-reduced-motion: reduce) { body, .card, .sig, .stat, .side, .tb, .ed, .chip, .btn { transition: none; } }


/* ---------- вкладки таймфреймов ---------- */
.tfbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; width: fit-content; max-width: 100%; }
.tfbtn { border: 0; background: transparent; color: var(--text-dim); padding: 7px 14px; border-radius: 9px; font-size: 13.5px; font-weight: 600; text-decoration: none; transition: background .15s, color .15s; }
.tfbtn:hover { color: var(--text); background: var(--surface); }
.tfbtn.on { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.tfbtn .tfrate { font-weight: 500; font-size: 11.5px; color: var(--text-dim); margin-left: 4px; }
.tfhelp { font-size: 12.5px; padding: 0 10px; text-decoration: none; }
/* ---------- страница «Как это работает» ---------- */
.help { display: flex; flex-direction: column; gap: 18px; max-width: 1120px; }
.help .sec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 22px; align-items: start; }
.help .sec h3 { font-size: 17px; text-transform: none; letter-spacing: 0; color: var(--text); margin: 0 0 8px; }
.help .sec p, .help .sec li { font-size: 14px; line-height: 1.6; max-width: 62ch; }
.help .sec ul, .help .sec ol { padding-left: 18px; margin: 6px 0; }
.help img { width: 100%; border-radius: 10px; border: 1px solid var(--border); cursor: zoom-in; background: #fff; }
.help .toc { display: flex; flex-wrap: wrap; gap: 8px; }
.help .note { font-size: 12.5px; color: var(--text-dim); }
@media (max-width: 860px) { .help .sec { grid-template-columns: 1fr; } }

/* ---------- быстрые ссылки на TradingView ---------- */
.sig-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.tvlink { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
  text-decoration: none; background: var(--accent); color: #fff; border: 1px solid var(--accent); transition: filter .15s, background .15s; }
.tvlink:hover { filter: brightness(1.08); color: #fff; }
.tvlink.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.tvlink.ghost:hover { background: var(--surface-2); color: var(--text); filter: none; }

/* ---------- фильтры ленты ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.fsearch { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; min-width: 240px; flex: 1; max-width: 360px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-dim); }
.fsearch:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fsearch input { border: 0; outline: none; background: transparent; color: var(--text); width: 100%; font-size: 14px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.seg label { padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-dim); cursor: pointer; }
.seg label.on { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.seg label:focus-within { outline: 2px solid var(--accent); }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.filters .sel { height: 40px; border-radius: 10px; padding: 0 10px; }

/* ---------- превью графика в истории ленты ---------- */
.pill.has-chart { cursor: zoom-in; }
.chart-pop { position: fixed; left: 0; top: 0; z-index: 50; width: min(620px, 46vw); padding: 6px; pointer-events: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 18px 48px rgba(0,0,0,.28); }
.chart-pop[hidden] { display: none; }
.chart-pop img { display: block; width: 100%; height: auto; border-radius: 8px; }

/* ---------- подробная карточка сигнала (выезжающая панель) ---------- */
.feed [data-signal], table [data-signal] { cursor: pointer; }
.feed [data-signal]:hover { border-color: var(--accent); }
table tr[data-signal]:hover td { background: var(--surface-2); }
[data-signal]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.noscroll { overflow: hidden; }
.drawer-bg { position: fixed; inset: 0; z-index: 39; background: rgba(8,10,14,.45); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; width: min(760px, 100vw); overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg, var(--surface)); border-left: 1px solid var(--border); box-shadow: -24px 0 60px rgba(0,0,0,.25); padding: 22px 26px 40px; }
.drawer[hidden], .drawer-bg[hidden] { display: none; }
.drawer-x { position: sticky; top: 0; float: right; z-index: 2; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 15px; cursor: pointer; }
.drawer-x:hover { border-color: var(--accent); color: var(--accent); }
.sd { display: flex; flex-direction: column; gap: 18px; }
.sd-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; padding-right: 44px; }
.sd-page .sd-head { padding-right: 0; }
.sd-name { font-size: 22px; font-weight: 800; line-height: 1.2; text-wrap: balance; }
.sd-sub { font-size: 13px; margin-top: 4px; }
.sd-kind { font-size: 13px; padding: 5px 12px; }
.sd-chart { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--border); background: #fff; cursor: zoom-in; }
.sd h4 { margin: 0 0 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); }
.sd section p { margin: 0 0 8px; line-height: 1.55; max-width: 68ch; }
.sd-after { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.sd-after > div { display: flex; align-items: baseline; gap: 12px; }
.sd-after b { font-size: 22px; font-variant-numeric: tabular-nums; }
.sd-after.good b { color: var(--long); } .sd-after.bad b { color: var(--short); }
.sd-after small { color: var(--text-dim); }
.sd-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 0; }
.sd-facts > div { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); display: flex; flex-direction: column; gap: 2px; }
.sd-facts dt { font-size: 12px; color: var(--text-dim); }
.sd-facts dd { margin: 0; font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sd-facts small { font-size: 12px; color: var(--text-dim); }
.sd-facts .long small { color: var(--long); } .sd-facts .short small { color: var(--short); } .sd-facts .warn small { color: var(--watch); }
.sd-series { margin: 0; padding-left: 22px; display: grid; gap: 4px; font-size: 14px; }
.sd-series .now { font-weight: 700; color: var(--accent); }
.sd-rel { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sd-rel a { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 7px 8px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 13.5px; }
.sd-rel a:hover { background: var(--surface-2); }
.sd-note { font-size: 12px; margin: 0; }
@media (max-width: 640px) { .drawer { padding: 16px 16px 32px; border-left: 0; } .sd-name { font-size: 19px; } }
.sd-after small.sd-warn { color: var(--watch); }

/* ---------- закреплённый инструмент (IMOEXF) ---------- */
.pin { position: sticky; top: 0; z-index: 6; display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 10px 18px;
  padding: 12px 16px; margin-bottom: 14px; border: 1px solid var(--accent); border-radius: 14px; background: var(--surface);
  box-shadow: var(--shadow); cursor: pointer; }
.pin:hover { background: var(--surface-2); }
.pin:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pin-id { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pin-id b { font-size: 17px; }
.pin-id .dim { font-size: 12px; }
.pin-tag { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.pin-price { display: flex; flex-direction: column; }
.pin-price b { font-size: 20px; font-variant-numeric: tabular-nums; }
.pin-price small { font-size: 11.5px; }
.pin-next { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.pin-ev { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.pin-ev em { font-style: normal; font-size: 11px; color: var(--text-dim); }
.pin-ev.long { color: var(--long); } .pin-ev.short { color: var(--short); }
.pin-ev.near { border-color: var(--watch); background: var(--watch-soft); }
.pin-more { font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; }
@media (max-width: 760px) { .pin { grid-template-columns: 1fr auto; } .pin-next { grid-column: 1 / -1; } .pin-more { display: none; } }
.wl { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wl li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface); font-size: 14px; line-height: 1.45; }
.wl li.long { border-left: 3px solid var(--long); } .wl li.short { border-left: 3px solid var(--short); } .wl li.acc { border-left: 3px solid var(--accent); }
.wl li.near { background: var(--watch-soft); }
.wl-d { text-align: right; white-space: nowrap; font-weight: 700; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.wl-d small { font-weight: 400; color: var(--text-dim); font-size: 12px; }

/* скриншот в закреплённом блоке */
.pin.has-thumb { grid-template-columns: 168px auto auto 1fr auto; }
.pin-thumb { width: 168px; height: 95px; object-fit: cover; object-position: 0 18%; border-radius: 8px; border: 1px solid var(--border); background: #fff; }
@media (max-width: 760px) {
  .pin.has-thumb { grid-template-columns: 1fr auto; }
  .pin-thumb { grid-column: 1 / -1; width: 100%; height: auto; aspect-ratio: 16 / 9; object-position: center; }
}

/* ---------- лайтбокс: кнопка TradingView ---------- */
.lb-in { display: flex; align-items: center; gap: 16px; max-width: 100%; }
.lb-in img { max-width: min(1100px, calc(100vw - 280px)); }
.lb-tv { display: inline-flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px; background: #fff; color: #131722;
  text-decoration: none; box-shadow: 0 12px 32px rgba(0,0,0,.35); cursor: pointer; transition: transform .15s, box-shadow .15s; flex: none; }
.lb-tv:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.lb-tv:focus-visible { outline: 3px solid #2962ff; outline-offset: 3px; }
.lb-tv span { display: flex; flex-direction: column; line-height: 1.25; }
.lb-tv b { font-size: 14.5px; }
.lb-tv small { font-size: 12px; color: #6b7280; }
.lb-tv .tv-logo { width: 34px; height: 34px; flex: none; }
.lb-tv[hidden] { display: none; }
@media (max-width: 900px) { .lb-in { flex-direction: column; } .lb-in img { max-width: 100%; } }
@media (prefers-reduced-motion: reduce) { .lb-tv { transition: none; } }

/* ---------- закреплённые инструменты: компактная полоса плиток (2026-09-27) ---------- */
.pins { position: sticky; top: 0; z-index: 6; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 10px;
  overflow-x: auto; padding: 6px 0 8px; margin: -6px 0 8px; background: var(--bg); scrollbar-width: thin; }
.pins .pin { position: static; display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 10px 12px; grid-template-columns: none;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: none; min-width: 0; }
.pins .pin:hover { border-color: var(--accent); background: var(--surface); }
.pin-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.pin-sym { display: flex; flex-direction: column; min-width: 0; }
.pin-sym b { font-size: 14.5px; }
.pin-sym small { font-size: 11.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pin-px { display: flex; flex-direction: column; align-items: flex-end; }
.pin-px b { font-size: 15px; font-variant-numeric: tabular-nums; }
.pin-px small { font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pin-px .up { color: var(--long); } .pin-px .dn { color: var(--short); }
.pin-spark { width: 100%; height: 30px; display: block; }
.pin-spark polyline { fill: none; stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.pin-spark.up polyline { stroke: var(--long); } .pin-spark.dn polyline { stroke: var(--short); }
.pins .pin-ev { align-self: flex-start; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; padding: 3px 9px; }

/* ---------- динамический поиск ---------- */
.fsearch { position: relative; }
.sugg { position: absolute; left: -1px; right: -1px; top: calc(100% + 6px); z-index: 20; display: flex; flex-direction: column; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 36px rgba(0,0,0,.16); min-width: 300px; }
.sugg[hidden] { display: none; }
.sugg button { display: grid; grid-template-columns: 72px 1fr; grid-template-rows: auto auto; column-gap: 10px; text-align: left; padding: 7px 10px;
  border: 0; border-radius: 8px; background: none; color: var(--text); cursor: pointer; font: inherit; }
.sugg button b { grid-row: 1 / 3; align-self: center; font-size: 14px; }
.sugg button span { font-size: 13.5px; }
.sugg button small { font-size: 11.5px; color: var(--text-dim); }
.sugg button.on, .sugg button:hover { background: var(--accent-soft); }
.sugg-empty { padding: 8px 10px; color: var(--text-dim); font-size: 13px; }
.fcount { font-size: 12.5px; color: var(--text-dim); }
.feed [data-q][hidden], table tr[data-q][hidden] { display: none; }

/* ---------- открытые (SEO) страницы ---------- */
body.pub { background: var(--bg); color: var(--text); }
.pub-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px max(16px, calc((100vw - 1180px) / 2)); background: var(--surface); border-bottom: 1px solid var(--border); }
.pub-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.pub-brand span { display: flex; flex-direction: column; line-height: 1.15; }
.pub-brand small { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.pub-nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pub-nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; }
.pub-cta { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 10px; background: var(--accent); color: #fff !important;
  font-weight: 700; text-decoration: none; }
.pub-cta:hover { filter: brightness(1.08); }
.pub-cta.big { padding: 12px 20px; font-size: 16px; }
.pub-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.pub-main { max-width: 1180px; margin: 0 auto; padding: 20px 16px 40px; display: flex; flex-direction: column; gap: 26px; }
.pub-main h1 { font-size: clamp(24px, 3.4vw, 36px); line-height: 1.2; margin: 0 0 10px; text-wrap: balance; }
.pub-main h2 { font-size: 20px; margin: 0 0 10px; }
.pub-main h3 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); margin: 0 0 8px; }
.pub-main p { max-width: 72ch; line-height: 1.6; margin: 0 0 10px; }
.pub-hero { padding: 26px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.pub-hero p { font-size: 16.5px; }
.pub-hero-cta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.pub-group { margin-bottom: 12px; }
.pub-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pub-chips .chip { text-decoration: none; color: var(--text); }
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pub-grid.small { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.pub-card { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; color: var(--text); }
.pub-card:hover { border-color: var(--accent); }
.pub-card img { width: 100%; height: auto; border-radius: 8px; background: #fff; }
.pub-card .pill { align-self: flex-start; }
.pub-card small { font-size: 12.5px; }
.crumbs { font-size: 13px; color: var(--text-dim); }
.crumbs a { color: var(--accent); text-decoration: none; }
.pub-signal { display: flex; flex-direction: column; gap: 18px; }
.pub-signal figure { margin: 0; }
.pub-signal figure img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); background: #fff; cursor: zoom-in; }
.pub-signal figcaption { font-size: 13px; color: var(--text-dim); margin-top: 6px; }
.pub-box { padding: 18px 20px; border-radius: 14px; background: var(--accent-soft); border: 1px solid var(--accent); }
.pub-box b { display: block; font-size: 17px; margin-bottom: 6px; }
.pub-pages { display: flex; gap: 16px; align-items: center; justify-content: center; }
.pub-pages a { color: var(--accent); font-weight: 600; text-decoration: none; }
.pub-foot { border-top: 1px solid var(--border); padding: 18px max(16px, calc((100vw - 1180px) / 2)); display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; background: var(--surface); }
.pub-foot a { color: var(--accent); text-decoration: none; }

/* ---------- статьи, обзоры, статистика, набор для поста ---------- */
.pub-article { display: flex; flex-direction: column; gap: 12px; max-width: 860px; }
.pub-article h2 { margin-top: 10px; }
.pub-article ul, .pub-article ol { max-width: 72ch; line-height: 1.6; padding-left: 22px; margin: 0; }
.pub-article .lead { font-size: 17px; color: var(--text); }
.pub-fig { margin: 6px 0 14px; }
.pub-fig img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); background: #fff; }
.pub-fig figcaption { font-size: 13px; color: var(--text-dim); margin-top: 6px; }
.pub-fig figcaption a { color: var(--accent); text-decoration: none; }
.pub-list { line-height: 1.9; padding-left: 20px; }
.pub-list a { color: var(--accent); text-decoration: none; font-weight: 600; }
.pub-articles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pub-articles .pub-card { padding: 16px; }
.pub-articles .pub-card b { font-size: 16px; }
.stats-t td, .stats-t th { vertical-align: top; }
.st-fav { color: var(--long); font-weight: 700; } .st-adv { color: var(--short); font-weight: 700; }
.post-kit { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.pk-img { display: flex; flex-direction: column; gap: 8px; }
.pk-img img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--border); background: #fff; }
.pk-text { display: flex; flex-direction: column; gap: 8px; }
.pk-text textarea { width: 100%; font: 13.5px/1.5 inherit; padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); resize: vertical; }
@media (max-width: 800px) { .post-kit { grid-template-columns: 1fr; } }

/* ---------- код входа ---------- */
.login-code { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 14px; padding: 12px 14px; border-radius: 12px;
  border: 1px dashed var(--accent); background: var(--accent-soft); }
.login-code span { font-size: 12.5px; color: var(--text-dim); grid-column: 1; }
.login-code b { grid-column: 1; grid-row: 2; font-size: 30px; letter-spacing: .12em; font-variant-numeric: tabular-nums; color: var(--accent); }
.login-code small { grid-column: 2; grid-row: 1 / 3; font-size: 12.5px; color: var(--text-dim); line-height: 1.4; }
/* юридические страницы: оферта, политика */
.pub-legal { max-width: 820px; line-height: 1.6; }
.pub-legal h1 { margin-bottom: 4px; }
.pub-legal h2 { font-size: 18px; margin: 26px 0 8px; }
.pub-legal p, .pub-legal li { font-size: 15px; }
.pub-legal ul { padding-left: 22px; }

/* ---------- мобильная версия (2026-10-02): верхняя панель, меню-шторка, нижние вкладки ---------- */
.mbar, .tabbar, .side-x, .side-bg, .m-only, .m-flex { display: none; }
@media (max-width: 860px) {
  .app { flex-direction: column; }
  .d-only { display: none !important; }
  .m-only { display: block; }
  .m-flex { display: inline-flex; }

  .mbar { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 30;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px; background: var(--sb-bg); color: #fff; border-bottom: 1px solid var(--sb-border); }
  .mb-brand { display: flex; align-items: center; gap: 9px; margin-right: auto; color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; letter-spacing: .05em; }
  .mb-brand img { width: 28px; height: 28px; border-radius: 7px; }
  .mb-btn { position: relative; width: 42px; height: 42px; flex: none; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 11px; border: 1px solid var(--sb-border); background: transparent; color: var(--sb-text); }
  .mb-btn:active { background: var(--sb-bg-active); }
  .mb-dot, .tab .dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--watch); box-shadow: 0 0 0 2px var(--sb-bg); }
  .mb-dot { top: 7px; right: 7px; }

  .side { position: fixed; top: 0; bottom: 0; left: 0; z-index: 46; width: min(304px, 86vw); overflow-y: auto; overscroll-behavior: contain;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 12px calc(18px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-104%); transition: transform .22s ease, background-color .2s ease; box-shadow: 0 0 48px rgba(0,0,0,.45); }
  body.menu-open { overflow: hidden; }
  body.menu-open .side { transform: none; }
  .side-bg { position: fixed; inset: 0; z-index: 45; background: rgba(8,10,14,.5); }
  body.menu-open .side-bg { display: block; }
  .side-x { display: inline-flex; align-items: center; justify-content: center; position: absolute; right: 10px; top: calc(12px + env(safe-area-inset-top, 0px));
    width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--sb-border); background: transparent; color: var(--sb-text); font-size: 16px; }
  .side .theme-btn { display: none; }
  .side .brandline { padding-right: 48px; }
  .side .nav { padding: 11px 10px; font-size: 15px; }
  .side .me { padding-top: 14px; margin-top: 18px; }

  .main { padding: 14px 14px calc(86px + env(safe-area-inset-bottom, 0px)); gap: 14px; }
  .head h2 { font-size: 20px; }
  .head p { font-size: 13px; }

  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    padding: 5px 4px calc(5px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -6px 20px rgba(16,24,40,.06); }
  .tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 50px; padding: 4px 2px;
    border-radius: 12px; color: var(--text-dim); text-decoration: none; font-size: 10.5px; font-weight: 600; letter-spacing: .01em; -webkit-tap-highlight-color: transparent; }
  .tab svg { width: 23px; height: 23px; }
  .tab.on { color: var(--accent); }
  .tab.on svg { stroke-width: 2.4; }
  .tab:active { background: var(--surface-2); }
  .tab .dot { top: 6px; left: calc(50% + 8px); box-shadow: 0 0 0 2px var(--surface); }
  .toast { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }

  /* крупнее зоны нажатия */
  .btn { min-height: 40px; }
  .chip { padding: 7px 13px; font-size: 13px; }
  .tog { width: 44px; height: 26px; }
  .tog span::after { width: 22px; height: 22px; }
  .tog input:checked + span::after { transform: translateX(18px); }

  /* лента */
  .pins { position: static; margin: 0; grid-auto-columns: minmax(220px, 70%); }
  a.chip { text-decoration: none; color: var(--text); }
  a.chip.on { color: #fff; }
  .an-pick > .dim { display: none; }
  .main > .tfbar { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .tfbar .tfbtn { white-space: nowrap; }
  .filters { gap: 8px; }
  .filters .fsearch { min-width: 0; max-width: none; flex: 1 1 0; }
  .filters:not(.open) > .seg, .filters:not(.open) > .sel { display: none; }
  .filters.open > .seg { width: 100%; overflow-x: auto; }
  .filters.open > .seg label { white-space: nowrap; flex: 1; text-align: center; }
  .filters.open > .sel { width: 100%; }
  .ffbtn { align-items: center; gap: 6px; height: 40px; white-space: nowrap; }
  .ffbtn b { min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
  .feed { grid-template-columns: 1fr; gap: 12px; }
  .sig .body { padding: 10px 12px 12px; }
  .sig-actions .tvlink { height: 36px; flex: 1; justify-content: center; }
  .drawer-x { width: 42px; height: 42px; }

  /* история сигналов — строки-карточки */
  .card:has(> .tbl-wrap > table.hist) { padding: 12px 12px 4px; }
  table.hist thead { display: none; }
  table.hist, table.hist tbody { display: block; }
  table.hist tr { display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "nm tm tf" "ev ev ev" "lv lv ln"; gap: 5px 8px; align-items: center;
    padding: 11px 0; border-bottom: 1px solid var(--border); }
  table.hist tr:last-child { border-bottom: 0; }
  table.hist td { padding: 0; border: 0; white-space: normal !important; }
  table.hist td:nth-child(1) { grid-area: tm; font-size: 12px; }
  table.hist td:nth-child(2) { grid-area: tf; }
  table.hist td:nth-child(3) { grid-area: nm; }
  table.hist td:nth-child(4) { grid-area: ev; }
  table.hist td:nth-child(5) { grid-area: lv; font-size: 12.5px; }
  table.hist td:nth-child(6) { grid-area: ln; font-size: 12.5px; }

  /* таблицы администрирования — карточки с подписями полей */
  .card:has(> .tbl-wrap > table.rt) { background: none; border: 0; padding: 0; }
  .card:has(> .tbl-wrap > table.rt) > h3 { margin: 4px 2px 10px; }
  table.rt thead { display: none; }
  table.rt, table.rt tbody, table.rt tr { display: block; }
  table.rt tr { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px 14px; margin: 0 0 10px; }
  table.rt tbody tr:hover { background: var(--surface); }
  table.rt td { display: flow-root; padding: 8px 0; border: 0; border-bottom: 1px dashed var(--border); text-align: right;
    white-space: normal !important; max-width: none !important; font-size: 13.5px; overflow-wrap: anywhere; }
  table.rt td:last-child { border-bottom: 0; }
  table.rt td::before { content: attr(data-l); float: left; max-width: 46%; margin-right: 12px; text-align: left; color: var(--text-dim);
    font-size: 12px; font-family: var(--sans); font-weight: 400; line-height: 1.6; }
  table.rt td:first-child { text-align: left; font-size: 15px; padding-top: 11px; border-bottom-style: solid; }
  table.rt td:first-child::before, table.rt td[data-l=""]::before { display: none; }
  table.rt td[data-l=""], table.rt td[colspan] { text-align: left; }
  table.rt td[data-l=""] .btn { margin: 3px 6px 3px 0; }
  table.rt form { flex-wrap: wrap; }

  .bc-grid { grid-template-columns: 1fr !important; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat .v { font-size: 21px; }
  .meter { min-width: 120px; }
}
@media (max-width: 860px) and (prefers-reduced-motion: reduce) { .side { transition: none; } }

/* мобильный центр управления в админке */
@media (max-width: 860px) {
  .adm-hub.m-only { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .adm-hub a { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 13px 14px; min-height: 76px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
  .adm-hub a:active { border-color: var(--accent); background: var(--accent-soft); }
  .adm-hub .ic { font-size: 18px; line-height: 1; }
  .adm-hub b { font-size: 14px; }
  .adm-hub small { font-size: 12px; color: var(--text-dim); }
  .adm-hub .n { position: absolute; top: 10px; right: 10px; font-family: var(--mono); font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 99px;
    background: var(--watch-soft); color: var(--watch); }
}

/* уведомления на телефоне: инструменты карточками, типы — переключатели-чипы */
@media (max-width: 860px) {
  .mnot.m-only { display: flex; flex-direction: column; gap: 14px; }
  .mn-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); font-size: 14.5px; }
  .mn-row:first-of-type { border-top: 0; padding-top: 2px; }
  .mn-row small { display: block; color: var(--text-dim); font-size: 12px; margin-top: 1px; }
  .mn-grp > header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: -2px 0 2px; }
  .mn-grp > header h3 { margin: 0; }
  .mn-grp > header .lnk { background: none; border: 0; padding: 6px 2px; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; }
  .mn-inst { border-top: 1px solid var(--border); }
  .mn-head { display: flex; align-items: center; gap: 10px; min-height: 56px; }
  .mn-exp { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 0; border: 0; background: none; color: var(--text); text-align: left; font: inherit; }
  .mn-exp .nm { flex: 1; min-width: 0; }
  .mn-exp b { display: block; font-size: 15px; font-weight: 600; }
  .mn-exp small { display: block; font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
  .mn-exp .cnt { font-family: var(--mono); font-size: 12px; color: var(--text-dim); padding: 2px 8px; border-radius: 99px; background: var(--surface-2); }
  .mn-exp .cnt.on { color: var(--accent); background: var(--accent-soft); }
  .mn-exp .chev { width: 18px; height: 18px; color: var(--text-dim); transition: transform .18s; flex: none; }
  .mn-inst.open .chev { transform: rotate(90deg); }
  .mn-body { display: none; flex-wrap: wrap; gap: 8px; padding: 0 0 14px; }
  .mn-inst.open .mn-body { display: flex; }
  .mchip { position: relative; display: inline-flex; }
  .mchip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
  .mchip span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
    font-size: 13px; font-weight: 600; color: var(--text-dim); }
  .mchip span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; }
  .mchip input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
  .mchip input:checked + span::before { background: currentColor; }
  .mchip input:disabled + span { opacity: .4; }
  .mchip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
  .msave { position: fixed; left: 10px; right: 10px; bottom: calc(68px + env(safe-area-inset-bottom, 0px)); z-index: 34; display: flex; align-items: center; gap: 8px;
    padding: 10px 10px 10px 14px; border-radius: 14px; background: var(--sb-bg); color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.3); font-size: 13px; }
  .msave span { flex: 1; min-width: 0; }
  .msave b { font-family: var(--mono); font-size: 15px; }
  .msave .btn { min-height: 38px; }
  .msave .btn.ghost { color: #fff; border-color: rgba(255,255,255,.25); }
  .est { gap: 10px 16px; }
  .est .btn-row { display: none; }
  .notif-head .btn-row { width: 100%; }
  .notif-head .btn-row .btn { flex: 1 1 auto; }
}

/* закреплённые инструменты: длинное название не выталкивает содержимое за левый край плитки */
.pins .pin { align-items: stretch; }
.pins .pin-sym { flex: 1 1 0; }
