:root {
    color-scheme: light dark;
    --bg: #eef2f7;
    --bg-2: #dbe7f3;
    --card: rgba(255, 255, 255, 0.86);
    --card-solid: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --soft: rgba(15, 23, 42, 0.07);
    --line: rgba(15, 23, 42, 0.12);
    --accent: #0f766e;
    --accent-2: #2563eb;
    --good: #16a34a;
    --talk: #dc2626;
    --warn: #d97706;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
    --shadow-strong: 0 18px 48px rgba(15, 23, 42, 0.16);
    --radius-lg: 20px;
    --radius-md: 16px;
    --radius-sm: 11px;
    --max-width: 1380px;
}

[data-theme="dark"] {
    --bg: #020617;
    --bg-2: #0f172a;
    --card: rgba(15, 23, 42, 0.82);
    --card-solid: #111827;
    --text: #e5edf8;
    --muted: #94a3b8;
    --soft: rgba(226, 232, 240, 0.08);
    --line: rgba(226, 232, 240, 0.13);
    --accent: #2dd4bf;
    --accent-2: #60a5fa;
    --good: #4ade80;
    --talk: #fb7185;
    --warn: #fbbf24;
    --shadow: 0 12px 34px rgba(0, 0, 0, 0.30);
    --shadow-strong: 0 22px 56px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

/* hidden должен всегда побеждать стили карточек/панелей.
   Иначе браузер может показать empty-state поверх уже отрисованных карточек. */
[hidden] {
    display: none !important;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(45, 212, 191, 0.13), transparent 28rem),
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.14), transparent 28rem),
        linear-gradient(145deg, var(--bg), var(--bg-2));
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: 0;
}

.app-shell {
    width: min(100% - 20px, var(--max-width));
    margin: 0 auto;
    padding: max(8px, env(safe-area-inset-top)) 0 18px;
}

.top-bar,
.panel-card,
.compact-summary article,
.node-card {
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: var(--shadow);
}

.top-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 8px 10px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.brand-line,
.top-actions,
.status-pill,
.brand-mark,
.panel-head,
.node-card-head,
.node-footer,
.player-controls {
    display: flex;
    align-items: center;
}

.brand-line {
    min-width: 0;
    gap: 10px;
}

.brand-mark {
    border: 0;
    flex: 0 0 auto;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

button.brand-mark {
    cursor: pointer;
    font: inherit;
}

button.brand-mark:hover,
button.brand-mark:focus-visible {
    color: var(--text);
    background: var(--soft);
    outline: none;
}

.brand-dot,
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--good);
    box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.12);
}

.pulse-dot {
    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.75); opacity: 0.55; }
}

.brand-title {
    min-width: 0;
}

.brand-title h1 {
    margin: 0;
    max-width: 56vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(0.92rem, 1.8vw, 1.18rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.brand-title span {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: 0.72rem;
}

.top-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 8px;
}

.status-pill {
    gap: 7px;
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.12);
    color: var(--good);
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
}

.status-pill.is-offline {
    color: var(--talk);
    background: rgba(220, 38, 38, 0.13);
}

.status-pill.is-offline .pulse-dot {
    background: var(--talk);
    box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.13);
}

.status-pill.is-warning {
    color: var(--warn);
    background: rgba(217, 119, 6, 0.13);
}

.status-pill.is-warning .pulse-dot {
    background: var(--warn);
    box-shadow: 0 0 0 6px rgba(217, 119, 6, 0.13);
}

.theme-toggle,
.listen-button {
    cursor: pointer;
    color: var(--text);
    background: var(--soft);
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.theme-toggle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1rem;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    background: rgba(45, 212, 191, 0.15);
}

.listen-button:hover {
    transform: translateY(-1px) scale(1.03);
}

.compact-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0;
}

.recent-activity {
    margin: 10px 0 0;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--card);
    box-shadow: var(--shadow);
}

.recent-activity-label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.recent-activity-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
}

.recent-activity-card {
    min-width: 82px;
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    color: #fff;
    background: #16a34a;
    box-shadow: 0 5px 12px rgba(22, 163, 74, 0.20);
    cursor: pointer;
    line-height: 1.05;
    touch-action: pan-x;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.recent-activity-card.is-holding {
    transform: scale(0.96);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.24);
}

.recent-activity-card:hover,
.recent-activity-card:focus-visible {
    transform: translateY(-1px);
    outline: 3px solid rgba(22, 163, 74, 0.22);
    outline-offset: 2px;
}

.recent-activity-card.is-talker {
    background: #dc2626;
    box-shadow: 0 5px 14px rgba(220, 38, 38, 0.28);
}

.recent-activity-card.is-talker:hover,
.recent-activity-card.is-talker:focus-visible {
    outline-color: rgba(220, 38, 38, 0.25);
}

.recent-activity-card strong,
.recent-activity-card span {
    display: block;
    white-space: nowrap;
}

.recent-activity-card strong {
    font-size: 0.76rem;
    font-weight: 950;
}

.recent-activity-card span {
    margin-top: 3px;
    font-size: 0.66rem;
    font-weight: 850;
}

.compact-summary article {
    min-height: 54px;
    border-radius: var(--radius-sm);
    padding: 8px 10px;
}

.compact-summary article:nth-child(1) {
    color: #fff;
    background: #16a34a;
}

.compact-summary article:nth-child(2) {
    color: #172033;
    background: #fbbf24;
}

.compact-summary article:nth-child(3) {
    color: #fff;
    background: #dc2626;
}

.compact-summary article:nth-child(4) {
    color: #fff;
    background: #0891b2;
}

.compact-summary article span {
    color: inherit;
    opacity: 0.88;
}

