/* =====================================================================================================================
   Терминал (/) — «100vh Zero-Scroll Viewport»: весь интерфейс помещается в окно, у страницы нет вертикальной прокрутки.
   Подключается ПОСЛЕДНИМ и действует только при <body class="term"> (на других страницах те же style.css/flow.css работают как раньше).
   Каркас включается только на десктопе (ширина ≥ 1101 px и высота ≥ 600 px): на телефоне и в очень низком окне остаётся обычная прокрутка —
   иначе содержимое обрезалось бы без возможности добраться до него.
   Сверху вниз: панель 1 (шапка с вкладками) 48 px · панель 2 (актив, статистика, инструменты графика) 44 px · ГРАФИК (всё остальное).
   Вид обеих панелей — css/term_head.css.
   Высота графика нигде не задана числом: он забирает остаток (flex: 1; min-height: 0), ResizeObserver в ChartPanel подгоняет размер холста.
   Цвета — только токены/переменные темы; hex в правилах нет.
   ===================================================================================================================== */

@media (min-width: 1101px) and (min-height: 600px) {
  /* ---------- каркас экрана ---------- */
  html:has(body.term), body.term { height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; overflow: hidden; }
  body.term { display: flex; flex-direction: column; }
  body.term > #head, body.term > #tickerbar, body.term > #announcementBanner { flex: 0 0 auto; }
  body.term > #app { flex: 1 1 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) var(--sig-w); grid-template-rows: minmax(0, 1fr); grid-template-areas: "main sig";
    gap: 12px; width: 100%; max-width: none; height: auto; margin: 0 auto; padding: 6px 12px 12px; align-items: stretch; }
  body.term #main { grid-area: main; display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 0; height: 100%; }
  body.term #sigcol.pn-panel { grid-area: sig; position: relative; top: auto; align-self: stretch; height: 100%; max-height: none; min-height: 0; }
  body.term .lw-attr { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; height: 12px; margin: 0; font-size: 10px; line-height: 12px; text-align: center; pointer-events: none; }   /* авторство Lightweight Charts — в нижней кромке, без яруса в потоке */
  body.term .lw-attr a { pointer-events: auto; }
  :root { --sig-w: 304px; }
  @media (min-width: 1600px) { :root { --sig-w: 340px; } }

  /* ---------- график забирает всё свободное место ---------- */
  body.term #main > #chartwrap:not(.focus-mode):not(:fullscreen) { flex: 1 1 0; height: auto; min-height: 0; gap: 6px; }
  body.term #main > #chartwrap:not(.focus-mode):not(:fullscreen):has(> .panes.split) { min-height: 0; }
  body.term #chartwrap > .panes { flex: 1 1 0; min-height: 0; }
  body.term #chartwrap > .panes.split > .pane { min-height: 0; }
  /* ---------- правая колонка «Аналитический срез»: плотнее, кнопки внизу всегда видны ---------- */
  body.term .pn-panel .sp-head { padding: 8px 12px 4px; }
  body.term .pn-bar { padding: 0 12px 6px; }
  body.term .pn-panel > .sp-body { padding: 8px 12px; }
  body.term .pn-panel .sp-ready.pn { gap: 8px; }
  body.term .pn-prob, body.term .pn-listbox { padding: 8px 10px; }
  body.term .sp-dock { padding: 8px 12px 6px; }
  body.term .pn-panel .btn.pn-go { height: 34px; }
  body.term .pn-dock-row { margin-top: 6px; }
  body.term .pn-panel .btn.pn-btn { height: 28px; }
  body.term .pn-disc { margin-top: 5px; }
  body.term .pn-list li { padding: 3px 0; }
}

/* ---------- сводка «С последнего визита» живёт в списке уведомлений (🔔), а не отдельной полосой ---------- */
.bell { position: relative; }
.bell[data-visit="1"]::after { content: ""; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--tick-up); box-shadow: 0 0 6px var(--tick-up); pointer-events: none; }
.bell[data-visit="1"]:has(#bellN:not(.hidden))::after { display: none; }       /* есть число непрочитанных — точка не нужна */
.notif-panel .nt-list li.nt-visit { display: block; padding: 9px 14px; font-size: 12px; line-height: 1.45; color: var(--dim); background: var(--surface2); }
.notif-panel .nt-list li.nt-visit b { color: var(--text); }
