* {
    box-sizing: border-box;
}

:root {
    --bg: #0f172a;
    --panel: rgba(15, 23, 42, 0.9);
    --panel-soft: rgba(30, 41, 59, 0.72);
    --line: rgba(148, 163, 184, 0.34);
    --text: #e5e7eb;
    --muted: #94a3b8;
    --cyan: #7dd3fc;
    --green: #86efac;
    --yellow: #fde68a;
    --pink: #f472b6;
    --red: #fca5a5;
}

body {
    position: relative;
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(rgba(125, 211, 252, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(125, 211, 252, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 50% 0%, rgba(20, 184, 166, 0.15), transparent 32rem),
        #0f172a;
    background-size: 44px 44px, 44px 44px, auto, auto;
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

body::before {
    background:
        linear-gradient(rgba(125, 211, 252, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(125, 211, 252, 0.025) 1px, transparent 1px);
    background-size: 100% 4px, 56px 100%;
    opacity: 0.36;
    mix-blend-mode: screen;
}

.topbar,
.app-with-ads,
.info-section,
.site-footer {
    position: relative;
    z-index: 1;
}

body::after {
    background:
        radial-gradient(circle at 20% 18%, rgba(125, 211, 252, 0.08), transparent 18rem),
        radial-gradient(circle at 80% 8%, rgba(244, 114, 182, 0.05), transparent 16rem);
    opacity: 0.75;
}

.topbar {
    display: grid;
    grid-template-columns: minmax(190px, 260px) minmax(0, 1fr) minmax(240px, 330px);
    align-items: center;
    gap: 20px;
    padding: 18px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(2, 6, 23, 0.62);
    backdrop-filter: blur(12px);
}

.brand-logo {
    display: grid;
    gap: 3px;
    justify-self: start;
    color: inherit;
    line-height: 1.1;
    text-decoration: none;
}

.brand-logo span {
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 800;
}

.brand-logo strong {
    color: var(--text);
    font-size: 30px;
    font-weight: 900;
    letter-spacing: 0;
}

.hero-copy {
    text-align: center;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--cyan);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.topbar h1 {
    margin: 0;
    font-size: 28px;
    letter-spacing: 0;
}

.header-status {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.status-pill {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.82);
    font-size: 12px;
    font-weight: 900;
}

.status-pill.is-active {
    border-color: rgba(134, 239, 172, 0.65);
    color: var(--green);
    box-shadow:
        0 0 18px rgba(34, 197, 94, 0.15),
        inset 0 0 14px rgba(34, 197, 94, 0.08);
    animation: signalPulse 1.6s ease-in-out infinite;
}

.status-pill.is-muted,
.status-pill.is-offline {
    border-color: rgba(252, 165, 165, 0.42);
    color: var(--red);
}

.app-with-ads {
    width: min(1780px, calc(100% - 32px));
    margin: 22px auto;
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr) 160px;
    gap: 18px;
    align-items: start;
}

.side-ad {
    position: sticky;
    top: 16px;
    min-height: 600px;
}

.ad-box {
    min-height: 600px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.72);
    color: var(--muted);
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 12px;
    text-align: center;
}

.ad-label {
    color: rgba(148, 163, 184, 0.72);
    font-size: 11px;
    letter-spacing: 0.14em;
    font-weight: 800;
}

.ad-box .adsbygoogle {
    width: 100%;
    min-height: 560px;
}

.app.four-pane {
    width: 100%;
    display: grid;
    grid-template-columns: 220px minmax(420px, 1.1fr) 230px 230px;
    gap: 12px;
    align-items: start;
}

.hud-status-strip {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 10px;
    border: 1px solid rgba(125, 211, 252, 0.22);
    border-radius: 8px;
    padding: 10px;
    background:
        linear-gradient(90deg, rgba(8, 47, 73, 0.34), rgba(30, 41, 59, 0.58)),
        rgba(2, 6, 23, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hud-status-strip::before {
    content: "TAB SHARE ONLY / LOCAL ANALYSIS / NO SERVER UPLOAD";
    grid-column: 1 / -1;
    color: rgba(125, 211, 252, 0.78);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.hud-exit-btn {
    display: none;
    align-self: stretch;
    width: auto;
    min-width: 128px;
    min-height: 100%;
    border: 1px solid rgba(125, 211, 252, 0.32);
    border-radius: 8px;
    background: rgba(125, 211, 252, 0.14);
    color: var(--cyan);
    font-size: 12px;
}

.hud-status-strip div {
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.64);
}

.hud-status-strip span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.hud-status-strip strong {
    display: block;
    margin-top: 6px;
    overflow: hidden;
    color: var(--cyan);
    font-size: 17px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.left-pane,
.center-pane,
.right-pane-a,
.right-pane-b {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.center-pane {
    position: relative;
}

.idle-signal-overlay,
.stream-start-overlay,
.awaiting-signal-overlay,
.lock-acquired-overlay,
.level-surge-overlay,
.burst-detected-overlay {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 58px;
    z-index: 5;
    min-height: 228px;
    border: 1px solid rgba(125, 211, 252, 0.36);
    border-radius: 8px;
    background:
        linear-gradient(rgba(125, 211, 252, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(125, 211, 252, 0.05) 1px, transparent 1px),
        rgba(2, 6, 23, 0.88);
    background-size: 100% 8px, 48px 100%, auto;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 10px;
    text-align: center;
    pointer-events: none;
    box-shadow:
        inset 0 0 36px rgba(56, 189, 248, 0.08),
        0 18px 42px rgba(0, 0, 0, 0.28);
}

.idle-signal-overlay {
    color: var(--cyan);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.32s ease, transform 0.32s ease, visibility 0.32s ease;
}

.idle-signal-overlay strong,
.stream-start-overlay strong,
.awaiting-signal-overlay strong,
.lock-acquired-overlay strong,
.level-surge-overlay strong,
.burst-detected-overlay strong {
    color: var(--cyan);
    font-size: 34px;
    font-weight: 950;
    letter-spacing: 0.08em;
    line-height: 1;
    text-shadow: 0 0 18px rgba(125, 211, 252, 0.36);
}

.idle-signal-overlay span,
.stream-start-overlay span,
.awaiting-signal-overlay span,
.lock-acquired-overlay span,
.level-surge-overlay span,
.burst-detected-overlay span {
    color: #e0f2fe;
    font-size: 15px;
    font-weight: 950;
    letter-spacing: 0.16em;
}

.idle-signal-overlay small {
    color: var(--red);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.16em;
}

.stream-start-overlay,
.awaiting-signal-overlay,
.lock-acquired-overlay,
.level-surge-overlay,
.burst-detected-overlay {
    border-color: rgba(134, 239, 172, 0.48);
    color: var(--green);
    opacity: 0;
    transform: scale(0.98);
    visibility: hidden;
}

.stream-start-overlay strong,
.awaiting-signal-overlay strong,
.lock-acquired-overlay strong {
    color: var(--green);
    text-shadow: 0 0 20px rgba(134, 239, 172, 0.42);
}

.stream-start-overlay strong {
    max-width: 100%;
    font-size: 24px;
    line-height: 1.2;
}

.awaiting-signal-overlay {
    border-color: rgba(253, 230, 138, 0.44);
}

.awaiting-signal-overlay strong {
    color: var(--yellow);
    text-shadow: 0 0 20px rgba(253, 230, 138, 0.34);
}

.awaiting-signal-overlay small {
    color: var(--red);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.16em;
}

.level-surge-overlay {
    border-color: rgba(253, 230, 138, 0.68);
}

.level-surge-overlay strong {
    color: var(--yellow);
    text-shadow: 0 0 22px rgba(253, 230, 138, 0.42);
}

.burst-detected-overlay {
    border-color: rgba(252, 165, 165, 0.72);
}

.burst-detected-overlay strong {
    color: var(--red);
    text-shadow: 0 0 22px rgba(252, 165, 165, 0.48);
}

body.stream-active .idle-signal-overlay {
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
}

body.lock-acquired .lock-acquired-overlay {
    animation: lockAcquireFlash 1.3s ease-out;
    visibility: visible;
}

body.stream-start .stream-start-overlay {
    animation: streamStartFlash 1.25s ease-out;
    visibility: visible;
}

body.awaiting-signal .awaiting-signal-overlay {
    opacity: 1;
    transform: scale(1);
    visibility: visible;
    animation: awaitingSignalScan 1.8s ease-in-out infinite;
}

body.level-surge .level-surge-overlay {
    animation: surgeOverlayFlash 0.95s ease-out;
    visibility: visible;
}

body.jump-burst .burst-detected-overlay {
    animation: burstOverlayFlash 1.25s ease-out;
    visibility: visible;
}

.left-pane,
.right-pane-a,
.right-pane-b {
    position: sticky;
    top: 12px;
}

.panel {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
        var(--panel);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 18px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.panel::before,
.panel::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    pointer-events: none;
}

.panel::before {
    top: 8px;
    left: 8px;
    border-top: 1px solid rgba(125, 211, 252, 0.42);
    border-left: 1px solid rgba(125, 211, 252, 0.42);
}

.panel::after {
    right: 8px;
    bottom: 8px;
    border-right: 1px solid rgba(125, 211, 252, 0.28);
    border-bottom: 1px solid rgba(125, 211, 252, 0.28);
}

.panel h2,
.control-group h2 {
    margin: 0 0 12px;
    color: #cbd5e1;
    font-size: 12px;
    letter-spacing: 0.16em;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.panel-heading span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.mode-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.mode-badges span,
.mode-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    padding: 4px 9px;
    background: rgba(148, 163, 184, 0.09);
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}

.mode-badge.is-active {
    border-color: rgba(125, 211, 252, 0.44);
    background: rgba(8, 47, 73, 0.34);
    color: var(--cyan);
}

.source-badge {
    display: grid;
    gap: 5px;
    place-items: center;
    min-height: 84px;
    border: 2px dashed rgba(125, 211, 252, 0.52);
    border-radius: 8px;
    color: var(--cyan);
    background: rgba(8, 47, 73, 0.32);
    font-size: 18px;
    font-weight: 900;
}

.source-badge span,
.source-badge small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.source-badge strong {
    color: var(--cyan);
    font-size: 22px;
    line-height: 1;
}

.source-panel p {
    margin: 12px 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.share-guide {
    display: grid;
    gap: 8px;
    margin: 12px 0;
    padding: 0;
    list-style: none;
    counter-reset: share-step;
}

.share-guide li {
    position: relative;
    min-height: 30px;
    padding: 8px 8px 8px 34px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.32);
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.55;
}

.share-guide li::before {
    counter-increment: share-step;
    content: counter(share-step);
    position: absolute;
    top: 8px;
    left: 8px;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(125, 211, 252, 0.18);
    color: var(--cyan);
    font-size: 11px;
    font-weight: 900;
}

button,
select {
    width: 100%;
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
}

button {
    cursor: pointer;
    background: #38bdf8;
    color: #082f49;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

button:hover:not(:disabled) {
    filter: brightness(1.08);
}

.primary-btn {
    background: var(--cyan);
    color: #082f49;
}

#evpModeBtn[aria-pressed="true"] {
    background: var(--pink);
    color: #1e1b4b;
    box-shadow: 0 0 18px rgba(244, 114, 182, 0.22);
}

#spiritModeBtn[aria-pressed="true"] {
    background: var(--yellow);
    color: #422006;
    box-shadow: 0 0 18px rgba(253, 230, 138, 0.22);
}

.danger-btn {
    margin-top: 10px;
    background: #ef4444;
    color: #fff;
}

select {
    appearance: none;
    background:
        linear-gradient(45deg, transparent 50%, #94a3b8 50%),
        linear-gradient(135deg, #94a3b8 50%, transparent 50%),
        rgba(148, 163, 184, 0.18);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px),
        0 0;
    background-size: 6px 6px, 6px 6px, 100% 100%;
    background-repeat: no-repeat;
    color: var(--text);
}

select option {
    background: #0f172a;
    color: var(--text);
}

.control-group {
    display: grid;
    gap: 10px;
}

.control-group + .control-group {
    margin-top: 16px;
}

.error-box {
    margin-top: 12px;
    border: 1px solid rgba(252, 165, 165, 0.52);
    border-radius: 8px;
    padding: 12px;
    background: rgba(127, 29, 29, 0.26);
    color: var(--red);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.6;
}

#waveformCanvas,
#spectrumCanvas {
    display: block;
    width: 100%;
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.72);
}

#waveformCanvas {
    height: 150px;
}

#spectrumCanvas {
    height: 360px;
}

.spectrum-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.spectrum-labels.is-circle {
    display: none;
}

.meter-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 46px;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
}

.meter-row span {
    color: var(--cyan);
    font-size: 12px;
    font-weight: 900;
}

.meter-row strong {
    color: var(--text);
    font-size: 13px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.meter {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
}

.meter-fill {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #22c55e, #eab308, #ef4444);
    transition: width 0.06s linear;
}

.peak-fill {
    background: linear-gradient(90deg, #38bdf8, #f472b6);
}

.status-grid,
.event-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.status-grid div,
.event-grid div,
.band-grid div {
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
    padding: 12px 8px;
    background: var(--panel-soft);
    text-align: center;
}

.status-grid span,
.event-grid span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.status-grid strong,
.event-grid strong {
    display: block;
    margin-top: 7px;
    color: var(--text);
    font-size: 14px;
}

.event-grid .is-hot {
    color: var(--yellow);
}

.event-log {
    display: grid;
    gap: 7px;
    max-height: 196px;
    overflow: hidden;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.event-log li {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
    padding: 8px 9px;
    background: rgba(2, 6, 23, 0.44);
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.event-log li:first-child {
    border-color: rgba(125, 211, 252, 0.38);
    color: var(--text);
    background: rgba(8, 47, 73, 0.32);
}

.event-log time {
    color: var(--cyan);
    font-variant-numeric: tabular-nums;
}

.event-log span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.band-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.band-grid div {
    color: var(--text);
    font-size: 11px;
    font-weight: 900;
}

.band-grid strong {
    display: block;
    margin-top: 7px;
    color: var(--cyan);
    font-size: 20px;
}

.band-comment {
    margin-top: 12px;
    border-radius: 8px;
    padding: 12px;
    background: rgba(56, 189, 248, 0.12);
    color: var(--cyan);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.45;
    text-align: center;
}

.roadmap-panel ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.roadmap-panel li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
    padding: 10px;
    background: rgba(148, 163, 184, 0.09);
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.roadmap-panel li strong {
    color: var(--cyan);
    font-size: 11px;
}

.info-section,
.comments-section,
.site-footer {
    width: min(1500px, calc(100% - 64px));
    margin: 0 auto 24px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.info-card,
.comments-section,
.site-footer {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

.info-card {
    padding: 18px;
}

.comments-section {
    padding: 18px;
}

.comments-section .app-comments,
.comments-section .app-comment-form-section {
    border-color: rgba(148, 163, 184, 0.22);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
        rgba(2, 6, 23, 0.36) !important;
    color: var(--text);
}

.comments-section .app-comments h2,
.comments-section .app-comment-form-section h2 {
    color: var(--cyan);
}

.comments-section .app-comment-count,
.comments-section .app-comment-page-status,
.comments-section .app-comment-meta,
.comments-section .app-comments-empty,
.comments-section .app-comment-body,
.comments-section .app-comment-message,
.comments-section .app-comment-form label {
    color: var(--muted);
}

.comments-section .app-comment-card,
.comments-section .app-comment-pagination {
    border-color: rgba(148, 163, 184, 0.2);
}

.comments-section .app-comment-rating {
    color: var(--yellow);
}

.comments-section .app-comment-admin-reply,
.comments-section .app-comment-reply {
    border-color: rgba(125, 211, 252, 0.34);
    background: rgba(8, 47, 73, 0.22);
}

.comments-section .app-comment-admin-reply-title,
.comments-section .app-comment-reply-form-wrap summary,
.comments-section .app-comment-pagination a {
    color: var(--cyan);
}

.comments-section .app-comment-form input,
.comments-section .app-comment-form select,
.comments-section .app-comment-form textarea {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.72) !important;
    color: var(--text);
    padding: 10px 12px;
}

.comments-section .app-comment-form input:focus,
.comments-section .app-comment-form select:focus,
.comments-section .app-comment-form textarea:focus {
    border-color: rgba(125, 211, 252, 0.62);
    outline: 2px solid rgba(125, 211, 252, 0.16);
}

.comments-section .app-comment-form button {
    width: auto;
    min-width: 160px;
    border-radius: 999px;
    background: var(--cyan);
    color: #082f49;
}

.info-card-wide {
    grid-column: 1 / -1;
}

.info-card h2 {
    margin: 0 0 12px;
    color: var(--cyan);
    font-size: 18px;
}

.guide-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.guide-block {
    min-width: 0;
}

.guide-block h3 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 15px;
}

.guide-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.guide-list div {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
    padding: 12px;
    background: rgba(2, 6, 23, 0.34);
}

.guide-list dt {
    color: var(--cyan);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.guide-list dd {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.75;
}

.info-card p,
.site-footer p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
}

.site-footer {
    padding: 18px;
    text-align: center;
}

.site-footer p {
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
}

.footer-links a {
    color: var(--cyan);
    font-weight: 800;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

body.stream-active .source-badge {
    border-color: rgba(134, 239, 172, 0.75);
    color: var(--green);
    box-shadow: inset 0 0 24px rgba(34, 197, 94, 0.12);
}

body.stream-active .source-badge strong,
body.stream-active .hud-link-cell strong {
    color: var(--green);
    animation: activeBlink 1.2s ease-in-out infinite;
}

body.stream-active .app {
    position: relative;
}

body.stream-active .app::before {
    content: "";
    position: absolute;
    inset: -10px;
    z-index: -1;
    border-radius: 12px;
    border: 1px solid rgba(134, 239, 172, 0.16);
    opacity: 0.8;
    pointer-events: none;
    animation: hudScan 2.8s linear infinite;
}

body.stream-start .hud-status-strip,
body.stream-start .source-panel,
body.stream-start .waveform-panel,
body.stream-start .spectrum-panel {
    animation: bootPanelFlash 1.25s ease-out;
}

body.lock-acquired .hud-status-strip,
body.lock-acquired .waveform-panel,
body.lock-acquired .spectrum-panel,
body.lock-acquired .monitor-panel {
    animation: bootPanelFlash 1.3s ease-out;
}

body.signal-locked .spectrum-panel,
body.signal-locked .waveform-panel {
    border-color: rgba(125, 211, 252, 0.58);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 0 1px rgba(125, 211, 252, 0.08),
        0 18px 50px rgba(0, 0, 0, 0.25),
        0 0 28px rgba(56, 189, 248, 0.14);
}

body.awaiting-signal .spectrum-panel,
body.awaiting-signal .waveform-panel,
body.awaiting-signal .status-panel {
    border-color: rgba(253, 230, 138, 0.34);
}

body.awaiting-signal .hud-status-strip div:nth-child(2) strong,
body.awaiting-signal .status-grid div:nth-child(3) strong {
    color: var(--yellow);
    text-shadow: 0 0 12px rgba(253, 230, 138, 0.22);
}

body.signal-locked .hud-status-strip {
    border-color: rgba(125, 211, 252, 0.46);
}

body.signal-locked .hud-status-strip div:nth-child(2) strong {
    color: var(--green);
    text-shadow: 0 0 14px rgba(134, 239, 172, 0.24);
}

body.silence-detected .status-panel {
    border-color: rgba(252, 165, 165, 0.4);
}

body.signal-jump .monitor-panel,
body.signal-jump .event-panel,
body.signal-jump .spectrum-panel {
    animation: jumpFlash 0.9s ease-out;
}

body.jump-burst .monitor-panel,
body.jump-burst .event-panel,
body.jump-burst .status-panel,
body.jump-burst .spectrum-panel,
body.jump-burst .waveform-panel {
    animation: burstFlash 1.3s ease-out;
}

body.signal-jump #maxJump,
body.signal-jump #jumpImpact,
body.jump-burst #maxJump,
body.jump-burst #jumpImpact {
    color: var(--yellow);
    text-shadow: 0 0 14px rgba(253, 230, 138, 0.36);
}

body.jump-burst #jumpImpact {
    color: var(--red);
    text-shadow: 0 0 16px rgba(252, 165, 165, 0.46);
}

body.evp-mode .spectrum-panel {
    border-color: rgba(244, 114, 182, 0.46);
}

body.evp-mode .event-panel {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 18px 50px rgba(0, 0, 0, 0.25),
        0 0 24px rgba(244, 114, 182, 0.08);
}

body.evp-trace .event-panel,
body.evp-trace .spectrum-panel {
    animation: evpTrace 1.1s ease-out;
}

body.spirit-mode .roadmap-panel {
    border-color: rgba(253, 230, 138, 0.38);
}

body.spirit-anomaly .status-panel,
body.spirit-anomaly .roadmap-panel {
    animation: spiritAnomaly 1s ease-out;
}

body.voice-like .roadmap-panel li:nth-child(4) strong {
    color: var(--yellow);
    text-shadow: 0 0 14px rgba(253, 230, 138, 0.4);
}

body.hud-mode {
    background: #020617;
}

body.hud-mode .topbar,
body.hud-mode .source-panel,
body.hud-mode .info-section,
body.hud-mode .comments-section,
body.hud-mode .site-footer,
body.hud-mode .side-ad {
    display: none;
}

body.hud-mode .app-with-ads {
    display: block;
    width: min(1280px, calc(100% - 24px));
    margin: 12px auto;
}

body.hud-mode .app.four-pane {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 12px;
}

body.hud-mode .left-pane {
    display: none;
}

body.hud-mode .center-pane {
    grid-column: 1;
}

body.hud-mode .right-pane-a {
    grid-column: 2;
}

body.hud-mode .right-pane-b {
    position: static;
    grid-column: 2;
}

body.hud-mode .status-panel,
body.hud-mode .band-panel,
body.hud-mode .event-panel,
body.hud-mode .roadmap-panel {
    padding: 14px;
}

body.hud-mode #spectrumCanvas {
    height: 520px;
}

body.hud-mode .hud-exit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@keyframes signalPulse {
    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.25);
    }
}

@keyframes hudScan {
    0% {
        box-shadow: 0 -18px 38px rgba(134, 239, 172, 0.03);
    }

    50% {
        box-shadow: 0 0 38px rgba(125, 211, 252, 0.13);
    }

    100% {
        box-shadow: 0 18px 38px rgba(134, 239, 172, 0.03);
    }
}

@keyframes activeBlink {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.58;
    }
}

@keyframes streamStartFlash {
    0% {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
        filter: brightness(1);
    }

    16% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: brightness(1.22);
    }

    68% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-8px) scale(1.01);
        filter: brightness(1);
    }
}

