/* Screener — оформление в стиле corsa.su: светлая тема по умолчанию, тёмная по переключателю. */
:root {
  color-scheme: light;
  --bg: #f2f4f8; --surface: #ffffff; --surface-2: #f7f9fc;
  --text: #0f172a; --text-2: #5b6576; --text-3: #97a0b1;
  --line: #e2e6ee; --line-2: #edf0f5;
  --accent: #2563eb; --accent-soft: #e7eeff; --accent-press: #1d4ed8;
  --cyan: #06a6d4;
  --up: #16a34a; --down: #e5484d; --warn: #f59e0b;
  --tile-neutral: #d5dae3;
  --radius: 16px; --radius-sm: 10px;
  --grad: linear-gradient(135deg, var(--accent), var(--cyan));
  --glass: color-mix(in srgb, var(--surface) 80%, transparent);
  --r: 14px; --r-sm: 10px; --fs: 1; --on-accent: #fff;
  --shadow-1: 0 1px 2px rgba(16,24,40,.04), 0 2px 6px rgba(16,24,40,.05);
  --shadow-2: 0 6px 20px rgba(16,24,40,.08);
  --shadow: 0 18px 48px rgba(16,24,40,.16);
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: var(--font);
  --side-w: 232px;
  /* совместимость с charts.js / account.js */
  --bg2: var(--surface); --card: var(--surface); --muted: var(--text-2); --accent2: var(--cyan);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090c12; --surface: #121721; --surface-2: #0e131b;
  --text: #e9edf5; --text-2: #9ba5b7; --text-3: #6c7689;
  --line: #222a37; --line-2: #19202b;
  --accent: #4f8cff; --accent-soft: #15254a; --accent-press: #75a6ff;
  --cyan: #22c3e6;
  --up: #22c55e; --down: #f4474f;
  --tile-neutral: #232b38;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.02); --shadow-2: 0 8px 24px rgba(0,0,0,.5); --shadow: 0 20px 56px rgba(0,0,0,.65);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 500 14px/1.4 var(--font); letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
  overflow: hidden; font-variant-numeric: tabular-nums;
}
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.muted { color: var(--text-2); }
.small { font-size: 12.5px; margin: 0; }
.up { color: var(--up); }
.down { color: var(--down); }
.grow { flex: 1; }
.grow0 { min-width: 0; }
[hidden] { display: none !important; }
svg { flex: none; }

/* ═══ заставка ═══ */
#splash {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(1100px 700px at 50% 42%, rgba(255,255,255,.9) 0%, color-mix(in srgb, var(--accent) 9%, transparent) 55%, color-mix(in srgb, var(--accent) 16%, transparent) 100%), var(--bg);
  transition: opacity .45s ease, visibility .45s;
}
:root[data-theme="dark"] #splash { background: radial-gradient(1100px 700px at 50% 42%, rgba(37,99,235,.34) 0%, rgba(37,99,235,.12) 42%, transparent 76%), #030b26; color: #fff; }
#splash.gone { opacity: 0; visibility: hidden; }
.splash-scene, .splash-sparks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.splash-scene ellipse { opacity: .35; }
:root[data-theme="dark"] .splash-scene ellipse { opacity: 1; }
.splash-arcs { transform-box: view-box; transform-origin: 50% 50%; opacity: .6; animation: sp-drift 9s ease-in-out infinite alternate; }
:root[data-theme="dark"] .splash-arcs { opacity: 1; }
.splash-arcs.b { animation-duration: 12s; animation-direction: alternate-reverse; }
@keyframes sp-drift { from { transform: translate(-16px, 8px) rotate(-1.2deg); } to { transform: translate(16px, -8px) rotate(1.2deg); } }
.splash-circuit { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: .24; }
.splash-circuit circle { fill: var(--accent); stroke: none; }
.splash-pulse { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .18;
  stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: sp-pulse 2.6s ease-in-out infinite; }
@keyframes sp-pulse { 0% { stroke-dashoffset: 1400; } 60% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1400; } }
.splash-center { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.logo-lg { width: 84px; height: 84px; border-radius: 22px; overflow: hidden; animation: sp-beat 1.4s ease-in-out infinite;
  box-shadow: 0 0 0 1px rgba(0,0,0,.04), 0 14px 34px color-mix(in srgb, var(--accent) 32%, transparent); }
.logo-lg svg, .logo-md svg { display: block; width: 100%; height: 100%; }
@keyframes sp-beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(.95); } }
.splash-name { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.splash-name b, .brand b { background: linear-gradient(90deg, var(--accent), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.splash-text { font-size: 13px; color: var(--text-2); }
:root[data-theme="dark"] .splash-text { color: #a8b3cc; }
.splash-bar { width: 190px; height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--text) 14%, transparent); overflow: hidden; }
.splash-bar::after { content: ''; display: block; width: 40%; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--cyan)); animation: sp-bar 1.3s ease-in-out infinite; }
@keyframes sp-bar { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .splash-arcs, .logo-lg, .splash-bar::after, .splash-pulse { animation: none; } }