.compact-summary span {
    display: block;
    color: var(--muted);
    font-size: 0.70rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.compact-summary strong {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(1rem, 2.3vw, 1.28rem);
    line-height: 1.1;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: 8px;
}

.nodes-panel {
    grid-column: 1 / span 3;
}

.info-stack {
    grid-column: 4;
    min-width: 0;
    width: 100%;
}

.info-stack > .panel-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.player-card .compact-head > div,
.player-controls,
.audio-activity-card,
.scanner-box,
.scanner-head,
.scanner-editor,
.player-note {
    min-width: 0;
    max-width: 100%;
}

.panel-card {
    border-radius: var(--radius-lg);
    padding: 12px;
}

.compact-head {
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.eyebrow {
    margin: 0 0 2px;
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

h2 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.mini-hint,
.audio-badge {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 999px;
    color: var(--muted);
    background: var(--soft);
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.audio-badge.is-ready {
    color: var(--good);
    background: rgba(22, 163, 74, 0.12);
}

.audio-badge.is-error {
    color: var(--talk);
    background: rgba(220, 38, 38, 0.13);
}

.audio-badge.is-wait {
    color: var(--warn);
    background: rgba(217, 119, 6, 0.13);
}

.nodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}

.node-card {
    position: relative;
    overflow: hidden;
    min-height: 132px;
    border-radius: var(--radius-md);
    padding: 9px;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.node-card:hover {
    transform: translateY(-1px);
    border-color: rgba(45, 212, 191, 0.42);
}

.node-card.is-clickable {
    cursor: pointer;
}

.node-card.is-clickable:focus-visible {
    outline: 3px solid rgba(45, 212, 191, 0.45);
    outline-offset: 2px;
}

.node-card.is-clickable.is-talker::after {
    content: "Нажми, чтобы слушать";
    position: absolute;
    right: 8px;
    bottom: 7px;
    padding: 3px 6px;
    border-radius: 999px;
    color: #fff;
    background: rgba(220, 38, 38, 0.86);
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.node-card.is-talker {
    border-color: rgba(220, 38, 38, 0.62);
    background:
        linear-gradient(135deg, rgba(220, 38, 38, 0.18), transparent 56%),
        var(--card);
    box-shadow: var(--shadow-strong);
    animation: talkerBlink 1.05s ease-in-out infinite;
}

@keyframes talkerBlink {
    0%, 100% { box-shadow: 0 0 0 rgba(220, 38, 38, 0), var(--shadow-strong); }
    50% { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18), var(--shadow-strong); }
}

.node-card.is-lastheard:not(.is-talker) {
    border-color: rgba(217, 119, 6, 0.45);
    background:
        linear-gradient(135deg, rgba(217, 119, 6, 0.13), transparent 58%),
        var(--card);
}

.node-card-head {
    justify-content: space-between;
    gap: 8px;
}

.node-avatar {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    overflow: hidden;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.node-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.node-main-title {
    min-width: 0;
    flex: 1 1 auto;
}

.node-main-title h3 {
    margin: 0;
    overflow: visible;
    word-break: normal;
    overflow-wrap: anywhere;
    font-size: clamp(0.92rem, 1.5vw, 1.05rem);
    line-height: 1.05;
    letter-spacing: 0.015em;
}

.callsign-link {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    cursor: pointer;
}

.callsign-link:hover,
.callsign-link:focus-visible {
    color: var(--accent-2);
    outline: none;
}

.node-main-title p {
    margin: 2px 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: 0.72rem;
}

.node-state {
    flex: 0 0 auto;
    padding: 5px 7px;
    border-radius: 999px;
    color: var(--good);
    background: rgba(22, 163, 74, 0.12);
    font-size: 0.66rem;
    font-weight: 900;
    text-transform: uppercase;
}

.is-talker .node-state {
    color: #fff;
    background: var(--talk);
}

.is-lastheard:not(.is-talker) .node-state {
    color: var(--warn);
    background: rgba(217, 119, 6, 0.12);
}

.node-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin-top: 9px;
}

.meta-row {
    min-width: 0;
    padding: 6px 7px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--soft);
}

.meta-row span {
    display: block;
    color: var(--muted);
    font-size: 0.63rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.meta-row strong {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
    line-height: 1.18;
}

.compact-primary {
    grid-column: 1 / -1;
}

.compact-primary strong {
    white-space: normal;
}

.node-footer {
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.68rem;
}

.node-footer span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.node-footer span:first-child {
    flex: 0 0 auto;
}

.bad-version {
    color: var(--warn);
    font-weight: 900;
}

.info-stack {
    display: grid;
    gap: 10px;
}

.audio-level-meter {
    --audio-level: 0%;
    display: none;
    margin: 10px 0 8px;
    padding: 7px 9px 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--soft);
}

.player-audio-meter.is-enabled {
    display: block;
}

.audio-level-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 5px;
}

.audio-level-head span {
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.audio-level-head strong {
    color: var(--good);
    font-variant-numeric: tabular-nums;
    font-size: 0.72rem;
    font-weight: 950;
    transition: color 0.12s ease;
}

.audio-level-meter.is-optimal .audio-level-head strong {
    color: var(--warn);
}

.audio-level-meter.is-danger .audio-level-head strong {
    color: var(--talk);
}

.audio-level-track {
    position: relative;
    height: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        #4d7c0f 0%,
        #84cc16 70%,
        #f59e0b 70%,
        #f97316 90%,
        #dc2626 90%,
        #991b1b 100%
    );
    box-shadow: inset 0 1px 3px rgba(2, 6, 23, 0.30);
}

.audio-level-cover {
    position: absolute;
    z-index: 1;
    top: 0;
    right: 0;
    bottom: 0;
    left: var(--audio-level);
    background: var(--card-solid);
}

.audio-level-optimal,
.audio-level-clip {
    position: absolute;
    z-index: 2;
    top: 0;
    bottom: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.43rem;
    font-weight: 950;
    letter-spacing: 0.02em;
    line-height: 1;
    pointer-events: none;
}

.audio-level-optimal {
    left: 80%;
    width: 10%;
    border-left: 1px solid rgba(255, 255, 255, 0.44);
    border-right: 1px solid rgba(255, 255, 255, 0.44);
}

.audio-level-clip {
    left: 90%;
    width: 10%;
}

.audio-level-scale {
    position: relative;
    height: 10px;
    margin-top: 2px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    font-size: 0.52rem;
    font-weight: 800;
    line-height: 1;
}

.audio-level-scale span {
    position: absolute;
    top: 1px;
    white-space: nowrap;
}

.audio-level-scale span:nth-child(1) { left: 0; }
.audio-level-scale span:nth-child(2) { left: 70%; transform: translateX(-50%); }
.audio-level-scale span:nth-child(3) { left: 90%; transform: translateX(-50%); }
.audio-level-scale span:nth-child(4) { right: 0; }

.player-controls {
    gap: 8px;
    margin: 10px 0 8px;
}

.audio-activity-card {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 42px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--soft);
    transition: border-color 0.16s ease, background 0.16s ease;
}

.audio-activity-card span,
.audio-activity-card strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audio-activity-card span {
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.audio-activity-card strong {
    margin-top: 2px;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 900;
}

.audio-activity-card.is-playing {
    border-color: rgba(34, 197, 94, 0.48);
    background: rgba(34, 197, 94, 0.13);
}

.audio-activity-card.is-playing span {
    color: var(--good);
}

.audio-activity-card.is-recent {
    border-color: rgba(217, 119, 6, 0.34);
    background: rgba(217, 119, 6, 0.09);
}

.floating-player-setting {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 4px 0 10px;
    padding: 8px 9px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--soft);
    cursor: pointer;
}

.floating-player-setting > span {
    min-width: 0;
}

.floating-player-setting strong,
.floating-player-setting small {
    display: block;
}

.floating-player-setting strong {
    font-size: 0.76rem;
}

.floating-player-setting small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.66rem;
    line-height: 1.25;
}