@keyframes lockAcquireFlash {
    0% {
        opacity: 0;
        transform: scale(0.96);
        filter: brightness(1);
    }

    18% {
        opacity: 1;
        transform: scale(1);
        filter: brightness(1.24);
    }

    72% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1.02);
        filter: brightness(1);
    }
}

@keyframes awaitingSignalScan {
    0%,
    100% {
        box-shadow:
            inset 0 0 28px rgba(253, 230, 138, 0.06),
            0 18px 42px rgba(0, 0, 0, 0.28);
        filter: brightness(1);
    }

    50% {
        box-shadow:
            inset 0 0 42px rgba(253, 230, 138, 0.12),
            0 0 32px rgba(253, 230, 138, 0.08);
        filter: brightness(1.08);
    }
}

@keyframes surgeOverlayFlash {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.97);
        filter: brightness(1);
    }

    18% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: brightness(1.28);
    }

    66% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-8px) scale(1.03);
        filter: brightness(1);
    }
}

@keyframes burstOverlayFlash {
    0% {
        opacity: 0;
        transform: scale(0.94);
        filter: brightness(1);
    }

    14% {
        opacity: 1;
        transform: scale(1.02);
        filter: brightness(1.32);
    }

    38% {
        opacity: 0.78;
        transform: scale(1);
    }

    56% {
        opacity: 1;
        transform: scale(1.01);
    }

    100% {
        opacity: 0;
        transform: scale(1.04);
        filter: brightness(1);
    }
}