/* ═══ каркас ═══ */
.app { display: flex; height: 100%; }
.side {
  width: var(--side-w); flex: none; display: flex; flex-direction: column; gap: 2px;
  background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px 14px;
}
.side { transition: margin-left .22s ease; }
.side-top { display: flex; align-items: flex-start; gap: 6px; padding-bottom: 12px; }
.brand { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 2px 8px; color: var(--text); text-decoration: none; }
.brand svg { border-radius: 9px; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 30%, transparent); }
.brand span { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.brand span b { font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.brand small { font-size: 11px; font-weight: 500; color: var(--text-3); margin-top: 2px; white-space: nowrap; }
.side-hide { display: grid; place-items: center; width: 30px; height: 30px; margin-top: 4px; flex: none; border: 0; border-radius: 9px; background: none; color: var(--text-3); }
.side-hide:hover { background: var(--line-2); color: var(--text); }
.side-hide svg, .nav-chev { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.side-scroll { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; }
.nav-group + .nav-group { margin-top: 6px; }
.nav-group-title { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; text-align: left; border-radius: 8px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 10px 10px 6px; }
.nav-group-title:hover { color: var(--text); }
.nav-group-title span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-chev { width: 14px; height: 14px; transition: transform .15s; }
.nav-group.folded .nav-chev { transform: rotate(-90deg); }
.nav-group.folded .nav button:not(.on) { display: none; }
/* скрытое меню: сцена на всю ширину, кнопка «показать» — в шапке */
.topbar .side-show { display: none; }
.app.side-hidden .side { margin-left: calc(-1 * var(--side-w)); visibility: hidden; transition: margin-left .22s ease, visibility 0s .22s; }
.app.side-hidden .topbar .side-show { display: grid; }
.app.side-hidden ~ .toasts { left: 16px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav button {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border: 0; border-radius: 10px; background: none;
  color: var(--text-2); font-weight: 500; text-align: left; position: relative;
}
.nav button svg, .tabbar svg, #viewSeg svg, .theme-sw svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav button:hover { background: var(--line-2); color: var(--text); }
.nav button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav button span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-chg { font-style: normal; font-size: 11.5px; font-weight: 600; }
.badge {
  min-width: 18px; height: 18px; padding: 0 6px; border-radius: 9px; background: var(--down); color: #fff;
  font: 600 11px/18px var(--font); font-style: normal; text-align: center;
}
.side-foot { display: flex; flex-direction: column; gap: 8px; }
.theme-sw { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 8px 10px; color: var(--text-2); font-weight: 500; }
.theme-sw:hover { color: var(--text); }
.theme-sw .moon { display: none; }
:root[data-theme="dark"] .theme-sw .sun { display: none; }
:root[data-theme="dark"] .theme-sw .moon { display: block; }
.side-note { font-size: 11px; line-height: 1.35; padding: 0 4px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 22px; background: var(--surface); border-bottom: 1px solid var(--line); }
.title { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.title h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.status.live i { background: var(--up); box-shadow: 0 0 0 0 color-mix(in srgb, var(--up) 60%, transparent); animation: live 1.6s infinite; }
.status.poll i { background: var(--accent); }
.status.delay i { background: var(--warn); }
.status.err i { background: var(--down); }
@keyframes live { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.seg { display: inline-flex; background: var(--line-2); border-radius: 10px; padding: 3px; flex: none; }
:root[data-theme="dark"] .seg { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 8px; color: var(--text-2); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
:root[data-theme="dark"] .seg button.on { background: var(--line); }
.seg.sm button { padding: 3px 9px; font-size: 12px; }
#viewSeg svg { width: 15px; height: 15px; }

.search { display: flex; align-items: center; gap: 8px; background: var(--line-2); border: 1px solid transparent; border-radius: 10px; padding: 0 12px; color: var(--text-3); transition: .15s; }
:root[data-theme="dark"] .search { background: var(--surface-2); border-color: var(--line); }
.search:focus-within { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input { border: 0; background: none; outline: none; padding: 8px 0; width: 230px; color: var(--text); }

.toolbar { display: flex; align-items: center; gap: 10px; padding: 10px 22px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sel { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.sel select {
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 5px 8px;
  font-weight: 600; font-size: 13px; color: var(--text); cursor: pointer; max-width: 210px;
}
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 11px; font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.chip:hover { color: var(--text); }
.chip.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); }
.chip b { display: inline-block; min-width: 16px; margin-left: 4px; padding: 0 5px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-size: 11px; }
.pop-wrap { position: relative; }
.pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 25; width: 290px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; animation: pop .18s ease-out; }
.pop .sel { width: 100%; justify-content: space-between; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }

.pulsebar { display: flex; align-items: center; gap: 22px; padding: 10px 22px; flex-wrap: wrap; }
.breadth { width: 260px; }
.breadth-track { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--line); }
.breadth-track i { display: block; height: 100%; transition: width .6s; }
#brUp { background: var(--up); }
#brDown { background: var(--down); margin-left: auto; }
.breadth-lbl { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 600; margin-top: 4px; }
.kpi { display: flex; flex-direction: column; font-size: 11px; color: var(--text-2); }
.kpi b { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; }
.kpi b.link { cursor: pointer; }
.kpi b.link:hover { color: var(--accent); }

/* ═══ сцена ═══ */
main { position: relative; flex: 1; min-height: 0; padding: 0 22px 8px; overflow: hidden; }
.map { position: relative; width: 100%; height: 100%; }
.tile {
  position: absolute; overflow: hidden; border-radius: 7px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  color: #fff; transition: left .45s, top .45s, width .45s, height .45s, background-color .5s;
}
.tile:hover { box-shadow: inset 0 0 0 2px rgba(255,255,255,.9), var(--shadow-2); z-index: 2; }
.tile .sym { font-weight: 700; letter-spacing: -.02em; line-height: 1.05; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 3px; }
.tile .val { font-weight: 600; opacity: .95; }
.tile .px { opacity: .72; font-size: 11px; }
.tile svg.spark { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 38%; opacity: .35; pointer-events: none; }
.tile .fav { position: absolute; top: 3px; left: 5px; font-size: 11px; opacity: .9; }
/* события мыши — только самой плитке: её начинка перерисовывается на каждом тике, и щелчок по только что заменённому тексту пропадал */
.tile > * { pointer-events: none; }
.tile.flash { animation: flash 1s ease-out; }
.tile.match { box-shadow: inset 0 0 0 3px #ffd60a; z-index: 3; }
.map.searching .tile:not(.match) { opacity: .25; }
@keyframes flash { 0% { filter: brightness(1.45); } 100% { filter: none; } }
.grp { position: absolute; font-size: 11px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; transition: left .45s, top .45s, width .45s; }
.grp span { color: var(--text-3); margin-left: 6px; font-weight: 600; }

.loader { position: absolute; inset: 0; display: grid; place-content: center; gap: 12px; justify-items: center; color: var(--text-2); pointer-events: none; }
.loader i { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .9s linear infinite; }
.loader.hide { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.demo { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 5; background: #fff4e0; color: #8a5300; border: 1px solid #ffd79a; padding: 6px 12px; border-radius: 9px; font-size: 12.5px; }
:root[data-theme="dark"] .demo { background: #3b2a06; color: #ffd27a; border-color: #6b4e12; }
.emptynote { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; color: var(--text-2); padding: 0 24px; }
.emptynote #emptyNoteText { max-width: 420px; font-size: 14px; line-height: 1.5; }

/* таблица */
.tablewrap { height: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-1); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 12px; text-align: right; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
th:first-child, td:first-child, th:nth-child(2), td:nth-child(2) { text-align: left; }
th { position: sticky; top: 0; z-index: 1; background: var(--surface); color: var(--text-2); font-size: 11.5px; font-weight: 600; cursor: pointer; user-select: none; border-bottom-color: var(--line); }
th.sorted { color: var(--accent); }
td.sym { font-weight: 700; }
td.sym small { display: block; font-weight: 500; color: var(--text-2); font-size: 11px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
tbody tr { cursor: pointer; }
tbody tr:hover td { background: var(--accent-soft); }
td .bar { display: inline-block; height: 6px; border-radius: 3px; vertical-align: middle; margin-right: 6px; opacity: .8; }
td svg { vertical-align: middle; }

/* аналитика */
.stats-view { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 10px; height: 100%; }
.scard { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 8px; box-shadow: var(--shadow-1); }
.shead { display: flex; flex-direction: column; gap: 1px; margin-bottom: 6px; }
.shead b { font-size: 13.5px; font-weight: 700; }
.shead span { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scard canvas { flex: 1; min-height: 0; width: 100%; }

/* подсказка */
.tip { position: fixed; z-index: 60; pointer-events: none; min-width: 220px; max-width: 320px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); font-size: 12px; }
.tip h4 { margin: 0 0 6px; font-size: 14.5px; display: flex; justify-content: space-between; gap: 12px; }
.tip .nm { margin: -4px 0 6px; color: var(--text-2); font-size: 11.5px; }
.tip dl { display: grid; grid-template-columns: auto auto; gap: 3px 14px; margin: 0; }
.tip dt { color: var(--text-2); }
.tip dd { margin: 0; text-align: right; font-weight: 600; }

/* легенда */
.legend { display: flex; align-items: center; gap: 12px; padding: 6px 22px 10px; font-size: 12px; flex-wrap: wrap; }
.legend-scale { display: flex; gap: 2px; }
.legend-scale span { min-width: 46px; padding: 2px 4px; text-align: center; border-radius: 4px; font-size: 10.5px; font-weight: 600; }
kbd { font: 600 10px var(--font); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; background: var(--surface); }

/* ═══ панели ═══ */
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 30; width: min(440px, 100vw);
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 18px; overflow-y: auto; animation: slide .25s ease-out; display: flex; flex-direction: column; gap: 12px;
}
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.panel-head { display: flex; align-items: center; gap: 10px; }
.panel-head h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#pSub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.panel-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text-2); }
.icon-btn:hover { color: var(--text); background: var(--line-2); }
.star { border: 0; background: none; font-size: 24px; color: var(--text-3); line-height: 1; }
.star.on { color: #ffb800; }
.panel-price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.panel-price b { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.panel-price span { font-size: 14px; font-weight: 600; }
#chart { width: 100%; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.stats div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; }
.stats span { display: block; font-size: 11px; color: var(--text-2); }
.stats b { font-size: 13.5px; font-weight: 600; }
.panel-alert .row { display: flex; gap: 6px; margin-top: 6px; }
.panel-alert select, .panel-alert input, .rules input[type=number] { background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 6px 8px; min-width: 0; }
.panel-alert input { flex: 1; }
.btn { border: 0; background: var(--accent); color: var(--on-accent); border-radius: 10px; padding: 7px 14px; font-weight: 600; }
.btn:hover { background: var(--accent-press); }
.btn.ghost { background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.btn.ghost:hover { background: var(--line-2); }
.btn.sm { padding: 4px 10px; font-size: 12.5px; }
.alist { list-style: none; margin: 6px 0 0; padding: 0; font-size: 12.5px; }
.alist li { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.linkbtn { border: 0; background: none; color: var(--accent); padding: 0; font-weight: 600; font-size: 13px; }
.panel-links { display: flex; gap: 16px; font-weight: 600; font-size: 13px; flex-wrap: wrap; }
.panel-links a { color: var(--accent); text-decoration: none; }
.rules { display: flex; flex-direction: column; gap: 9px; align-items: flex-start; }
.rule { display: flex; align-items: center; gap: 6px; font-size: 13px; flex-wrap: wrap; }
.rules input[type=number] { width: 70px; padding: 3px 6px; }
.feed-head { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 10px; }
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.feed li { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 13px; cursor: pointer; }
.feed li:hover { border-color: var(--accent); }
.feed li.empty { cursor: default; border-style: dashed; }
.feed li time { float: right; font-size: 11px; color: var(--text-2); }

.toasts { position: fixed; left: calc(var(--side-w) + 16px); bottom: 16px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 9px 12px; box-shadow: var(--shadow); font-size: 13px; cursor: pointer; animation: slide .25s ease-out; max-width: 340px; }
.toast.up { border-left-color: var(--up); }
.toast.down { border-left-color: var(--down); }

/* ═══ полноэкранные слои ═══ */
.overlay { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; flex-direction: column; animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; } }
.pro-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.pro-head h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.pro-price { font-size: 16px; font-weight: 700; }
.pro-price span { font-size: 13px; }
.pro-ind { display: flex; gap: 6px; flex-wrap: wrap; }
.pro-body { position: relative; flex: 1; min-height: 0; margin: 8px 18px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
#proCv { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.pro-legend { position: absolute; left: 10px; top: 6px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; font-weight: 600; pointer-events: none; color: var(--text-2); max-width: calc(100% - 100px); }
.pro-legend b { font-weight: 600; }
.pro-hint { font-size: 11.5px; padding: 6px 18px 10px; }

/* вход — стеклянная карточка как на corsa.su */
.modal-bg { position: fixed; inset: 0; z-index: 70; background: color-mix(in srgb, #0a1a40 38%, transparent); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { position: relative; width: min(400px, 100%); border-radius: 22px; padding: 30px 30px 26px; display: flex; flex-direction: column; gap: 12px; align-items: stretch; text-align: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid color-mix(in srgb, var(--accent) 16%, transparent);
  box-shadow: 0 0 0 1px rgba(255,255,255,.5) inset, 0 24px 60px color-mix(in srgb, var(--accent) 22%, transparent); animation: popin .4s cubic-bezier(.2,.8,.2,1); }
@keyframes popin { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.logo-md { width: 60px; height: 60px; margin: 0 auto; border-radius: 17px; overflow: hidden; box-shadow: 0 14px 34px color-mix(in srgb, var(--accent) 32%, transparent); }
.modal-title { margin: 4px 0 0; font-size: 22px; letter-spacing: -.01em; }
.modal .seg { align-self: center; }
.modal p { margin: 0; font-size: 13px; }
.modal-x { position: absolute; top: 14px; right: 14px; }
.fld { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-2); font-weight: 500; text-align: left; }
.fld input { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; color: var(--text); font-size: 14px; outline: none; transition: .15s; }
.fld input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fld input:disabled { opacity: .6; }
.btn.big { padding: 12px; font-size: 14.5px; margin-top: 4px; background: linear-gradient(90deg, var(--accent-press), var(--accent) 45%, var(--cyan)); box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 40%, transparent); }
.btn.big:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.red { background: var(--down); }
.err { color: var(--down); font-size: 13px; font-weight: 600; }
.ok { color: var(--up); font-size: 13px; font-weight: 600; margin-left: 10px; }

/* кабинет */
.overlay.cab { flex-direction: row; }
.cab-nav { width: 250px; flex: none; display: flex; flex-direction: column; gap: 2px; padding: 16px 12px; background: var(--surface); border-right: 1px solid var(--line); }
.cab-user { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; min-width: 0; }
.cab-user > div:last-child { min-width: 0; }
.cab-user b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cab-user .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ava { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 18px; color: #fff; background: linear-gradient(135deg, #0a2896, #1350c8 55%, #00a0e3); }
.cab-nav button[data-v] { text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 10px; font-weight: 500; color: var(--text-2); }
.cab-nav button[data-v]:hover { color: var(--text); background: var(--line-2); }
.cab-nav button[data-v].on { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.cab-sync { font-size: 11.5px; padding: 0 12px 8px; }
.cab-x { position: absolute; top: 14px; right: 16px; }
.cab-main { flex: 1; min-width: 0; overflow-y: auto; padding: 26px 34px 40px; }
.cab-main > * { max-width: 1100px; }
.cab-main h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; }
.cab-main h3 { margin: 26px 0 10px; font-size: 15px; display: flex; align-items: baseline; gap: 12px; }
.cab-main > p { margin: 0 0 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.ktile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; box-shadow: var(--shadow-1); }
.ktile[data-go] { cursor: pointer; }
.ktile[data-go]:hover { border-color: var(--accent); }
.ktile span { font-size: 12px; color: var(--text-2); font-weight: 600; }
.ktile b { font-size: 24px; font-weight: 700; }
.ktile em { font-style: normal; font-size: 12px; color: var(--text-2); }
.ktile em.up { color: var(--up); } .ktile em.down { color: var(--down); }
.cab-table { height: auto; }
.cab-table td.unfav { color: #ffb800; cursor: pointer; }
.cab-empty { border: 1px dashed var(--line); border-radius: 12px; padding: 18px; color: var(--text-2); font-size: 13px; background: var(--surface); }
.cab-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.addfav { display: flex; gap: 6px; }
.addfav input, .histq { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; outline: none; }
.cab-feed li time { font-size: 11px; }
.cab-form { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px 18px; margin-bottom: 14px; max-width: 520px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; box-shadow: var(--shadow-1); }
.cab-form h3 { margin: 14px 0 0; }
.cab-form .fld { align-self: stretch; }
.cab-form.danger { border-color: color-mix(in srgb, var(--down) 45%, var(--line)); }
.cab-form p { margin: 0; font-size: 13px; }

/* ═══ адаптив ═══ */
.tabbar { display: none; }
@media (max-width: 1280px) {
  :root { --side-w: 76px; }
  .side { padding: 14px 10px; align-items: stretch; }
  .brand span, .nav button span, .nav-chg, .theme-sw span, .side-note, .nav-group-title span, .nav-chev { display: none; }
  .side-top { flex-direction: column; align-items: center; padding-bottom: 6px; }
  .brand { justify-content: center; padding: 2px 0; }
  .nav-group-title { padding: 0; height: 1px; margin: 8px 6px; background: var(--line); pointer-events: none; }
  .nav-group.folded .nav button:not(.on) { display: flex; }
  .nav button { justify-content: center; padding: 11px 0; }
  .nav .badge { position: absolute; top: 3px; right: 6px; }
  .theme-sw { justify-content: center; }
  .stats-view { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: 300px; overflow-y: auto; }
}
@media (max-width: 760px) {
  .side { display: none; }
  .app.side-hidden .topbar .side-show, .topbar .side-show { display: none; }
  .toasts { left: 12px; bottom: 76px; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .tabbar button { flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 600; color: var(--text-3); padding: 5px 0; }
  .tabbar button.on { color: var(--accent); }
  .app { height: calc(100% - 58px - env(safe-area-inset-bottom)); }
  .topbar { height: auto; padding: 8px 12px; gap: 8px; flex-wrap: wrap; }
  .title h1 { font-size: 18px; }
  .search { order: 5; flex: 1 1 100%; }
  .search input { width: 100%; }
  .toolbar { padding: 8px 12px; gap: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .toolbar > * { flex: none; }
  .toolbar .sel > span { display: none; }
  .pop { position: fixed; top: auto; left: 12px; right: 12px; bottom: 70px; width: auto; }
  .pulsebar { gap: 10px; padding: 8px 12px; }
  .breadth { width: 100%; }
  .kpi { display: none; }
  main { padding: 0 8px 6px; }
  .hint { display: none; }
  .legend { padding: 4px 12px 6px; }
  .legend-scale span { min-width: 36px; }
  .stats-view { grid-template-columns: 1fr; grid-auto-rows: 280px; }
  .overlay.cab { flex-direction: column; }
  .cab-nav { width: auto; flex-direction: row; overflow-x: auto; align-items: center; padding: 8px 56px 8px 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .cab-nav > * { flex: none; }
  .cab-user, .cab-sync, .cab-nav .grow { display: none; }
  .cab-x { top: 8px; right: 8px; }
  .cab-main { padding: 16px; }
  .pro-head { gap: 8px; padding: 8px 12px; }
  .pro-body { margin: 6px 8px 0; }
  .pro-hint { display: none; }
}
.m-only { display: none; }
@media (max-width: 760px) { .m-only { display: grid; } }
@media (max-width: 760px) {
  .title { flex-direction: column; align-items: flex-start; gap: 0; flex: 1; }
  .topbar .grow { display: none; }
  .status { font-size: 11px; white-space: normal; }
}

/* кабинет: пользователи (администратор) */
.role { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--line-2); color: var(--text-2); }
.role.admin { background: var(--accent-soft); color: var(--accent); }
.role.off { background: color-mix(in srgb, var(--down) 12%, transparent); color: var(--down); }
.cab-form.wide { max-width: 1100px; }
.ucreate { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-self: stretch; align-items: end; }
.ucreate select, .utable select { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; font-size: 14px; color: var(--text); }
.utable select { padding: 4px 8px; font-size: 13px; }
.utable td { text-align: left; }
.utable tbody tr { cursor: default; }
.utable tbody tr:hover td { background: none; }
.utable .acts { display: flex; gap: 12px; justify-content: flex-end; }
.linkbtn.red { color: var(--down); }
.cred { align-self: stretch; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; display: flex; flex-direction: column; gap: 4px; }
.cred code { font: 600 14px ui-monospace, Consolas, monospace; user-select: all; }
.cab-banner { background: #fff4e0; color: #8a5300; border: 1px solid #ffd79a; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px; max-width: 520px; }
:root[data-theme="dark"] .cab-banner { background: #3b2a06; color: #ffd27a; border-color: #6b4e12; }

/* ═══ вход: карточка поверх заставки, как на corsa.su ═══ */
body.locked .app, body.locked .tabbar { visibility: hidden; }
#splash.gate-on .splash-center { display: none; }
.gate { position: relative; width: min(380px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 12px; padding: 30px 30px 24px; border-radius: 22px; text-align: center;
  background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid color-mix(in srgb, var(--accent) 14%, transparent);
  box-shadow: 0 0 0 1px rgba(255,255,255,.55) inset, 0 28px 70px color-mix(in srgb, var(--accent) 24%, transparent); animation: popin .45s cubic-bezier(.2,.8,.2,1); }
:root[data-theme="dark"] .gate { background: rgba(18,24,44,.82); border-color: rgba(90,140,255,.25); box-shadow: 0 28px 70px rgba(0,0,0,.55); color: var(--text); }
.gate-title { margin: 6px 0 0; font-size: 22px; font-weight: 750; letter-spacing: -.02em; }
.gate-sub { margin: -6px 0 6px; font-size: 13px; color: var(--text-2); }
.gate-hint { margin: 2px 0 0; font-size: 12px; color: var(--text-3); }

/* ═══ сетка графиков ═══ */
.charts-ctl { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.charts { display: grid; gap: 8px; height: 100%; overflow-y: auto; align-content: start; scrollbar-width: thin; }
.cell { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-height: 0; box-shadow: var(--shadow-1); user-select: none; }
.cell:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.cell.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-1); }
.cell.pinned::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent), var(--cyan)); }
.cell canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.cell .wm { position: absolute; left: 30px; right: 58px; top: 22%; display: flex; flex-direction: column; align-items: center; pointer-events: none; color: var(--text); line-height: 1; }
.cell .wm b { font-size: var(--wm, 30px); font-weight: 800; letter-spacing: -.02em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell .wm small { font-size: calc(var(--wm, 30px) * .45); font-weight: 600; margin-top: 3px; }
.cell .bdg { position: absolute; top: 5px; left: 6px; right: 62px; display: flex; gap: 3px; flex-wrap: wrap; z-index: 2; }
.cell .nm { font-size: 13px; font-weight: 800; line-height: 1; padding: 3px 7px; border-radius: 6px; white-space: nowrap; color: var(--text);
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--text) 35%, var(--line)); box-shadow: var(--shadow-1); letter-spacing: -.01em; }
.cell .nm i { font-style: normal; font-weight: 600; font-size: .75em; color: var(--text-2); margin-left: 5px; }
.cell[data-bs="xs"] .nm { font-size: 11px; padding: 2px 5px; }
.cell[data-bs="lg"] .nm { font-size: 14.5px; padding: 4px 8px; }
.cell[data-bs="xl"] .nm { font-size: 16px; padding: 4px 9px; }
.bd { --c: var(--text-2); font-size: 10.5px; font-weight: 700; line-height: 1; padding: 3px 6px; border-radius: 999px; white-space: nowrap; cursor: help;
  color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 9%, var(--surface)); }
.bd.hot { background: color-mix(in srgb, var(--c) 24%, var(--surface)); border-color: var(--c); }
.cell[data-bs="xs"] .bd { font-size: 9px; padding: 2px 4px; }
.cell[data-bs="md"] .bd { font-size: 11.5px; padding: 3px 7px; }
.cell[data-bs="lg"] .bd { font-size: 12.5px; padding: 4px 8px; }
.cell[data-bs="xl"] .bd { font-size: 14px; padding: 4px 9px; }
.b-up { --c: var(--up); } .b-down { --c: var(--down); }
.b-rng { --c: #1a9f53; } .b-natr { --c: #c99400; } .b-vol { --c: #a24bd8; } .b-trd { --c: #e07a00; } .b-spk { --c: #0091c7; }
.b-fp { --c: #e07a00; } .b-fn { --c: #7c4dff; } .b-cor { --c: #5b6b8c; } .b-new { --c: #e5484d; } .b-mute { --c: var(--text-3); }
:root[data-theme="dark"] .b-rng { --c: #30d158; } :root[data-theme="dark"] .b-natr { --c: #ffd60a; } :root[data-theme="dark"] .b-vol { --c: #d08cff; }
:root[data-theme="dark"] .b-trd, :root[data-theme="dark"] .b-fp { --c: #ff9f0a; } :root[data-theme="dark"] .b-spk { --c: #40c8e0; } :root[data-theme="dark"] .b-cor { --c: #98a4bf; }
.cell .cbtn { position: absolute; left: 5px; top: 30px; display: flex; flex-direction: column; gap: 3px; z-index: 2; }
.cell[data-bs="lg"] .cbtn, .cell[data-bs="xl"] .cbtn { top: 36px; }
.cbtn button, .cfoot button { display: grid; place-items: center; width: 21px; height: 21px; padding: 0; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--text-2); opacity: .9; transition: .12s; box-shadow: var(--shadow-1); }
.cbtn svg, .cfoot svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cell:hover .cbtn button { opacity: 1; }
.cbtn button:hover, .cfoot button:hover { color: var(--accent); border-color: var(--accent); }
.cbtn button.on { color: #ffb800; border-color: color-mix(in srgb, #ffb800 60%, var(--line)); opacity: 1; }
.cbtn button[data-b="pin"].on { color: var(--accent); border-color: var(--accent); }
.cbtn button.on svg { fill: currentColor; fill-opacity: .25; }
.cfoot { position: absolute; right: 62px; bottom: 20px; display: flex; gap: 3px; z-index: 2; opacity: 0; transition: opacity .12s; }
.cell:hover .cfoot, .cell.sel .cfoot { opacity: 1; }
.cfoot .lock { display: none; color: var(--accent); border-color: var(--accent); }
.cell.sel .cfoot .lock { display: grid; }
.cflash { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; background: var(--text); color: var(--surface); padding: 6px 12px; border-radius: 9px; font-size: 12.5px; font-weight: 600; pointer-events: none; animation: fade .15s; }
/* компактный режим: всё место — графикам */
body.compact .pulsebar, body.compact .legend { display: none; }
body.compact main { padding: 4px 8px 6px; }
body.compact .toolbar { padding-top: 6px; padding-bottom: 6px; }

/* ═══ настройки графиков ═══ */
.cset .ava { font-size: 20px; }
.cset-main { flex: 1; min-width: 0; overflow-y: auto; padding: 22px 30px 40px; }
.cset-main h3 { margin: 22px 0 8px; font-size: 15px; }
.cset-main h3:first-child { margin-top: 4px; }
.cset-main > p { margin: 0 0 10px; font-size: 13px; max-width: 640px; }
.cset-prev { width: min(440px, 36vw); flex: none; padding: 60px 22px 22px 0; display: flex; flex-direction: column; gap: 10px; }
.cset-prev .preview { height: 300px; flex: none; }
.pick { display: flex; flex-wrap: wrap; gap: 6px; max-width: 720px; }
.pick button { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 6px 11px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.pick button:hover { color: var(--text); }
.pick button.on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.olist { display: flex; flex-direction: column; gap: 4px; max-width: 640px; margin-bottom: 6px; }
.orow { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13px; cursor: pointer; max-width: 640px; margin-bottom: 4px; }
.olist .orow { margin: 0; }
.orow span { flex: 1; min-width: 0; }
.olist .orow:not(.on) span { color: var(--text-2); }
.orow input { accent-color: var(--accent); }
.obtn { border: 1px solid var(--line); background: var(--surface-2); border-radius: 6px; width: 24px; height: 24px; padding: 0; color: var(--text-2); }
.obtn:disabled { opacity: .3; cursor: default; }
.nfld { max-width: 420px; margin-bottom: 10px; }
.nfld > div { display: flex; align-items: center; gap: 10px; }
.nfld input[type=range] { flex: 1; accent-color: var(--accent); }
.nfld b { min-width: 48px; text-align: right; color: var(--text); font-size: 13px; }
@media (max-width: 1100px) { .cset-prev { display: none; } }
@media (max-width: 760px) {
  .cset-main { padding: 16px; }
  .charts-ctl .sel > span { display: none; }
}

/* ═══ современное оформление: стекло, мягкие тени, акцент-градиент (поверх базовых правил) ═══ */
body { background: var(--body-bg, radial-gradient(1200px 520px at 75% -120px, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%)), var(--bg); background-attachment: fixed; font-feature-settings: "cv11", "ss01", "tnum"; }
:root[data-theme="dark"] body { background: var(--body-bg, radial-gradient(1200px 560px at 75% -140px, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%)), var(--bg); background-attachment: fixed; }
.side { background: var(--glass); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); }
.topbar, .toolbar { background: var(--glass); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); }
.toolbar { border-bottom-color: var(--line-2); }
.title h1 { font-weight: 750; letter-spacing: -.025em; }
.nav button { transition: background .15s, color .15s; }
.nav button.on { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 16%, transparent), color-mix(in srgb, var(--accent) 4%, transparent)); }
.nav button.on::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--grad); }
.seg button { transition: background .15s, color .15s, box-shadow .15s; }
.seg button.on { color: var(--accent); }
:root[data-theme="dark"] .seg button.on { color: var(--text); }
.chip, .sel select, .icon-btn, .theme-sw { transition: border-color .15s, color .15s, background .15s, box-shadow .15s; }
.chip:hover, .sel select:hover, .icon-btn:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.chip.on { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.sel select { border-radius: 10px; background-color: var(--surface-2); }
.btn { background: var(--grad); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent); transition: filter .15s, box-shadow .15s; }
.btn:hover { background: var(--grad); filter: brightness(1.08); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 40%, transparent); }
.btn.ghost { box-shadow: none; }
.btn.ghost:hover { filter: none; }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
.breadth-track { height: 5px; border-radius: 99px; }
.kpi b { font-weight: 700; font-size: 14px; letter-spacing: -.01em; }
/* карточки графиков */
.cell { border-radius: 14px; border-color: var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 100%, #fff 0%), var(--surface)); transition: border-color .2s, box-shadow .2s; }
:root[data-theme="dark"] .cell { background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, #ffffff), var(--surface) 40%); }
.cell:hover { box-shadow: var(--shadow-2), 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent); }
.cell.sel { box-shadow: 0 0 0 1px var(--accent), 0 0 24px color-mix(in srgb, var(--accent) 22%, transparent); }
.tablewrap, .scard { border-radius: 16px; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); }
.tip, .pop { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: color-mix(in srgb, var(--surface) 92%, transparent); }
.tile { border-radius: 8px; }
/* тонкие полосы прокрутки */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text-3) 45%, transparent) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text-3) 40%, transparent); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }

/* ═══ «Оформление»: скругления, размер текста, стекло, анимации (переменные ставит look.js) ═══ */
.cell, .tablewrap, .scard, .tip, .pop, .panel-chart, #chart, .cab-empty, .ktile, .lk-card { border-radius: var(--r); }
.btn, .seg, .search, .sel select, .icon-btn, .theme-sw, .nav button, .cab-nav button[data-v], .fld input, .stats div, .feed li { border-radius: var(--r-sm); }
.seg button { border-radius: calc(var(--r-sm) - 2px); }
.ava { background: var(--grad); color: var(--on-accent); }
body { font-size: calc(14px * var(--fs)); }
table { font-size: calc(13px * var(--fs)); }
th { font-size: calc(11px * var(--fs)); }
.nav button, .theme-sw { font-size: calc(14px * var(--fs)); }
.chip, .seg button, .sel select { font-size: calc(12.5px * var(--fs)); }
.sel, .kpi { font-size: calc(11.5px * var(--fs)); }
.kpi b { font-size: calc(14px * var(--fs)); }
.title h1 { font-size: calc(20px * var(--fs)); }
.bd { font-size: calc(10.5px * var(--fs)); }
.cell .nm { font-size: calc(13px * var(--fs)); }
.tile .sym, .tile .val { font-family: var(--font); }
[data-glass] .cell, [data-glass] .tablewrap, [data-glass] .scard, [data-glass] .lk-card, [data-glass] .panel, [data-glass] .cab-nav {
  background: color-mix(in srgb, var(--surface) 68%, transparent); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); }
[data-glass] .side, [data-glass] .topbar, [data-glass] .toolbar { background: color-mix(in srgb, var(--surface) 58%, transparent); }
[data-motion="off"] *, [data-motion="off"] *::before, [data-motion="off"] *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
.side-foot .look-sw svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* страница «Оформление» */
.lk-card { background: var(--surface); border: 1px solid var(--line); padding: 16px 18px 18px; margin: 0 0 14px; box-shadow: var(--shadow-1); }
.cab-main .lk-card h3 { margin: 0 0 10px; }
.cab-main .lk-card h3 + .lk-opts, .cab-main .lk-card .lk-opts + h3, .cab-main .lk-card .lk-grid + h3 { margin-top: 0; }
.cab-main .lk-card .lk-opts + h3, .cab-main .lk-card .lk-grid + h3 { padding-top: 16px; }
.lk-tag { font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--line-2); padding: 2px 8px; border-radius: 99px; }
.lk-note { margin: -2px 0 12px; font-size: 12.5px; color: var(--text-2); }
.lk-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.lk-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--text); transition: border-color .15s, box-shadow .15s, background .15s; }
.lk-opt:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.lk-opt.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.lk-name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; }
.lk-hint { font-size: 11.5px; color: var(--text-2); }
.lk-dot { width: 18px; height: 18px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.lk-seed { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; font-size: 12.5px; }
.lk-grid { display: flex; flex-direction: column; gap: 2px; }
.lk-row { display: flex; align-items: center; gap: 14px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.lk-row:first-child { border-top: 0; }
.lk-lbl { flex: 0 0 230px; font-weight: 600; font-size: 13px; display: flex; flex-direction: column; }
.lk-lbl span { font-weight: 500; font-size: 11.5px; color: var(--text-2); }
.lk-ctl { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.lk-color { width: 42px; height: 30px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.lk-ctl code { font-size: 12px; color: var(--text-2); }
.lk-range { flex: 1; max-width: 280px; accent-color: var(--accent); }
.lk-val { min-width: 52px; font-size: 13px; }
.lk-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lk-2 .lk-card { margin: 0 0 14px; }
.lk-prev { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lk-prev .nm { font-size: calc(13px * var(--fs)); font-weight: 800; line-height: 1; padding: 3px 7px; border-radius: 6px; color: var(--text); background: var(--surface); border: 1px solid color-mix(in srgb, var(--text) 35%, var(--line)); }
.lk-prev .nm i { font-style: normal; font-weight: 600; font-size: .75em; color: var(--text-2); margin-left: 5px; }
@media (max-width: 900px) { .lk-2 { grid-template-columns: 1fr; } .lk-row { flex-direction: column; align-items: stretch; gap: 6px; } .lk-lbl { flex: none; } }

/* ═══ динамика: тики цены, живая точка, перестановки в топе (выключается в «Оформление» → Анимации) ═══ */
.cell.tk-up { animation: tkc-up .9s ease-out; }
.cell.tk-down { animation: tkc-down .9s ease-out; }
@keyframes tkc-up { from { border-color: var(--up); box-shadow: 0 0 0 1px var(--up), 0 0 18px color-mix(in srgb, var(--up) 35%, transparent); } }
@keyframes tkc-down { from { border-color: var(--down); box-shadow: 0 0 0 1px var(--down), 0 0 18px color-mix(in srgb, var(--down) 35%, transparent); } }
td.tk-up, .kpi b.tk-up { animation: tkt-up 1s ease-out; }
td.tk-down, .kpi b.tk-down { animation: tkt-down 1s ease-out; }
.kpi b { border-radius: 5px; }
@keyframes tkt-up { from { background: color-mix(in srgb, var(--up) 28%, transparent); } }
@keyframes tkt-down { from { background: color-mix(in srgb, var(--down) 28%, transparent); } }
/* пульсирующая точка последней цены у графиков «Линия» и «Область» */
.cell .pdot { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 1; pointer-events: none; --pc: var(--accent); transition: transform .12s linear; }
.cell .pdot[hidden] { display: none; }
.cell .pdot::before, .cell .pdot::after { content: ''; position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--pc); }
.cell .pdot::before { box-shadow: 0 0 0 2px var(--surface), 0 0 10px var(--pc); }
.cell .pdot::after { animation: pdot 1.6s ease-out infinite; }
@keyframes pdot { from { transform: scale(1); opacity: .7; } to { transform: scale(3.8); opacity: 0; } }
/* «▲3» — график поднялся в топе */
.cell .rk { position: absolute; top: 6px; right: 8px; z-index: 3; font-size: calc(11px * var(--fs, 1)); font-weight: 800; line-height: 1; padding: 3px 7px; border-radius: 999px;
  pointer-events: none; animation: rk 3s ease-out forwards; box-shadow: var(--shadow-1); }
.cell .rk.up { color: var(--up); background: color-mix(in srgb, var(--up) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--up) 45%, transparent); }
.cell .rk.down { color: var(--down); background: color-mix(in srgb, var(--down) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--down) 45%, transparent); }
@keyframes rk { 0% { opacity: 0; transform: translateY(5px) scale(.8); } 10%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-5px); } }
.pick.ctypes button { display: inline-flex; align-items: center; gap: 6px; }
.pick.ctypes svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .cell .pdot::after { animation: none; } }

/* ═══ Плотности: крупные заявки в стакане (dens.js) ═══ */
.dens-view { display: flex; flex-direction: column; gap: 10px; height: 100%; min-height: 0; }
.dens-view[hidden] { display: none; }
.dens-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dens-src { font-size: 12px; font-weight: 600; color: var(--text-2); padding: 4px 10px; border-radius: 999px; background: var(--line-2); max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: help; }
.dens-src.live { color: var(--up); background: color-mix(in srgb, var(--up) 12%, transparent); }
.dens-src.live::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; animation: dens-pulse 1.6s ease-in-out infinite; }
@keyframes dens-pulse { 50% { opacity: .35; } }
.dens-upd { font-size: 11.5px; }
.dens-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 10px; }
.dens-main { min-height: 0; min-width: 0; }
.dens-empty { padding: 28px 18px; text-align: center; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.dens-table td small { display: block; font-weight: 500; color: var(--text-2); font-size: 11px; }
.dens-table td.lv b { font-weight: 700; }
.dens-table tr.cur td { background: var(--accent-soft); }
.dens-table tr.cur td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.dens-table td.fav { color: #ffb800; }
.dside { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 6px; text-transform: uppercase; letter-spacing: .03em; }
.dside.b { color: var(--up); background: color-mix(in srgb, var(--up) 13%, transparent); }
.dside.a { color: var(--down); background: color-mix(in srgb, var(--down) 13%, transparent); }
.imbc { min-width: 120px; }
.imb { position: relative; display: inline-block; width: 64px; height: 6px; border-radius: 3px; background: var(--line-2); vertical-align: middle; margin-right: 6px; }
.imb::after { content: ''; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--text-3); }
.imb i { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.imb i.up { background: var(--up); } .imb i.down { background: var(--down); }
.dens-mapcard { height: 100%; padding: 10px 6px 4px 10px; }
.dens-map { width: 100%; height: 100%; display: block; }

.dens-book { min-height: 0; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); padding: 12px 0 10px; font-variant-numeric: tabular-nums; }
.db-head { display: flex; align-items: center; gap: 8px; padding: 0 14px; }
.db-head b { font-size: 17px; }
.db-head .muted { font-size: 11.5px; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-head .star { font-size: 20px; color: #ffb800; }
.db-px { display: flex; flex-direction: column; align-items: flex-end; }
.db-px b { font-size: 15px; } .db-px span { font-size: 12px; font-weight: 600; }
.db-tools { display: flex; align-items: center; gap: 6px; padding: 8px 14px 10px; font-size: 12.5px; border-bottom: 1px solid var(--line-2); }
.db-thr { width: 120px; padding: 3px 7px; border: 1px solid var(--accent); border-radius: 7px; background: var(--surface); color: var(--text); font: inherit; }
.linkbtn.red { color: var(--down); }
.db-cols, .db-row { display: grid; grid-template-columns: 1fr 1.15fr 1fr .8fr .75fr; gap: 6px; padding: 0 14px; align-items: center; }
.db-cols.prof, .db-side.prof .db-row:not(.sum) { grid-template-columns: 1.15fr 1fr .8fr .9fr; }
.db-cols { font-size: 10.5px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; padding-top: 8px; padding-bottom: 4px; }
.db-cols span:not(:first-of-type), .db-row span:not(:first-of-type) { text-align: right; }
.db-row { position: relative; font-size: 12px; height: 24px; }
.db-row > span { position: relative; z-index: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-row > i { position: absolute; right: 0; top: 2px; bottom: 2px; border-radius: 4px 0 0 4px; opacity: .16; }
.db-row.a > i { background: var(--down); } .db-row.b > i { background: var(--up); }
.db-row.l1 > i { opacity: .32; } .db-row.l2 > i { opacity: .55; }
.db-row.l2 { font-weight: 700; }
.db-row.a .v { color: var(--down); } .db-row.b .v { color: var(--up); }
.db-row.l0 { color: var(--text-2); }
.db-row.max { font-weight: 700; color: var(--text); border-radius: 5px; }
.db-row.a.max { box-shadow: inset 0 0 0 1.5px var(--down); } .db-row.b.max { box-shadow: inset 0 0 0 1.5px var(--up); }
.db-opts { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 8px 14px 0; font-size: 12px; }
.db-opts .seg:first-child { margin-right: auto; }
.db-row.sum { grid-template-columns: 1fr auto; font-size: 11.5px; color: var(--text-2); height: 26px; }
.db-row.sum .v { font-weight: 700; }
.db-none { padding: 4px 14px; font-size: 12px; }
.db-mid { display: flex; align-items: baseline; gap: 10px; padding: 6px 14px; margin: 4px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.db-mid b { font-size: 15px; }
.db-mid span { font-size: 11.5px; }
.db-iss { margin: 10px 14px 0; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: 12px; display: flex; flex-direction: column; gap: 5px; }
.db-bal { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; }
.db-bal i.up { background: var(--up); } .db-bal i.down { background: var(--down); }
.db-bal-l { display: flex; justify-content: space-between; font-weight: 600; }
.db-note { padding: 10px 14px 0; font-size: 11.5px; line-height: 1.45; }
[data-glass] .dens-book { background: color-mix(in srgb, var(--surface) 68%, transparent); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); }
@media (max-width: 1100px) {
  .dens-body { grid-template-columns: 1fr; grid-template-rows: minmax(260px, 1fr) auto; overflow-y: auto; }
  .dens-book { max-height: none; overflow: visible; }
}
@media (max-width: 760px) {
  .dens-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .dens-bar > * { flex: none; }
  .dens-src { max-width: 260px; }
}
.dens-table th { white-space: normal; }
.dens-table td.near b { white-space: nowrap; }

/* ═══════════ v23: меню профиля, страницы топа, фильтры, обзор рынка, арбитраж, поиск, «Центр» ═══════════ */
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 13px; }
.search.sm { padding: 0 10px; }
.search.sm input { width: 150px; padding: 6px 0; font-size: 13px; }
/* переключатель видов: на средних экранах — только значки */
@media (max-width: 1560px) { #viewSeg button { font-size: 0; gap: 0; padding: 5px 9px; } #viewSeg svg { width: 16px; height: 16px; } }

/* кнопка профиля и меню */
.hub-btn { position: relative; width: 36px; height: 36px; flex: none; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center;
  background: var(--grad); color: var(--on-accent); font-weight: 750; font-size: 15px; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); transition: transform .15s, box-shadow .15s; }
.hub-btn:hover, .hub-btn.on { transform: scale(1.06); box-shadow: 0 0 0 3px var(--accent-soft), 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.hub-btn.dot::after { content: ""; position: absolute; top: 0; right: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--down); border: 2px solid var(--surface); }
.hub { position: fixed; top: 58px; right: 14px; z-index: 65; width: 350px; max-height: calc(100vh - 72px); overflow-y: auto; padding: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); animation: pop .18s ease-out; scrollbar-width: thin; }
.hub-user { display: flex; align-items: center; gap: 10px; padding: 4px 4px 12px; border-bottom: 1px solid var(--line-2); }
.hub-user .ava { width: 42px; height: 42px; border-radius: 50%; background: var(--grad); color: var(--on-accent); }
.hub-user b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-user .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-user .grow0 { flex: 1; }
.hub-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin: 12px 4px 6px; }
.hub-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.hub-grid button { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1px solid transparent; background: none; border-radius: 12px; padding: 8px 2px; font-size: 11px; font-weight: 600; color: var(--text-2); line-height: 1.15; text-align: center; }
.hub-grid button:hover { background: var(--line-2); color: var(--text); }
.hub-grid button.on { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.hub-list { display: flex; flex-direction: column; gap: 1px; }
.hub-list button, .hub-foot button { display: flex; align-items: center; gap: 10px; border: 0; background: none; border-radius: 10px; padding: 8px 8px; font-size: 13.5px; font-weight: 500; color: var(--text); text-align: left; }
.hub-list button span { flex: 1; }
.hub-list button:hover, .hub-foot button:hover { background: var(--line-2); }
.hub svg, .hub-ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; color: var(--text-2); }
.hub-grid button.on svg { color: var(--accent); }
.hub-n { font-style: normal; min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--down); color: #fff; font-size: 11px; font-weight: 700; text-align: center; line-height: 18px; }
.hub-c { font-style: normal; font-size: 12px; color: var(--text-3); font-weight: 600; }
.hub-foot { display: flex; gap: 4px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.hub-foot button { flex: 1; justify-content: center; font-size: 12.5px; padding: 8px 4px; }
.hub-foot button.red, .hub-foot button.red svg { color: var(--down); }
.hub-ic { display: inline-grid; vertical-align: -4px; margin-right: 8px; }

/* пагинация сетки: кнопки у краёв и точки страниц */
.gpager { position: absolute; inset: 0 22px 8px; pointer-events: none; z-index: 6; }
body:not([data-view="charts"]) .gpager { display: none; }
.gp { position: absolute; top: 50%; width: 30px; height: 64px; margin-top: -32px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px); color: var(--text-2); display: grid; place-items: center; pointer-events: auto; box-shadow: var(--shadow-2); opacity: .35; transition: opacity .15s, color .15s, width .15s; padding: 0; }
.gp.prev { left: -18px; border-radius: 0 12px 12px 0; }
.gp.next { right: -18px; border-radius: 12px 0 0 12px; }
.gp svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.gpager:not([hidden]) .gp:hover { opacity: 1; color: var(--accent); width: 36px; }
#stage:hover .gp:not(:disabled) { opacity: .85; }
.gp:disabled { opacity: 0 !important; pointer-events: none; }
.gp-num { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); display: flex; align-items: center; gap: 5px; pointer-events: auto; padding: 4px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line); box-shadow: var(--shadow-1); font-size: 11px; font-weight: 600; color: var(--text-2); opacity: 0; transition: opacity .15s; }
#stage:hover .gp-num { opacity: 1; }
.gp-num i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); cursor: pointer; }
.gp-num i.on { background: var(--accent); width: 18px; border-radius: 4px; }
.gp-num span { margin-left: 4px; }
.charts.space, .charts.space canvas { cursor: ew-resize; }
.cfoot .ctfb { display: grid; place-items: center; height: 21px; padding: 0 6px; border-radius: 6px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; }
.cfoot .ctfb[hidden] { display: none; }
.cell .nm { cursor: copy; }
.cgrid { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 4px; font-size: 13px; }
.cgrid input { width: 58px; margin-left: 4px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-weight: 600; }
.keys { display: flex; flex-direction: column; gap: 6px; max-width: 640px; font-size: 13px; }
.keys > div { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.keys kbd { font-size: 11.5px; padding: 1px 6px; }
.keys span { margin-left: 8px; color: var(--text-2); }

/* всплывающее меню (вотчлисты, флаги, «где торгуется») */
.pmenu { position: fixed; z-index: 90; min-width: 200px; max-width: 360px; max-height: 70vh; overflow-y: auto; padding: 6px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); animation: pop .14s ease-out; font-size: 13px; }
.pmenu.wide { max-width: 520px; min-width: 420px; }
.pmenu > button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 7px 9px; border-radius: 8px; text-align: left; font-weight: 500; }
.pmenu > button:hover { background: var(--line-2); }
.pmenu .pm-h { padding: 6px 9px 6px; font-weight: 700; font-size: 12.5px; }
.pmenu .pm-pad { padding: 8px 9px; }
.pmenu .pm-foot { padding: 8px 9px 4px; font-size: 11.5px; line-height: 1.4; border-top: 1px solid var(--line-2); margin-top: 4px; }
.pmenu .pm-sep { border-top: 1px solid var(--line-2); border-radius: 0 0 8px 8px; margin-top: 4px; color: var(--accent); font-weight: 600; }
.pmenu .red { color: var(--down); }
.pm-check i { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--line); flex: none; display: grid; place-items: center; }
.pm-check.on i { background: var(--accent); border-color: var(--accent); }
.pm-check.on i::after { content: ""; width: 8px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.pm-check .muted { margin-left: auto; }
.pm-flags { display: flex; gap: 8px; padding: 6px 9px 8px; }
.pm-flags button { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--surface); background: var(--f); box-shadow: 0 0 0 1px var(--line); padding: 0; }
.pm-flags button.on, .pm-flags button:hover { box-shadow: 0 0 0 2px var(--f); }
.pmenu > .pm-row { display: grid; grid-template-columns: 1.4fr 1fr .9fr .9fr 1fr; gap: 8px; align-items: center; font-variant-numeric: tabular-nums; }
.pmenu > .pm-row.cur { background: var(--accent-soft); cursor: default; }
.pm-row.off { display: flex; justify-content: space-between; padding: 7px 9px; color: var(--text-3); }
.pm-row span:first-child { font-weight: 600; }

