        :root {
            --bg-main: #151a24;
            --bg-panel: #161b26;
            --bg-input: #0d1117;
            --text-main: #d1d5db;
            --text-muted: #858b97;
            --border-color: #262e3d;
            --neon-blue: #00d2ff;
            --neon-green: #39ff14;
            --neon-amber: #ffaa00;
            --danger: #f43f5e;
        }

        body {
            background-color: var(--bg-main);
            color: var(--text-main);
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            font-size: 11px;
            margin: 0;
            padding: 10px 0;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .container {
            width: 1024px;
            box-sizing: border-box;
        }

        header {
            background: linear-gradient(180deg, #1f2636 0%, #131822 100%);
            border: 1px solid var(--border-color);
            border-radius: 4px;
            padding: 6px 12px;
            margin-bottom: 8px;
            display: flex;
            justify-content: flex-start;
            align-items: center;
            gap: 6px;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
        }

        header h2 { margin: 0; font-size: 13px; font-weight: 600; color: #fff; }

        header .header-sep {
            width: 1px;
            height: 24px;
            margin: 0 3px;
            background: var(--border-color);
            flex: none;
        }
        header .header-views,
        header .header-views form { display: inline-flex; align-items: center; }
        header .header-views form { margin: 0; padding: 0; }
        header .spacer { flex: 1 1 auto; }

        /* Переключатель видов водопада — единый сегмент-контрол */
        #viewformbuttons {
            display: inline-flex;
            align-items: center;
            gap: 2px;
            height: 28px;
            box-sizing: border-box;
            padding: 2px;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            background: var(--bg-input);
        }
        #viewformbuttons .radios {
            position: absolute;
            opacity: 0;
            width: 0;
            height: 0;
            pointer-events: none;
        }
        #viewformbuttons label {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            height: 22px;
            padding: 0 10px;
            border-radius: 3px;
            color: var(--text-muted);
            font-size: 11px;
            font-weight: 600;
            white-space: nowrap;
            cursor: pointer;
            transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
        }
        #viewformbuttons label:hover {
            color: var(--text-main);
            background: rgba(255,255,255,0.05);
        }
        #viewformbuttons .radios:checked + label {
            background: linear-gradient(180deg, #283143 0%, #1a212d 100%);
            color: #fff;
            box-shadow: inset 0 0 0 1px var(--neon-blue), 0 0 6px rgba(0,210,255,0.25);
        }

        /* Ссылка на мобильную версию рядом с «О приёмнике» */
        header a.mobile-link {
            display: inline-flex;
            align-items: center;
            margin: 0;
            text-decoration: none;
            white-space: nowrap;
        }

        /* Ссылка на тестовый сервер: спокойный тёплый акцент, заметный
           на тёмной шапке, но без неоновой яркости */
        header a.test-link {
            display: inline-flex;
            align-items: center;
            margin: 0;
            text-decoration: none;
            white-space: nowrap;
            color: #f2d08a;
            border-color: rgba(214, 164, 90, 0.62);
            background: linear-gradient(180deg, rgba(214, 164, 90, 0.18) 0%, rgba(214, 164, 90, 0.09) 100%);
        }
        header a.test-link:hover {
            color: #fff;
            border-color: #e0b36a;
            background: linear-gradient(180deg, rgba(214, 164, 90, 0.30) 0%, rgba(214, 164, 90, 0.16) 100%);
        }

        /* Ссылка-локатор в шапке — без явного правила наследует «невидимый»
           на тёмном фоне цвет браузера. Делаем её заметной. */
        header h2 a,
        header h2 a:link,
        header h2 a:visited {
            color: var(--neon-blue);
            text-decoration: none;
            border-bottom: 1px dotted rgba(0,210,255,0.7);
            font-weight: bold;
        }
        header h2 a:hover {
            color: #fff;
            border-bottom-color: #fff;
            text-shadow: 0 0 6px rgba(0,210,255,0.6);
        }

        .panel {
            background: linear-gradient(180deg, #1b2230 0%, #121721 100%);
            border: 1px solid var(--border-color);
            border-radius: 4px;
            padding: 8px;
            box-shadow: 0 4px 10px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
            margin-bottom: 8px;
        }

        .panel-title {
            font-size: 10px;
            font-weight: bold;
            text-transform: uppercase;
            color: var(--text-muted);
            margin-bottom: 6px;
            letter-spacing: 0.5px;
        }

        /* Информационная плашка-предупреждение (в стиле панелей) */
        .warn-plate {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 5px 10px;
            background: linear-gradient(180deg, #2a1a0d 0%, #17100a 100%);
            border: 1px solid rgba(255,170,0,0.45);
            border-left: 3px solid var(--neon-amber);
            border-radius: 4px;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 0 8px rgba(255,170,0,0.12);
        }
        .warn-plate-badge {
            color: var(--danger);
            font-weight: bold;
            font-size: 10px;
            letter-spacing: 0.6px;
            text-shadow: 0 0 6px rgba(244,63,94,0.5);
        }
        .warn-plate-text {
            color: #e8d9b5;
            font-size: 10px;
            line-height: 1.3;
        }
        .warn-plate-text a {
            color: #ffd166;
            font-weight: 600;
            text-decoration: none;
            border-bottom: 1px dotted rgba(255, 209, 102, 0.7);
        }
        .warn-plate-text a:hover {
            color: #fff;
            border-bottom-color: #fff;
        }

        /* Статистика сервера (без заголовка) */
        .stats-grid {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: center;
            gap: 6px 10px;
            font-size: 11px;
        }
        .stat-cell {
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }
        .stat-k {
            color: var(--text-muted);
            font-size: 9px;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            white-space: nowrap;
        }
        .stat-v {
            display: inline-block;
            width: 86px;
            flex: 0 0 auto;
            padding: 1px 6px;
            text-align: center;
            background: #0a0f16;
            border: 1px solid #1f2733;
            border-radius: 4px;
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.85);
            color: var(--neon-blue);
            font-weight: bold;
            font-variant-numeric: tabular-nums;
            white-space: nowrap;
        }

        /* Абсолютное позиционирование оверлея настройки (carrier/edgelower/
           edgeupper/yellowbar). */
        .scaleabs { position: absolute; }

        /* Кнопки диапазонов — по центру, одинаковой ширины (по «160m») */
        #bandbuttons {
            display: block;
            text-align: center;
        }
        #bandbuttons .btnBand {
            min-width: 46px;
        }
        /* Цифровой шрифт частоты */
        @font-face {
            font-family: 'digital-font';
            src: url('DS-DIGII.ttf');
        }

        /* --- Loader  --- */
        .loader {
            display: flex;
            flex-direction: column;
            font-size: 2em;
            justify-content: center;
            align-items: center;
            background: rgb(245,245,245);
            color: #000;
            z-index: 1001;
            position: fixed;
            left: 0; top: 0; right: 0; bottom: 0;
            overflow: hidden;
        }
        body .loader .dots {
            display: flex;
            position: relative;
            top: 13px;
            left: -10px;
            width: 100px;
            animation: dots 4s ease infinite 1s;
        }
        body .loader .dots div {
            position: relative;
            width: 10px;
            height: 10px;
            margin-right: 10px;
            border-radius: 100%;
            background-color: black;
        }
        body .loader .dots div:nth-child(1) {
            width: 0px; height: 0px; margin: 5px; margin-right: 15px;
            animation: show-dot 4s ease-out infinite 1s;
        }
        body .loader .dots div:nth-child(4) {
            background-color: transparent;
            animation: dot-fall-left 4s linear infinite 1s;
        }
        body .loader .dots div:nth-child(4):before {
            position: absolute; width: 10px; height: 10px; margin-right: 10px;
            border-radius: 100%; background-color: black; content: '';
            animation: dot-fall-top 4s cubic-bezier(0.46,0.02,0.94,0.54) infinite 1s;
        }
        @keyframes dots {
            0% { left: -10px; }
            20%, 100% { left: 10px; }
        }
        @keyframes show-dot {
            0%, 20% { width: 0px; height: 0px; margin: 5px; margin-right: 15px; }
            30%, 100% { width: 10px; height: 10px; margin: 0px; margin-right: 10px; }
        }
        @keyframes dot-fall-left {
            0%, 5% { left: 0px; }
            100% { left: 200px; }
        }
        @keyframes dot-fall-top {
            0%, 5% { top: 0px; }
            30%, 100% { top: 50vh; }
        }
        .loaded_hiding { transition: 0.7s opacity; opacity: 0; }
        .loaded { display: none !important; }
        .notify {
            position: fixed; z-index: 1000; top: 0px; width: 100%; height: 0;
            box-sizing: border-box; color: #fff; text-align: center;
            background: #bdbdbdf2; overflow: hidden; transition: height .7s;
        }
        .active { height: 50px; }
        .success:before { content: "На этом диапазоне пока нет приёмника. Для его появления Вы можете помочь проекту! Кнопка  внизу страницы"; }


        /* Горизонтальная жёлтая полоска на указателе настройки */
        #yellowbarr { background-color:yellow; top:1px; height:1px; }
        #yellowbara:hover #yellowbarr { top:2px; height:2px; }
        /* Полоса фильтра — затенение по водопаду, зависит от ширины полосы
           (width:100% от #yellowbar) */
        .vl {
            position:absolute;
            width:100%;
            height:170px;
            top:-167px;
            z-index:2;
            background-image: linear-gradient(to right,
                rgb(255,255,0) -20%,
                rgba(255,255,154,0.2) 5%,
                rgba(255,255,154,0.2) 95%,
                rgb(255,255,0) 120%);
        }

        /* Magic Eye: плавное движение + сектор снизу */
        .progress-ring__circle {
            transition: 0.35s stroke-dashoffset;
            transform: rotate(-90deg);
            transform-origin: 50% 50%;
            /* Дуги-сектора рисуются ПОВЕРХ внутренней тени SVG, поэтому без
             * собственной тени выглядят плоской наклейкой. drop-shadow по
             * контуру дуги даёт «глубину лампы» (плавный край, полутона). */
            filter: drop-shadow(0 0 6px rgba(0,0,0,0.55))
                    drop-shadow(0 0 14px rgba(13,224,12,0.25));
        }

        /* Выпадающая панель «О приёмнике» в шапке */
        .info-drop {
            position: relative;
            display: inline-block;
        }
        .info-drop-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            height: 28px;
            box-sizing: border-box;
            background: linear-gradient(180deg, #283143 0%, #1a212d 100%);
            color: #e5e7eb;
            border: 1px solid #374357;
            border-radius: 4px;
            padding: 0 9px;
            cursor: pointer;
            font-size: 11px;
            text-decoration: none;
            transition: border-color 0.15s, color 0.15s;
        }
        .info-drop-btn:hover {
            border-color: var(--neon-blue);
            color: #fff;
        }
        .info-drop-panel {
            position: absolute;
            top: 32px;
            right: 0;
            width: 430px;
            max-height: 520px;
            overflow-y: auto;
            background: var(--bg-panel);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            box-shadow: 0 8px 18px rgba(0,0,0,0.6);
            padding: 12px;
            display: none;
            z-index: 100;
            color: var(--text-main);
            font-size: 11px;
            line-height: 1.45;
        }
        .info-drop-panel h3 {
            font-size: 12px;
            font-weight: bold;
            color: var(--neon-blue);
            margin: 4px 0 6px;
            letter-spacing: 0.4px;
        }
        .info-drop-panel a {
            color: var(--neon-blue);
        }
        .info-drop-panel ul, .info-drop-panel ol { padding-left: 16px; margin: 5px 0; }
        .info-drop-panel li { margin-bottom: 4px; color: var(--text-muted); }
        .info-drop-panel .monitor-btn {
            display: block;
            text-align: center;
            margin-top: 8px;
            padding: 5px 10px;
            background: linear-gradient(180deg, #1e3a8a 0%, #1d4ed8 100%);
            color: #fff;
            border-radius: 4px;
            text-decoration: none;
        }
        .info-drop-panel details > summary {
            cursor: pointer;
            color: var(--neon-blue);
            text-decoration: underline;
            margin: 6px 0;
        }
        /* Переключатели (колонка) — собственный компактный toggle */
        .sw-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 3px 0;
        }
        .sw-label {
            font-size: 11px;
            color: var(--text-main);
        }
        .sw-toggle {
            appearance: none;
            -webkit-appearance: none;
            width: 32px;
            height: 16px;
            border-radius: 10px;
            background: var(--bg-input);
            border: 1px solid var(--border-color);
            position: relative;
            cursor: pointer;
            transition: 0.2s;
            margin: 0;
        }
        .sw-toggle::after {
            content: "";
            position: absolute;
            top: 1px; left: 1px;
            width: 12px; height: 12px;
            border-radius: 50%;
            background: #666;
            transition: 0.2s;
        }
        .sw-toggle:checked {
            background: var(--neon-blue);
            border-color: var(--neon-blue);
        }
        .sw-toggle:checked::after {
            left: 17px;
            background: #fff;
        }

        /* DSP-тумблеры: 4 колонки — названия в один ряд, тумблеры строкой ниже */
        .sw-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            column-gap: 6px;
            row-gap: 5px;
            align-items: start;
        }
        .sw-grid-label {
            font-size: 10px;
            line-height: 1.2;
            color: var(--text-main);
            cursor: pointer;
            overflow-wrap: break-word;
        }
        .sw-grid .sw-toggle {
            justify-self: start;
        }

        /* Audio Control: [mute] [ползунок] [бейдж dB], без подписи «Громкость» */
        .vol-row {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .vol-mute {
            flex: 0 0 auto;
            width: 32px;
            height: 26px;
            padding: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .vol-mute svg {
            display: block;
            width: 16px;
            height: 16px;
        }
        .vol-mute .vol-icon-off { display: none; }
        .vol-mute.btn-selected .vol-icon-on { display: none; }
        .vol-mute.btn-selected .vol-icon-off { display: block; }
        .vol-badge {
            flex: 0 0 auto;
            min-width: 44px;
            padding: 3px 6px;
            text-align: center;
            border-radius: 4px;
            background: var(--bg-input);
            border: 1px solid var(--border-color);
            color: var(--neon-blue);
            font-size: 10px;
            font-weight: bold;
            font-variant-numeric: tabular-nums;
        }
        .vol-slider {
            -webkit-appearance: none;
            appearance: none;
            flex: 1 1 auto;
            min-width: 0;
            height: 20px;
            margin: 0;
            padding: 0;
            border: 0;
            cursor: pointer;
            /* заливка рисуется фоном самого input: градиент обновляет volslider()
               через background-image; background-size учитывает радиус бегунка,
               чтобы край заливки совпадал с его центром */
            background-color: transparent;
            background-image: linear-gradient(90deg, #00d2ff 0 76.9%, #232b3a 76.9% 100%);
            background-size: calc(100% - 14px) 4px;
            background-position: 7px center;
            background-repeat: no-repeat;
            border-radius: 2px;
            --vol: 76.9%;
        }
        .vol-slider::-webkit-slider-runnable-track {
            height: 20px;
            background: transparent;
            border: 0;
        }
        .vol-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 14px;
            height: 14px;
            margin-top: 3px;
            border-radius: 50%;
            background: #e5e7eb;
            border: 2px solid var(--neon-blue);
            box-shadow: 0 0 6px rgba(0,210,255,0.6);
        }
        .vol-slider::-moz-range-track {
            height: 20px;
            background: transparent;
            border: 0;
        }
        .vol-slider::-moz-range-progress {
            background: transparent;
        }
        .vol-slider::-moz-range-thumb {
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background: #e5e7eb;
            border: 2px solid var(--neon-blue);
            box-shadow: 0 0 6px rgba(0,210,255,0.6);
        }
        .vol-slider:focus-visible {
            outline: 1px solid var(--neon-blue);
            outline-offset: 2px;
        }

        /* Audio Rec: кнопка + плашка состояния (REC / время / размер / частота) */
        .rec-btn {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            height: 28px;
            padding: 0 8px;
            background: linear-gradient(180deg, #1a1114 0%, #120c0e 100%);
            border: 1px solid rgba(255, 74, 74, 0.45);
            border-radius: 4px;
            color: #ff6b6b;
            font-size: 11px;
            font-weight: bold;
            cursor: pointer;
            transition: 0.15s;
        }
        .rec-btn:hover { border-color: #ff4a4a; color: #fff; }
        .rec-btn.is-recording {
            background: linear-gradient(180deg, #3a0d16 0%, #24070d 100%);
            border-color: #ff003c;
            color: #fff;
            box-shadow: 0 0 10px rgba(255,0,60,0.35), inset 0 0 8px rgba(255,0,60,0.15);
        }
        .rec-dot {
            display: inline-block;
            flex: 0 0 auto;
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: #ff003c;
            box-shadow: 0 0 6px #ff003c;
        }
        .rec-btn.is-recording .rec-dot,
        .rec-line .rec-dot { animation: rec-blink 1s ease-in-out infinite; }
        @keyframes rec-blink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.2; }
        }
        .rec-status { margin-top: 5px; }
        .rec-status:empty { display: none; }

        /* Активная плашка записи (палитра ua6eh):
           dot · REC · частота | время | размер */
        .rec-line {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 7px 10px;
            background: #0b111b;
            border: 1px solid #2a151a;
            border-radius: 4px;
            box-shadow: inset 0 2px 5px rgba(0,0,0,0.8);
            font-size: 11px;
        }
        .rec-label {
            color: #ff4444;
            font-weight: 700;
            letter-spacing: 0.8px;
            text-transform: uppercase;
            text-shadow: 0 0 4px rgba(255,0,60,0.4);
        }
        .rec-freq {
            color: var(--neon-amber);
            font: 500 12px/1 "Courier New", monospace;
            font-variant-numeric: tabular-nums;
            text-shadow: 0 0 5px rgba(255,170,0,0.35);
        }
        .rec-sep { color: #2d3540; font-weight: 300; }
        .rec-time {
            color: #fff;
            font: bold 12px/1 "Courier New", monospace;
            font-variant-numeric: tabular-nums;
        }
        .rec-size {
            color: var(--text-muted);
            font: 11px/1 "Courier New", monospace;
            font-variant-numeric: tabular-nums;
        }

        /* Карточка «Запись сохранена» */
        .rec-done {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 7px 10px;
            background: #0b1410;
            border: 1px solid #2a3a2a;
            border-radius: 4px;
            box-shadow: inset 0 2px 5px rgba(0,0,0,0.8);
        }
        .rec-done-icon {
            flex: 0 0 auto;
            width: 11px;
            height: 6px;
            border-left: 2px solid var(--neon-green);
            border-bottom: 2px solid var(--neon-green);
            transform: rotate(-45deg) translateY(-1px);
            box-shadow: 0 0 6px rgba(57,255,20,0.4);
        }
        .rec-done-info {
            flex: 1 1 auto;
            min-width: 0;
            display: flex;
            flex-direction: column;
        }
        .rec-done-title {
            color: var(--neon-green);
            font-size: 11px;
            font-weight: bold;
            line-height: 1.2;
        }
        .rec-done-meta {
            color: var(--text-muted);
            font: 9px/1.3 "Courier New", monospace;
            font-variant-numeric: tabular-nums;
        }
        .rec-done-file {
            color: #6e7681;
            font: 9px/1.3 "Courier New", monospace;
            word-break: break-all;
        }
        .rec-dl {
            flex: 0 0 auto;
            display: inline-block;
            padding: 4px 10px;
            background: linear-gradient(180deg, #14351f 0%, #0d2415 100%);
            border: 1px solid #2f7a45;
            border-radius: 3px;
            color: #9cffb0;
            font-size: 10px;
            font-weight: bold;
            text-align: center;
            text-decoration: none;
            white-space: nowrap;
        }
        .rec-dl:hover { border-color: #39ff14; color: #fff; }

        /* Полноширинная плашка записи рядом с блоком декодера */
        .rec-panel { padding: 6px 8px; }
        .rec-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 4px;
        }
        .rec-panel-title {
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text-muted);
        }
        .rec-close {
            background: transparent;
            border: 0;
            color: var(--text-muted);
            font-size: 16px;
            line-height: 1;
            padding: 0 4px;
            cursor: pointer;
        }
        .rec-close:hover { color: #fff; }
        .rec-panel .rec-status { margin-top: 0; }

        /* Контейнер оригинального водопада */
        #wfccontainer {
            width: 1024px;
            margin-bottom: 8px;
            background: #000;
        }
        #wfcontainer {
            width: 1024px;
        }

        .main-grid {
            display: grid;
            grid-template-columns: 280px 448px 280px;
            gap: 8px;
            margin-bottom: 8px;
        }

        .flex-col {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        button, .btn, .btnBand, .btnBandW {
            background: linear-gradient(180deg, #283143 0%, #1a212d 100%);
            color: #e5e7eb;
            border: 1px solid #374357;
            border-top: 1px solid #4b5b75;
            padding: 3px 6px;
            border-radius: 3px;
            cursor: pointer;
            font-size: 11px;
            font-weight: 500;
            text-shadow: 0 -1px 0 rgba(0,0,0,0.5);
            box-shadow: 0 1px 2px rgba(0,0,0,0.3);
            transition: all 0.1s;
            white-space: nowrap;
        }

        button:active, .btnBand:active, .btnBandW:active {
            background: #151a24;
            box-shadow: inset 0 1px 3px rgba(0,0,0,0.8);
            transform: translateY(0.5px);
        }

        /* Класс подсветки активных элементов из rx-base.js */
        .btn-selected, button.active-blue {
            background: linear-gradient(180deg, #1e3a8a 0%, #1d4ed8 100%) !important;
            border-color: var(--neon-blue) !important;
            color: #fff !important;
            box-shadow: 0 0 6px rgba(0, 210, 255, 0.6) !important;
            text-shadow: 0 0 4px #fff !important;
        }

        button.active-green {
            background: linear-gradient(180deg, #064e3b 0%, #047857 100%);
            border-color: var(--neon-green);
            color: #fff;
            box-shadow: 0 0 6px rgba(57, 255, 20, 0.6);
            text-shadow: 0 0 4px #fff;
        }

        .btn-group {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            align-items: center;
        }

        /* ============================================================
           РЕДИЗАЙН 2026-10-31: панель управления водопадом
           Компактный блок кнопок под водопадом, без текстовых подписей.
           ============================================================ */
        .wf-settings {
            padding: 5px 7px;
        }
        .wf-row {
            display: flex;
            align-items: center;
            width: 100%;
        }
        .wf-btns {
            display: flex;
            align-items: center;
            gap: 2px;
            min-width: 0;
        }
        /* Доли ширины: 5 кнопок зума + 2 типа + 4 размера + 1 «Hide labels».
           В сумме 12 равных кнопок на всю ширину панели. */
        .wf-zoom { flex: 5 1 0; }
        .wf-type { flex: 2 1 0; }
        .wf-size { flex: 4 1 0; }
        .wf-settings .wf-btn {
            flex: 1 1 0;
            min-width: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 26px;
            padding: 3px 6px;
            background: transparent;
            border: 1px solid transparent;
            border-radius: 4px;
            box-shadow: none;
            text-shadow: none;
            color: var(--text-main);
            font-size: 11px;
            font-weight: 500;
            line-height: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .wf-settings .wf-btn:hover {
            background: rgba(0, 210, 255, 0.10);
            border-color: rgba(0, 210, 255, 0.35);
            color: #fff;
        }
        .wf-settings .wf-btn.btn-selected {
            background: linear-gradient(180deg, #1e3a8a 0%, #1d4ed8 100%) !important;
            border-color: var(--neon-blue) !important;
            color: #fff !important;
            box-shadow: 0 0 6px rgba(0, 210, 255, 0.45) !important;
        }
        .wf-size-btn {
            font-variant-numeric: tabular-nums;
        }
        .wf-sep {
            flex: 0 0 1px;
            height: 20px;
            margin: 0 6px;
            background: var(--border-color);
        }
        .wf-btn:focus-visible {
            outline: 1px solid var(--neon-blue);
            outline-offset: 1px;
        }

        .digital-display {
            background-color: #05070a;
            border: 1px solid #1f2733;
            border-radius: 8px;   /* стало 8px (было 4px) — заметное скругление */
            padding: 6px;
            font-family: 'Courier New', Courier, monospace;
            font-weight: bold;
            text-align: center;
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.9);
            position: relative;
            display: grid;
            grid-template-columns: 76px minmax(0, 1fr);
            grid-template-rows: auto auto;
            column-gap: 6px;
            row-gap: 1px;
            align-items: center;
        }
        /* Magic Eye: занимает оба ряда и центрируется по всей высоте дисплея */
        .dd-circle {
            grid-column: 1;
            grid-row: 1 / span 2;
            align-self: center;
            justify-self: center;
            position: relative;
            display: flex;
            align-items: center;
        }
        .dd-core {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
        }

        #freq-digits {
            background: transparent;
            border: none;
            font-size: 40px;
            font-family: digital-font, 'Courier New', monospace;
            color: var(--neon-blue);
            text-shadow: 0 0 6px rgba(0,210,255,0.5);
            letter-spacing: 1px;
            grid-column: 2;
            grid-row: 1;
            min-width: 0;
            text-align: center;
            padding-left: 0;
            font-weight: bold;
        }
        #freq-digits:focus {
            outline: none;
            color: #fff;
            text-shadow: 0 0 8px #fff;
        }

        /* Снизу: модуляция · ширина полосы · FT8 вкл/выкл */
        .dd-foot {
            grid-column: 2;
            grid-row: 2;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin-top: 0;
            font-size: 10px;
            color: var(--text-muted);
        }
        .dd-foot b {
            font-weight: bold;
            color: var(--neon-amber);
            font-variant-numeric: tabular-nums;
        }
        .dd-foot-sep { color: #2d3540; }
        .dd-mode-now {
            font-weight: bold;
            letter-spacing: 0.5px;
            color: var(--neon-green);
            text-shadow: 0 0 5px rgba(57,255,20,0.4);
        }
        .dd-ft8 {
            font-weight: bold;
            letter-spacing: 0.5px;
            color: var(--text-muted);
            margin-left: 6px;
        }
        .dd-ft8.is-on {
            color: var(--neon-amber);
            text-shadow: 0 0 5px rgba(255,170,0,0.4);
        }

        /* --- S-метр со шкалой --- */
        .smeter-container {
            height: 34px;
            background: #05070a;
            border: 1px solid #1f2733;
            border-radius: 3px;
            margin-top: 6px;
            position: relative;
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.9);
        }
        /* Шкала S-метра (фон-деления) */
        .smeter-scale {
            position: absolute;
            left: 8px; right: 8px; top: 0; bottom: 0;
            background:
                repeating-linear-gradient(90deg,
                    rgba(255,255,255,0.12) 0 1px,
                    transparent 1px 12.5%),
                linear-gradient(90deg, #0b3d2e 0%, #3d2b0b 100%);
            border-radius: 2px;
        }
        /* подписи шкалы */
        .smeter-scale-labels {
            position: absolute;
            left: 8px; right: 8px; top: 20px;
            display: flex;
            justify-content: space-between;
            font-size: 8px;
            color: #667;
            pointer-events: none;
        }
        /* --- S-метр: классы из оригинала --- */
        .smeterpeak {
            height: 11.17px;
            margin: 0 0 -12px 7px;
            background-color: transparent;
            border-right: 2px solid rgb(255,0,0);
            position: relative;
        }
        .smetermin {
            display: none;   /* метка шумового пола скрыта 30.09 (см. HTML) */
            margin: 7px 0 -12px 7px;
            z-index: 1;
            width: 0;
            height: 4.17px;
            background-color: transparent;
            position: absolute;
            border-right: 2px solid #98ffee;
        }
        .smeterbar {
            width: 252px;
            height: 10px;
            background: linear-gradient(to right, #98ffee 113px, red 5px);
            box-shadow: 0 0 10px rgba(251,244,135,0.8);
            position: relative;
            margin: 9px 0 0 7px;
        }
        .EQ {
            width: 300px;
            margin-left: 0px;
            margin-top: 0;
            max-width: 241px;
            height: 8px;
            font-size: 0;
            position: relative;
            background-color: #000;
        }
        .EQ * { box-sizing: border-box; }
        .EQ-column {
            display: inline-block;
            width: 100%;
            height: 100%;
            position: relative;
            background-image: linear-gradient(to right, #98ffee 115px, red 5px);
        }
        .EQ-column[data-volume="0"]::after { height: 0; }
        .EQ-column[data-volume="1"]::after { height: 3%; }
        .EQ-column[data-volume="2"]::after { height: 13%; }
        .EQ-column[data-volume="3"]::after { height: 23%; }
        .EQ-column[data-volume="4"]::after { height: 33%; }
        .EQ-column[data-volume="5"]::after { height: 43%; }
        .EQ-column[data-volume="6"]::after { height: 53%; }
        .EQ-column[data-volume="7"]::after { height: 63%; }
        .EQ-column[data-volume="8"]::after { height: 73%; }
        .EQ-column[data-volume="9"]::after { height: 83%; }
        .EQ-column[data-volume="10"]::after { height: 93%; }
        table.smetertable td { border: 1px solid #000; background-color: rgba(226,226,226,0.11); }

        #smeterbar {
            position: absolute;
            left: 8px; top: 4px;
            height: 12px;
            width: 0px;
            background: linear-gradient(90deg, #39ff14 0%, #ffaa00 70%, #f43f5e 100%);
            border-radius: 2px;
            box-shadow: 0 0 6px rgba(57,255,20,0.4);
            transition: 0.1s width;
        }
        #smeterpeak {
            position: absolute;
            left: 8px; top: 4px;
            height: 12px;
            width: 0px;
            border-right: 2px solid #ff0000;
            background: transparent;
        }
        #smetermin {
            position: absolute;
            left: 8px; top: 20px;
            height: 3px;
            width: 0px;
            border-right: 2px solid #98ffee;
            background: transparent;
            z-index: 1;
        }
        /* EQ-полоса (smeterbarnew) — скрытый блок из JS */
        #smeterbarnew {
            position: absolute;
            left: 8px; top: 4px;
            height: 12px;
            background: rgba(57,255,20,0.25);
        }
        #numericalsmeter, #numericalsmeterpeak {
            position: absolute;
            right: 8px; top: 20px;
            font-size: 8px;
            color: #889;
        }

        /* --- S-метр: логичная шкала + метрики, в цветах ua6eh --- */
        .smeter-panel { padding-top: 2px; }
        .smeter-metrics { display: flex; gap: 4px; }
        .smeter-metric {
            flex: 1 1 0;
            min-width: 0;
            min-height: 16px;
            display: flex;
            flex-direction: row;
            align-items: baseline;
            justify-content: center;
            gap: 3px;
            padding: 1px 4px;
            background: #0a0f16;
            border: 1px solid #1f2733;
            border-radius: 4px;
        }
        .smeter-metric-label {
            font-size: 7px;
            line-height: 1;
            letter-spacing: 0.4px;
            text-transform: uppercase;
            color: var(--text-muted);
        }
        .smeter-metric-value {
            font: bold 11px/1.1 "Courier New", monospace;
            font-variant-numeric: tabular-nums;
            white-space: nowrap;
            color: var(--neon-blue);
        }
        .smeter-metric .smeter-snr { color: var(--neon-green); }
        .smeter-metric .smeter-peakval { color: #ff6b6b; }
        .smeter-metric:first-child { align-items: center; }
        .smeter-s-wrap {
            position: relative;
            display: inline-block;
            width: 24px;
            line-height: 1.1;
            text-align: center;
        }
        #smeterS { color: #39ff14; }
        #smeterSplus {
            position: absolute;
            left: calc(100% + 1px);
            top: 50%;
            transform: translateY(-50%);
            color: #ff4444;
            white-space: nowrap;
        }

        .smeter-track {
            position: relative;
            height: 10px;
            margin-top: 4px;
            background: #05070a;
            border: 1px solid #1f2733;
            border-radius: 3px;
            overflow: hidden;
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.9);
        }
        .smeter-gradient {
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, #00d2ff 0%, #39ff14 55%, #ffaa00 80%, #f43f5e 100%);
            clip-path: inset(0 100% 0 0);
            transition: clip-path 0.12s linear;
        }
        .smeter-peak-mark {
            position: absolute;
            top: 0;
            bottom: 0;
            width: 2px;
            background: #ff003c;
            box-shadow: 0 0 6px #ff003c;
            transform: translateX(-50%);
            transition: left 0.2s linear;
        }
        /* Индикатор MUTE: ядро при mute не шлёт кадры S-метра (src/audio.c),
           поэтому полоса заморожена — показываем это явно, а не выдаём за живой замер. */
        .smeter-mute {
            position: absolute;
            top: 1px;
            right: 3px;
            display: none;
            font-size: 7px;
            font-weight: 700;
            letter-spacing: 0.5px;
            color: #ff4444;
            text-shadow: 0 0 4px rgba(255,0,60,0.5);
        }
        .smeter-track.muted .smeter-mute { display: block; }
        .smeter-track.muted .smeter-gradient { opacity: 0.45; }
        .smeter-track.muted .smeter-peak-mark { opacity: 0.45; }
        .smeter-ruler {
            position: relative;
            height: 12px;
            margin-top: 5px;
            font-size: 8px;
            line-height: 1;
            color: #39ff14;
        }
        .smeter-ruler span {
            position: absolute;
            transform: translateX(-50%);
            white-space: nowrap;
        }
        .smeter-ruler span:first-child { transform: none; }
        .smeter-ruler span:last-child { transform: translateX(-100%); }
        /* S1…S8 (дети 1–4) — зелёные; S9 (5-й) — янтарный; +20/+40/+60 (6–8) — красные */
        .smeter-ruler span:nth-child(5) { color: #ffaa00; }
        .smeter-ruler span:nth-child(n+6) { color: #ff4444; }
        .smeter-ruler span::before {
            content: "";
            position: absolute;
            left: 50%;
            top: -7px;
            width: 1px;
            height: 3px;
            background: rgba(255,255,255,0.22);
        }
        .smeter-ruler span:first-child::before { left: 0; }
        .smeter-ruler span:last-child::before { left: 100%; }

        select, input[type="text"] {
            background-color: var(--bg-input);
            color: #fff;
            border: 1px solid var(--border-color);
            border-radius: 3px;
            padding: 2px 4px;
            font-size: 11px;
            box-sizing: border-box;
        }

        select:focus, input[type="text"]:focus {
            border-color: var(--neon-blue);
            outline: none;
        }

        label {
            font-size: 11px;
            display: inline-flex;
            align-items: center;
            gap: 3px;
            cursor: pointer;
        }

        input[type="radio"], input[type="checkbox"] {
            margin: 0;
            accent-color: var(--neon-blue);
        }

        .row-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 2px 0;
        }

        #chatboxnew {
            height: 140px;
            box-sizing: border-box;
            overflow-y: auto;
            background: var(--bg-input);
            border: 1px solid var(--border-color);
            border-radius: 3px;
            padding: 6px;
            font-family: monospace;
            font-size: 14px;
            line-height: 1.3;
            overflow-wrap: break-word;
            margin-bottom: 6px;
        }

        #chatform { margin: 0; padding: 0; }
        #chatrow { display: flex; gap: 6px; }
        #chatinput {
            flex-grow: 1;
            min-width: 0;
            font-size: 14px;
            padding: 5px 8px;
        }
        #chatsend {
            font-size: 13px;
            padding: 5px 14px;
        }

        /* Скролл чата: стандартная ширина, цвета сайта */
        @supports selector(::-webkit-scrollbar) {
            #chatboxnew::-webkit-scrollbar {
                width: 15px;
                height: 15px;
            }
            #chatboxnew::-webkit-scrollbar-track {
                background: #0b1016;
                border-left: 1px solid var(--border-color);
            }
            #chatboxnew::-webkit-scrollbar-thumb {
                background: #2b3a4a;
                border: 2px solid #0b1016;
                border-radius: 8px;
                background-clip: padding-box;
            }
            #chatboxnew::-webkit-scrollbar-thumb:hover {
                background: var(--neon-blue);
            }
            #chatboxnew::-webkit-scrollbar-thumb:active {
                background: #00a8cc;
            }
            #chatboxnew::-webkit-scrollbar-corner {
                background: #0b1016;
            }
            #chatboxnew::-webkit-scrollbar-button {
                display: none;
            }
        }
        @supports not selector(::-webkit-scrollbar) {
            #chatboxnew {
                scrollbar-width: auto;
                scrollbar-color: #2b3a4a #0b1016;
            }
        }

        #users {
            font-size: 11px;
            /* js (douu) рисует блоки шириной 1024px — не даём им вылезать
               за границы панели: обрезаем и ограничиваем по ширине */
            overflow: hidden;
            max-width: 100%;
        }
        
        /* Скрываем служебные оригинальные формы, которые ломали верстку, 
           но сохраняем невидимыми в DOM, если скрипты их ищут напрямую */
        .hidden-form-system {
            display: none !important;
        }
    
        /* ============================================================
           ДРУГИЕ SDR: аккордеон перед блоком декодеров
           ============================================================ */
        .other-sdr {
            padding: 0;
            overflow: hidden;
        }
        .osdr-toggle {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 7px 10px;
            background: transparent;
            border: 0;
            color: var(--text-main);
            font: 600 11px/1 "Roboto Condensed", Arial, sans-serif;
            cursor: pointer;
        }
        .osdr-toggle:hover {
            color: #fff;
            background: rgba(0, 210, 255, 0.05);
        }
        .osdr-title {
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .osdr-chevron {
            color: var(--neon-blue);
            transition: transform 0.2s;
        }
        .other-sdr.is-open .osdr-chevron { transform: rotate(180deg); }
        .osdr-body { padding: 0 10px 9px; }
        .osdr-group + .osdr-group { margin-top: 7px; }
        .osdr-group-title {
            margin: 3px 0 4px;
            font-size: 9px;
            letter-spacing: 0.5px;
            text-transform: uppercase;
            color: var(--text-muted);
        }
        .osdr-grid {
            display: grid;
            grid-template-columns: repeat(6, minmax(0, 1fr));
            gap: 4px;
        }
        .osdr-grid a {
            display: block;
            padding: 4px 6px;
            text-align: center;
            text-decoration: none;
            background: var(--bg-input);
            border: 1px solid var(--border-color);
            border-radius: 4px;
            color: var(--text-main);
            font-size: 10px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            transition: 0.15s;
        }
        .osdr-grid a:hover {
            border-color: var(--neon-blue);
            color: #fff;
            box-shadow: 0 0 6px rgba(0,210,255,0.25);
        }

        /* ============================================================
           ОКНО FT8-декодера (дизайн в духе sv1btl/decoders.js,
           но в тёмной теме сайта). Открывается кнопкой FT8.
           Бэкенд: серверный /~~ft8 (ka9q-radio decode_ft8).
           ============================================================ */
        .ft8win {
            box-sizing: border-box;
            width: 100%;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            background: linear-gradient(180deg, var(--bg-panel) 0%, #0d1117 100%);
            font: 11px/1.35 Arial, sans-serif;
            color: var(--text-main);
            text-align: left;
            box-shadow: 0 4px 10px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
        }

        .ft8-head {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 4px 8px;
            padding: 3px 8px;
            background: linear-gradient(180deg, #1c2536 0%, #141c29 100%);
            border-bottom: 1px solid var(--border-color);
            border-radius: 6px 6px 0 0;
        }

        .ft8-title {
            font-weight: bold;
            flex: 1;
            white-space: nowrap;
            color: var(--neon-amber);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            font-size: 10px;
        }

        .ft8-head span { color: var(--text-muted); }
        .ft8-head b.ft8-count { color: var(--neon-blue); }
        .ft8-head .ft8-count-label { white-space: nowrap; }

        .ft8-clear {
            background: linear-gradient(180deg, #283143 0%, #1a212d 100%);
            color: var(--text-main);
            border: 1px solid #374357;
            border-radius: 3px;
            padding: 1px 8px;
            font-size: 10px;
            font-weight: 500;
            cursor: pointer;
            box-shadow: 0 1px 2px rgba(0,0,0,0.3);
        }
        .ft8-clear:hover { border-color: var(--danger); color: #fff; }

        .ft8-list {
            height: 150px;
            overflow-y: auto;
            background: var(--bg-input);
            color: var(--text-main);
            font: 11px/1.45 "Roboto Condensed", Arial, sans-serif;
            scrollbar-width: thin;
            scrollbar-color: #2b3b52 #0a0f16;
        }
        .ft8-list::-webkit-scrollbar { width: 8px; }
        .ft8-list::-webkit-scrollbar-track { background: #0a0f16; }
        .ft8-list::-webkit-scrollbar-thumb {
            background: #2b3b52;
            border: 2px solid #0a0f16;
            border-radius: 4px;
        }
        .ft8-list::-webkit-scrollbar-thumb:hover { background: #3b5474; }

        .ft8-table {
            border-collapse: collapse;
            width: 100%;
            table-layout: fixed;
        }

        .ft8-table col.ft8-c-utc   { width: 10%; }
        .ft8-table col.ft8-c-db    { width: 6%; }
        .ft8-table col.ft8-c-dt    { width: 6%; }
        .ft8-table col.ft8-c-hz    { width: 12%; }
        .ft8-table col.ft8-c-grid  { width: 10%; }
        .ft8-table col.ft8-c-dist  { width: 12%; }

        .ft8-table th {
            position: sticky;
            top: 0;
            background: linear-gradient(180deg, #1b2434 0%, #161e2b 100%);
            color: #8b9bb4;
            font: 600 9px/1.2 Arial, sans-serif;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            text-align: left;
            padding: 4px 6px;
            border-bottom: 1px solid var(--border-color);
            z-index: 1;
            white-space: nowrap;
        }

        /* Числовые колонки (dB, DT, Hz, Locator, Distance) — по центру */
        .ft8-table th:nth-child(2),
        .ft8-table th:nth-child(3),
        .ft8-table th:nth-child(4),
        .ft8-table th:nth-child(6),
        .ft8-table th:nth-child(7) {
            text-align: center;
        }

        .ft8-table th + th { border-left: 1px solid rgba(255,255,255,0.04); }

        .ft8-table td {
            padding: 3px 7px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            border-bottom: 1px solid #202836;
            color: var(--text-main);
            vertical-align: middle;
        }
        .ft8-table td + td { border-left: 1px solid rgba(255,255,255,0.035); }

        .ft8-table tbody tr:nth-child(even) td { background: rgba(255,255,255,0.018); }
        .ft8-table tbody tr:hover td { background: rgba(0,210,255,0.075); }
        .ft8-table tr { cursor: pointer; }

        /* UTC — приглушённый моноширинный */
        .ft8-table td.ft8-utc {
            color: #8b9bb4;
            font: 10px/1.4 "Courier New", monospace;
        }

        /* dB — цвет по уровню SNR */
        .ft8-table td.ft8-db {
            text-align: center;
            font: bold 11px/1.4 "Courier New", monospace;
            font-variant-numeric: tabular-nums;
        }
        .ft8-table td.ft8-db.ft8-db-good { color: var(--neon-green); }
        .ft8-table td.ft8-db.ft8-db-mid  { color: var(--neon-amber); }
        .ft8-table td.ft8-db.ft8-db-low  { color: #7d8aa0; }

        /* DT */
        .ft8-table td.ft8-dt {
            text-align: center;
            color: #8b9bb4;
            font: 10px/1.4 "Courier New", monospace;
            font-variant-numeric: tabular-nums;
        }
        .ft8-table td.ft8-dt.ft8-warn { color: var(--neon-amber); }

        /* Частота в Гц: 14 074 250, последние 3 цифры приглушены */
        .ft8-table td.ft8-hz {
            text-align: center;
            color: #ffcc66;
            font: bold 11px/1.4 "Courier New", monospace;
            font-variant-numeric: tabular-nums;
            letter-spacing: 0.02em;
        }
        .ft8-table .ft8-hz-u {
            color: #a88a5a;
            font-weight: normal;
        }

        /* Сообщение */
        .ft8-table td.ft8-msg {
            color: #e6edf7;
            white-space: normal;
            word-break: break-word;
        }

        /* Локатор — кликабельный чип, ведёт на карту по координатам */
        .ft8-table td.ft8-grid { text-align: center; }
        .ft8-table .ft8-grid-a {
            display: inline-block;
            padding: 0 5px;
            border: 1px solid #2b5f7a;
            border-radius: 3px;
            background: rgba(0, 210, 255, 0.06);
            color: #7dd3fc;
            font: bold 10px/1.5 "Courier New", monospace;
            text-decoration: none;
            transition: 0.15s;
        }
        .ft8-table .ft8-grid-a:hover {
            border-color: var(--neon-blue);
            color: #fff;
            box-shadow: 0 0 6px rgba(0,210,255,0.45);
        }

        /* Дистанция */
        .ft8-table td.ft8-dist {
            text-align: center;
            color: #8b9bb4;
            font: 10px/1.4 "Courier New", monospace;
            font-variant-numeric: tabular-nums;
        }
        .ft8-table .ft8-dim { color: #55637a; }

        .ft8-status {
            padding: 2px 8px 3px;
            color: var(--text-muted);
            font-style: italic;
            font-size: 9px;
            border-top: 1px solid var(--border-color);
            min-height: 14px;
        }

        .ft8-empty {
            color: var(--text-muted);
            font-style: italic;
            text-align: center;
            padding: 12px 6px;
        }
    