@keyframes bootPanelFlash {
    0% {
        border-color: rgba(134, 239, 172, 0.92);
        box-shadow:
            inset 0 0 24px rgba(134, 239, 172, 0.16),
            0 0 36px rgba(56, 189, 248, 0.22);
        filter: brightness(1.22);
    }

    48% {
        border-color: rgba(125, 211, 252, 0.76);
        box-shadow:
            inset 0 0 18px rgba(56, 189, 248, 0.12),
            0 0 30px rgba(134, 239, 172, 0.16);
    }

    100% {
        border-color: var(--line);
        filter: brightness(1);
    }
}

@keyframes jumpFlash {
    0% {
        border-color: rgba(253, 230, 138, 0.82);
        box-shadow: 0 0 32px rgba(234, 179, 8, 0.26);
    }

    100% {
        border-color: var(--line);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.04),
            0 18px 50px rgba(0, 0, 0, 0.25);
    }
}

@keyframes burstFlash {
    0% {
        border-color: rgba(239, 68, 68, 0.9);
        box-shadow: 0 0 42px rgba(239, 68, 68, 0.28);
        filter: brightness(1.24);
    }

    45% {
        border-color: rgba(253, 230, 138, 0.82);
        box-shadow: 0 0 34px rgba(253, 230, 138, 0.22);
    }

    100% {
        border-color: var(--line);
        filter: brightness(1);
    }
}