/* фильтры */
.flt-quick { display: flex; flex-direction: column; gap: 8px; width: 100%; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.flt-quick:empty { display: none; }
.fq-h { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
.fq-types { display: flex; flex-wrap: wrap; gap: 5px; }
.fq-types .chip { padding: 3px 9px; font-size: 12px; }
.cab-nav button.fnew { text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 10px; color: var(--accent); font-weight: 600; }
.cab-nav button.fnew:hover { background: var(--accent-soft); }
.fhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; max-width: 760px; }
.fname { flex: 1; min-width: 200px; font-size: 20px; font-weight: 700; border: 1px solid transparent; border-radius: 10px; padding: 6px 10px; background: none; letter-spacing: -.01em; }
.fname:hover, .fname:focus { border-color: var(--line); background: var(--surface); outline: none; }
.fconds { display: flex; flex-direction: column; gap: 6px; max-width: 760px; margin-bottom: 8px; }
.frow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 13px; }
.frow select { flex: 1; min-width: 190px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font-weight: 600; }
.frow label { display: flex; align-items: center; gap: 6px; color: var(--text-2); }
.frow input:not([type]) { width: 96px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); font-weight: 600; }
.frow input.bad { border-color: var(--down); box-shadow: 0 0 0 3px color-mix(in srgb, var(--down) 18%, transparent); }
.frow .fabs input { accent-color: var(--accent); }
.fign { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.fign .chip button { border: 0; background: none; padding: 0 0 0 4px; color: var(--text-3); }
.ftpl { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; max-width: 760px; margin-bottom: 16px; }
.ftpl button { display: flex; flex-direction: column; gap: 3px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; }
.ftpl button b { font-size: 14px; }
.ftpl button:hover { border-color: var(--accent); box-shadow: var(--shadow-1); }
.fprev { overflow-y: auto; }
.fcount { font-size: 13px; color: var(--text-2); }
.fcount b { font-size: 30px; color: var(--text); letter-spacing: -.02em; margin-right: 4px; }
.fcoins { display: flex; flex-wrap: wrap; gap: 5px; }
.fcoins .chip small { font-weight: 600; margin-left: 3px; }

/* обзор рынка */
.review { display: flex; height: 100%; min-height: 0; gap: 0; }
.review[hidden] { display: none; }
.rv-charts { flex: 1; min-width: 0; display: grid; gap: 8px; grid-template-columns: 1fr; grid-auto-rows: 1fr; }
.rv-charts[data-n="2"] { grid-template-columns: 1fr 1fr; }
.rv-charts[data-n="4"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.rv-charts[data-n="6"] { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; }
.rv-win { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); overflow: hidden; }
.rv-win.act { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.rv-charts[data-n="1"] .rv-win.act { border-color: var(--line); }
.rv-wh { display: flex; align-items: center; gap: 8px; padding: 6px 8px 4px 10px; flex-wrap: nowrap; min-width: 0; }
.rv-wh .rv-tf { flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.rv-wh .rv-px, .rv-wh b { white-space: nowrap; }
.rv-wh .icon-btn { flex: none; }
.rv-wh b { font-size: 15px; letter-spacing: -.01em; }
.rv-px { font-size: 12.5px; font-weight: 600; }
.rv-wh .seg.sm button { padding: 2px 7px; font-size: 11.5px; }
.rv-link { width: 14px; height: 14px; border-radius: 50%; border: 2px dashed var(--line); background: var(--l); padding: 0; flex: none; }
.rv-link.on { border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--l); }
.rv-cv { position: relative; flex: 1; min-height: 0; }
.rv-cv canvas, .qs-cv canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.rv-split { width: 10px; flex: none; cursor: col-resize; position: relative; }
.rv-split::after { content: ""; position: absolute; top: 45%; bottom: 45%; left: 4px; width: 2px; border-radius: 2px; background: var(--line); }
.rv-split:hover::after { background: var(--accent); top: 30%; bottom: 30%; }
.rv-side { width: 400px; flex: none; min-width: 260px; display: flex; flex-direction: column; min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); overflow: hidden; }
.rv-tabs { display: flex; gap: 2px; padding: 6px 6px 0; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line-2); flex: none; }
.rv-tabs button { border: 0; background: none; padding: 7px 10px; border-radius: 8px 8px 0 0; font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; border-bottom: 2px solid transparent; }
.rv-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.rv-tabs button:hover { color: var(--text); }
.rv-tools { display: flex; align-items: center; gap: 6px; padding: 6px; flex: none; }
.rv-tools .search { flex: 1; min-width: 0; }
.rv-tools .search input { width: 100%; }
.rv-tools .icon-btn.on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.rv-tools .seg.sm button { padding: 3px 8px; }
.rv-list { flex: 1; min-height: 0; overflow: auto; outline: none; scrollbar-width: thin; }
.rv-list table { font-size: 12.5px; }
.rv-list th, .rv-list td { padding: 6px 8px; }
.rv-list th:first-child, .rv-list td:first-child { text-align: center; }
.rv-list tr.cur td { background: var(--accent-soft); }
.rv-list tr.cur td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.rv-list td.fl { width: 22px; padding-right: 0; }
.rv-list td.fl i { display: block; width: 11px; height: 11px; border-radius: 50%; background: var(--f); margin: 0 auto; }
.rv-list td.fl i.no { background: none; border: 1.5px solid var(--line); opacity: 0; }
.rv-list tr:hover td.fl i.no { opacity: 1; }
.rv-list .star-s { color: #ffb800; font-size: 11px; }
.rv-list .cab-empty { margin: 10px; }
.rv-other { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px; border-top: 1px solid var(--line-2); }
.rv-other .muted { width: 100%; font-size: 12px; }
.rv-foot { font-size: 11px; padding: 6px 10px; border-top: 1px solid var(--line-2); flex: none; }

/* арбитраж */
.arb-view { display: flex; flex-direction: column; gap: 8px; height: 100%; min-height: 0; }
.arb-view[hidden] { display: none; }
.arb-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.arb-upd { font-size: 12px; }
.arb-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.arb-hint { margin: 0; font-size: 12.5px; max-width: 1100px; line-height: 1.45; }
.arb-table { height: auto; flex: none; }
.arb-table td small { font-weight: 500; }
.arb-table td.sym small { display: block; }
.arb-table .acts { display: flex; gap: 12px; justify-content: flex-end; }
.vb { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 700; background: var(--line-2); }
.vb.up { color: var(--up); background: color-mix(in srgb, var(--up) 12%, transparent); }
.vb.down { color: var(--down); background: color-mix(in srgb, var(--down) 12%, transparent); }

/* спредовый график */
.spread-modal { width: min(980px, 100%); text-align: left; padding: 22px 24px 18px; }
.spread-modal .modal-title { font-size: 18px; padding-right: 40px; }
.spread-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12.5px; }
#spCv { width: 100%; height: min(440px, 55vh); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }

