:root.nt-uniform-fit { --nt-design-vw: 16px; --nt-design-vh: 9px; }
.nt-uniform-fit body { width: 100vw; height: 100dvh; }
.nt-uniform-fit body.night-train-2d #main-synth-container { position: absolute; width: 1600px; height: 900px; min-height: 900px; transform-origin: top left; }
.nt-uniform-fit body.night-train-2d .nt-title { font-size: max(12px, clamp(1.1rem, calc(1.9 * var(--nt-design-vw, 1vw)), 1.95rem)); }
.nt-uniform-fit body.night-train-2d .nt-status-card__primary { font-size: max(12px, clamp(0.8rem, calc(1.02 * var(--nt-design-vw, 1vw)), 1.05rem)); }
.nt-uniform-fit body.night-train-2d .nt-status-card__secondary { font-size: max(12px, clamp(0.48rem, calc(0.55 * var(--nt-design-vw, 1vw)), 0.62rem)); }
.nt-uniform-fit body.night-train-2d .nt-monitor-card__title,
.nt-uniform-fit body.night-train-2d .nt-control-strip__label,
.nt-uniform-fit body.night-train-2d .nt-panel-section__title,
.nt-uniform-fit body.night-train-2d .nt-deck-section__title { font-size: max(12px, 0.62rem); }
.nt-uniform-fit body.night-train-2d .nt-monitor-card__subtitle { font-size: max(12px, 0.48rem); }
.nt-uniform-fit body.night-train-2d .nt-volume-value { font-size: max(12px, 0.5rem); }
.nt-uniform-fit body.night-train-2d .nt-knob-grid[data-section="oscillators"] .nt-knob__label { font-size: max(12px, 0.46rem); }
.nt-uniform-fit body.night-train-2d .nt-knob__label { font-size: max(12px, 0.48rem); }
.nt-uniform-fit body.night-train-2d .nt-knob--voice .nt-knob__label { font-size: max(12px, 0.44rem); }
.nt-uniform-fit body.night-train-2d .nt-knob--voice .nt-knob__value { font-size: max(12px, 0.38rem); }
.nt-uniform-fit body.night-train-2d .nt-knob__value { font-size: max(12px, 0.44rem); }
.nt-uniform-fit body.night-train-2d .nt-field__label { font-size: max(12px, 0.46rem); }
.nt-uniform-fit body.night-train-2d .nt-select,
.nt-uniform-fit body.night-train-2d .nt-input { font-size: max(12px, 0.58rem); }
.nt-uniform-fit body.night-train-2d .nt-panel--utility .nt-select,
.nt-uniform-fit body.night-train-2d .nt-panel--utility .nt-input { font-size: max(12px, 0.58rem); }
.nt-uniform-fit body.night-train-2d .nt-action-btn,
.nt-uniform-fit body.night-train-2d .nt-toggle-btn { font-size: max(12px, 0.56rem); }
.nt-uniform-fit body.night-train-2d .nt-mini-btn { font-size: max(12px, 0.5rem); }
.nt-uniform-fit body.night-train-2d .nt-learn-status { font-size: max(12px, 0.58rem); }
.nt-uniform-fit body.night-train-2d .nt-mappings-list__empty { font-size: max(12px, 0.62rem); }
.nt-uniform-fit body.night-train-2d .nt-mapping-item__text { font-size: max(12px, 0.62rem); }
.nt-uniform-fit body.night-train-2d .nt-sequencer__title { font-size: max(12px, 0.62rem); }
.nt-uniform-fit body.night-train-2d .nt-sequencer__subtitle { font-size: max(12px, 0.44rem); }
.nt-uniform-fit body.night-train-2d .nt-sequencer__tempo-label { font-size: max(12px, 0.46rem); }
.nt-uniform-fit body.night-train-2d .nt-sequencer__tempo-input { font-size: max(12px, 0.5rem); }
.nt-uniform-fit body.night-train-2d .nt-sequencer__toggle,
.nt-uniform-fit body.night-train-2d .nt-sequencer__collapse,
.nt-uniform-fit body.night-train-2d .nt-sequencer__rate,
.nt-uniform-fit body.night-train-2d .nt-sequencer__clock,
.nt-uniform-fit body.night-train-2d .nt-sequencer__pattern-btn { font-size: max(12px, 0.5rem); }
.nt-uniform-fit body.night-train-2d .nt-sequencer__pattern-select { font-size: max(12px, 0.48rem); }
.nt-uniform-fit body.night-train-2d .nt-sequencer-step__index { font-size: max(12px, 0.42rem); }
.nt-uniform-fit body.night-train-2d .nt-sequencer-step__offset { font-size: max(12px, 0.64rem); }
.nt-uniform-fit body.night-train-2d .nt-sequencer-step__mode { font-size: max(12px, 0.48rem); }
.nt-uniform-fit body.night-train-2d .nt-note-card__title { font-size: max(12px, 0.62rem); }
.nt-uniform-fit body.night-train-2d .nt-note-stepper { font-size: max(12px, 0.92rem); }
.nt-uniform-fit body.night-train-2d .nt-note-value { font-size: max(12px, 0.76rem); }
.nt-uniform-fit body.night-train-2d .nt-note-card .nt-field__label { font-size: max(12px, 0.46rem); }
.nt-uniform-fit body.night-train-2d .nt-wheel__label { font-size: max(12px, clamp(1rem, calc(1.2 * var(--nt-design-vw, 1vw)), 1.5rem)); }
.nt-uniform-fit body.night-train-2d .nt-wheel__value { font-size: max(12px, 0.8rem); }
.nt-uniform-fit body.night-train-2d .nt-key--white .nt-key__label { font-size: max(12px, clamp(0.68rem, calc(0.74 * var(--nt-design-vw, 1vw)), 0.9rem)); }
.nt-uniform-fit body.night-train-2d .nt-key--black .nt-key__label { font-size: max(12px, clamp(0.56rem, calc(0.58 * var(--nt-design-vw, 1vw)), 0.72rem)); }