@keyframes evpTrace {
    0% {
        border-color: rgba(244, 114, 182, 0.88);
        box-shadow: 0 0 36px rgba(244, 114, 182, 0.3);
        filter: brightness(1.2);
    }

    100% {
        border-color: var(--line);
        filter: brightness(1);
    }
}

@keyframes spiritAnomaly {
    0% {
        border-color: rgba(253, 230, 138, 0.88);
        box-shadow: 0 0 38px rgba(253, 230, 138, 0.24);
        filter: brightness(1.18);
    }

    100% {
        border-color: var(--line);
        filter: brightness(1);
    }
}

@media (max-width: 1500px) {
    .app-with-ads {
        width: min(100% - 24px, 1500px);
        display: block;
    }

    .side-ad {
        display: none;
    }
}

@media (max-width: 1180px) {
    .app.four-pane {
        grid-template-columns: 240px minmax(0, 1fr);
    }

    .hud-status-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hud-exit-btn {
        grid-column: 1 / -1;
        min-height: 42px;
    }

    .right-pane-a,
    .right-pane-b {
        position: static;
        grid-column: span 1;
    }

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

@media (max-width: 760px) {
    .topbar {
        grid-template-columns: 1fr;
        padding: 16px 20px;
    }

    .hero-copy {
        text-align: left;
    }

    .topbar h1 {
        font-size: 24px;
    }

    .header-status {
        grid-template-columns: 1fr;
    }

    .app.four-pane,
    body.hud-mode .app.four-pane {
        display: block;
    }

    .hud-status-strip {
        grid-template-columns: 1fr 1fr;
        margin-bottom: 12px;
    }

    .hud-status-strip div {
        padding: 9px;
    }

    .hud-status-strip strong {
        font-size: 14px;
    }

    .panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .idle-signal-overlay,
    .stream-start-overlay,
    .awaiting-signal-overlay,
    .lock-acquired-overlay,
    .level-surge-overlay,
    .burst-detected-overlay {
        left: 12px;
        right: 12px;
        top: 54px;
        min-height: 190px;
    }

    .idle-signal-overlay strong,
    .stream-start-overlay strong,
    .awaiting-signal-overlay strong,
    .lock-acquired-overlay strong,
    .level-surge-overlay strong,
    .burst-detected-overlay strong {
        font-size: 24px;
    }

    .stream-start-overlay strong {
        font-size: 18px;
    }

    .idle-signal-overlay span,
    .stream-start-overlay span,
    .awaiting-signal-overlay span,
    .lock-acquired-overlay span,
    .level-surge-overlay span,
    .burst-detected-overlay span {
        font-size: 12px;
    }

    .mode-badges {
        justify-content: flex-start;
    }

    .left-pane,
    .right-pane-a,
    .right-pane-b {
        position: static;
    }

    .panel {
        margin-bottom: 12px;
    }

    #waveformCanvas {
        height: 132px;
    }

    #spectrumCanvas,
    body.hud-mode #spectrumCanvas {
        height: 300px;
    }

    .info-section,
    .comments-section,
    .site-footer {
        width: min(100% - 24px, 1500px);
    }

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

    .guide-columns {
        grid-template-columns: 1fr;
    }
}
