/* =========================================================
   Quest 3 VR Splat Studio — Modern Glassmorphic Stylesheet
   ========================================================= */

:root {
    --bg-dark: #0a0b10;
    --card-bg: rgba(16, 18, 28, 0.78);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-border-glow: rgba(0, 243, 255, 0.3);
    
    --accent-cyan: #00f3ff;
    --accent-cyan-rgb: 0, 243, 255;
    --accent-purple: #a855f7;
    --accent-purple-rgb: 168, 85, 247;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-glass: 0 12px 40px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -webkit-font-smoothing: antialiased;
}

/* Site Global Header Integration */
#main-nav-placeholder {
    position: relative;
    z-index: 1000;
}

/* 3D Canvas Viewport */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    outline: none;
    cursor: grab;
}

#canvas-container:active {
    cursor: grabbing;
}

/* Reusable Glass Panel Utility */
.xr-panel,
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: 18px;
    box-shadow: var(--shadow-glass);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.xr-panel:hover,
.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.14);
    transform: none; /* Prevent global stylesheet translateY conflict */
}

/* =========================================================
   Top Control Toolbar
   ========================================================= */

.xr-toolbar,
.xr-toolbar:hover,
#xr-toolbar,
#xr-toolbar:hover {
    position: fixed !important;
    top: 76px !important;
    left: 50% !important;
    transform: translateX(-50%) !important; /* Strictly lock center positioning */
    z-index: 100 !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 18px;
    width: min(94vw, 1140px);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast) !important;
}

.toolbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-badge {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.18), rgba(168, 85, 247, 0.18));
    border: 1px solid rgba(0, 243, 255, 0.4);
    color: var(--accent-cyan);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.brand-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    background: linear-gradient(120deg, #ffffff 40%, var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
    outline: none;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.96);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.16), rgba(168, 85, 247, 0.22));
    border: 1px solid rgba(0, 243, 255, 0.45);
    color: #ffffff;
    box-shadow: 0 0 16px rgba(0, 243, 255, 0.18);
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.26), rgba(168, 85, 247, 0.35));
    border-color: var(--accent-cyan);
    box-shadow: 0 0 24px rgba(0, 243, 255, 0.32);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
}

.btn-ghost {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.btn-pill {
    background: rgba(0, 243, 255, 0.2);
    color: var(--accent-cyan);
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
}

/* =========================================================
   WebXR AR & VR Buttons Custom Styling
   ========================================================= */

.xr-buttons-mount {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.xr-enter-bar {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 10050;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    pointer-events: auto;
    background: rgba(8, 10, 16, 0.92);
    border: 1px solid rgba(0, 243, 255, 0.35);
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

.xr-bar-status,
.xr-start-status {
    margin: 0;
    width: 100%;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-amber);
}

.xr-enter-ar-main,
.xr-enter-vr-main {
    min-width: 240px !important;
    min-height: 64px !important;
    font-size: 20px !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 243, 255, 0.35);
}

.xr-start-status:empty {
    display: none;
}

.xr-dom-overlay {
    display: none;
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10000;
}

.xr-dom-overlay.active {
    display: block;
}

.xr-dom-overlay button {
    pointer-events: auto;
    position: absolute;
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(10, 12, 20, 0.75);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.xr-btn-mount,
.vr-button-mount,
.ar-button-mount {
    display: flex;
    align-items: center;
}

button#ARButton,
button#VRButton,
.xr-enter-ar,
.xr-enter-vr {
    position: static !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 132px !important;
    min-height: 48px !important;
    height: auto !important;
    left: auto !important;
    bottom: auto !important;
    padding: 12px 22px !important;
    border-radius: 12px !important;
    font-family: var(--font-sans) !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: all var(--transition-fast) !important;
    white-space: nowrap !important;
    z-index: 200 !important;
    border: none !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(0, 243, 255, 0.35);
}

button#ARButton,
.xr-enter-ar {
    /* Vibrant Cyan & Blue Gradient with Pulsing Glow */
    background: linear-gradient(135deg, #00f3ff, #0284c7) !important;
    color: #000000 !important;
    font-weight: 800 !important;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.45) !important;
    animation: pulse-glow-ar 3s infinite ease-in-out;
}

button#ARButton:hover,
.xr-enter-ar:hover {
    transform: translateY(-1px) scale(1.03) !important;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.75) !important;
}

button#ARButton:active,
.xr-enter-ar:active {
    transform: scale(0.96) !important;
}

button#VRButton,
.xr-enter-vr {
    /* Radiant Violet & Indigo Gradient with Pulsing Glow */
    background: linear-gradient(135deg, #a855f7, #6366f1) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.45) !important;
    animation: pulse-glow-vr 3s infinite ease-in-out;
}

button#VRButton:hover,
.xr-enter-vr:hover {
    transform: translateY(-1px) scale(1.03) !important;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.75) !important;
}

button#VRButton:active,
.xr-enter-vr:active {
    transform: scale(0.96) !important;
}

/* Disabled buttons */
button#ARButton:disabled,
button#ARButton[disabled],
button#VRButton:disabled,
button#VRButton[disabled] {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-muted) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
    animation: none !important;
    cursor: not-allowed !important;
    opacity: 0.85 !important;
}