.floating-player-setting input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.floating-player-setting i {
    position: relative;
    flex: 0 0 auto;
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: var(--line);
    transition: background 0.16s ease;
}

.floating-player-setting i::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.24);
    transition: transform 0.16s ease;
}

.floating-player-setting input:checked + i {
    background: var(--accent);
}

.floating-player-setting input:checked + i::after {
    transform: translateX(16px);
}

.floating-player-setting input:focus-visible + i {
    outline: 3px solid rgba(45, 212, 191, 0.28);
    outline-offset: 2px;
}

.listen-button {
    position: relative;
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    overflow: hidden;
    border-radius: 50%;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.20);
}

.listen-button::before {
    content: "";
    position: absolute;
    inset: -35%;
    opacity: 0;
    background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, 0.62), transparent 34%);
}

.listen-button.is-off {
    background: linear-gradient(135deg, #dc2626, #991b1b);
}

.listen-button.is-waiting {
    background: linear-gradient(135deg, #16a34a, #15803d);
    animation: playWaitPulse 1.35s ease-in-out infinite;
}

.listen-button.is-waiting::before {
    opacity: 0.45;
    animation: playSweep 1.5s linear infinite;
}

.listen-button.is-playing {
    background: linear-gradient(135deg, #22c55e, #06b6d4);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16), 0 0 26px rgba(34, 197, 94, 0.48);
    animation: playGlow 0.82s ease-in-out infinite;
}

.listen-button.is-playing::before {
    opacity: 0.62;
    animation: playSweep 0.9s linear infinite;
}

.listen-button.is-error {
    background: linear-gradient(135deg, #f59e0b, #dc2626);
}

.listen-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.play-icon {
    position: relative;
    z-index: 1;
    transform: translateX(1px);
    line-height: 1;
}

.play-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@keyframes playWaitPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.24); }
    50% { transform: scale(1.04); box-shadow: 0 0 0 7px rgba(22, 163, 74, 0.05); }
}

@keyframes playGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.22); }
}

@keyframes playSweep {
    to { transform: rotate(360deg); }
}

.player-note {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.scanner-box {
    margin-top: 10px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--soft);
}

.scanner-head,
.scanner-editor,
.scanner-chips {
    display: flex;
    align-items: center;
}

.scanner-head {
    justify-content: space-between;
    gap: 8px;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 900;
}

.scanner-editor {
    gap: 7px;
    margin-top: 8px;
}

.scanner-editor input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 11px;
    outline: none;
    color: var(--text);
    background: var(--card-solid);
    font-size: 0.8rem;
    font-weight: 800;
}

.mini-button {
    cursor: pointer;
    min-height: 30px;
    padding: 0 9px;
    border-radius: 10px;
    color: var(--text);
    background: var(--card-solid);
    font-size: 0.72rem;
    font-weight: 900;
}

.mini-button.accent {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.scanner-chips {
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.scanner-chip {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    color: var(--text);
    background: var(--card-solid);
    font-size: 0.74rem;
    font-weight: 900;
}

.scanner-chip b {
    color: var(--talk);
    font-size: 0.92rem;
    line-height: 1;
}

.scanner-empty {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
}

.scanner-note {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.3;
}

.info-list {
    margin: 8px 0 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 0;
    border-top: 1px solid var(--line);
}

.info-list dt {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.info-list dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 0.78rem;
    font-weight: 700;
}

.legend-list {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.legend-list li {
    padding: 7px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.empty-state {
    display: grid;
    place-items: center;
    min-height: 220px;
    padding: 24px;
    text-align: center;
    color: var(--muted);
}

.empty-state h3 {
    margin: 8px 0 4px;
    color: var(--text);
}

.empty-state p {
    margin: 0;
}

.empty-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--soft);
    font-size: 1.7rem;
}

@media (max-width: 980px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .nodes-panel {
        grid-column: 1;
        order: 1;
    }

    .info-stack {
        grid-column: 1;
        order: 2;
    }
}

@media (max-width: 680px) {
    .app-shell {
        width: min(100% - 12px, var(--max-width));
        padding-top: 0;
    }

    .top-bar {
        border-radius: 0 0 14px 14px;
    }

    .brand-title h1 {
        max-width: 44vw;
        font-size: 0.9rem;
    }

    .status-pill span:last-child {
        display: none;
    }

    .compact-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        margin: 8px 0;
    }

    .recent-activity-list {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding: 2px;
    }

    .recent-activity-card {
        flex: 0 0 auto;
    }

    .nodes-grid {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .node-card {
        min-height: auto;
    }

    .node-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .panel-card {
        padding: 10px;
        border-radius: 16px;
    }

    .floating-player-setting {
        display: flex;
    }

    .player-audio-meter {
        display: none !important;
    }

    .mobile-audio-meter.is-enabled {
        display: block;
        width: 100%;
        margin: 8px 0;
    }

    .listen-button {
        width: 46px;
        height: 46px;
    }

    .player-controls.is-floating-player {
        position: fixed;
        z-index: 10000;
        width: min(220px, calc(100vw - 16px));
        max-width: calc(100vw - 16px);
        margin: 0;
        padding: 5px;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: var(--card-solid);
        box-shadow: var(--shadow-strong);
        touch-action: none;
        user-select: none;
        -webkit-user-select: none;
    }

    .player-controls.is-floating-player.is-dragging {
        cursor: grabbing;
        box-shadow: 0 18px 44px rgba(2, 6, 23, 0.38);
    }

    .player-controls.is-floating-player .audio-activity-card {
        cursor: grab;
        border-radius: 999px;
        padding-left: 12px;
    }

    .player-controls.is-floating-player .listen-button {
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        min-height: 42px;
    }

    .scanner-editor {
        align-items: stretch;
        flex-direction: column;
    }

    .mini-button.accent {
        width: 100%;
    }
}

@media (min-width: 1280px) {
    .nodes-grid {
        grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    }
}


/* 20260707t: выравнивание общего контейнера и детализация карточек. */
.top-bar,
.recent-activity,
.compact-summary,
.dashboard-layout {
    width: 100%;
}

.app-shell {
    width: min(100% - 14px, var(--max-width));
}

.node-state-last-swap {
    position: relative;
    display: inline-grid;
    min-width: 52px;
    justify-items: center;
    overflow: hidden;
}

.node-state-last-swap .state-last,
.node-state-last-swap .state-online {
    grid-area: 1 / 1;
    transition: opacity 0.2s ease;
}

.node-state-last-swap .state-last {
    animation: lastOnlineLast 2.2s ease-in-out infinite;
}

.node-state-last-swap .state-online {
    animation: lastOnlineOnline 2.2s ease-in-out infinite;
}

@keyframes lastOnlineLast {
    0%, 42% { opacity: 1; transform: translateY(0); }
    55%, 100% { opacity: 0; transform: translateY(-4px); }
}

@keyframes lastOnlineOnline {
    0%, 42% { opacity: 0; transform: translateY(4px); }
    55%, 100% { opacity: 1; transform: translateY(0); }
}

.node-card.is-clickable::after {
    content: "Подробнее";
    position: absolute;
    right: 8px;
    bottom: 7px;
    padding: 3px 6px;
    border-radius: 999px;
    color: var(--muted);
    background: var(--soft);
    font-size: 0.56rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.node-card.is-clickable:hover::after,
.node-card.is-clickable:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.node-card.is-clickable.is-talker::after {
    content: "Подробнее";
    color: #fff;
    background: rgba(220, 38, 38, 0.86);
}

.node-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 16px;
}

.node-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
}

.node-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-height: min(86vh, 760px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--card-solid);
    box-shadow: var(--shadow-strong);
    padding: 18px;
}