.nt-uniform-fit #nt-instrument { position:absolute; width:1600px; height:900px; transform-origin:top left; }
.nt-uniform-fit body.night-train-2d .night-train-app-shell { --nt-wheel-h:200px; }
.nt-uniform-fit body.night-train-2d .nt-knob__label,
.nt-uniform-fit body.night-train-2d .nt-knob__value { font-size:10px; letter-spacing:0; }
.nt-uniform-fit body.night-train-2d .nt-knob-grid[data-section="oscillators"] .nt-knob { max-width:none; }
.nt-uniform-fit body.night-train-2d .nt-knob-grid[data-section="oscillators"] .nt-knob__label,
.nt-uniform-fit body.night-train-2d .nt-knob-grid[data-section="oscillators"] .nt-knob__value { font-size:10px; letter-spacing:0; }

.nt-uniform-fit body.night-train-2d .nt-deck-section > * { min-width:0; }
.nt-uniform-fit body.night-train-2d .nt-deck-section__header { gap:2px; }
.nt-uniform-fit body.night-train-2d .nt-deck-section__header h3 { font-size:10px; letter-spacing:0; }
.nt-uniform-fit body.night-train-2d .nt-deck-section__led { width:6px; height:6px; flex-shrink:0; }

.nt-uniform-fit body { position:fixed; inset:0; margin:0; min-height:0; height:100dvh; overflow:hidden; }

.nt-uniform-fit body.night-train-2d .nt-sequencer__controls { gap:3px !important; }
.nt-uniform-fit body.night-train-2d .nt-sequencer__controls :is(button, select, input, span) { font-size:10px; letter-spacing:0; }
.nt-uniform-fit body.night-train-2d .nt-sequencer__controls button { padding-inline:4px; min-width:0; }
.nt-uniform-fit body.night-train-2d .nt-sequencer__tempo-field { padding-inline:4px; gap:3px; }

/* Widescreen baseline: keep one proportional layout, with room for parameters. */
.nt-uniform-fit body.night-train-2d .nt-performance,
.nt-uniform-fit body.night-train-2d .nt-header__inner { width:100%; max-width:none; }
.nt-uniform-fit body.night-train-2d .nt-deck-sections { gap:10px; }
.nt-uniform-fit body.night-train-2d .nt-deck-section { padding:12px 8px; gap:12px; }
.nt-uniform-fit body.night-train-2d .nt-knob-grid { row-gap:20px; }
.nt-uniform-fit body.night-train-2d .nt-knob__label,
.nt-uniform-fit body.night-train-2d .nt-knob__value,
.nt-uniform-fit body.night-train-2d .nt-knob-grid[data-section="oscillators"] .nt-knob__label,
.nt-uniform-fit body.night-train-2d .nt-knob-grid[data-section="oscillators"] .nt-knob__value { font-size:13px; line-height:1.2; }
.nt-uniform-fit body.night-train-2d .nt-deck-section__header h3 { font-size:13px; }
.nt-uniform-fit body.night-train-2d .nt-knob:not(.nt-knob--voice) { grid-template-rows:56px 40px auto; }
.nt-uniform-fit body.night-train-2d .nt-knob:not(.nt-knob--voice) .nt-knob__meta { min-height:54px; grid-template-rows:32px 18px; }
.nt-uniform-fit body.night-train-2d .nt-knob:not(.nt-knob--voice) .nt-knob__label { min-height:32px; white-space:normal; }

/* Include the 194px performance sidebar and its 8px gutter. */
.nt-uniform-fit body.night-train-2d .nt-sequencer-mount { left:-202px; }

.nt-uniform-fit body.night-train-2d .nt-keybed-section { width:100%; max-width:none; margin-inline:0; }

.nt-uniform-fit body.night-train-2d .nt-performance__left { height:var(--nt-control-deck-height, auto); }
.nt-uniform-fit body.night-train-2d .nt-note-controls-mount { align-self:end; height:auto; }