/* быстрый поиск */
.qs-bg { place-items: start center; padding-top: 9vh; }
.qs { width: min(920px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; animation: popin .25s cubic-bezier(.2,.8,.2,1); }
.qs-in { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.qs-in svg { width: 20px; height: 20px; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; }
.qs-in input { flex: 1; border: 0; outline: none; background: none; font-size: 17px; font-weight: 500; color: var(--text); }
.qs-body { display: grid; grid-template-columns: 340px 1fr; height: min(460px, 62vh); }
.qs-list { overflow-y: auto; border-right: 1px solid var(--line-2); padding: 6px; scrollbar-width: thin; }
.qs-row { display: flex; gap: 8px; align-items: center; width: 100%; border: 0; background: none; padding: 8px 10px; border-radius: 9px; text-align: left; font-size: 13px; }
.qs-row .qs-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.qs-row.on { background: var(--accent-soft); }
.qs-row:hover { background: var(--line-2); }
.qs-f { width: 9px; height: 9px; border-radius: 50%; background: var(--f); display: inline-block; flex: none; }
.qs-empty { padding: 20px; font-size: 13px; }
.qs-prev { display: flex; flex-direction: column; min-width: 0; padding: 10px 12px; gap: 8px; }
.qs-ph { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.qs-ph b:first-child { font-size: 18px; }
.qs-cv { position: relative; flex: 1; min-height: 0; border: 1px solid var(--line-2); border-radius: 10px; }
.qs-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.qs-acts .btn { padding: 5px 10px; font-size: 12.5px; }

/* «Центр» */
.hub-main > * { max-width: 1040px; }
.hub-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 14px; }
.hub-tabs button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 13px; color: var(--text-2); }
.hub-tabs button.on { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.hub-doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 22px; font-size: 14px; line-height: 1.6; max-width: 820px; }
.hub-doc p { margin: 0 0 12px; }
.hub-doc ol { margin: 0 0 12px; padding-left: 20px; }
.hub-doc li { margin-bottom: 6px; }
.hdl { display: grid; grid-template-columns: 200px 1fr; gap: 10px 18px; margin: 0; }
.hdl dt { font-weight: 700; }
.hdl dd { margin: 0; color: var(--text-2); }
.keys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.keys-grid .cab-form { max-width: none; padding-bottom: 14px; }
.news { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.news .cab-form { gap: 4px; padding: 14px 18px; }
.news h3 { margin: 0; }
.news time { font-size: 12px; }
.news p { font-size: 13.5px; line-height: 1.5; }

/* вотчлист для TradingView */
.tv-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.tv-grid .cab-form { max-width: none; }
.tv-ns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-top: 8px; align-self: stretch; }
.tv-n { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.tv-n select { padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-weight: 600; }
.tv-out textarea { align-self: stretch; min-height: 280px; resize: vertical; font: 12px/1.5 ui-monospace, Consolas, monospace; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--text); }

/* дневник сделок */
.jcurve canvas { width: 100%; height: 160px; align-self: stretch; }
.jcurve { max-width: none; margin: 12px 0; }
.jform { max-width: none; margin-bottom: 12px; }
.jgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; align-self: stretch; }
.jform select { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; color: var(--text); font: inherit; }
.jimp { cursor: pointer; }
.cab-main .cab-actions .pick button { padding: 4px 9px; font-size: 12px; }

/* доска пожеланий */
.wf { margin-bottom: 8px; max-width: none; }
.wf button .muted { font-weight: 500; }
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; margin-top: 6px; }
.wcard { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow-1); }
.wcard h3 { margin: 0; font-size: 15px; }
.wcard p { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.45; white-space: pre-line; }
.wtop { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.wst { font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); }
.wst.plan { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.wst.work { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 45%, transparent); }
.wst.done { color: var(--up); border-color: color-mix(in srgb, var(--up) 45%, transparent); }
.wst.no { color: var(--text-3); border-color: var(--line); }
.wans { font-size: 12.5px; background: var(--accent-soft); border-radius: 10px; padding: 7px 10px; }
.wfoot { display: flex; align-items: center; gap: 6px; margin-top: auto; font-size: 12px; }
.wv { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 3px 9px; font-weight: 700; font-size: 12px; color: var(--text-2); }
.wv.on { color: var(--up); border-color: var(--up); background: color-mix(in srgb, var(--up) 10%, transparent); }
.wv.dn.on { color: var(--down); border-color: var(--down); background: color-mix(in srgb, var(--down) 10%, transparent); }
.wadm { display: flex; align-items: center; gap: 10px; padding-top: 6px; border-top: 1px dashed var(--line-2); }
.wadm select { padding: 3px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 12px; }
#wForm textarea { font: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--text); resize: vertical; }
#wForm select { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; color: var(--text); }

/* адаптив новых разделов */
@media (max-width: 1100px) {
  .rv-side { width: 330px; }
  .rv-charts[data-n="6"] { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 1fr); }
  .tv-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .hub { top: auto; bottom: 64px; right: 8px; left: 8px; width: auto; max-height: 75vh; }
  .hub-btn { width: 32px; height: 32px; font-size: 13px; }
  .gp { display: none; }
  .gp-num { opacity: 1; }
  .review { flex-direction: column; overflow-y: auto; }
  .rv-charts { flex: none; height: 52vh; grid-template-columns: 1fr !important; grid-template-rows: none !important; grid-auto-rows: 100%; overflow-y: auto; }
  .rv-split { display: none; }
  .rv-side { width: auto !important; flex: none; height: 70vh; margin-top: 8px; }
  .rv-foot { display: none; }
  .qs-bg { padding-top: 12px; }
  .qs-body { grid-template-columns: 1fr; height: auto; }
  .qs-list { max-height: 40vh; border-right: 0; }
  .qs-prev { height: 300px; }
  .pmenu.wide { min-width: 0; max-width: calc(100vw - 16px); }
  .pmenu > .pm-row { grid-template-columns: 1.3fr 1fr .9fr; }
  .pm-row span:nth-child(4), .pm-row span:nth-child(5) { display: none; }
  .hdl { grid-template-columns: 1fr; gap: 2px; }
  .hdl dd { margin-bottom: 10px; }
  .frow input:not([type]) { width: 80px; }
  .spread-modal { padding: 16px 14px 12px; }
}
/* арбитраж не зависит от интервала, сектора и фильтров раздела — прячем лишнее */
body[data-view="arb"] #ivSeg, body[data-view="arb"] #sector, body[data-view="arb"] label:has(#sector), body[data-view="arb"] #favOnly, body[data-view="arb"] .toolbar .pop-wrap, body[data-view="arb"] .pulsebar { display: none; }
.gp-num { bottom: -6px; }

/* ═══════════ телефон (v32): шапка в одну строку, виды всегда на виду, настройки и фильтры — в панели снизу,
   графики листаются пальцем по вертикали, двигаются по горизонтали, масштаб — двумя пальцами ═══════════ */