.node-modal-close {
    cursor: pointer;
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--text);
    background: var(--soft);
    font-size: 1.4rem;
    line-height: 1;
}

.node-modal-head {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding-right: 42px;
}

.node-modal-avatar {
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    overflow: hidden;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-size: 1.35rem;
    font-weight: 950;
    letter-spacing: 0.04em;
}

.node-modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.node-modal-titlebox {
    min-width: 0;
}

.node-modal-titlebox h2 {
    overflow-wrap: anywhere;
    font-size: clamp(1.25rem, 3vw, 1.85rem);
}

.node-modal-titlebox p:not(.eyebrow) {
    margin: 6px 0 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.node-modal-state {
    justify-self: end;
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--good);
    background: rgba(22, 163, 74, 0.12);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.node-modal-state.is-talker {
    color: #fff;
    background: var(--talk);
}

.node-modal-state.is-lastheard {
    color: var(--warn);
    background: rgba(217, 119, 6, 0.13);
}

.node-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.node-detail-row {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px;
    background: var(--soft);
}

.node-detail-row.is-important {
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.12), var(--soft));
}

.node-detail-row span {
    display: block;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.node-detail-row strong {
    display: block;
    margin-top: 4px;
    overflow-wrap: anywhere;
    font-size: 0.9rem;
}

.node-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

body.has-node-modal {
    overflow: hidden;
}

body.has-audio-auth-modal {
    overflow: hidden;
}

.audio-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: grid;
    place-items: center;
    padding: 16px;
}

.audio-auth-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.78);
    /* Blur forces full-page repaints while typing on older mobile browsers. */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.audio-auth-dialog {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: calc(100vh - 32px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--card-solid);
    box-shadow: 0 26px 80px rgba(2, 6, 23, 0.45);
    padding: 24px;
}

.audio-auth-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--text);
    background: var(--soft);
    font-size: 1.35rem;
    line-height: 1;
}

.audio-auth-heading {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    padding-right: 34px;
}

.audio-auth-heading h2 {
    margin-top: 3px;
    font-size: 1.4rem;
}

.audio-auth-heading p:last-child {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.audio-auth-icon,
.audio-auth-mail-icon {
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: white;
    background: linear-gradient(135deg, #0891b2, #2563eb);
    box-shadow: 0 10px 24px rgba(8, 145, 178, 0.25);
}

.audio-auth-icon {
    width: 54px;
    height: 54px;
    font-size: 1.45rem;
}

.audio-auth-form {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

.audio-auth-form > label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
}

.audio-auth-form input {
    width: 100%;
    min-width: 0;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    color: var(--text);
    background: var(--soft);
    padding: 0 12px;
    font: inherit;
}

.audio-auth-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.14);
}

.audio-auth-contact {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.audio-auth-contact a {
    display: inline-block;
    margin-top: 4px;
    color: var(--accent-2);
    font-weight: 900;
}

.audio-auth-password-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 7px;
}

.audio-auth-password-row button {
    cursor: pointer;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    background: var(--soft);
}

.audio-auth-message {
    min-height: 1.25em;
    color: var(--talk);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.45;
}

.audio-auth-message.is-lock {
    padding: 10px 12px;
    border-radius: 12px;
    color: #b45309;
    background: rgba(245, 158, 11, 0.12);
}

.audio-auth-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.audio-auth-actions .mini-button {
    min-height: 40px;
    padding: 9px 15px;
}

.audio-auth-submit[disabled],
.audio-auth-actions button[disabled] {
    cursor: wait;
    opacity: 0.55;
}

.audio-auth-pending {
    display: grid;
    justify-items: center;
    gap: 10px;
    margin-top: 20px;
    text-align: center;
}

.audio-auth-pending[hidden] {
    display: none;
}

.audio-auth-mail-icon {
    width: 64px;
    height: 64px;
    font-size: 1.7rem;
}

.audio-auth-pending p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.audio-auth-timers {
    display: grid;
    gap: 5px;
    width: 100%;
    margin: 8px 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--soft);
    padding: 11px 13px;
    color: var(--muted);
    font-size: 0.8rem;
}

.audio-auth-timers strong {
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 680px) {
    .audio-auth-modal {
        padding: 9px;
    }

    .audio-auth-dialog {
        max-height: calc(100vh - 18px);
        border-radius: 20px;
        padding: 20px 16px;
    }

    .audio-auth-heading {
        grid-template-columns: 46px minmax(0, 1fr);
        gap: 10px;
    }

    .audio-auth-icon {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }

    .audio-auth-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }
}

