/* Force the button to be visible and on top */
#debugBtn {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 10000;
    /* display: inline-block !important; */
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Modal container */
#debugModal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: none;
    /* hidden until opened */
    background: rgba(0, 0, 0, .4);
}

/* Shown state */
#debugModal.open {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Panel styling */
#debugPanel {
    width: min(1000px, 95vw);
    max-height: 90vh;
    overflow: auto;
    background: #111;
    color: #eee;
    border-radius: 10px;
    padding: 16px;
    font: 12px/1.4 system-ui;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}

/* Table + log */
#dbgPeers table {
    width: 100%;
    border-collapse: collapse;
}

#dbgPeers th,
#dbgPeers td {
    border: 1px solid #333;
    padding: 4px 6px;
    text-align: left;
}

#dbgPeers th {
    background: #191919;
    position: sticky;
    top: 0;
}

#dbgLog {
    white-space: pre-wrap;
    background: #0b0b0b;
    border: 1px solid #333;
    padding: 8px;
    border-radius: 8px;
    max-height: 30vh;
    overflow: auto;
}



#debugPanel h3 {
    margin: .25rem 0;
}