.mviews, .m-sheet-head, .m-tools-btn, .m-scrim { display: none; }
/* вертикальный свайп над свечами отдаём странице (листать сетку), горизонтальный и щипок — графику */
.cell canvas, .rv-cv canvas, .qs-cv canvas { touch-action: pan-y; }
@media (max-width: 760px) {
  /* шапка: название, биржа, поиск, сигналы, меню — одна строка */
  .topbar { flex-wrap: nowrap; height: 54px; padding: 0 8px 0 14px; gap: 4px; }
  .topbar .search { display: none; }
  .title { flex: 1; min-width: 0; }
  .title h1 { font-size: 19px; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .status { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  #exSeg { margin-right: 2px; }
  #exSeg button { padding: 5px 9px; font-size: 12.5px; }
  .topbar .icon-btn { width: 38px; height: 38px; border: 0; background: none; color: var(--text-2); }
  .topbar .hub-btn { width: 34px; height: 34px; margin-left: 2px; }

  /* виды — отдельная строка крупных кнопок */
  .mviews { display: flex; flex: none; padding: 4px 6px; overflow-x: auto; scrollbar-width: none; background: var(--glass);
    backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); border-bottom: 1px solid var(--line-2); }
  .mviews::-webkit-scrollbar { display: none; }
  .mviews #viewSeg { display: flex; flex: 1; gap: 2px; padding: 0; background: none; box-shadow: none; }
  .mviews #viewSeg button { flex: 1 1 0; min-width: 46px; flex-direction: column; justify-content: center; gap: 3px; padding: 6px 0 5px; overflow: hidden;
    font-size: 10px; font-weight: 600; letter-spacing: -.03em; border-radius: 11px; color: var(--text-2); }
  .mviews #viewSeg button.on { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
  .mviews #viewSeg svg { width: 20px; height: 20px; }

  /* строка под видами: интервал и кнопка «Настройки» */
  .toolbar { flex-wrap: nowrap; overflow: visible; padding: 6px 10px; gap: 8px; }
  body:not(.m-tools) .toolbar > :not(#ivSeg):not(#mTools) { display: none; }
  #ivSeg { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  #ivSeg button { flex: 1 0 auto; justify-content: center; padding: 6px 8px; }
  .m-tools-btn { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 7px 12px; flex: none; }
  .m-tools-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

  /* выезжающая снизу панель настроек */
  body.m-tools .m-scrim { display: block; position: fixed; inset: 0; z-index: 58; background: rgba(6, 12, 28, .42); animation: fade .15s ease-out; }
  body.m-tools .toolbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 59; flex-direction: column; align-items: stretch; gap: 12px;
    max-height: 86vh; overflow-x: hidden; overflow-y: auto; padding: 0 16px calc(18px + env(safe-area-inset-bottom));
    background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; border-top: 1px solid var(--line);
    border-radius: 20px 20px 0 0; box-shadow: 0 -14px 40px rgba(0, 0, 0, .22); animation: m-sheet .24s cubic-bezier(.2, .8, .2, 1); }
  @keyframes m-sheet { from { transform: translateY(48px); opacity: 0; } }
  body.m-tools .m-tools-btn { display: none; }
  body.m-tools .m-sheet-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 2;
    margin: 0 -16px; padding: 18px 16px 10px; background: var(--surface); border-bottom: 1px solid var(--line-2); }
  body.m-tools .m-sheet-head::before { content: ""; position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--line); }
  .m-sheet-head b { font-size: 17px; }
  .m-sheet-head .btn { padding: 7px 16px; font-size: 14px; }
  body.m-tools #ivSeg { width: 100%; flex: none; }
  body.m-tools .toolbar .sel { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-2); }
  body.m-tools .toolbar .sel > span { display: inline; }
  body.m-tools .toolbar .sel select { flex: 1; max-width: 62%; padding: 10px; font-size: 14px; }
  body.m-tools .charts-ctl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  body.m-tools .charts-ctl .sel { grid-column: 1 / -1; }
  body.m-tools .toolbar .chip { padding: 10px 14px; font-size: 13.5px; text-align: center; }
  body.m-tools .pop-wrap { display: flex; flex-direction: column; }
  body.m-tools .pop { position: static; width: auto; margin-top: 10px; padding: 14px; box-shadow: none; animation: none;
    background: var(--surface-2); backdrop-filter: none; -webkit-backdrop-filter: none; }
  body.m-tools .pop .sel select { max-width: 55%; }
  body.m-tools .pop .chip { align-self: stretch; }
  body.m-tools .fq-types .chip { align-self: auto; padding: 6px 11px; }
  /* фильтры в панели — сразу раскрыты, кнопка становится заголовком блока */
  body.m-tools #filtersPop[hidden] { display: flex !important; }
  body.m-tools #filtersBtn { pointer-events: none; border: 0; background: none; box-shadow: none; text-align: left; padding: 8px 0 0;
    font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
  #cFreeze { display: none; }

  /* пульс рынка и легенда — только там, где они нужны; остальное место — данным */
  .pulsebar { padding: 6px 12px 4px; }
  body:not([data-view="map"]):not([data-view="stats"]) .pulsebar { display: none; }
  body:not([data-view="map"]) .legend { display: none; }
  .legend { flex-wrap: nowrap; gap: 8px; padding: 2px 10px 6px; }
  #legendLbl, #updated { display: none; }
  .legend-scale { flex: 1; }
  .legend-scale span { flex: 1; min-width: 0; font-size: 10px; }
  main { padding: 6px 8px 6px; }
  body[data-view="map"] main { padding-top: 0; }

  /* сетка графиков: одна колонка, листается пальцем; кнопки на графике — в карточке и на большом графике */
  .cell .cbtn, .cell .cfoot { display: none; }
  .cell .bdg { right: 60px; }
  #stage:has(.gpager:not([hidden])) .charts { padding-bottom: 50px; }
  .gpager { inset: auto 8px 8px; height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; }
  .gpager[hidden] { display: none; }
  .gpager .gp { display: grid; position: static; margin: 0; width: 46px; height: 40px; opacity: 1; border-radius: 12px; color: var(--text); }
  .gpager .gp:disabled { opacity: .35 !important; }
  .gpager .gp-num { position: static; transform: none; opacity: 1; height: 40px; padding: 0 14px; font-size: 12.5px; }
  .gpager .gp-num i { display: none; }
  .gpager .gp-num span { margin: 0; }

  /* большой график: заголовок в строку, таймфреймы и индикаторы — полосами, листаются вбок */
  .pro-head { padding: 8px 8px 6px 12px; gap: 6px 6px; }
  .pro-head h2 { font-size: 19px; }
  #proSub, #proFit { display: none; }
  .pro-price { font-size: 14px; white-space: nowrap; }
  .pro-head .icon-btn { width: 36px; height: 36px; }
  #proTf, #proInd { order: 2; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  #proInd { order: 3; gap: 6px; }
  #proInd .chip { flex: none; padding: 6px 11px; }
  #proTf button { flex: 1 0 auto; justify-content: center; padding: 6px 8px; }
  .pro-body { margin: 4px 6px calc(6px + env(safe-area-inset-bottom)); }
  .pro-legend { font-size: 11px; max-width: calc(100% - 66px); }

  /* карточка инструмента и сигналы — на весь экран поверх нижнего меню */
  .panel { z-index: 45; width: 100vw; border-left: 0; padding: 14px 14px calc(22px + env(safe-area-inset-bottom)); }
  .panel .icon-btn { width: 38px; height: 38px; }

  /* таблица: тикер закреплён слева, остальное листается вбок */
  #table th, #table td { padding: 9px 8px; }
  #table th:first-child, #table td:first-child { position: sticky; left: 0; z-index: 1; width: 30px; min-width: 30px; padding: 0 2px 0 8px; background: var(--surface); }
  #table th:nth-child(2), #table td:nth-child(2) { position: sticky; left: 30px; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line); }
  #table th:first-child, #table th:nth-child(2) { z-index: 3; background: var(--surface-2); }
  #table td.sym small { max-width: 110px; }

  /* фильтры по метрикам и настройки графиков: одна прокрутка, «проходят сейчас» — под условиями */
  .overlay.cset { overflow-y: auto; }
  .cset .cab-nav { position: sticky; top: 0; z-index: 3; }
  .cset .cset-main { flex: none; overflow: visible; }
  .cset .cset-main { order: 1; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .cset-prev.fprev { display: flex; width: auto; gap: 6px; padding: 12px 16px 10px; border-bottom: 1px solid var(--line-2); background: var(--surface-2); }
  .cset-prev.fprev:empty { display: none; }
  .fprev .fcount b { font-size: 24px; }
  .fprev .fcount::before { content: "Проходят сейчас: "; }
  .fprev .fcoins { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .fprev .fcoins .chip { flex: none; }
  .fprev > .muted:first-child, .fprev p.small { display: none; }
  .frow { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
  .frow select { grid-column: 1 / 3; grid-row: 1; min-width: 0; padding: 9px 8px; }
  .frow [data-fa="del"] { grid-column: 3; grid-row: 1; width: 36px; height: 36px; }
  .frow label { min-width: 0; }
  .frow input:not([type]) { width: 100%; min-width: 0; padding: 9px 8px; }
  .frow .fabs { grid-column: 1 / -1; }
  .fhead .btn { flex: 1; }
  .ftpl { grid-template-columns: 1fr; }
  .addfav input { flex: 1; min-width: 0; }
  .cab-nav button[data-v], .cab-nav button.fnew { padding: 8px 12px; white-space: nowrap; }
}
/* телефон в альбомной ориентации: без пульса и легенды — высоты и так мало */
@media (pointer: coarse) and (max-height: 500px) and (min-width: 761px) {
  .pulsebar, .legend { display: none; }
}
/* телефон (v33): ничего не налезает друг на друга — проверено по каждому разделу на 375 px */
@media (max-width: 760px) {
  /* подписи видов и нижнего меню шире равных долей («Аналитика», «Плотности», «Облигации») — ширина по тексту */
  .mviews #viewSeg button { flex: 1 1 auto; min-width: 0; padding: 6px 3px 5px; }
  .tabbar button { flex: 1 1 auto; min-width: 0; padding: 5px 2px; font-size: 10px; }
  /* «Аналитика»: колонка 1fr растягивалась по длинной подписи, карточки уезжали за край */
  .stats-view { grid-template-columns: minmax(0, 1fr); }
  /* «Обзор»: таймфреймы — отдельной строкой под тикером, а не сжатой полоской под кнопками */
  .rv-wh { flex-wrap: wrap; row-gap: 4px; }
  .rv-wh .rv-tf { order: 9; flex: 1 1 100%; display: flex; }
  .rv-wh .rv-tf button { flex: 1 0 auto; justify-content: center; }
  /* «Графики»: переключатель страниц — в своей полосе под лентой, а не поверх карточек */
  #stage:has(.gpager:not([hidden])) .charts { padding-bottom: 0; height: calc(100% - 48px); }
  .gpager { inset: auto 8px 2px; }
  /* «Настройки»: блок фильтров (z-index 25) закрывал закреплённый заголовок с кнопкой «Готово» */
  body.m-tools .m-sheet-head { z-index: 30; }
  /* «Плотности»: панель в четыре строки вместо ленты шириной 1400 px:
     источник + время · список/карта + «только с плотностями» · стороны · три списка */
  .dens-bar { flex-wrap: wrap; overflow: visible; gap: 6px; }
  .dens-bar > * { flex: none; min-width: 0; }
  .dens-bar .dens-src { order: 1; flex: 1 1 55%; max-width: none; }
  .dens-bar .dens-upd { order: 2; font-size: 11px; white-space: nowrap; }
  .dens-bar .seg[data-set="mode"] { order: 3; }
  .dens-bar .chip[data-set="only"] { order: 4; margin-left: auto; padding: 5px 11px; font-size: 12px; }
  .dens-bar .seg[data-set="side"] { order: 5; flex: 1 1 100%; display: flex; }
  .dens-bar .seg[data-set="side"] button { flex: 1; justify-content: center; }
  .dens-bar .seg.sm button { padding: 4px 8px; font-size: 12px; }
  .dens-bar .sel { order: 6; flex: 1 1 0; display: flex; flex-direction: column; align-items: stretch; gap: 2px; font-size: 10.5px; }
  .dens-bar .sel select { width: 100%; min-width: 0; padding: 6px 4px; font-size: 12.5px; }
  .dens-bar .sel[hidden] { display: none; }
  .dens-bar .grow { display: none; }
  /* «Арбитраж»: режимы переносятся, а не прокручивают вбок всю шапку (активный режим был за краем) */
  .arb-head { gap: 8px; }
  .arb-head > .seg { display: flex; flex-wrap: wrap; max-width: 100%; }
  .arb-head > .seg button { flex: 1 1 auto; justify-content: center; padding: 5px 8px; font-size: 12.5px; }
  .arb-head .search { flex: 1 1 100%; }
  /* карта: цена в плитке попадала на фоновую линию графика — на телефоне только тикер и изменение */
  .tile .px { display: none; }
}
/* узкие телефоны (360 px и меньше): интервал и «Настройки» помещаются в строку без обрезки последней кнопки */
@media (max-width: 380px) {
  #ivSeg button { padding: 6px 5px; }
  .m-tools-btn { padding: 7px 10px; gap: 5px; }
}

/* ═══ большой график: инструменты рисования и список индикаторов (v34) ═══ */
.pro-body { display: flex; overflow: hidden; }
.pro-tools { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: none; }
.pro-tools button { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border: 0; border-radius: 8px; background: none; color: var(--text-2); cursor: pointer; }
.pro-tools button:hover { background: var(--line-2); color: var(--text); }
.pro-tools button.on { background: var(--accent-soft); color: var(--accent); }
.pro-tools hr { width: 20px; margin: 4px 0; border: 0; border-top: 1px solid var(--line); flex: none; }
.pro-cvw { position: relative; flex: 1; min-width: 0; }
.pro-sel { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 2; display: flex; align-items: center; gap: 5px; padding: 4px 6px 4px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.pro-sel[hidden] { display: none; }
.pro-sel button[data-c] { width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 2px solid var(--surface); background: var(--c); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.pro-sel button[data-c].on { box-shadow: 0 0 0 2px var(--text); }
.pro-sel .icon-btn { width: 28px; height: 28px; border-radius: 8px; }
.pro-pop { position: fixed; z-index: 60; width: 420px; max-width: calc(100vw - 16px); max-height: 70vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 0 0 8px; }
.pro-pop[hidden] { display: none; }
.pp-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.pp-head .icon-btn { width: 30px; height: 30px; }
.pp-sec { padding: 10px 14px 4px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-2); }
.pp-row { display: flex; align-items: center; gap: 8px; padding: 2px 12px 2px 14px; min-height: 32px; }
.pp-row:hover { background: var(--line-2); }
.pp-row label { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); }
.pp-row.on label { color: var(--text); }
.pp-row label i { flex: none; width: 14px; height: 3px; border-radius: 2px; }
.pp-row input[type=checkbox] { margin: 0; accent-color: var(--accent); }
.pp-par { display: flex; gap: 4px; }
.pp-par input { width: 54px; padding: 3px 6px; font-size: 12px; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; font-family: inherit; }
@media (max-width: 760px) {
  .pro-body { flex-direction: column-reverse; }
  .pro-tools { flex-direction: row; border-right: 0; border-top: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; padding: 4px 6px; }
  .pro-tools button { width: 38px; height: 36px; }
  .pro-tools hr { width: 0; height: 20px; margin: 0 3px; border-top: 0; border-left: 1px solid var(--line); }
  .pro-pop { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; max-height: 72vh; border-radius: 16px 16px 0 0; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .pp-par input { width: 48px; }
  .pro-sel { bottom: 26px; }
}

/* ═══════════ v35: параметры отбора графиков, лента сделок ═══════════ */
.b-sort { --c: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent); }
.chip.c-params { display: inline-flex; align-items: center; gap: 5px; }
.c-params svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }

/* окно «Параметры отбора» */
.pc-now { font-size: 13px; padding: 9px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--text); margin: 4px 0 12px; max-width: 900px; line-height: 1.45; }
.pc-q { max-width: 360px; margin-bottom: 4px; }
.pc-q input { width: 100%; }
.cset-main h4.pc-g { margin: 18px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
.pgrid[hidden], .pcard[hidden], .pc-g[hidden] { display: none; }
.pcard { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 9px; background: var(--surface); display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, box-shadow .15s; }
.pcard:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.pcard.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.pc-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pc-top > b { font-size: 13.5px; cursor: pointer; }
.pc-pick { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); padding: 0; cursor: pointer; display: grid; place-items: center; }
.pc-pick i { width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.pcard.on .pc-pick { border-color: var(--accent); }
.pcard.on .pc-pick i { background: var(--accent); }
.pc-tag { font-size: 10.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 7px; white-space: nowrap; }
.pc-lead { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.pc-lead b { color: var(--text); }
.pc-desc { margin: 0; font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.pc-set { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; }
.pc-f { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); }
.pc-f input, .pc-f select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 3px 6px; }
.pc-f input { width: 58px; }
.pc-f select { max-width: 250px; }
.pc-set .grow { flex: 1; }
.hp-meta { margin-top: 5px; }
.hdl dt .pc-tag { margin-left: 4px; vertical-align: 1px; }
.hp-flash + dd, .hp-flash { animation: hpFlash 2.2s ease-out; }
@keyframes hpFlash { 0%, 30% { background: var(--accent-soft); } 100% { background: transparent; } }

/* лента сделок */
.tape { display: flex; flex-direction: column; min-height: 0; font-variant-numeric: tabular-nums; }
.tape[hidden] { display: none; }
.tp-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px 6px; font-size: 12.5px; }
.tp-head b { white-space: nowrap; }
.tp-src { font-size: 11px; color: var(--text-3); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.tp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 20%, transparent); }
.tp-dot.off { background: var(--text-3); box-shadow: none; }
.tp-head .grow { flex: 1; }
.tp-min { font: inherit; font-size: 11.5px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 2px 4px; max-width: 120px; }
.tp-bal { display: flex; height: 4px; margin: 0 10px; border-radius: 3px; overflow: hidden; background: var(--line-2); }
.tp-bal i { display: block; height: 100%; transition: width .4s; }
.tp-bal .up { background: var(--up); } .tp-bal .down { background: var(--down); }
.tp-bal-l { display: flex; justify-content: space-between; gap: 6px; padding: 3px 10px 4px; font-size: 10.5px; font-weight: 600; min-height: 18px; white-space: nowrap; }
.tp-spd { overflow: hidden; text-overflow: ellipsis; }
.tp-cols, .tp-r { display: grid; grid-template-columns: 1.05fr 1.2fr .9fr .95fr; gap: 4px; padding: 0 10px; align-items: center; }
.tp-cols { font-size: 10px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; padding-bottom: 3px; border-bottom: 1px solid var(--line-2); }
.tp-cols span:not(:first-child), .tp-r span:not(:first-child) { text-align: right; }
.tp-wrap { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tp-list { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.tp-r { font-size: 11.5px; height: 20px; color: var(--text-2); }
.tp-r span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-r span:first-child { color: var(--text-3); }
.tp-r.b span:nth-child(2) { color: var(--up); } .tp-r.s span:nth-child(2) { color: var(--down); }
.tp-r.big { font-weight: 700; color: var(--text); }
.tp-r.big.b { background: color-mix(in srgb, var(--up) 14%, transparent); } .tp-r.big.s { background: color-mix(in srgb, var(--down) 14%, transparent); }
.tp-r.nw { animation: tpIn .6s ease-out; }
@keyframes tpIn { from { background: color-mix(in srgb, var(--accent) 22%, transparent); } }
@media (prefers-reduced-motion: reduce) { .tp-r.nw { animation: none; } }
:root[data-motion="off"] .tp-r.nw { animation: none; }
.tp-empty { padding: 14px 10px; font-size: 12px; color: var(--text-3); line-height: 1.45; }
.tp-new { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); border: 0; border-radius: 999px; padding: 3px 10px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-1); }
.tp-new[hidden] { display: none; }