@media (max-width: 680px) {
    .node-modal-head {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .node-modal-avatar {
        width: 72px;
        height: 72px;
        border-radius: 18px;
        font-size: 1rem;
    }

    .node-modal-state {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .node-modal-grid {
        grid-template-columns: 1fr;
    }
}

/* 20260707t: карточки всегда открывают подробности, модалка стала компактным текстовым паспортом ноды. */
.node-card.is-clickable::after {
    content: "Подробнее";
}

.node-card.is-clickable.is-talker::after {
    content: "Подробнее";
}

.node-modal-dialog {
    width: min(680px, 100%);
}

.node-modal-text {
    display: block;
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: var(--soft);
}

.node-detail-section {
    padding: 9px 12px 7px;
    color: var(--accent-strong);
    background: rgba(45, 212, 191, 0.08);
    border-top: 1px solid var(--line);
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.node-detail-section:first-child {
    border-top: 0;
}

.node-detail-row {
    display: grid;
    grid-template-columns: minmax(112px, 0.34fr) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-width: 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    padding: 8px 12px;
    background: transparent;
}

.node-detail-row.is-important {
    background: rgba(45, 212, 191, 0.055);
}

.node-detail-row span {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.node-detail-row strong {
    display: block;
    margin-top: 0;
    color: var(--text);
    overflow-wrap: anywhere;
    font-size: 0.9rem;
    line-height: 1.35;
}

.node-detail-link {
    color: var(--accent-2);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.node-detail-link:hover,
.node-detail-link:focus-visible {
    color: var(--accent);
    outline: none;
}

.node-modal-grid {
    grid-template-columns: 1fr;
}

@media (max-width: 680px) {
    .node-detail-row {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}

/* 20260707u: ускорение UI и масштабируемое окно подробностей. */
.node-card {
    contain: layout paint style;
    content-visibility: auto;
    contain-intrinsic-size: 190px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: transform 90ms ease, border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.node-card:hover {
    transform: translateY(-1px);
}

.nodes-grid {
    align-items: start;
}

.node-modal-backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.node-modal-dialog {
    resize: both;
    min-width: min(360px, calc(100vw - 32px));
    min-height: 320px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    will-change: transform;
}

.node-modal-dialog::after {
    content: "";
    position: sticky;
    float: right;
    display: block;
    width: 16px;
    height: 16px;
    margin: 4px -6px -8px 0;
    opacity: 0.55;
    background:
        linear-gradient(135deg, transparent 0 45%, var(--muted) 46% 55%, transparent 56%),
        linear-gradient(135deg, transparent 0 62%, var(--muted) 63% 70%, transparent 71%);
    pointer-events: none;
}

@media (max-width: 680px) {
    .node-modal-dialog {
        resize: none;
        width: calc(100vw - 18px);
        max-width: calc(100vw - 18px);
        max-height: calc(100vh - 18px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .node-card,
    .node-card:hover {
        transition: none;
        transform: none;
    }
}


/* 20260707w: возврат нормального вида карточек.
   Карточки снова заполняют ширину сетки, не имеют жёсткой высоты
   и не обрезают внутренние строки. Частоты остаются только в подробностях. */
.nodes-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    justify-content: stretch;
    align-items: stretch;
    grid-auto-rows: auto;
    gap: 8px;
}

.node-card {
    width: auto;
    height: auto;
    min-height: 132px;
    max-height: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.node-meta {
    flex: 0 0 auto;
    overflow: visible;
    align-content: stretch;
}

.node-footer {
    flex: 0 0 auto;
    min-height: 16px;
}

.node-card .meta-row {
    min-height: 0;
}

.node-card .meta-row:nth-child(n+4) {
    display: none;
}

@media (min-width: 1280px) {
    .nodes-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 680px) {
    .nodes-grid {
        grid-template-columns: 1fr;
    }

    .node-card {
        width: auto;
        min-height: 132px;
    }
}


/* 20260707x: корректная последняя активная нода и кнопка быстрого добавления TG. */
.node-card.is-clickable::after,
.node-card.is-clickable:hover::after,
.node-card.is-clickable:focus-visible::after,
.node-card.is-clickable.is-talker::after {
    display: none;
}

.node-footer {
    align-items: center;
}

.card-quick-listen {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 3px 7px;
    border: 1px solid rgba(45, 212, 191, 0.30);
    border-radius: 999px;
    color: var(--accent);
    background: rgba(45, 212, 191, 0.10);
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: transform 0.14s ease, background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.card-quick-listen:hover,
.card-quick-listen:focus-visible {
    transform: translateY(-1px);
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent;
    outline: none;
}

.node-card.is-talker .card-quick-listen {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(220, 38, 38, 0.86);
}

.node-card.is-lastheard:not(.is-talker) .card-quick-listen {
    color: var(--warn);
    border-color: rgba(217, 119, 6, 0.30);
    background: rgba(217, 119, 6, 0.12);
}

/* 20260710a: автоматический Lite-режим для старых компьютеров.
   Включается из app.js, если мало CPU/RAM, включён save-data/reduced-motion
   или браузер слишком старый для AudioWorklet. */
html.lite-mode,
body.lite-mode {
    scroll-behavior: auto !important;
}

body.lite-mode {
    background: var(--bg) !important;
}

.lite-mode *,
.lite-mode *::before,
.lite-mode *::after {
    animation: none !important;
    transition: none !important;
    filter: none !important;
    text-shadow: none !important;
}

.lite-mode .top-bar,
.lite-mode .panel-card,
.lite-mode .recent-activity,
.lite-mode .compact-summary article,
.lite-mode .node-card,
.lite-mode .node-modal-dialog {
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.lite-mode .node-modal-backdrop {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.lite-mode .node-card:hover,
.lite-mode .node-card:focus-visible,
.lite-mode .theme-toggle:hover,
.lite-mode .listen-button:hover,
.lite-mode .mini-button:hover {
    transform: none !important;
}

.lite-mode .node-card.is-talker {
    box-shadow: none !important;
}

.lite-mode .node-state-last-swap .state-last,
.lite-mode .node-state-last-swap .state-online {
    opacity: 1 !important;
    transform: none !important;
}

.lite-mode .node-state-last-swap .state-online {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
   Dynamic SVX player pool debug window
   ============================================================ */

.info-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.info-card-title-row h2 {
    margin: 0;
}

.player-pool-debug-button {
    flex: 0 0 auto;
}

.player-pool-debug-window {
    position: fixed;
    z-index: 1000;
    left: 24px;
    top: 76px;
    width: min(920px, calc(100vw - 48px));
    height: min(620px, calc(100vh - 100px));
    min-width: 360px;
    min-height: 260px;
    max-width: 100vw;
    max-height: 100vh;
    overflow: hidden;
    resize: both;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--card-solid);
    color: var(--text);
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.34);
}

.player-pool-debug-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 68px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--card);
    cursor: move;
    user-select: none;
    touch-action: none;
}

.player-pool-debug-head h2,
.player-pool-debug-head .eyebrow {
    margin: 0;
}

.player-pool-debug-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-pool-debug-live {
    max-width: 260px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-pool-debug-close {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--soft);
    color: var(--text);
    cursor: pointer;
    font-size: 1.6rem;
    line-height: 1;
}

.player-pool-debug-close:hover,
.player-pool-debug-close:focus-visible {
    border-color: var(--talk);
    color: var(--talk);
}

.player-pool-debug-body {
    height: calc(100% - 68px);
    padding: 12px;
    overflow: auto;
    overscroll-behavior: contain;
}

.player-pool-debug-placeholder,
.player-pool-debug-empty,
.player-pool-debug-error {
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--soft);
    color: var(--muted);
}

.player-pool-debug-error {
    border-color: var(--talk);
    color: var(--talk);
}

.player-pool-debug-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(100px, 1fr));
    gap: 8px;
}

.player-pool-debug-metric {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--soft);
}

.player-pool-debug-metric span,
.player-pool-debug-metric strong {
    display: block;
}

.player-pool-debug-metric span {
    color: var(--muted);
    font-size: 0.72rem;
}

.player-pool-debug-metric strong {
    margin-top: 3px;
    font-size: 1.1rem;
}

.player-pool-debug-section-title {
    margin: 16px 0 8px;
    font-size: 0.96rem;
}

.player-pool-debug-table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.player-pool-debug-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.player-pool-debug-table th,
.player-pool-debug-table td {
    padding: 8px 9px;
    border-bottom: 1px solid var(--line);
    border-right: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.player-pool-debug-table th:last-child,
.player-pool-debug-table td:last-child {
    border-right: 0;
}

.player-pool-debug-table tbody tr:last-child td {
    border-bottom: 0;
}

.player-pool-debug-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--card-solid);
    color: var(--muted);
    font-weight: 700;
}

.player-pool-debug-table td small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    white-space: nowrap;
}

.player-pool-debug-callsign,
.player-pool-debug-tg {
    white-space: nowrap;
}

.player-pool-debug-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--soft);
    font-weight: 700;
}

.player-pool-debug-status.is-online {
    background: var(--soft);
    color: var(--good);
}

.player-pool-debug-status.is-ошибка,
.player-pool-debug-problem {
    color: var(--talk);
}

.player-pool-debug-status.is-подключение {
    color: var(--warn);
}

.player-pool-debug-subscribers {
    display: grid;
    gap: 3px;
    margin-top: 4px;
}

.player-pool-debug-subscribers span {
    display: block;
    max-width: 330px;
    overflow-wrap: anywhere;
    color: var(--muted);
    font-size: 0.7rem;
}

.player-pool-debug-details {
    margin-top: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--soft);
}