@keyframes pulse-glow-ar {
    0%, 100% {
        box-shadow: 0 0 16px rgba(0, 243, 255, 0.35);
    }
    50% {
        box-shadow: 0 0 26px rgba(0, 243, 255, 0.65), 0 0 10px rgba(0, 243, 255, 0.4);
    }
}

@keyframes pulse-glow-vr {
    0%, 100% {
        box-shadow: 0 0 16px rgba(168, 85, 247, 0.35);
    }
    50% {
        box-shadow: 0 0 26px rgba(168, 85, 247, 0.65), 0 0 10px rgba(99, 102, 241, 0.4);
    }
}

/* =========================================================
   Floating Telemetry & Quick Action Card
   ========================================================= */

.telemetry-card {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 90;
    width: 310px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.telemetry-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-muted);
}

.status-indicator.live {
    background-color: var(--accent-emerald);
    box-shadow: 0 0 8px var(--accent-emerald);
}

.status-indicator.loading {
    background-color: var(--accent-amber);
    box-shadow: 0 0 8px var(--accent-amber);
    animation: pulse-dot 1s infinite alternate;
}

@keyframes pulse-dot {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

.active-filename {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.telemetry-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    background: rgba(0, 0, 0, 0.25);
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-cyan);
}

.telemetry-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.btn-micro {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 7px 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-micro:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.18);
}

.btn-micro.active {
    background: rgba(0, 243, 255, 0.14);
    color: var(--accent-cyan);
    border-color: rgba(0, 243, 255, 0.35);
}

.btn-micro:disabled {
    opacity: 0.38;
    pointer-events: none;
    cursor: default;
}

/* =========================================================
   Loading Progress Dialog
   ========================================================= */

.loading-dialog,
.loading-dialog:hover {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 200;
    padding: 24px 28px;
    width: min(90vw, 420px);
    display: none;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(0, 243, 255, 0.3);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 243, 255, 0.15);
}

.loading-dialog.active {
    display: flex;
}

.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(0, 243, 255, 0.2);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.loading-title-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.loading-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.loading-percent {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-cyan);
}

.loading-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.loading-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    border-radius: 999px;
    transition: width 0.15s ease-out;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.loading-subtitle {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

/* =========================================================
   Drag & Drop Overlay
   ========================================================= */

.drop-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(10, 11, 16, 0.88);
    backdrop-filter: blur(16px);
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.drop-overlay.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.drop-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 50px 70px;
    border: 2px dashed rgba(0, 243, 255, 0.6);
    border-radius: 28px;
    background: rgba(16, 20, 32, 0.6);
    box-shadow: 0 0 60px rgba(0, 243, 255, 0.2);
    text-align: center;
    transform: scale(0.96);
    transition: transform var(--transition-fast);
}

.drop-overlay.active .drop-overlay-content {
    transform: scale(1);
}

.drop-icon-wrapper {
    color: var(--accent-cyan);
    animation: float-icon 2s infinite ease-in-out;
}

@keyframes float-icon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.drop-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
}

.drop-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.drop-subtitle code {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-cyan);
    padding: 2px 6px;
    border-radius: 5px;
    font-family: var(--font-mono);
}

/* =========================================================
   Controls Cheat Sheet Modal
   ========================================================= */

.controls-modal {
    position: fixed;
    inset: 0;
    z-index: 400;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.controls-modal.active {
    display: flex;
    opacity: 1;
}

.controls-modal-card {
    width: min(92vw, 540px);
    max-height: 85vh;
    overflow-y: auto;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transform: scale(0.96);
    transition: transform var(--transition-fast);
}

.controls-modal.active .controls-modal-card {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 14px;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(120deg, #ffffff 40%, var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    border-radius: 6px;
    transition: color var(--transition-fast);
}

.btn-close:hover {
    color: #ffffff;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.controls-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.section-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.section-badge.vr {
    color: var(--accent-cyan);
}

.section-badge.desktop {
    color: var(--accent-purple);
}

.controls-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.controls-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.ctrl-key {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.08);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.ctrl-desc {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: right;
    margin-left: 14px;
}

/* =========================================================
   Toast Notification
   ========================================================= */

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 600;
    padding: 10px 22px;
    background: rgba(16, 20, 32, 0.92);
    border: 1px solid rgba(0, 243, 255, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 243, 255, 0.25);
    backdrop-filter: blur(16px);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-fast);
}

.toast.active,
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* =========================================================
   Responsive Breakpoints
   ========================================================= */

body.compare-active #xr-toolbar,
body.compare-active .telemetry-card,
body.compare-active .xr-enter-bar,
body.compare-active #drop-overlay,
body.compare-setup-open #drop-overlay {
    display: none !important;
}

