:root.vmix-uniform-fit { --vmix-design-vw:12.8px; --vmix-design-vh:8px; }
.vmix-uniform-fit body { position:fixed; inset:0; width:100vw; height:100dvh; min-height:0; overflow:hidden; }
.vmix-uniform-fit #mixer-instrument { position:absolute; width:1280px; height:800px; transform-origin:top left; }
.vmix-uniform-fit #app-container { width:1280px; height:800px; max-width:none; max-height:none; margin:0; }
.vmix-uniform-fit #mixer-actions-row { grid-template-columns: 1fr 1.7fr 1fr 0.85fr; grid-template-areas:"effect-a transition effect-b pip"; gap:12px; }
.vmix-uniform-fit #mixer-actions-row .control-item { display:grid; grid-template-columns:minmax(0,1fr); gap:6px; min-width:0; }
.vmix-uniform-fit #mixer-actions-row .control-select { width:100%; min-width:0; }
.vmix-uniform-fit #transition-controls { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px; min-width:0; }
.vmix-uniform-fit #transition-controls > label { grid-column:1 / -1; }
.vmix-uniform-fit #mixer-actions-row label { font-size:12px; }

/* Keep the viewport shell independent from the fixed instrument dimensions. */
html.vmix-uniform-fit { min-height: 0; height: 100%; overflow: hidden; }
.vmix-uniform-fit body { padding: 0; width: var(--hx-fit-viewport-width, 100vw); height: var(--hx-fit-viewport-height, 100dvh); }
.vmix-uniform-fit #app-container { min-width: 0; min-height: 0; box-sizing: border-box; }

/* Adaptive fullscreen expands panel space, never independently stretches axes. */
.vmix-uniform-fit.vmix-adaptive #app-container { width:100%; height:100%; }
.vmix-uniform-fit.vmix-adaptive #main-controls { width:100%; max-width:none; }
.vmix-uniform-fit.vmix-adaptive .controls-grid { min-width:0; min-height:0; overflow:auto; }

/* Give the single app column the entire canvas instead of its intrinsic width. */
.vmix-uniform-fit #app-container { grid-template-columns: minmax(0, 1fr); justify-content: stretch; }

/* Fit the output strip inside its panel, including the complete master meter. */
.vmix-uniform-fit #audio-midi-row {
    width: 100%; max-width: 100%; min-width: 0;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, .9fr);
    gap: 12px;
}
.vmix-uniform-fit #audio-midi-row #midi-controls {
    grid-template-columns: max-content minmax(0, 1fr) auto 66px;
    gap: 6px;
}
.vmix-uniform-fit #audio-midi-row #master-output-controls {
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 8px;
}
.vmix-uniform-fit #audio-midi-row .master-volume-container {
    grid-template-columns: minmax(0, 1fr) 24px 24px;
    gap: 10px;
    width: 100%; min-width: 0;
}
.vmix-uniform-fit #audio-midi-row .master-volume-container label {
    white-space: normal; text-align: right; line-height: 1.35;
}

.vmix-uniform-fit #audio-midi-row { transform: none; }