.player-pool-debug-details summary {
    padding: 9px 10px;
    cursor: pointer;
    font-weight: 700;
}

.player-pool-debug-detail-body,
.player-pool-debug-events,
.player-pool-debug-free-list {
    padding: 0 10px 10px;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.72rem;
    overflow-wrap: anywhere;
}

.player-pool-debug-detail-body p,
.player-pool-debug-events p {
    margin: 5px 0 0;
}

@media (max-width: 720px) {
    .player-pool-debug-window {
        left: 8px;
        top: 8px;
        width: calc(100vw - 16px);
        height: calc(100vh - 16px);
        min-width: 0;
        min-height: 240px;
    }

    .player-pool-debug-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .player-pool-debug-live {
        display: none;
    }
}


/* ============================================================
   Info links, protected contact and resizable resource window
   ============================================================ */

.info-resources {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.info-resource-links {
    display: grid;
    gap: 5px;
}

.info-text-link {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 7px 4px;
    border-radius: 9px;
    background: transparent;
    color: var(--accent-2);
    cursor: pointer;
    text-align: left;
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--accent-2) 40%, transparent);
    text-underline-offset: 3px;
}

.info-text-link:hover,
.info-text-link:focus-visible {
    background: var(--soft);
    color: var(--accent);
    outline: none;
}

.info-text-link > span:first-child {
    flex: 0 0 auto;
    font-size: 1.05rem;
    text-decoration: none;
}

.telegram-join-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    min-height: 54px;
    padding: 9px 14px;
    border: 1px solid rgba(14, 165, 233, 0.35);
    border-radius: 14px;
    background: linear-gradient(135deg, #229ed9, #168acd);
    box-shadow: 0 10px 24px rgba(14, 165, 233, 0.22);
    color: #ffffff;
    text-decoration: none;
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.telegram-join-button:hover,
.telegram-join-button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(14, 165, 233, 0.30);
    outline: none;
}

.telegram-join-button small,
.telegram-join-button strong {
    display: block;
}

.telegram-join-button small {
    opacity: 0.82;
    font-size: 0.68rem;
}

.telegram-join-button strong {
    margin-top: 1px;
    font-size: 0.95rem;
}

.telegram-join-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1.1rem;
}

.info-join-card {
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--soft);
}

.info-join-card p {
    margin: 4px 0;
}

.info-join-title {
    color: var(--text);
    font-weight: 850;
}

.protected-email-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 9px;
}

.protected-email-row code {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--accent);
    font-size: 0.72rem;
    user-select: none;
}

.info-join-card > small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.67rem;
}

.info-resource-window {
    position: fixed;
    z-index: 1100;
    left: 32px;
    top: 48px;
    width: min(900px, calc(100vw - 64px));
    height: min(680px, calc(100vh - 80px));
    min-width: 380px;
    min-height: 300px;
    max-width: 100vw;
    max-height: 100vh;
    overflow: hidden;
    resize: both;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--card-solid);
    color: var(--text);
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.42);
}

.info-resource-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 68px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--card);
    cursor: move;
    user-select: none;
    touch-action: none;
}

.info-resource-titlebox,
.info-resource-head-actions {
    display: flex;
    align-items: center;
}

.info-resource-titlebox {
    min-width: 0;
    gap: 10px;
}

.info-resource-titlebox h2,
.info-resource-titlebox .eyebrow {
    margin: 0;
}

