html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}
/* Globe fills whatever the side panel leaves; Cesium picks up the resize on its next frame. */
body {
    display: flex;
    font: 13px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
}
#cesiumContainer {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
}
/* Pipeline stats overlay (js/points.js); hidden with ?stats=0 */
#pointStats {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 1000;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.65);
    color: #0f0;
    font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: pre;
    pointer-events: none;
    border-radius: 4px;
}

/* Side panel (js/inspector.js) */
#sidePanel {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    background: #1d1f23;
    color: #ddd;
    border-left: 1px solid #333;
}
body.panel-collapsed #sidePanel {
    display: none;
}
#panelToggle {
    display: none;
    position: fixed;
    top: 8px;
    right: 8px;
    z-index: 1000;
}
body.panel-collapsed #panelToggle {
    display: block;
}
#sidePanel button,
#panelToggle {
    background: #2e3238;
    color: #ddd;
    border: 1px solid #444;
    border-radius: 3px;
    padding: 2px 8px;
    font: inherit;
    cursor: pointer;
}
#sidePanel button:hover,
#panelToggle:hover {
    background: #3a4048;
}
.panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-bottom: 1px solid #333;
}
/* The list takes the spare height and scrolls; details sizes to its content. */
.panel:first-child {
    flex: 1 1 auto;
}
.panel header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #25282d;
}
.panel h2 {
    flex: 1;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.panel .count {
    margin-left: 4px;
    padding: 0 6px;
    border-radius: 8px;
    background: #3a4048;
    font-weight: normal;
}
.selection {
    flex: 1 1 auto;
    overflow-y: auto;
    margin: 0;
    padding: 4px 0;
    list-style: none;
}
.selection li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 10px;
    cursor: pointer;
}
.selection li:hover {
    background: #2a2e34;
}
.selection li.focused {
    background: #1f3a44;
    box-shadow: inset 3px 0 0 #0ff;
}
.selection li.empty {
    color: #888;
    cursor: default;
}
.selection li.empty:hover {
    background: none;
}
.selection .label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.selection button {
    padding: 0 6px !important;
}
.details {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3px 12px;
    margin: 0;
    padding: 8px 10px;
}
.details dt {
    color: #999;
}
.details dd {
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    overflow-wrap: anywhere;
}
.actions {
    display: flex;
    gap: 6px;
    padding: 0 10px 10px;
}
.actions[hidden] {
    display: none;
}
.swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    border: 1px solid #0008;
    border-radius: 50%;
    vertical-align: -1px;
}

/* Bad Apple playback bar (js/badapple.js) */
#playbackBar {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #1d1f23;
    color: #ddd;
    border: 1px solid #444;
    border-radius: 4px;
}
#playbackBar button {
    background: #2e3238;
    color: #ddd;
    border: 1px solid #444;
    border-radius: 3px;
    padding: 2px 8px;
    font: inherit;
    cursor: pointer;
}
#playbackBar button:hover {
    background: #3a4048;
}
#playbackBar input[type="range"] {
    width: 400px;
}
#playbackBar input[data-role="volume"] {
    width: 80px;
}
#playbackBar [data-role="time"] {
    min-width: 90px;
    font-variant-numeric: tabular-nums;
}
