/* Styles for `sphere.html`, loaded after `app.css` so the shared tokens and
 * components are already in scope. Rules written the same way in three or
 * more pages belong in `app.css` instead: `tests/test_shared_styles.py`
 * fails when one is copied that far.
 */
.sphere-page {
    padding: 16px;
    height: calc(100vh - 57px);
    display: flex;
    gap: 12px;
}
.sphere-sidebar {
    width: 310px;
    min-width: 260px;
    background: #12151b;
    border: 1px solid #252a35;
    border-radius: 2px;
    padding: 12px;
    overflow: auto;
}
body.light-mode .sphere-sidebar {
    background: #fff;
    border-color: #d7dce6;
}
.sphere-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sphere-topbar {
    background: #12151b;
    border: 1px solid #252a35;
    border-radius: 2px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
body.light-mode .sphere-topbar {
    background: #fff;
    border-color: #d7dce6;
}
.sphere-topbar input[type=text], .sphere-topbar input[type=range] {
    accent-color: #d4a54a;
}
.sphere-input {
    background: #0c0e12;
    color: #d6d9e0;
    border: 1px solid #252a35;
    border-radius: 2px;
    padding: 6px 8px;
    font-size: 0.84rem;
}
body.light-mode .sphere-input {
    background: #fff;
    color: #1f2937;
    border-color: #d7dce6;
}
.sphere-btn {
    background: #181c24;
    color: #d4a54a;
    border: 1px solid #d4a54a;
    border-radius: 2px;
    padding: 6px 10px;
    font-size: 0.78rem;
    cursor: pointer;
}
.sphere-btn:hover {
    background: #d4a54a;
    color: #0c0e12;
}
body.light-mode .sphere-btn {
    background: #f3f4f6;
    color: #92660a;
    border-color: #b8891e;
}
body.light-mode .sphere-btn:hover {
    background: #d4a54a;
    color: #fff;
}
.sphere-status {
    font-size: 0.74rem;
    color: #9aa2af;
    min-height: 1em;
}
.sphere-status.success { color: #7fb18a; }
.sphere-status.error { color: #c3787d; }
.sphere-graph {
    flex: 1;
    min-height: 360px;
    background: #12151b;
    border: 1px solid #252a35;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}
body.light-mode .sphere-graph {
    background: #fff;
    border-color: #d7dce6;
}
.sphere-tooltip {
    position: absolute;
    pointer-events: none;
    background: #181c24;
    border: 1px solid #252a35;
    color: #d6d9e0;
    border-radius: 2px;
    padding: 6px 8px;
    font-size: 0.74rem;
    z-index: 10;
    opacity: 0;
    transform: translate(-50%, -120%);
}
body.light-mode .sphere-tooltip {
    background: #fff;
    border-color: #d7dce6;
    color: #1f2937;
}
.sphere-section-title {
    margin: 0 0 8px 0;
    font-size: 0.82rem;
    color: #9aa2af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
body.light-mode .sphere-section-title { color: #6b7280; }
body.light-mode .sphere-legend-item { color: #1f2937; }
body.light-mode .sphere-proximity-item { color: #1f2937; }
.sphere-proximity-item {
    margin-bottom: 6px;
    font-size: 0.78rem;
}
.sphere-proximity-bar {
    height: 6px;
    border-radius: 2px;
    background: rgba(212, 165, 74, 0.25);
    margin-top: 3px;
}
.sphere-checkboxes {
    max-height: 220px;
    overflow: auto;
    border: 1px solid #252a35;
    border-radius: 2px;
    padding: 6px;
}
body.light-mode .sphere-checkboxes {
    border-color: #d7dce6;
}
.sphere-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 0.78rem;
}
.sphere-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.autocomplete-list {
    position: absolute;
    margin-top: 2px;
    background: #12151b;
    border: 1px solid #252a35;
    border-radius: 2px;
    max-height: 180px;
    overflow: auto;
    width: 240px;
    z-index: 20;
}
body.light-mode .autocomplete-list {
    background: #fff;
    border-color: #d7dce6;
}
.autocomplete-item {
    padding: 6px 8px;
    cursor: pointer;
    font-size: 0.78rem;
}
.autocomplete-item:hover {
    background: #181c24;
}
body.light-mode .autocomplete-item:hover {
    background: #f3f4f6;
}
@media (max-width: 980px) {
    .sphere-page {
        flex-direction: column;
        height: auto;
    }
    .sphere-sidebar {
        width: 100%;
        min-width: 0;
    }
}