.info-resource-titlebox h2 {
    max-width: min(52vw, 620px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1rem;
}

.info-resource-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 12px;
    background: var(--soft);
    font-size: 1.2rem;
}

.info-resource-head-actions {
    flex: 0 0 auto;
    gap: 7px;
}

.info-resource-state {
    max-width: 180px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.info-resource-external,
.info-resource-close {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--soft);
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
}

.info-resource-external:hover,
.info-resource-external:focus-visible {
    border-color: var(--accent-2);
    color: var(--accent-2);
    outline: none;
}

.info-resource-close {
    font-size: 1.6rem;
}

.info-resource-close:hover,
.info-resource-close:focus-visible {
    border-color: var(--talk);
    color: var(--talk);
    outline: none;
}

.info-resource-body {
    position: relative;
    height: calc(100% - 68px);
    overflow: hidden;
    background: var(--bg);
}

.info-resource-body iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #ffffff;
}

.info-resource-loading {
    position: absolute;
    z-index: 2;
    inset: 12px 12px auto;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--card-solid);
    box-shadow: var(--shadow);
    color: var(--muted);
    font-size: 0.78rem;
    pointer-events: none;
}

.node-map-window,
.admin-window {
    position: fixed;
    z-index: 1200;
    left: 48px;
    top: 52px;
    width: min(980px, calc(100vw - 64px));
    height: min(700px, calc(100vh - 80px));
    min-width: 380px;
    min-height: 300px;
    max-width: 100vw;
    max-height: 100vh;
    overflow: hidden;
    resize: both;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--card-solid);
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.42);
}

.node-map-head,
.admin-window-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 68px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--card);
    cursor: move;
    user-select: none;
    touch-action: none;
}

.node-map-titlebox,
.node-map-head-actions,
.admin-window-head-actions {
    display: flex;
    align-items: center;
}

.node-map-titlebox { gap: 10px; }
.node-map-titlebox h2,
.admin-window-head h2 { margin: 0; font-size: 1rem; }
.node-map-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--soft); font-size: 1.2rem; }
.node-map-head-actions,
.admin-window-head-actions { gap: 7px; color: var(--muted); font-size: 0.75rem; }

.node-map-close,
.admin-window-close {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--soft);
    color: var(--text);
    cursor: pointer;
    font-size: 1.6rem;
}