/* большой график: лента справа */
.pro-tape { flex: none; width: 262px; border-left: 1px solid var(--line); }
/* «Плотности»: лента третьей колонкой на широком экране, под стаканом — на среднем */
.dens-body { grid-template-columns: minmax(0, 1fr) 380px 270px; }
.dens-tape { min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); overflow: hidden; }
@media (max-width: 1440px) and (min-width: 1101px) {
  .dens-body { grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: minmax(0, 1.5fr) minmax(170px, 1fr); }
  .dens-main { grid-row: 1 / 3; }
}
@media (max-width: 1100px) {
  .dens-body { grid-template-columns: 1fr; grid-template-rows: minmax(260px, 1fr) auto auto; }
  .dens-tape { height: 360px; flex: none; }
}
/* «Обзор рынка»: лента под вотчлистом */
.rv-tape { flex: none; height: 250px; border-top: 1px solid var(--line); }
@media (max-height: 760px) { .rv-tape { height: 190px; } }
@media (max-width: 760px) {
  .pro-tape { width: auto; height: 170px; border-left: 0; border-bottom: 1px solid var(--line); }
  .pgrid { grid-template-columns: 1fr; }
  .pc-lead { max-width: 55%; }
}

/* ═══════════ v36: строка над разделами (период торгов + бегущая строка) и каталог облигаций ═══════════ */
.tkbar { flex: none; display: flex; align-items: center; height: 30px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 12px; overflow: hidden; }
.tk-sess { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 100%; padding: 0 12px 0 18px; border: 0; border-right: 1px solid var(--line); background: var(--surface); color: var(--text); white-space: nowrap; cursor: pointer; font-size: 12px; }
.tk-sess:hover { background: var(--line-2); }
.tk-sess i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex: none; }
.tk-sess .tk-mx { color: var(--text-3); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.tk-sess b { font-weight: 600; }
.k-main i, i.k-main { background: var(--up); box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 20%, transparent); }
.k-morn i, .k-eve i, .k-wknd i, i.k-morn, i.k-eve, i.k-wknd { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.k-auc i, i.k-auc { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 22%, transparent); }
.k-clr i, i.k-clr, .k-off i { background: var(--text-3); }
.k-off b { color: var(--text-2); font-weight: 500; }
.tk-run { position: relative; flex: 1; min-width: 0; height: 100%; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 36px), transparent); }
.tk-track { position: absolute; left: 0; top: 0; height: 100%; display: flex; align-items: center; gap: 28px; padding-left: 18px; white-space: nowrap; will-change: transform; }
.tkbar.tk-empty .tk-run::after { content: attr(data-empty); position: absolute; left: 18px; top: 0; line-height: 30px; color: var(--text-3); white-space: nowrap; }
.tkbar.tk-off .tk-run::after { content: 'Бегущая строка выключена — включить можно кнопкой справа'; position: absolute; left: 18px; top: 0; line-height: 30px; color: var(--text-3); white-space: nowrap; }
.tkbar.tk-off .tk-track { display: none; }
.tk-it { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border: 0; border-radius: 7px; background: none; color: var(--text); font-size: 12px; cursor: pointer; }
.tk-it:hover { background: var(--line-2); }
.tk-it b { font-weight: 700; }
.tk-it .tk-ic { font-size: 10px; }
.tk-it .tk-ic.d { font-size: 12px; }
.tk-it .tk-tag { color: var(--text-3); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.tk-it small.muted { font-variant-numeric: tabular-nums; }
.tk-it.is-d { box-shadow: inset 0 0 0 1px var(--line); }
.tk-it.new { animation: tkNew 2.4s ease-out; }
@keyframes tkNew { from { background: color-mix(in srgb, var(--accent) 26%, transparent); } }
:root[data-motion="off"] .tk-it.new { animation: none; }
@media (prefers-reduced-motion: reduce) { .tk-it.new { animation: none; } }
/* без анимации строка не едет — листается вбок */
:root[data-motion="off"] .tk-run { overflow-x: auto; scrollbar-width: none; }
.tk-set { flex: none; display: grid; place-items: center; width: 34px; height: 100%; border: 0; border-left: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; }
.tk-set:hover { color: var(--text); background: var(--line-2); }
.pmenu.tk-pop { min-width: 300px; max-width: 380px; }
.pmenu.tk-pop > button input { pointer-events: none; }
.tk-sch { display: grid; grid-template-columns: 12px 92px 1fr auto; align-items: center; gap: 8px; padding: 4px 9px; border-radius: 8px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tk-sch i { width: 8px; height: 8px; border-radius: 50%; }
.tk-sch b { font-weight: 500; }
.tk-sch.cur { background: var(--accent-soft); }
.tk-sch.cur b { font-weight: 700; }
.tk-sch.past { color: var(--text-3); }
.tk-sch em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); }

