.inv-comparison-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

.inv-scene-selector {
    background: #ffffff;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
}

.inv-scene-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.inv-scene-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid transparent;
    background: #f9f9f9;
    padding: 0.6rem;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
    width: 160px;
}
.inv-scene-button:hover { transform: scale(1.04); }
.inv-scene-button.active { border-color: #3273dc; }

.inv-scene-button img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    aspect-ratio: 16 / 9;
    background: #eee;
}

.inv-scene-button span {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

/* 3 columns × 2 rows: row 1 = GT / Sp.Mink. / PTv3, row 2 = Sonata / Utonia / Ours.
   Each .inv-cell stacks a header on top of a canvas wrapper. */
.inv-canvas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
    gap: 14px;
    align-items: stretch;
}

.inv-cell {
    display: flex;
    flex-direction: column;
}

.inv-col-header {
    text-align: center;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 4px 0 6px;
}

.inv-canvas-wrapper {
    position: relative;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.08);
    aspect-ratio: 1 / 1;
}

.inv-canvas {
    width: 100%;
    height: 100%;
    cursor: move;
    display: block;
}

/* Split-viewer-specific bits */
.inv-split-wrapper {
    overflow: visible;          /* let the splitter handle sit slightly outside */
}

.sv-splitter {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background: rgba(0,0,0,0.85);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.25);
    cursor: ew-resize;
    z-index: 9;
    transform: translateX(-1.5px);
    touch-action: none;
}
.sv-splitter-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 36px;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    background: rgba(0,0,0,0.7);
    display: grid;
    place-items: center;
}
.sv-splitter-handle::before {
    content: "";
    width: 2px;
    height: 16px;
    background: rgba(255,255,255,0.85);
    box-shadow: -4px 0 0 rgba(255,255,255,0.6), 4px 0 0 rgba(255,255,255,0.6);
}

/* Static (non-draggable) center divider for the side-by-side scale viewer. */
.sv-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: rgba(0,0,0,0.35);
    transform: translateX(-1px);
    pointer-events: none;
    z-index: 6;
}

.inv-split-label {
    position: absolute;
    bottom: 6px;
    background: rgba(255,255,255,0.85);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
    pointer-events: none;
    z-index: 5;
}
.inv-split-label-left  { left:  6px; }
.inv-split-label-right { right: 6px; }

.inv-button-container {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 10;
}

.inv-control-button {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.85);
    border: 1px solid #ccc;
    border-radius: 5px;
    font-weight: bold;
    font-family: 'Menlo', monospace;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}
.inv-control-button:hover  { background-color: rgba(200,200,200,0.85); }
.inv-control-button:active { background-color: rgba(150,150,150,0.85); }

.inv-legend {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 14px;
    font-size: 0.85rem;
    color: #333;
}
.inv-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.inv-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.1);
}