.node-map-body { height: calc(100% - 68px); background: #dbeafe; }
#nodeMap { width: 100%; height: 100%; }
.node-map-tower { background: transparent; border: 0; }
.node-map-tower svg { display: block; filter: drop-shadow(0 2px 3px rgba(2, 6, 23, 0.35)); }
.node-map-window .leaflet-tooltip { border: 0; border-radius: 6px; padding: 2px 5px; background: rgba(15, 23, 42, 0.86); color: #fff; box-shadow: none; font-size: .66rem; font-weight: 500; line-height: 1.2; }
.node-map-window .leaflet-tooltip-top::before { border-top-color: rgba(15, 23, 42, 0.92); }
.node-map-window .leaflet-popup-content-wrapper { border-radius: 16px; background: #fff; color: #1f2937; box-shadow: 0 12px 30px rgba(15, 23, 42, .26); }
.node-map-window .leaflet-popup-tip { background: #fff; }
.node-map-window .leaflet-popup-content { margin: 15px 18px 16px; }
.node-map-popup { min-width: 210px; color: #1f2937; }
.node-map-popup-head { display: flex; align-items: center; gap: 9px; }
.node-map-popup-head h3 { min-width: 0; }
.node-map-popup-avatar { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; overflow: hidden; border-radius: 11px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); font-size: .72rem; font-weight: 900; letter-spacing: .03em; }
.node-map-popup-avatar img { width: 100%; height: 100%; object-fit: cover; }
.node-map-popup h3 { margin: 0; font-size: 1.05rem; line-height: 1.2; }
.node-map-popup h3 .callsign-link { color: #0f172a; text-decoration: none; }
.node-map-popup h3 .callsign-link:hover { text-decoration: underline; }
.node-map-popup-status { margin: 7px 0 11px; color: #166534; font-size: .78rem; font-weight: 900; }
.node-map-popup-status.is-talker { color: #b91c1c; }
.node-map-popup-details { padding-top: 9px; border-top: 1px solid #dbe2ea; }
.node-map-popup-section { margin: 10px 0 4px; color: #0f766e; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.node-map-popup-section:first-child { margin-top: 0; }
.node-map-popup-row { margin: 3px 0; font-size: .8rem; line-height: 1.35; overflow-wrap: anywhere; }
.node-map-popup-row span { color: #64748b; font-weight: 800; }
.node-map-popup-row strong { color: #1f2937; }
.node-map-popup-row a { color: #047857; text-decoration: underline; text-underline-offset: 2px; }
.node-map-popup-row a:hover { color: #065f46; }

.admin-auth-modal { position: fixed; inset: 0; z-index: 21000; display: grid; place-items: center; padding: 16px; }
.admin-auth-dialog { width: min(500px, 100%); }
.admin-window { z-index: 1300; width: min(1120px, calc(100vw - 64px)); height: min(760px, calc(100vh - 80px)); }
.admin-window-body { height: calc(100% - 68px); overflow: auto; padding: 16px; }
.admin-add-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.admin-add-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.admin-add-form label,
.admin-user-field { display: grid; gap: 5px; color: var(--muted); font-size: .76rem; font-weight: 800; }
.admin-add-form input,
.admin-user-field input { min-width: 0; height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 0 9px; color: var(--text); background: var(--card-solid); font: inherit; }
.admin-password-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.admin-add-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.admin-window-note { margin: 0 0 12px; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.admin-users-list { display: grid; gap: 10px; }
.admin-users-empty { margin: 0; padding: 16px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
.admin-user-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(180px, 1.4fr) minmax(170px, 1.3fr) auto; gap: 10px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.admin-user-password { display: grid; grid-template-columns: minmax(0, 1fr) 36px; gap: 5px; }
.admin-user-password button { border: 1px solid var(--line); border-radius: 9px; background: var(--soft); color: var(--text); cursor: pointer; }
.admin-user-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.admin-user-actions .mini-button[disabled], .admin-add-actions .mini-button[disabled] { opacity: .5; cursor: not-allowed; }
.admin-pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px; margin-top: 16px; }
.admin-pagination button { min-width: 34px; }
.admin-pagination button.is-current { border-color: var(--accent-2); color: var(--accent-2); }

@media (max-width: 820px) {
    .admin-window { left: 8px; top: 8px; width: calc(100vw - 16px); height: calc(100vh - 16px); min-width: 0; }
    .admin-add-form { grid-template-columns: 1fr; }
    .admin-user-row { grid-template-columns: 1fr; align-items: stretch; }
    .admin-user-actions { justify-content: flex-start; }
    .node-map-window { left: 8px; top: 8px; width: calc(100vw - 16px); height: calc(100vh - 16px); min-width: 0; }
}

@media (max-width: 720px) {
    .protected-email-row {
        align-items: stretch;
        flex-direction: column;
    }

    .info-resource-window {
        left: 8px;
        top: 8px;
        width: calc(100vw - 16px);
        height: calc(100vh - 16px);
        min-width: 0;
        min-height: 260px;
    }

    .info-resource-state {
        display: none;
    }
}
/* Footer and embedded node_info.json generator. */
.audio-level-optimal {
    left: 70%;
    width: 13.333%;
}

.audio-level-meter.is-clipping .audio-level-head strong {
    color: var(--talk);
}

.audio-level-meter.is-clipping .audio-level-track {
    border-color: color-mix(in srgb, var(--talk) 82%, white 18%);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--talk) 24%, transparent), inset 0 1px 3px rgba(2, 6, 23, 0.30);
}

.site-footer {
    display: grid;
    justify-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 20px 14px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
}

.site-footer-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;
}

.site-footer-button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--card-solid);
    color: var(--text);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.site-footer-button:hover {
    transform: translateY(-1px);
    border-color: var(--accent);
}

.site-footer-button.accent {
    border-color: color-mix(in srgb, var(--accent) 68%, var(--line));
    background: color-mix(in srgb, var(--accent) 14%, var(--card-solid));
}

.site-footer p {
    margin: 0;
    font-size: 0.73rem;
    letter-spacing: 0.025em;
}

.site-footer a {
    color: var(--accent);
    font-weight: 900;
}

body.has-node-info-generator {
    overflow: hidden;
}

.node-info-generator-modal {
    position: fixed;
    z-index: 22000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 12px;
}

.node-info-generator-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.68);
}

.node-info-generator-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(720px, calc(100vw - 24px));
    height: min(760px, calc(100vh - 24px));
    min-width: 420px;
    min-height: 360px;
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    flex-direction: column;
    overflow: hidden;
    resize: both;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--card-solid);
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.48);
}

.node-info-generator-head {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px 13px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--soft) 78%, var(--card-solid));
}

.node-info-generator-head h2,
.node-info-generator-head p {
    margin: 0;
}

.node-info-generator-head h2 {
    margin-top: 2px;
    font-size: 1.08rem;
}

.node-info-generator-head p:not(.eyebrow) {
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

.node-info-generator-close {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--card-solid);
    color: var(--text);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.node-info-generator-form {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 11px;
    overflow: auto;
    padding: 14px 16px 16px;
}

.node-info-generator-form fieldset {
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 13px;
}

.node-info-generator-form legend {
    padding: 0 6px;
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.node-info-generator-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.node-info-generator-grid label {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.node-info-generator-grid label.wide {
    grid-column: 1 / -1;
}

.node-info-generator-grid label > span {
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 850;
}

.node-info-generator-grid input,
.node-info-generator-grid select {
    width: 100%;
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 9px;
    outline: none;
    background: var(--soft);
    color: var(--text);
    font: inherit;
    font-size: 0.78rem;
}

.node-info-generator-grid input:focus,
.node-info-generator-grid select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}

.node-info-generator-grid select option {
    background: #ffffff;
    color: #111827;
}

.node-info-generator-grid input[type="file"] {
    padding: 5px 7px;
}

.node-info-generator-grid small {
    color: var(--muted);
    font-size: 0.62rem;
}

.node-info-generator-grid .node-info-generator-label-hint {
    margin-left: 3px;
    font-weight: 650;
    text-transform: none;
}

.node-info-generator-grid .node-info-generator-avatar-preview {
    display: flex;
    width: min(300px, 100%);
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--soft);
    color: var(--text);
    font-size: 0.68rem;
    text-transform: none;
}

.node-info-generator-avatar-preview img {
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    border-radius: 9px;
    object-fit: cover;
    background: var(--card-solid);
}

.node-info-generator-avatar-preview strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.node-info-generator-status {
    min-height: 32px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--soft);
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.35;
}

.node-info-generator-status.is-error {
    color: var(--talk);
    font-weight: 850;
}

.node-info-generator-result-wrap {
    display: flex;
    height: 76px;
    min-height: 76px;
    flex: 0 0 auto;
    flex-direction: column;
}

.node-info-generator-result-resizer {
    display: grid;
    width: 72px;
    height: 18px;
    min-height: 18px;
    align-self: center;
    flex: 0 0 auto;
    place-items: center;
    padding: 0;
    border: 0;
    outline: none;
    background: transparent;
    cursor: ns-resize;
    touch-action: none;
}

.node-info-generator-result-resizer span {
    width: 48px;
    height: 4px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--muted) 68%, transparent);
    transition: width 0.15s ease, background 0.15s ease;
}

.node-info-generator-result-resizer:hover span,
.node-info-generator-result-resizer:focus-visible span,
.node-info-generator-result-resizer.is-dragging span {
    width: 58px;
    background: var(--accent);
}

.node-info-generator-result-resizer:disabled {
    cursor: default;
    opacity: 0.45;
}

.node-info-generator-result {
    width: 100%;
    min-height: 58px;
    flex: 1 1 auto;
    margin: 0;
    overflow: auto;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #07101f;
    color: #c7f9e9;
    font: 0.66rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

.node-info-generator-result:empty::before {
    color: #7f8da3;
    content: 'Здесь появится готовый JSON';
}

.node-info-generator-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

@media (max-width: 560px) {
    .site-footer-actions,
    .site-footer-button {
        width: 100%;
    }

    .node-info-generator-modal {
        padding: 6px;
    }

    .node-info-generator-dialog {
        width: calc(100vw - 12px);
        height: calc(100vh - 12px);
        min-width: 0;
        min-height: 0;
        max-width: none;
        max-height: none;
        resize: none;
        border-radius: 14px;
    }

    .node-info-generator-grid {
        grid-template-columns: 1fr;
    }

    .node-info-generator-grid label.wide {
        grid-column: auto;
    }

    .node-info-generator-head {
        padding: 13px 13px 11px;
    }

    .node-info-generator-form {
        padding: 11px;
    }
}
