:root {
    --bg-color: #f4f7f6;
    --panel-bg: #ffffff;
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #4b5563;
    --secondary-hover: #374151;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --text-color: #1f2937;
    --border-color: #cbd5e1;
}

*:not(mjx-container):not(mjx-container *) {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 1.2rem 1rem;
    display: flex;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
}

.container {
    max-width: 1100px;
    width: 100%;
}

/* Top Navigation Bar */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

.nav-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #1e293b;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    min-height: 40px;
}

.nav-home-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: var(--primary-color);
    transform: translateY(-1px);
}

.nav-dept-tag {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

@media (max-width: 600px) {
    .nav-dept-tag {
        display: none;
    }
}

header {
    text-align: center;
    margin-bottom: 1.5rem;
}

header h1 {
    font-size: 2.1rem;
    color: #0f172a;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

header p {
    color: #64748b;
    font-size: 0.95rem;
}

.series-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.series-card h3 {
    font-size: 1rem;
    color: #1e3a8a;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.series-card p {
    font-size: 0.88rem;
    color: #4b5563;
    line-height: 1.55;
    margin-bottom: 0.5rem;
}

.series-card .series-tagline {
    font-weight: 700;
    color: #111827;
    font-style: italic;
}

/* Rigid Grid Layout Track Guards */
.sim-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
    .sim-layout {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    /* Option A: Visualizer & 3D canvas render on top; controls follow naturally below */
    .visualizer-panel {
        order: 1;
    }

    .controls-panel {
        order: 2;
        max-height: none;
        overflow-y: visible;
        padding-right: 1.5rem;
        padding-bottom: 1.5rem;
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }
}

.panel {
    background: var(--panel-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.controls-panel {
    max-height: min(calc(100vh - 120px), 760px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 1.25rem;
    padding-bottom: 2.5rem; /* Generous scroll cleat so concepts box is never cut off */
    box-sizing: border-box;
}

/* Custom slim scrollbar for controls panel */
.controls-panel::-webkit-scrollbar {
    width: 6px;
}
.controls-panel::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}
.controls-panel::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.controls-panel::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.control-group {
    margin-bottom: 1.15rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px dashed var(--border-color);
}

.control-group h3 {
    font-size: 1rem;
    margin-bottom: 0.45rem;
    color: #334155;
}

/* Mode Switcher Buttons */
.mode-toggle-group {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.mode-btn {
    flex: 1;
    padding: 0.55rem 0.5rem;
    border: 1px solid var(--border-color);
    background: #f8fafc;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.mode-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.mode-btn.active {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.25);
}

.hidden-control {
    display: none !important;
}

/* Stepper & Slider Row: Rigid Dimension Guard */
.slider-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.35rem;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    flex-wrap: nowrap;
}

@media (max-width: 680px) {
    .mode-toggle-group {
        display: flex;
        flex-direction: column;
        gap: 0.45rem;
        width: 100%;
    }

    .mode-btn {
        width: 100%;
        padding: 0.65rem 0.85rem;
        font-size: 0.85rem;
        min-height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .slider-row {
        display: flex;
        flex-wrap: wrap;
        height: auto;
        min-height: auto;
        max-height: none;
        gap: 0.35rem 0.5rem;
        margin-bottom: 0.85rem;
        align-items: center;
    }

    .slider-row label {
        flex: 1;
        width: auto;
        min-width: 0;
        max-width: none;
        font-size: 0.85rem;
    }

    .slider-row .stat-badge {
        flex: 0 0 auto;
        width: auto;
        min-width: 78px;
        max-width: none;
        margin-left: auto;
        order: 2;
        padding: 0.25rem 0.6rem;
    }

    .slider-row .stepper-container {
        flex: 0 0 100%;
        width: 100%;
        order: 3;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-top: 0.15rem;
    }

    .stepper-container .step-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        font-size: 1.25rem;
        border-radius: 8px;
    }

    .stepper-container input[type="range"] {
        flex: 1;
        min-width: 0;
        height: 8px;
    }
}

.slider-row label {
    font-size: 0.84rem;
    font-weight: 600;
    width: 110px;
    min-width: 110px;
    max-width: 110px;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stepper-container {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
    min-width: 0;
}

.stepper-container input[type="range"] {
    flex: 1;
    min-width: 0;
    cursor: pointer;
    min-height: 24px;
    accent-color: var(--primary-color);
}

/* Step Buttons */
.step-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border: 1px solid #cbd5e1;
    background: #f1f5f9;
    color: #1e293b;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.step-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.step-btn:active {
    background: #cbd5e1;
    transform: scale(0.95);
}

.stat-badge {
    background: #e2e8f0;
    padding: 0.25rem 0.45rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.82rem;
    width: 88px;
    min-width: 88px;
    max-width: 88px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex-shrink: 0;
}

.slider-hint {
    font-size: 0.74rem;
    color: #64748b;
    font-style: italic;
    line-height: 1.35;
    margin-top: 0.2rem;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.button-split-row {
    display: flex;
    gap: 0.5rem;
}

.button-split-row .btn {
    flex: 1;
}

.btn {
    width: 100%;
    padding: 0.65rem;
    border: none;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.btn-primary { background-color: var(--primary-color); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); }

.btn-secondary { background-color: var(--secondary-color); color: white; }
.btn-secondary:hover { background-color: var(--secondary-hover); }

.btn-neutral { background-color: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; }
.btn-neutral:hover { background-color: #e2e8f0; color: #0f172a; }

.concepts-box {
    background-color: #f8fafc;
    padding: 1.1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #6366f1;
    user-select: text;
    -webkit-user-select: text;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.concepts-box h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.concepts-box ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.concepts-box li {
    font-size: 0.83rem;
    margin-bottom: 0.6rem;
    line-height: 1.5;
    color: #475569;
}

.concepts-box li strong {
    color: #1e293b;
}

.visualizer-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
}

/* Rigid 4-Column Grid Stats Bar with Responsive Wrap */
/* Responsive 4-Column Grid Stats Bar */
.stats-bar {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.6rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    box-sizing: border-box;
}

@media (max-width: 820px) {
    .stats-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .stats-bar {
        grid-template-columns: 1fr;
    }
}

.stat-item {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 6px;
    padding: 0.45rem 0.6rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    min-width: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.stat-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: normal;
    word-break: break-word;
    line-height: 1.25;
}

.stat-label em {
    font-style: italic;
    font-family: 'Times New Roman', Times, serif;
    font-weight: 700;
    font-size: 0.78rem;
}

.stat-label sub {
    font-size: 0.62rem;
    vertical-align: sub;
}

.stat-data {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.stat-value {
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.unit {
    font-size: 0.78rem;
    font-weight: 700;
    color: #2563eb;
    text-transform: none !important;
    white-space: nowrap;
}

/* Fixed-Height Status Banner Variants */
#status-badge {
    width: 100%;
    min-height: 34px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.45rem 0.85rem;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.35;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    overflow: visible;
    text-overflow: unset;
    box-sizing: border-box;
    transition: all 0.25s ease;
}

.status-normal {
    background-color: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.status-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.status-alert {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
    animation: pulseAlert 1.2s infinite alternate;
}

.status-charging {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}

.status-optimal {
    background-color: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde047;
}

.status-paused {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

@keyframes pulseAlert {
    from { box-shadow: 0 0 0px rgba(239, 68, 68, 0); }
    to { box-shadow: 0 0 10px rgba(239, 68, 68, 0.4); }
}

/* Interactive View Mode Toolbar */
.zoom-toolbar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    min-height: 32px;
}

.zoom-label {
    font-size: 0.74rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.zoom-btn-group {
    display: flex;
    gap: 0.3rem;
}

.zoom-btn {
    padding: 0.22rem 0.6rem;
    border: 1px solid var(--border-color);
    background: #f8fafc;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-text-short {
    display: none;
}
.btn-text-full {
    display: inline;
}

@media (max-width: 680px) {
    .zoom-toolbar {
        flex-direction: column;
        align-items: stretch;
        height: auto;
        min-height: auto;
        gap: 0.35rem;
        margin-bottom: 0.6rem;
    }
    .zoom-label {
        font-size: 0.74rem;
        text-align: left;
    }
    .zoom-btn-group {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.35rem;
        width: 100%;
    }
    .zoom-btn {
        padding: 0.45rem 0.2rem;
        font-size: 0.74rem;
        text-align: center;
        white-space: nowrap;
    }
    .btn-text-full {
        display: none;
    }
    .btn-text-short {
        display: inline;
    }
}

.zoom-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.zoom-btn.active {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

.canvas-container {
    width: 100%;
    aspect-ratio: 11 / 10;
    background: #080c14;
    border: 1px solid #1e293b;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

/* Mobile height & area expansion so 3D model and streamlines are never cramped */
@media (max-width: 768px) {
    .canvas-container {
        aspect-ratio: auto;
        height: 380px;
        min-height: 350px;
        max-height: 55vh;
    }
}

/* Floating Gesture Hint Overlay */
.gesture-hint {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.78);
    color: #94a3b8;
    font-size: 0.72rem;
    padding: 4px 9px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    transition: opacity 1.2s ease;
    z-index: 5;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.hint-touch {
    display: none;
}
.hint-desktop {
    display: inline;
}

@media (max-width: 768px), (pointer: coarse) {
    .hint-desktop {
        display: none;
    }
    .hint-touch {
        display: inline;
    }
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
    cursor: grab;
}

canvas:active {
    cursor: grabbing;
}

/* Admission Callout Box */
.admission-card { 
    background: linear-gradient(135deg, #1e3a8a, #0f172a); 
    color: #ffffff; 
    padding: 1.5rem; 
    border-radius: 12px; 
    display: flex; 
    flex-wrap: wrap; 
    align-items: center; 
    justify-content: space-between; 
    gap: 1.5rem; 
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); 
    position: relative; 
    border: 2px solid transparent; 
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) { 
    .admission-card { 
        flex-direction: column; 
        text-align: left; 
        gap: 1.25rem; 
        padding: 1.25rem 1.5rem;
    } 
    .program-grid { 
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
        gap: 0.75rem;
    } 
    .promo-actions { 
        width: 100%; 
        flex-direction: row;
    } 
    .promo-actions .promo-button {
        flex: 1;
    }
}

@media (max-width: 520px) {
    .program-grid {
        grid-template-columns: 1fr;
    }
    .promo-actions {
        flex-direction: column;
    }
}

.attention-flash { 
    animation: bannerGlowPulse 3s infinite ease-in-out; 
}

@keyframes bannerGlowPulse { 
    0% { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); border-color: transparent; } 
    50% { box-shadow: 0 0 20px 4px rgba(251, 191, 36, 0.4); border-color: rgba(251, 191, 36, 0.6); } 
    100% { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); border-color: transparent; } 
}

.promo-copy .promo-kicker { 
    color: #60a5fa; 
    font-weight: 600; 
    text-transform: uppercase; 
    font-size: 0.8rem; 
    letter-spacing: 0.05em; 
    margin-bottom: 0.2rem; 
}

.promo-copy .promo-lead { 
    color: #ffffff; 
    font-weight: 600; 
    font-size: 1.05rem; 
    margin-bottom: 0.25rem; 
}

.promo-copy .promo-headline { 
    color: #fcd34d; 
    font-weight: 800; 
    font-size: 1.45rem; 
    line-height: 1.25; 
}

.program-grid { 
    display: flex; 
    gap: 1.5rem; 
    flex: 1; 
    justify-content: center; 
}

.program-card { 
    background: rgba(255, 255, 255, 0.08); 
    padding: 0.75rem 1rem; 
    border-radius: 8px; 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    font-size: 0.85rem; 
    display: flex; 
    flex-direction: column; 
    gap: 0.2rem; 
}

.program-card strong { color: #fcd34d; font-size: 0.95rem; } 
.program-card span { color: #e2e8f0; } 
.program-card small { color: #94a3b8; font-style: italic; }

.promo-actions { 
    display: flex; 
    flex-direction: column; 
    gap: 0.5rem; 
    min-width: 160px; 
}

.promo-button { 
    padding: 0.65rem 1.2rem; 
    border-radius: 6px; 
    font-weight: 700; 
    text-decoration: none; 
    transition: all 0.2s ease; 
    text-align: center; 
    font-size: 0.9rem; 
    min-height: 44px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.main-cta { background-color: #fbbf24; color: #0f172a; } 
.main-cta:hover { background-color: #f59e0b; transform: translateY(-1px); }

.sub-cta { background-color: transparent; color: #e2e8f0; border: 1px solid rgba(255, 255, 255, 0.3); } 
.sub-cta:hover { background-color: rgba(255, 255, 255, 0.1); color: #fff; border-color: #fff; }

/* Feedback & Suggestions Card */
.feedback-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

@media (max-width: 800px) {
    .feedback-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .feedback-btn {
        width: 100%;
        text-align: center;
    }
}

.feedback-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.feedback-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #eff6ff;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feedback-text h4 {
    font-size: 0.95rem;
    color: #0f172a;
    margin-bottom: 0.2rem;
}

.feedback-text p {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.4;
}

.feedback-btn {
    padding: 0.65rem 1.1rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #1e3a8a;
    font-weight: 700;
    font-size: 0.86rem;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
}

.feedback-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: var(--primary-hover);
}

.series-footer { 
    text-align: center; 
    padding: 1.5rem 0 0; 
    border-top: 1px solid #e5e7eb; 
    margin-top: 1.5rem; 
}

.series-footer p { 
    font-size: 0.82rem; 
    color: #64748b; 
    font-weight: 500; 
}

/* On-Screen Viewport Legend Overlay */
.viewport-legend {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 6px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    pointer-events: none;
    z-index: 5;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-family: 'Segoe UI', monospace;
    font-weight: 600;
    color: #e2e8f0;
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .viewport-legend {
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        padding: 5px 8px;
        gap: 6px 12px;
        justify-content: center;
        background: rgba(8, 12, 20, 0.92);
    }
    .legend-item {
        font-size: 0.65rem;
        gap: 4px;
    }
    .legend-dot {
        width: 7px;
        height: 7px;
    }
}
/* Readouts, status lines and labels wrap instead of being cut off. */
.slider-row label {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}
.slider-row label { line-height: 1.2; }