/* каталог облигаций */
.bcat-view { display: flex; flex-direction: column; gap: 8px; height: 100%; min-height: 0; }
.bcat-view[hidden] { display: none; }
.bc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bc-q input { width: 240px; padding: 6px 0; }
.bc-info { font-size: 12px; }
.bc-flt { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px 18px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r, 14px); box-shadow: var(--shadow-1); max-height: 42vh; overflow: auto; flex: none; }
.bc-fg { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bc-fg.wide { grid-column: 1 / -1; }
.bc-fg > span { font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.bc-fg > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bc-fg .chip { padding: 4px 10px; font-size: 12px; }
.bc-in, .bc-rng input { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 5px 9px; font-size: 13px; color: var(--text); outline: none; }
.bc-in { width: 100%; max-width: 340px; }
.bc-in:focus, .bc-rng input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.bc-rng { display: inline-flex; align-items: center; gap: 6px; }
.bc-rng input { width: 84px; }
.bc-rng i { color: var(--text-3); font-style: normal; }
.bc-body { flex: 1; min-height: 0; overflow: auto; }
.bc-table { height: auto; min-height: 100%; }
.bc-table td.sym small { max-width: 180px; }
.bc-table td.sym .vb { font-size: 10px; padding: 0 5px; vertical-align: 1px; }
.bc-table td { font-variant-numeric: tabular-nums; }
.bc-em { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.bc-r.r1 { color: var(--up); background: color-mix(in srgb, var(--up) 12%, transparent); }
.bc-r.r2 { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.bc-r.r3 { color: #b86e00; background: color-mix(in srgb, var(--warn) 16%, transparent); }
:root[data-theme="dark"] .bc-r.r3 { color: var(--warn); }
.bc-r.r4 { color: var(--down); background: color-mix(in srgb, var(--down) 12%, transparent); }
.bc-liq { display: inline-flex; align-items: center; gap: 6px; }
.bc-liq i { display: inline-block; width: 22px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--c) var(--w), var(--line) var(--w)); }
.bc-liq.l2 i { --c: var(--up); --w: 100%; }
.bc-liq.l1 i { --c: var(--warn); --w: 66%; }
.bc-liq.l0 i { --c: var(--down); --w: 33%; }
.bc-pager { flex: none; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12.5px; }
.bc-pages { display: inline-flex; align-items: center; gap: 3px; }
.bc-pages button { min-width: 30px; height: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text-2); font-weight: 600; font-size: 12.5px; cursor: pointer; }
.bc-pages button:hover:not(:disabled) { color: var(--text); }
.bc-pages button.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.bc-pages button:disabled { opacity: .4; cursor: default; }
.pmenu.bc-cols > button input { pointer-events: none; }
/* карточка выпуска */
.bc-card { width: min(1000px, 100%); max-height: calc(100vh - 32px); overflow: auto; text-align: left; padding: 22px 24px 18px; gap: 10px; }
.bc-card .modal-title { font-size: 20px; padding-right: 40px; }
.bc-sub { font-size: 13px; }
.bc-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
.bc-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bc-kpis > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.bc-kpis span { font-size: 11.5px; color: var(--text-2); }
.bc-kpis b { font-size: 17px; font-variant-numeric: tabular-nums; }
.bc-kpis small { font-size: 11.5px; color: var(--text-2); }
.bc-kpis small.up { color: var(--up); }
.bc-kpis small.down { color: var(--down); }
.bc-cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; }
.bc-cols2 h4 { margin: 6px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.bc-dl { display: grid; grid-template-columns: minmax(130px, 45%) 1fr; gap: 3px 10px; margin: 0; font-size: 12.5px; }
.bc-dl dt { color: var(--text-2); }
.bc-dl dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bc-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.bc-acts a.btn { text-decoration: none; display: inline-flex; align-items: center; }
body[data-view="bcat"] #sector, body[data-view="bcat"] label:has(#sector), body[data-view="bcat"] #favOnly, body[data-view="bcat"] .toolbar .pop-wrap,
body[data-view="bcat"] .pulsebar, body[data-view="bcat"] #mTools, body[data-view="bcat"] .legend .hint { display: none; }
@media (max-width: 760px) {
  .tkbar { height: 28px; }
  .tk-sess { padding: 0 8px 0 10px; gap: 6px; }
  .tk-sess .tk-mx { display: none; }
  .tk-track { gap: 18px; padding-left: 10px; }
  .tk-it .tk-tag, .tk-it > span.muted { display: none; }
  .tkbar.tk-empty .tk-run::after, .tkbar.tk-off .tk-run::after { line-height: 28px; left: 10px; }
  .tk-set { width: 30px; }
  .bc-head { gap: 6px; }
  .bc-head > .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .bc-q { flex: 1 1 100%; }
  .bc-q input { width: 100%; }
  .bc-info { flex-basis: 100%; }
  .bc-flt { grid-template-columns: 1fr; max-height: 50vh; }
  .bc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bc-cols2 { grid-template-columns: 1fr; }
  .bc-card { padding: 16px 14px 12px; }
  .bc-pager { gap: 8px; }
  .bc-pages button { min-width: 26px; padding: 0 5px; }
  /* на телефоне каталог листается целиком, а не в окошке таблицы */
  body[data-view="bcat"] main { overflow-y: auto; }
  .bcat-view { height: auto; min-height: 100%; }
  .bc-body { overflow: visible; flex: none; }
  .bc-table { min-height: 0; }
  .bc-q { order: 1; }
  .bc-head > .chip, .bc-head > .linkbtn { order: 2; }
  .bc-info { order: 3; }
  .bc-pager .sel > span { display: none; }
  .bc-pager { flex-wrap: nowrap; justify-content: space-between; }
}

/* ═══ v37: уведомления ведут в «Обзор», стакан в «Обзоре» (book.js), карточка ═══ */
.panel-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.panel-acts .btn { flex: 1 1 auto; }
.toast.sig { display: flex; align-items: flex-start; gap: 8px; padding-right: 6px; }
.toast .t-body { flex: 1; min-width: 0; }
.toast .t-body small { display: block; margin-top: 3px; font-size: 11px; font-weight: 600; color: var(--accent); }
.toast .t-x { flex: none; border: 0; background: none; color: var(--text-3); font-size: 12px; line-height: 1; padding: 3px 5px; border-radius: 6px; cursor: pointer; }
.toast .t-x:hover { color: var(--text); background: var(--line-2); }
.toast.sig:hover { border-color: var(--accent); }
.toast.act { display: flex; align-items: center; gap: 12px; cursor: default; }
.toast.act .linkbtn { white-space: nowrap; font-weight: 700; }
.feed li[data-s]::after { content: 'Обзор →'; float: right; clear: right; font-size: 11px; font-weight: 600; color: var(--accent); opacity: 0; transition: opacity .15s; }
.feed li[data-s]:hover::after { opacity: 1; }

/* «Обзор»: колонка стакана и ленты между графиками и вотчлистом */
.rv-dock { width: 286px; flex: none; margin-left: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.rv-dock[hidden] { display: none; }
.rv-dock > section { min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); overflow: hidden; }
.rv-dock > section[hidden] { display: none; }
.rv-dock .rv-book { flex: 1.25 1 0; }
.rv-dock .rv-tape { flex: 1 1 0; height: auto; border-top: 1px solid var(--line); }
.rv-dtabs { flex: none; }
.rv-dtabs[hidden] { display: none; }
/* узкий экран: под вотчлистом, вкладками */
.rv-dock.in-side { width: auto; margin: 0; gap: 0; flex: none; height: 330px; border-top: 1px solid var(--line); }
.rv-dock.in-side .rv-dtabs { margin: 6px 6px 0; align-self: flex-start; }
.rv-dock.in-side > section { flex: 1 1 0; border: 0; border-radius: 0; box-shadow: none; }
@media (max-height: 760px) { .rv-dock.in-side { height: 260px; } }
@media (max-width: 1440px) { .rv-dock { width: 262px; } }
@media (max-width: 760px) { .rv-dock.in-side { height: 360px; } }
[data-glass] .rv-dock > section { background: color-mix(in srgb, var(--surface) 68%, transparent); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); }

/* компактный стакан (book.js) */
.bookw { display: flex; flex-direction: column; min-height: 0; font-variant-numeric: tabular-nums; }
.bw-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px 6px; font-size: 12.5px; }
.bw-head b { white-space: nowrap; }
.bw-head .grow { flex: 1; }
.bw-src { font-size: 11px; color: var(--text-3); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; cursor: help; }
.bw-head .seg.sm button { padding: 2px 7px; font-size: 11px; }
.bw-head .seg[hidden] { display: none; }
.bw-depth { font: inherit; font-size: 11.5px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 2px 3px; }
.bw-bal { display: flex; height: 4px; margin: 0 10px; border-radius: 3px; overflow: hidden; background: var(--line-2); }
.bw-bal i { display: block; height: 100%; transition: width .4s; }
.bw-bal .up { background: var(--up); } .bw-bal .down { background: var(--down); }
.bw-bal-l { display: flex; justify-content: space-between; gap: 6px; padding: 3px 10px 4px; font-size: 10.5px; font-weight: 600; min-height: 18px; white-space: nowrap; }
.bw-thr { overflow: hidden; text-overflow: ellipsis; cursor: help; }
.bw-cols, .bw-r { display: grid; grid-template-columns: 1.15fr .95fr .95fr .8fr; gap: 4px; padding: 0 10px; align-items: center; }
.bw-cols { font-size: 10px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; padding-bottom: 3px; border-bottom: 1px solid var(--line-2); }
.bw-cols span:not(:first-child), .bw-r span:not(:first-of-type) { text-align: right; }
.bw-body { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; padding: 2px 0 6px; }
.bw-r { position: relative; font-size: 11.5px; height: 21px; }
.bw-r > span { position: relative; z-index: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw-r > i { position: absolute; right: 0; top: 2px; bottom: 2px; border-radius: 4px 0 0 4px; opacity: .14; transition: width .3s; }
.bw-r.a > i { background: var(--down); } .bw-r.b > i { background: var(--up); }
.bw-r.a > span:first-of-type { color: var(--down); } .bw-r.b > span:first-of-type { color: var(--up); }
.bw-r.l0 { color: var(--text-2); }
.bw-r.l1 > i { opacity: .3; } .bw-r.l2 > i { opacity: .52; }
.bw-r.l2 { font-weight: 700; }
.bw-r.a .v { color: var(--down); } .bw-r.b .v { color: var(--up); }
.bw-r.max { font-weight: 700; color: var(--text); border-radius: 5px; }
.bw-r.a.max { box-shadow: inset 0 0 0 1.5px var(--down); } .bw-r.b.max { box-shadow: inset 0 0 0 1.5px var(--up); }
.bw-mid { display: flex; align-items: baseline; gap: 8px; padding: 4px 10px; margin: 3px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); white-space: nowrap; overflow: hidden; }
.bw-mid b { font-size: 14px; }
.bw-mid span { font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.bw-none { padding: 4px 10px; font-size: 11.5px; }
.bw-cols { white-space: nowrap; }
.bw-head .icon-btn.sm, .rv-dock .tp-head .icon-btn.sm { width: 22px; height: 22px; font-size: 11px; flex: none; }
.rv-dock .tp-src { font-size: 0; gap: 0; }
.rv-dock .tp-min { max-width: 100px; }
.rv-dock .tp-head, .rv-dock .bw-head { gap: 5px; padding-left: 9px; padding-right: 7px; }
/* под вотчлистом: список и стакан/лента делят высоту, подсказку клавиш прячем — место нужнее */
.rv-dock.in-side { height: auto; flex: 0 0 46%; min-height: 210px; }
.rv-side:has(.rv-dock.in-side:not([hidden])) .rv-foot { display: none; }
.rv-dock.in-side:has(.rv-dtabs:not([hidden])) .bw-head > b, .rv-dock.in-side:has(.rv-dtabs:not([hidden])) .tp-head > b { display: none; }
@media (max-width: 760px) { .rv-dock.in-side { flex-basis: 360px; } }
@media (max-width: 760px) {
  .rv-side:has(.rv-dock.in-side:not([hidden])) { height: auto; }
  .rv-side:has(.rv-dock.in-side:not([hidden])) .rv-list { flex: none; height: 46vh; }
  .rv-dock.in-side { flex: none; height: 380px; }
}
/* панель: длинные названия секторов и метрик не выталкивают «Фильтры» на вторую строку */
#sector { max-width: 170px; }
@media (max-width: 1560px) { #sector { max-width: 130px; } #metric { max-width: 220px; } }
@media (max-width: 760px) { #sector, #metric { max-width: none; } }

/* ═══ v38: стаканы, крупные сделки, новости, календарь, роботы, тепловая карта и кластеры, свои источники, Telegram ═══ */
.books-view, .prints-view, .news-view, .cal-view { display: flex; flex-direction: column; gap: 10px; height: 100%; min-height: 0; }
.books-view[hidden], .prints-view[hidden], .news-view[hidden], .cal-view[hidden] { display: none; }
.bk-bar, .pr-bar, .nw-bar, .cl-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* разделы не про один рынок — интервал, метрика, сектор, избранное и фильтры карты скрыты */
body.wide-view #ivSeg, body.wide-view label:has(#sector), body.wide-view #favOnly, body.wide-view .toolbar .pop-wrap, body.wide-view #mTools, body.wide-view .pulsebar { display: none !important; }
body[data-view="books"] .pulsebar { display: none; }

/* стена стаканов */
.bk-grid { flex: 1; min-height: 0; display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); }
.bk-grid[data-n="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bk-grid[data-n="9"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bk-grid[data-n="12"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bk-card { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); overflow: hidden; }
.bk-h { display: flex; align-items: center; gap: 6px; padding: 7px 8px 2px 10px; font-size: 12.5px; }
.bk-name { font-size: 14px; font-weight: 700; color: var(--text); }
.bk-px { font-weight: 600; white-space: nowrap; }
.bk-bot { font-size: 11.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, #f59e0b 18%, transparent); color: #b45309; cursor: help; }
.bk-why { font-size: 11px; padding: 0 10px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-b { flex: 1; min-height: 0; }
.bk-card .icon-btn.on { color: var(--accent); border-color: var(--accent); }
.bookw.bare .bw-cols { padding-top: 2px; }
.bw-r.mk { box-shadow: inset 3px 0 0 #f59e0b; }
@media (max-width: 1100px) { .bk-grid, .bk-grid[data-n] { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 360px; overflow-y: auto; } }
@media (max-width: 760px) { .bk-grid, .bk-grid[data-n] { grid-template-columns: 1fr; } .bk-bar, .pr-bar, .nw-bar, .cl-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .bk-bar > *, .pr-bar > *, .nw-bar > *, .cl-bar > * { flex: none; } }

/* крупные сделки */
.pr-mk { display: flex; gap: 4px; }
.pr-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.pr-k { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.pr-k .tp-bal { margin: 0; }
.pr-kl { display: flex; justify-content: space-between; gap: 6px; font-weight: 600; font-size: 11.5px; }
.pr-table { flex: 1; min-height: 0; }
.pr-table tr[data-s] { cursor: pointer; }
.pr-table tr.nw td { animation: tpIn 1.2s ease-out; }

/* новости */
.nw-q { min-width: 220px; }
.nw-q input { width: 100%; }
.nw-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 10px; }
.nw-feed { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 2px; }
.nw-it { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; font-size: 13px; line-height: 1.45; }
.nw-it.mine { border-left: 3px solid var(--accent); }
.nw-meta { display: flex; gap: 8px; align-items: baseline; font-size: 12px; margin-bottom: 4px; }
.nw-meta a { margin-left: auto; text-decoration: none; color: var(--accent); font-weight: 700; }
.nw-x { word-break: break-word; }
.nw-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.nw-tags .chip { padding: 2px 8px; font-size: 11.5px; font-weight: 700; }
.nw-side { min-height: 0; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; font-size: 12.5px; }
.nw-h { font-weight: 700; margin: 4px 0 6px; }
.nw-h:not(:first-child) { margin-top: 14px; }
.nw-tr { display: grid; grid-template-columns: 1fr auto 34px 26px; gap: 6px; align-items: center; padding: 2px 0; }
.nw-tr.on .linkbtn { color: var(--accent); }
.nw-tr .linkbtn { font-weight: 700; color: var(--text); text-align: left; }
.nw-tr b { text-align: right; }
.nw-st { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.nw-st span { margin-left: auto; }
.nw-sym .chip { font-weight: 700; }
@media (max-width: 1100px) { .nw-body { grid-template-columns: 1fr; } .nw-side { max-height: 260px; order: -1; } }

/* календарь */
.cl-ty { display: flex; flex-wrap: wrap; gap: 4px; }
.cl-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.cl-day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; }
.cl-day h3 { margin: 2px 0 6px; font-size: 14px; }
.cl-ev { display: flex; align-items: center; gap: 10px; padding: 5px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.cl-ev:first-of-type { border-top: 0; }
.cl-ic { width: 22px; text-align: center; flex: none; }
.cl-go { font-weight: 600; color: var(--text); text-align: left; }
.cl-bell { opacity: .45; filter: grayscale(1); }
.cl-bell.on { opacity: 1; filter: none; border-color: #f59e0b; }
.cl-ev.k-div .cl-go, .cl-ev.k-div b { color: var(--up); }
.cl-add .src-grid { grid-template-columns: 160px 1fr 1fr; }

/* «Обзор»: вид окна, упоминания, роботы */
.rv-vm button { padding: 2px 5px; display: inline-flex; }
.rv-vm svg { width: 14px; height: 14px; }
.rv-wh .seg[hidden] { display: none; }
.rv-mn { width: auto; padding: 0 6px; font-size: 11.5px; font-weight: 700; }
.rv-mn[hidden] { display: none; }
.rv-hm { position: relative; flex: 1; min-height: 0; }
.rv-hm[hidden], .rv-cv[hidden] { display: none; }
.rv-dock .rv-algo { flex: none; max-height: 132px; overflow-y: auto; padding: 6px 10px; font-size: 11.5px; line-height: 1.35; }
.rv-dock .rv-algo[hidden] { display: none; }
.ra-h { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.ra-h .linkbtn { margin-left: auto; font-weight: 700; }
.ra-it { padding: 3px 0 3px 8px; border-left: 2px solid #f59e0b; margin-top: 3px; cursor: help; }
.ra-it.up { border-left-color: var(--up); } .ra-it.down { border-left-color: var(--down); }
.rv-dock.in-side .rv-algo { border-top: 1px solid var(--line-2); max-height: 90px; }
.pmenu .pm-news, .pmenu .pm-link { display: block; padding: 7px 12px; font-size: 12px; color: var(--text); text-decoration: none; max-width: 380px; line-height: 1.4; border-radius: 8px; }
.pmenu .pm-news:hover, .pmenu .pm-link:hover { background: var(--line-2); }
.panel-links .ul { color: var(--accent); text-decoration: none; }

/* тепловая карта и кластеры */
.hm { position: relative; }
.hm canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; border-radius: 0 0 var(--r) var(--r); }
.hm-ctl { position: absolute; left: 8px; top: 6px; display: flex; gap: 4px; z-index: 2; }
.hm-ctl[hidden] { display: none; }
.hm-ctl .seg { background: rgba(20, 28, 48, .85); }
.hm-ctl .seg button { color: #cfd6e6; padding: 2px 7px; font-size: 11px; }
.hm-ctl .seg button.on { background: rgba(255, 255, 255, .18); color: #fff; }
.hm-ctl .icon-btn { background: rgba(20, 28, 48, .85); color: #cfd6e6; border-color: rgba(255, 255, 255, .15); width: 22px; height: 22px; }
.hm-note { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); color: #8591a8; font-size: 12px; text-align: center; pointer-events: none; max-width: 80%; }

/* бегущая строка: упоминания */
.tk-it.is-n > span:not(.muted):not(.tk-v) { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-ic.n { font-size: 12px; }

/* кабинет: свои источники, ссылки, Telegram */
.src-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.src-row:first-of-type { border-top: 0; }
.src-row .grow0 { min-width: 0; }
.src-row .small { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw { position: relative; display: inline-block; width: 34px; height: 20px; flex: none; }
.sw input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.sw i { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .15s; }
.sw i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.sw input:checked + i { background: var(--accent); }
.sw input:checked + i::after { transform: translateX(14px); }
.src-edit { margin-top: 10px; background: var(--surface-2); }
.src-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 12px; }
.src-adv summary { cursor: pointer; font-weight: 600; font-size: 13px; margin: 6px 0; }
.src-edit textarea { width: 100%; font: inherit; font-size: 12.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; color: var(--text); resize: vertical; }
.src-test { margin-top: 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); font-size: 12.5px; }
.src-test.ok { border-color: color-mix(in srgb, var(--up) 45%, var(--line)); }
.src-test.bad { border-color: color-mix(in srgb, var(--down) 45%, var(--line)); }
.src-test.ok > b { color: var(--up); }
.src-test.bad > b { color: var(--down); }
.src-ti { padding: 3px 0; border-top: 1px dashed var(--line-2); }
.src-raw { max-height: 180px; overflow: auto; font-size: 11px; background: var(--surface-2); padding: 8px; border-radius: 8px; white-space: pre-wrap; word-break: break-all; }
.lk-row { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 4px 0; }
.lk-row input:not([type]) { font: inherit; font-size: 12.5px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); min-width: 0; }
.lk-mk { display: flex; gap: 8px; font-size: 11.5px; flex-wrap: wrap; }
.lk-mk label { display: inline-flex; gap: 3px; align-items: center; }
.tg-pref { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line-2); cursor: pointer; }
.tg-pref:first-of-type { border-top: 0; }
.tg-pref > span:last-child { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
@media (max-width: 760px) { .lk-row { grid-template-columns: 1fr; } .cl-add .src-grid { grid-template-columns: 1fr; } .src-row { flex-wrap: wrap; } }
.nw-x { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.nw-x.open { display: block; -webkit-line-clamp: unset; }

/* ═══ v40: опционы, дневник сделок, портфель (opt.js, jr.js, pf.js) и общие виджеты (kit.js) ═══ */
.opt-view, .jr-view, .pf-view { height: 100%; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-bottom: 24px; }
.opt-view[hidden], .jr-view[hidden], .pf-view[hidden] { display: none; }
.opt-view > *, .jr-view > *, .pf-view > *, .op-body > * { flex-shrink: 0; }
.kit-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-1); min-width: 0; }
.kit-card h3 { margin: 0 0 6px; font-size: 14px; }
.kit-card canvas { display: block; width: 100%; height: 220px; }
.kit-card canvas.tall { height: 300px; }
.kit-card p.small { margin: -2px 0 8px; }
.kit-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kit-h h3 { margin: 0; }
.kit-h .seg, .kit-h > .icon-btn { margin-left: auto; }
.kit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.kit-grid[hidden] { display: none; }
.kit-grid .span2 { grid-column: span 2; }
@media (max-width: 760px) { .kit-grid { grid-template-columns: 1fr; } .kit-grid .span2 { grid-column: auto; } }
.kit-empty { color: var(--text-3); font-size: 13px; padding: 30px 0; text-align: center; }
.kit-donut { display: flex; align-items: center; gap: 14px; }
.kit-donut svg { width: 150px; height: 150px; flex: none; }
.kit-donut ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; font-size: 12.5px; }
.kit-donut li { display: grid; grid-template-columns: 10px 1fr auto; gap: 2px 8px; align-items: center; }
.kit-donut li i { width: 10px; height: 10px; border-radius: 3px; }
.kit-donut li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kit-donut li em { grid-column: 2 / -1; font-style: normal; color: var(--text-3); font-size: 11.5px; }
.kit-dc1 { font-size: 15px; font-weight: 700; fill: var(--text); }
.kit-dc2 { font-size: 9.5px; fill: var(--text-3); }
.kit-ring { width: 150px; height: 150px; display: block; margin: 6px auto 0; }
.kit-ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.kit-ring .kit-ring-bg { stroke: var(--line-2); }
.kit-ring text { font-size: 20px; font-weight: 700; fill: var(--text); }
.kit-ring-l { text-align: center; color: var(--text-2); font-size: 12.5px; margin-top: 4px; }
.kc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; }
.kc-head > b { font-size: 14px; min-width: 120px; text-align: center; }
.kc-w, .kc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.kc-w span { text-align: center; font-size: 11px; color: var(--text-3); padding-bottom: 2px; }
.kc-d { min-height: 58px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-2); padding: 4px 6px; display: flex; flex-direction: column; gap: 1px; font-size: 11px; overflow: hidden; }
.kc-d span { color: var(--text-3); }
.kc-d b { font-size: 12px; white-space: nowrap; }
.kc-d em { font-style: normal; color: var(--text-3); }
.kc-d.up { background: color-mix(in srgb, var(--up) 14%, var(--surface)); border-color: color-mix(in srgb, var(--up) 35%, var(--line)); cursor: pointer; }
.kc-d.down { background: color-mix(in srgb, var(--down) 13%, var(--surface)); border-color: color-mix(in srgb, var(--down) 35%, var(--line)); cursor: pointer; }
.kc-d.up b { color: var(--up); } .kc-d.down b { color: var(--down); }
.kc-d.today { outline: 2px solid var(--accent); outline-offset: -2px; }
.kc-d.off { background: none; border-color: transparent; }
@media (max-width: 760px) { .kc-d { min-height: 44px; padding: 3px; } .kc-d em { display: none; } .kc-d b { font-size: 10px; } }
.kit-sug { position: fixed; z-index: 90; max-width: 460px; max-height: 320px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 4px; }
.kit-sug button { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; width: 100%; border: 0; background: none; text-align: left; padding: 7px 9px; border-radius: 8px; color: var(--text); font-size: 13px; }
.kit-sug button:hover { background: var(--accent-soft); }
.kit-sug span { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.kit-sug em { font-style: normal; color: var(--text-3); font-size: 11px; }

/* дневник и портфель */
.jr-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jr-tiles { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.jr-tiles .ktile b { font-size: 21px; }
.jr-hello { grid-column: 1 / -1; line-height: 1.55; }
.jr-ring { display: flex; flex-direction: column; justify-content: center; min-height: 200px; }
.jr-lh { margin-top: 4px; }
.jr-form, .jr-imp, .jr-set { max-width: 1100px; display: flex; flex-direction: column; gap: 10px; }
.jr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; align-items: end; }
.jr-form .fld input, .jr-form .fld select, .jr-form .fld textarea, .jr-imp textarea, .jr-imp select, .jr-set .fld input { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; color: var(--text); font-size: 13.5px; outline: none; font-family: inherit; width: 100%; min-width: 0; }
.jr-form .fld input:focus, .jr-form textarea:focus, .jr-imp textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.jr-imp textarea { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.jr-qty { display: flex; gap: 6px; align-items: center; }
.jr-qty input { flex: 1; }
.jr-types { flex-wrap: wrap; align-self: flex-start; }
.jr-dir button.on.up { color: var(--up); } .jr-dir button.on.down { color: var(--down); }
.jr-quick { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface-2); }
.jr-quick input, .jr-quick textarea { resize: vertical; min-height: 36px; field-sizing: content; max-height: 160px; flex: 1 1 360px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--text); font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; outline: none; }
.jr-quick .small { flex-basis: 100%; }
.jr-prev { font-size: 13px; color: var(--text-2); min-height: 18px; }
.jr-form .row, .jr-imp .row, .jr-set .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.jr-table td, .pf-table td { white-space: nowrap; }
.jr-table td.acts, .pf-table td.acts { display: flex; gap: 10px; }
.jr-table th.sortable { cursor: pointer; user-select: none; }
.jr-table th.sortable.on { color: var(--accent); }
.jr-pages { margin-top: 8px; flex-wrap: wrap; }
.jr-pages button.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.jr-impt { max-height: 260px; }
.red-t { color: var(--down) !important; }
.pf-mk { align-self: center; }
.pf-bar { display: inline-block; width: 46px; height: 6px; border-radius: 3px; background: var(--line-2); margin-right: 6px; vertical-align: middle; overflow: hidden; }
.pf-bar i { display: block; height: 100%; background: var(--accent); }

/* опционы */
.op-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.op-asset select { max-width: 280px; }
.op-px { font-size: 14px; }
.op-exps { display: flex; gap: 6px; flex-wrap: wrap; }
.op-exps .chip em { font-style: normal; color: var(--text-3); font-weight: 500; margin-left: 3px; }
.op-exps .chip.on em { color: inherit; opacity: .8; }
.op-body { display: flex; flex-direction: column; gap: 12px; }
.op-sum { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 8px; }
.op-sum > div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; gap: 1px; box-shadow: var(--shadow-1); }
.op-sum span { font-size: 11.5px; color: var(--text-2); font-weight: 600; }
.op-sum b { font-size: 15.5px; }
.op-sum em { font-style: normal; font-size: 11.5px; color: var(--text-3); }
.op-sum .linkbtn { font-size: 12px; align-self: flex-start; }
.op-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.op-desk { height: auto; max-height: calc(100vh - 330px); min-height: 320px; }
.op-desk table, .op-assets table { font-variant-numeric: tabular-nums; }
.op-desk th, .op-desk td { text-align: right; padding: 5px 8px; font-size: 12.5px; white-space: nowrap; }
.op-desk thead { position: sticky; top: 0; z-index: 2; }
.op-desk thead th { background: var(--surface); box-shadow: inset 0 -1px 0 var(--line); }
.op-desk .op-hc { color: var(--up); text-align: center; } .op-desk .op-hp { color: var(--down); text-align: center; }
.op-desk .op-k { text-align: center; background: var(--surface-2); font-weight: 700; }
.op-desk td[data-itm] { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.op-desk tr.atm .op-k { background: var(--accent-soft); color: var(--accent); }
.op-desk .op-q { cursor: pointer; }
.op-desk .op-q:hover { background: var(--accent-soft); color: var(--accent); }
.op-desk .op-th { color: var(--text-2); }
.op-desk td.op-oi { background-image: linear-gradient(to left, color-mix(in srgb, var(--warn) 24%, transparent) var(--w), transparent var(--w)); }
.op-desk td[data-s="p"].op-oi { background-image: linear-gradient(to right, color-mix(in srgb, var(--warn) 24%, transparent) var(--w), transparent var(--w)); }
.op-desk tr.op-spot td { padding: 0; height: 0; border: 0; position: relative; }
.op-desk tr.op-spot td span { position: absolute; left: 50%; transform: translate(-50%, -50%); background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; z-index: 1; white-space: nowrap; }
.op-desk tr.op-spot td::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; border-top: 2px solid var(--accent); }
.op-assets { height: auto; }
.op-assets td { white-space: nowrap; }
.op-assets tr[data-k] { cursor: pointer; }
.op-assets tr.on td { background: var(--accent-soft); }
.op-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; }
@media (max-width: 760px) { .op-grid { grid-template-columns: 1fr; } }
.op-calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 12px; align-items: start; }
@media (max-width: 1100px) { .op-calc { grid-template-columns: 1fr; } }
.op-tpl { max-width: none; margin-bottom: 10px; }
.op-tpl button { font-size: 12px; padding: 5px 9px; }
.op-legs { margin-bottom: 8px; }
.op-legs td { padding: 4px 6px; white-space: nowrap; }
.op-legs input, .op-legs select { width: 90px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 5px 7px; color: var(--text); font-size: 12.5px; }
.op-legs input[data-f="q"] { width: 60px; }
.chip.sm { padding: 3px 9px; font-size: 12px; }
.chip.up { color: var(--up); border-color: color-mix(in srgb, var(--up) 45%, var(--line)); }
.chip.down { color: var(--down); border-color: color-mix(in srgb, var(--down) 45%, var(--line)); }
.op-legs-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.op-legs-act .sel input[type="range"] { width: 110px; }
.op-pnl canvas { height: 320px; }
.op-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.op-stats > div { display: flex; flex-direction: column; gap: 1px; font-size: 12px; }
.op-stats span { color: var(--text-2); font-weight: 600; font-size: 11.5px; }
.op-stats b { font-size: 14px; }
.op-stats em { font-style: normal; color: var(--text-3); font-size: 11px; }
@media (max-width: 760px) {
  .jr-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .jr-bar > * { flex: none; }
  .op-bar { gap: 6px; }
  .op-px .muted, #opUpd { display: none; }
  .op-asset select { max-width: 230px; }
  .op-exps { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .op-exps .chip { flex: none; }
  .op-desk { max-height: 70vh; min-height: 260px; }
  .op-sum { display: flex; overflow-x: auto; scrollbar-width: none; gap: 6px; }
  .op-sum > div { flex: none; min-width: 138px; padding: 6px 10px; }
  .op-sum b { font-size: 14px; }
  .jr-tiles { grid-template-columns: 1fr 1fr; }
  .jr-tiles .ktile b { font-size: 16px; }
  .kit-donut svg { width: 120px; height: 120px; }
  .jr-grid { grid-template-columns: 1fr 1fr; }
}

/* ═══ v42: регистрация, пробный день и подписка; детали в духе pump.fun — мятная кнопка, плашки «горячее», полоса-объявление, шкала срока ═══ */
:root { --mint: #86efac; --mint-ink: #052e16; --hot: #ff3d6e; }
:root[data-theme="dark"] { --mint: #86efac; --mint-ink: #052e16; }
.btn.mint { background: var(--mint); color: var(--mint-ink); box-shadow: 0 4px 16px color-mix(in srgb, var(--mint) 35%, transparent); }
.btn.mint:hover { background: var(--mint); filter: brightness(1.06); box-shadow: 0 6px 20px color-mix(in srgb, var(--mint) 45%, transparent); }
.btn.big.mint { background: var(--mint); }
.hot { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; background: color-mix(in srgb, var(--hot) 14%, transparent); color: var(--hot); font: 600 10.5px/18px var(--font); text-transform: uppercase; letter-spacing: .03em; font-style: normal; vertical-align: 1px; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: color-mix(in srgb, var(--up) 14%, transparent); color: var(--up); }
.pill.warn { background: color-mix(in srgb, var(--hot) 14%, transparent); color: var(--hot); }
.role.ok { background: color-mix(in srgb, var(--up) 13%, transparent); color: var(--up); }
.role.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: #b45309; }
:root[data-theme="dark"] .role.warn { color: #fbbf24; }

/* вход: вкладки «Вход / Регистрация» — сегменты в рамке */
.gate-pane { display: flex; flex-direction: column; gap: 12px; }
.gate-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.gate-tabs button { border: 0; background: none; height: 30px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.gate-tabs button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
:root[data-theme="dark"] .gate-tabs button.on { background: var(--line); }
.gate-note { margin: 0; font-size: 13px; color: var(--text-2); text-align: left; }
.gate-test { padding: 9px 12px; border: 1px dashed color-mix(in srgb, var(--warn) 60%, transparent); border-radius: 8px; background: color-mix(in srgb, var(--warn) 9%, transparent); font-size: 12.5px; text-align: left; }
.gate-test code { font: 700 14px var(--font); letter-spacing: .12em; padding: 0 4px; }
.gate.wide { width: min(780px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
.pw-head { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pw-head h3 { margin: 2px 0 0; font-size: 19px; }
.pw-head p { margin: 0; font-size: 13.5px; max-width: 520px; }
.pay-hint.flash { animation: pay-flash 1.6s ease-out; border-radius: 6px; }
@keyframes pay-flash { 0%, 30% { background: color-mix(in srgb, var(--mint) 30%, transparent); color: var(--text); } 100% { background: transparent; } }

/* тарифы */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; text-align: left; max-width: 760px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color .15s, transform .15s; }
.plan:hover { border-color: color-mix(in srgb, var(--mint) 60%, var(--line)); transform: translateY(-1px); }
.plan.best { border-color: color-mix(in srgb, var(--mint) 70%, var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--mint) 40%, transparent), 0 10px 28px color-mix(in srgb, var(--mint) 16%, transparent); }
.plan.cur::after { content: 'ваш тариф'; position: absolute; top: -9px; right: 12px; padding: 0 7px; border-radius: 4px; background: var(--up); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 18px; }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 13.5px; }
.plan-top .hot { margin: 0; }
.plan-price { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.plan-per { font-size: 12.5px; color: var(--text-2); min-height: 18px; }
.plan-per em { font-style: normal; font-weight: 700; }
.plan .btn { margin-top: 8px; padding: 8px 10px; }

/* кабинет → «Подписка»: карточка срока со шкалой, как прогресс у монет на pump.fun */
.sub-card { max-width: 760px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-1); margin-bottom: 6px; }
.sub-card h3 { margin: 8px 0 2px; font-size: 20px; }
.sub-card p { margin: 0 0 10px; font-size: 13px; }
.sub-bar { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.sub-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #22c55e, var(--mint)); }
.sub-bar-lbl { display: flex; justify-content: space-between; margin-top: 5px; font-size: 12px; color: var(--text-2); }

/* полоса-объявление над бегущей строкой: края растворяются в фоне */
.annc { flex: none; display: flex; align-items: center; justify-content: center; gap: 10px; height: 30px; padding: 0 16px; border: 0; width: 100%;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 9%, var(--surface-2)) 12%, color-mix(in srgb, var(--accent) 9%, var(--surface-2)) 88%, transparent);
  color: var(--text); font-size: 12.5px; white-space: nowrap; overflow: hidden; }
.annc:hover .annc-go { text-decoration: underline; }
.annc .pill { height: 18px; font-size: 11px; }
.annc-dim { color: var(--text-2); }
.annc-go { color: var(--accent); font-weight: 700; }
.annc.warn { background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--hot) 12%, var(--surface-2)) 12%, color-mix(in srgb, var(--hot) 12%, var(--surface-2)) 88%, transparent); }
.annc.warn .pill { background: color-mix(in srgb, var(--hot) 16%, transparent); color: var(--hot); }

/* поиск: подсказка клавиши справа в поле */
.search .kbd { flex: none; font: 600 11px/18px var(--font); min-width: 20px; text-align: center; padding: 0 5px; border-radius: 5px; border: 1px solid var(--line); background: var(--surface); color: var(--text-3); }
.search:focus-within .kbd { display: none; }

/* таблица: строка подсвечивается к правому краю цветом изменения (сила — --rt) */
tbody tr.rt-up { background: linear-gradient(90deg, transparent 25%, color-mix(in srgb, var(--up) var(--rt), transparent)); }
tbody tr.rt-down { background: linear-gradient(90deg, transparent 25%, color-mix(in srgb, var(--down) var(--rt), transparent)); }

@media (max-width: 760px) {
  .plans { grid-template-columns: 1fr; }
  .annc { justify-content: flex-start; }
  .annc-dim { display: none; }
  .search .kbd { display: none; }
}
.cab-main .pay-hint { margin-top: 10px; }

/* ═══════════ v43: детали в духе pump.fun — палитра «Pump», шапки панелей, переключатели, бегущая строка, покупки/продажи, «горячее» на карте ═══════════ */
/* палитра «Pump»: ровный почти чёрный фон без свечения, мятные кнопки с тёмным текстом */
:root[data-pal="pump"] body { background: var(--bg); }
:root[data-pal="pump"] #splash { background: var(--bg); }
/* «Турбо» до загрузки look.js (первый заход — снимка оформления ещё нет): основа и акцент палитры, inline-стиль look.js их перекроет */
:root[data-pal="pump"] { --bg: #0b0b0e; --surface: #131316; --surface-2: #1b1b1f; --line: #303036; --line-2: #232327;
  --text: #f4f4f5; --text-2: #a1a1aa; --text-3: #71717a; --accent: #86efac; --accent-press: #4ade80; --cyan: #4ade80; --on-accent: #052e16; }
/* заставка в «Турбо»: те же дуги, схема, пульс и искры, но в мятно-графитовой гамме вместо синей */
:root[data-pal="pump"] #splash { background: radial-gradient(1000px 640px at 50% 44%, rgba(74,222,128,.07) 0%, rgba(74,222,128,.02) 45%, transparent 75%), #0b0b0e; color: #f4f4f5; }
:root[data-pal="pump"] .sp-c1 { stop-color: #14532d; }
:root[data-pal="pump"] .sp-c2 { stop-color: #16a34a; }
:root[data-pal="pump"] .sp-c3 { stop-color: #86efac; }
:root[data-pal="pump"] .sp-g { stop-color: #4ade80; }
:root[data-pal="pump"] .sp-g:first-child { stop-opacity: .08; }
:root[data-pal="pump"] .splash-arcs { opacity: .42; }
:root[data-pal="pump"] .splash-circuit { stroke: #3f3f46; opacity: .7; }
:root[data-pal="pump"] .splash-circuit circle { fill: #86efac; opacity: .55; }
:root[data-pal="pump"] .splash-pulse { stroke: #86efac; opacity: .22; }
:root[data-pal="pump"] .splash-name b { background: none; color: #f4f4f5; }
:root[data-pal="pump"] .splash-text { color: #a1a1aa; }
:root[data-pal="pump"] .splash-bar { background: #232327; }
:root[data-pal="pump"] .splash-bar::after { background: #86efac; }
:root[data-pal="pump"] .logo-lg, :root[data-pal="pump"] .logo-md { box-shadow: 0 0 0 1px #303036, 0 14px 40px rgba(74,222,128,.10); }
/* логотип в «Турбо»: графитовая плитка, белая «C», мятный пульс (и в меню, и на заставке); рамку даёт box-shadow .logo-lg/.logo-md */
:root[data-pal="pump"] .lg-c1 { stop-color: #1f1f23; }
:root[data-pal="pump"] .lg-c2 { stop-color: #16161a; }
:root[data-pal="pump"] .lg-c3 { stop-color: #0f0f12; }
:root[data-pal="pump"] .lg-p { stop-color: #86efac; }
/* карточка входа — как панели «Турбо»: графит, тонкая рамка, без синего свечения */
:root[data-pal="pump"] .gate { background: rgba(19,19,22,.94); border-color: #303036; box-shadow: 0 28px 70px rgba(0,0,0,.6); }
:root[data-pal="pump"] .btn:not(.ghost):not(.red) { background: var(--accent); color: var(--on-accent); box-shadow: none; }
:root[data-pal="pump"] .btn:not(.ghost):not(.red):hover { background: var(--accent-press); filter: none; box-shadow: none; }
:root[data-pal="pump"] .cell { background: var(--surface); }

/* переключатели: рамка 1px, отступ 2px, плотные сегменты; активный — заливка поверхности */
:root[data-theme] .seg { background: transparent; border: 1px solid var(--line); padding: 2px; border-radius: 6px; box-shadow: none; gap: 1px; align-items: center; }
:root[data-theme] .seg button { height: 22px; padding: 0 9px; border-radius: 4px; font-size: calc(12px * var(--fs)); font-weight: 500; box-shadow: none; }
:root[data-theme] .seg.sm button { height: 20px; }
:root[data-theme] .seg button.on { background: color-mix(in srgb, var(--text) 8%, var(--surface)); color: var(--text); box-shadow: none; }
:root[data-pal="pump"] .seg button.on { background: var(--surface-2); }
:root[data-theme] .seg button:not(.on):hover { color: var(--text); background: color-mix(in srgb, var(--text) 4%, transparent); }
/* над тепловой картой стакана переключатель лежит на холсте — своя тёмная подложка */
:root[data-theme] .hm-ctl .seg { background: rgba(20, 28, 48, .85); border-color: rgba(255, 255, 255, .14); }
:root[data-theme] .hm-ctl .seg button.on { background: rgba(255, 255, 255, .18); color: #fff; }

/* шапки панелей: значок и название слева, кнопки-значки справа, тонкая линия снизу */
.rv-wh, .bw-head, .tp-head, .bk-h { border-bottom: 1px solid var(--line-2); min-height: 34px; }
.rv-wh { padding: 4px 6px 4px 10px; }
.bk-h { padding: 5px 6px 5px 10px; }
.bk-why { padding-top: 4px; }
.ph-ic { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; color: var(--text-2); }
.bw-head b, .tp-head b, .nw-h b, .bk-name { font-weight: 600; font-size: 13px; }
.rv-wh .icon-btn.sm, .bk-h .icon-btn.sm, .nw-h .icon-btn.sm, .bw-head .icon-btn.sm, .tp-head .icon-btn.sm {
  width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); font-size: 12px; }
.rv-wh .icon-btn.sm:hover, .bk-h .icon-btn.sm:hover, .nw-h .icon-btn.sm:hover, .bw-head .icon-btn.sm:hover, .tp-head .icon-btn.sm:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
.bk-h .icon-btn.on, .bw-head .icon-btn.on, .tp-head .icon-btn.on { background: var(--accent-soft); color: var(--accent); }
.rv-avh { display: contents; }
.rv-wh .rv-tf { min-width: 72px; }
.rv-wh .rv-px { flex: 0 1 auto; min-width: 58px; overflow: hidden; text-overflow: ellipsis; }
.rv-wh .icon-btn.sm.rv-mn { width: auto; padding: 0 6px; white-space: nowrap; font-size: 11.5px; }
.nw-h { display: flex; align-items: center; gap: 7px; margin: -2px -12px 8px; padding: 0 8px 7px 12px; border-bottom: 1px solid var(--line-2); min-height: 30px; }
.nw-h:not(:first-child) { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.rv-dock.in-side:has(.rv-dtabs:not([hidden])) .bw-head > .ph-ic, .rv-dock.in-side:has(.rv-dtabs:not([hidden])) .tp-head > .ph-ic { display: none; }

/* кружок с буквой тикера */
.tk-av { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none; border-radius: 50%; font: 700 10px/1 var(--font); font-style: normal; letter-spacing: 0;
  color: hsl(var(--h, 210) 65% 34%); background: hsl(var(--h, 210) 70% 89%); }
:root[data-theme="dark"] .tk-av { color: hsl(var(--h, 210) 85% 74%); background: hsl(var(--h, 210) 40% 19%); }
.rv-wh .tk-av, .bk-h .tk-av { width: 20px; height: 20px; font-size: 11px; }

/* бегущая строка: кружок, тикер, цветное значение */
.tk-it { gap: 6px; }
.tk-v { font-weight: 600; padding: 1px 6px; border-radius: 4px; background: color-mix(in srgb, currentColor 13%, transparent); white-space: nowrap; }
.tk-v:not(.up):not(.down) { color: var(--text-2); }
.tk-v.n { color: var(--accent); }
.tk-it .tk-tag { order: 0; }

/* покупки / продажи в карточке инструмента */
.bsf { display: flex; flex-direction: column; gap: 5px; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.bsf-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.bsf-row b { font-weight: 700; }
.bsf-row .muted { font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.bsf-bar { position: relative; height: 6px; border-radius: 3px; background: var(--down); overflow: hidden; }
.bsf-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--up); border-right: 2px solid var(--surface); transition: width .4s ease; }
:root[data-motion="off"] .bsf-bar i { transition: none; }
.bsf-sum { color: var(--text-2); font-size: 11.5px; }

/* «горячее» на тепловой карте: надпись в углу большой плитки, точка на маленькой */
.tile .tl-hot { position: absolute; top: 4px; right: 4px; margin: 0; background: var(--hot); color: #fff; font-size: 9.5px; line-height: 15px; padding: 0 5px; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.tile .tl-hot.dot { width: 7px; height: 7px; padding: 0; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .9); }
@media (max-width: 760px) {
  .tk-it .tk-tag { display: none; }
  .tile .tl-hot:not(.dot) { font-size: 8.5px; line-height: 13px; padding: 0 4px; }
}