.compare-setup-modal {
    position: fixed;
    inset: 0;
    z-index: 420;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.compare-setup-modal.active {
    display: flex;
}

.compare-setup-card {
    width: min(94vw, 860px);
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.compare-setup-lead {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.45;
}

.compare-slots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.compare-slot {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-radius: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.22);
    min-height: 220px;
}

.compare-slot.is-drop-target,
.compare-slot[data-state="ready"] {
    border-style: solid;
}

.compare-slot.is-drop-target {
    border-color: rgba(0, 243, 255, 0.7);
    box-shadow: 0 0 0 1px rgba(0, 243, 255, 0.25);
}

.compare-slot[data-state="ready"] {
    border-color: rgba(16, 185, 129, 0.45);
}

.compare-slot[data-state="error"] {
    border-color: rgba(244, 63, 94, 0.5);
}

.compare-slot-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.compare-slot-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    background: rgba(0, 243, 255, 0.16);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 243, 255, 0.35);
}

.compare-slot-badge.alt {
    background: rgba(168, 85, 247, 0.18);
    color: #e9d5ff;
    border-color: rgba(168, 85, 247, 0.4);
}

.compare-slot-status {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.compare-slot-status[data-state="ready"] { color: var(--accent-emerald); }
.compare-slot-status[data-state="loading"] { color: var(--accent-amber); }
.compare-slot-status[data-state="error"] { color: var(--accent-rose); }

.compare-slot-name {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compare-slot-meta {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
    min-height: 32px;
    line-height: 1.4;
}

.compare-select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 10, 16, 0.85);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
}

.compare-slot-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.compare-mode-picker {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.compare-mode-option {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
}

.compare-mode-option:has(input:checked) {
    border-color: rgba(0, 243, 255, 0.45);
    background: rgba(0, 243, 255, 0.08);
}

.compare-mode-option input {
    margin-top: 3px;
}

.compare-mode-option span {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.compare-mode-option strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.compare-setup-error {
    margin: 0;
    color: var(--accent-rose);
    font-size: 13px;
    font-weight: 600;
}

.compare-setup-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.compare-session {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 95;
    pointer-events: none;
}

.compare-session.active {
    display: block;
}

.compare-session.mode-dual #compare-show-a-btn,
.compare-session.mode-dual #compare-show-b-btn {
    display: none;
}

.compare-session-bar,
.compare-session-bar:hover {
    position: fixed !important;
    top: 76px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 110;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: min(94vw, 980px);
    padding: 10px 14px;
    pointer-events: auto;
}

.compare-session-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.compare-session-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.compare-session-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.compare-labels {
    position: absolute;
    inset: 132px 16px 72px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    pointer-events: none;
}

.compare-session.mode-single .compare-labels {
    grid-template-columns: 1fr;
}

.compare-session.mode-single .compare-label-b,
.compare-session.mode-single .compare-divider {
    display: none;
}

.compare-session.mode-single[data-active="b"] .compare-label-a {
    display: none;
}

.compare-session.mode-single[data-active="b"] .compare-label-b {
    display: flex;
    justify-self: start;
    text-align: left;
    align-items: flex-start;
}

.compare-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    max-width: min(46vw, 420px);
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(10, 12, 20, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.compare-label span {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

.compare-label-b {
    justify-self: end;
    text-align: right;
    align-items: flex-end;
}

.compare-divider {
    position: absolute;
    top: 128px;
    bottom: 64px;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, transparent, rgba(0, 243, 255, 0.55), transparent);
}

.compare-session-hint {
    position: absolute;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    margin: 0;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(10, 12, 20, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.compare-capture-flash {
    position: fixed;
    inset: 0;
    z-index: 400;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.82);
    opacity: 1;
    transition: opacity 0.28s ease;
}

.compare-capture-flash.is-fading {
    opacity: 0;
}

@media (max-width: 860px) {
    .compare-slots,
    .compare-mode-picker,
    .compare-labels {
        grid-template-columns: 1fr;
    }

    .compare-label-b {
        justify-self: start;
        align-items: flex-start;
        text-align: left;
    }

    .compare-session.mode-dual .compare-labels {
        grid-template-rows: 1fr 1fr;
        grid-template-columns: 1fr;
    }

    .compare-session.mode-dual .compare-divider {
        top: calc(50% + 40px);
        bottom: auto;
        left: 16px;
        right: 16px;
        width: auto;
        height: 1px;
        transform: none;
        background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.55), transparent);
    }

    .compare-session-hint {
        white-space: normal;
        text-align: center;
        max-width: 90vw;
        bottom: 12px;
    }

    .xr-toolbar {
        top: 68px;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        gap: 10px;
    }

    .toolbar-actions {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .telemetry-card {
        bottom: 168px;
        left: 12px;
        right: 12px;
        width: auto;
    }

    .xr-enter-bar {
        bottom: 12px;
        width: min(94vw, 420px);
    }
}