body.night-train-2d {
    background:
        radial-gradient(circle at 50% 16%, rgba(255, 232, 196, 0.08), transparent 28%),
        linear-gradient(180deg, #23201d 0%, #171717 18%, #121212 100%);
    color: #f2eee7;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

body.night-train-2d #collapsible-ui-container,
body.night-train-2d #octave-controls {
    display: none !important;
}

body.night-train-2d #main-synth-container {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
}

body.night-train-2d .fullscreen-control {
    position: fixed;
    right: 18px;
    top: 18px;
    z-index: 50;
}

body.night-train-2d .night-train-app-shell {
    --nt-text: #f2eee7;
    --nt-text-dim: rgba(242, 238, 231, 0.72);
    --nt-shadow: rgba(0, 0, 0, 0.42);
    --nt-header-h: clamp(60px, 7.5vh, 82px);
    --nt-keybed-h: clamp(109px, 14.25vh, 154px);
    --nt-wheel-w: clamp(56px, 5vw, 72px);
    --nt-wheel-h: clamp(220px, 28vh, 300px);

    height: 100dvh;
    min-height: 100dvh;
    display: grid;
    grid-template-rows: var(--nt-header-h) 1fr;
    overflow: hidden;
}

body.night-train-2d .nt-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
}

body.night-train-2d .nt-header__inner {
    width: min(1500px, calc(100% - 24px));
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
}

body.night-train-2d .nt-title {
    margin: 0;
    font-size: clamp(1.1rem, 1.9vw, 1.95rem);
    line-height: 1;
    letter-spacing: 0.12em;
    font-weight: 800;
    color: #f3eee5;
    text-shadow:
        0 0 8px rgba(255, 247, 230, 0.16),
        0 0 20px rgba(255, 227, 178, 0.10);
}

body.night-train-2d .nt-status-card {
    min-width: 220px;
    max-width: 290px;
    min-height: 48px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    box-shadow:
        0 0 26px rgba(255,255,255,0.10),
        0 18px 40px var(--nt-shadow),
        inset 0 0 0 1px rgba(255,255,255,0.04);
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 4px;
}

body.night-train-2d .nt-panel--utility .nt-status-card {
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
    margin-bottom: 2px;
}

body.night-train-2d .nt-status-card__primary {
    font-size: clamp(0.8rem, 1.02vw, 1.05rem);
    letter-spacing: 0.06em;
    font-weight: 700;
}

body.night-train-2d .nt-status-card__secondary {
    font-size: clamp(0.48rem, 0.55vw, 0.62rem);
    letter-spacing: 0.08em;
    color: var(--nt-text-dim);
}

body.night-train-2d .nt-main {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) var(--nt-keybed-h);
    padding: 0 20px 0;
    gap: 8px;
    overflow: hidden;
}

body.night-train-2d .nt-performance {
    min-height: 0;
    width: min(1500px, calc(100% - 24px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(176px, 194px) minmax(0, 1fr) minmax(208px, 224px);
    align-items: stretch;
    gap: 8px;
    overflow: hidden;
}

body.night-train-2d .nt-performance__left,
body.night-train-2d .nt-performance__center,
body.night-train-2d .nt-performance__right {
    min-height: 0;
    position: relative;
    overflow: hidden;
}

body.night-train-2d .nt-performance__left {
    display: grid;
    grid-template-rows: auto 1fr;
    align-content: start;
    gap: 14px;
}

body.night-train-2d .nt-performance__center,
body.night-train-2d .nt-performance__right {
    align-items: stretch;
    justify-content: center;
}

body.night-train-2d .nt-performance__right {
    display: flex;
    box-sizing: border-box;
    padding-right: 0;
}

body.night-train-2d .nt-performance__center {
    display: block;
    position: relative;
    overflow: visible;
}

body.night-train-2d .nt-control-deck,
body.night-train-2d .nt-utility-panel {
    width: 100%;
    min-width: 0;
}

body.night-train-2d .nt-control-deck {
    height: auto;
    align-self: start;
    position: relative;
    z-index: 1;
}

body.night-train-2d .nt-utility-panel {
    height: 100%;
}

body.night-train-2d .nt-sequencer-mount {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    min-width: 0;
    min-height: 0;
    flex: none;
    z-index: 20;
    overflow: visible;
    pointer-events: none;
}

body.night-train-2d .nt-utility-panel {
    width: 100%;
    margin-right: auto;
}

body.night-train-2d .nt-deck-shell,
body.night-train-2d .nt-panel {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        0 16px 40px rgba(0,0,0,0.22);
}

body.night-train-2d .nt-deck-shell {
    padding: 11px 5px 11px 8px;
    display: grid;
    grid-template-rows: auto auto;
    gap: 10px;
    overflow: hidden;
    height: auto;
    align-self: start;
}

body.night-train-2d .nt-deck-topbar {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(152px, 0.8fr) minmax(126px, 0.64fr) minmax(96px, 0.44fr);
    gap: 5px;
    min-height: 0;
    align-items: stretch;
}

body.night-train-2d .nt-deck-topbar > * {
    align-self: stretch;
}

body.night-train-2d .nt-deck-topbar > .nt-monitor-card,
body.night-train-2d .nt-deck-topbar > .nt-control-strip {
    height: 100%;
    box-sizing: border-box;
}

body.night-train-2d .nt-monitor-card {
    grid-column: auto;
}

body.night-train-2d .nt-control-strip {
    grid-column: span 1;
}

body.night-train-2d .nt-monitor-card,
body.night-train-2d .nt-control-strip,
body.night-train-2d .nt-panel-section,
body.night-train-2d .nt-deck-section {
    padding: 8px 9px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.06);
}

body.night-train-2d .nt-monitor-card {
    display: grid;
    gap: 8px;
}

body.night-train-2d .nt-monitor-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

body.night-train-2d .nt-monitor-card__title,
body.night-train-2d .nt-control-strip__label,
body.night-train-2d .nt-panel-section__title,
body.night-train-2d .nt-deck-section__title {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    color: rgba(242, 238, 231, 0.94);
}

body.night-train-2d .nt-monitor-card__subtitle {
    font-size: 0.48rem;
    letter-spacing: 0.12em;
    color: rgba(242, 238, 231, 0.54);
}

body.night-train-2d .nt-monitor {
    border-radius: 14px;
    overflow: hidden;
    background: rgba(7, 9, 20, 0.75);
    border: 1px solid rgba(255,255,255,0.08);
}

body.night-train-2d .nt-monitor--deck canvas,
body.night-train-2d .nt-monitor canvas {
    display: block;
    width: 100%;
    height: auto;
}

body.night-train-2d .nt-control-strip {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    align-content: start;
    gap: 7px;
}

body.night-train-2d .nt-control-strip--presets {
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 2px;
    padding-top: 4px;
    padding-bottom: 4px;
}

body.night-train-2d .nt-voice-subcontrols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    align-items: start;
}

body.night-train-2d .nt-voice-subcontrol {
    min-width: 0;
    transition: opacity 120ms ease, filter 120ms ease;
}

body.night-train-2d .nt-voice-subcontrol.is-disabled {
    opacity: 0.45;
    filter: saturate(0.7);
    pointer-events: none;
}

body.night-train-2d .nt-control-strip--output {
    gap: 4px;
    padding-top: 4px;
    padding-bottom: 4px;
}

body.night-train-2d .nt-output-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18px;
    gap: 10px;
    align-items: center;
}

body.night-train-2d .nt-output-volume {
    display: grid;
    grid-template-rows: auto auto;
    justify-items: center;
    align-items: center;
    gap: 6px;
    padding-top: 0;
    align-self: center;
}

body.night-train-2d .nt-output-knob {
    width: clamp(48px, 3.8vw, 58px);
    height: clamp(48px, 3.8vw, 58px);
}

body.night-train-2d .nt-vu-meter {
    position: relative;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.12);
    background:
        linear-gradient(180deg, rgba(9, 11, 16, 0.92), rgba(16, 18, 22, 0.82));
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.05),
        inset 0 -2px 6px rgba(0,0,0,0.28);
}

body.night-train-2d .nt-vu-meter__fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(90deg, #64e3b4 0%, #f2d29b 58%, #df6969 100%);
    box-shadow:
        0 0 10px rgba(242, 210, 155, 0.24),
        0 0 18px rgba(100, 227, 180, 0.12);
    transition: width 55ms linear;
}

body.night-train-2d .nt-vu-meter--vertical {
    width: 18px;
    height: 100px;
    min-height: 100px;
    justify-self: end;
    align-self: center;
    margin-top: 9px;
    display: flex;
    align-items: end;
    border-radius: 8px;
}

body.night-train-2d .nt-vu-meter__fill--vertical {
    width: 100%;
    height: 0%;
    align-self: end;
    background:
        linear-gradient(180deg, #fff6e3 0%, #f2d29b 42%, #b98542 100%);
    box-shadow:
        0 0 10px rgba(242, 210, 155, 0.24),
        0 0 18px rgba(255, 246, 227, 0.10);
    transition: height 55ms linear;
}

body.night-train-2d .nt-volume-value--center {
    order: -1;
    min-height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.night-train-2d .nt-volume-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

body.night-train-2d .nt-volume-slider {
    width: 100%;
    margin: 0;
    accent-color: #f2d29b;
}

body.night-train-2d .nt-volume-value {
    min-width: 42px;
    text-align: right;
    font-size: 0.5rem;
    letter-spacing: 0.1em;
    color: rgba(242, 210, 155, 0.92);
}

body.night-train-2d .nt-volume-value--center {
    min-width: 0;
    text-align: center;
    line-height: 1;
}

body.night-train-2d .nt-inline-actions,
body.night-train-2d .nt-toggle-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

body.night-train-2d .nt-preset-actions {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 6px;
    align-content: stretch;
    min-height: 0;
}

body.night-train-2d .nt-control-strip--presets .nt-input {
    min-height: 28px;
    height: 28px;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 28px;
}

body.night-train-2d .nt-control-strip--presets .nt-action-btn {
    min-height: 24px;
    padding-top: 2px;
    padding-bottom: 2px;
}

body.night-train-2d .nt-control-strip--presets .nt-inline-actions .nt-action-btn {
    min-height: 24px;
}

body.night-train-2d .nt-action-btn--generate {
    min-height: 22px;
    padding-top: 1px;
    padding-bottom: 1px;
    align-self: end;
}

body.night-train-2d .nt-action-btn--generate {
    width: 100%;
}

body.night-train-2d .nt-deck-sections {
    min-height: auto;
    display: grid;
    grid-template-columns:
        minmax(228px, 1.16fr)
        minmax(110px, 0.66fr)
        minmax(110px, 0.66fr)
        minmax(100px, 0.52fr)
        minmax(172px, 0.94fr);
    gap: 4px;
    align-items: start;
    margin-top: 0;
    align-self: start;
}

body.night-train-2d .nt-deck-section {
    display: grid;
    grid-template-rows: auto auto;
    gap: 5px;
    min-height: 0;
    overflow: hidden;
    padding: 5px 5px 6px 3px;
    align-self: start;
}

body.night-train-2d .nt-deck-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 1px;
    padding: 0 1px 0 0;
}

body.night-train-2d .nt-deck-section__led {
    --nt-led-strength: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 35%, rgba(255,255,255,0.98), rgba(242, 210, 155, 0.96) 36%, rgba(120, 79, 28, 0.88) 100%);
    box-shadow:
        0 0 calc(6px + (18px * var(--nt-led-strength))) rgba(242, 210, 155, calc(0.08 + (0.28 * var(--nt-led-strength)))),
        inset 0 0 0 1px rgba(255,255,255,0.25);
    opacity: calc(0.35 + (0.65 * var(--nt-led-strength)));
}

body.night-train-2d .nt-knob-grid {
    display: grid;
    grid-auto-flow: row;
    gap: 6px;
    align-content: start;
    overflow: visible;
    padding-bottom: 0;
    grid-auto-rows: minmax(96px, auto);
}

body.night-train-2d .nt-knob-grid[data-section="oscillators"] {
    grid-template-columns: repeat(4, minmax(34px, 1fr));
    column-gap: 1px;
    row-gap: 5px;
    padding-inline: 0;
}

body.night-train-2d .nt-deck-section[data-section="oscillators"] {
    padding: 5px 1px 6px 3px;
}

body.night-train-2d .nt-deck-section[data-section="oscillators"] .nt-deck-section__header {
    padding-right: 0;
}

body.night-train-2d .nt-deck-section[data-section="amplitude"] {
    padding: 5px 2px 6px 2px;
}

body.night-train-2d .nt-deck-section[data-section="amplitude"] .nt-deck-section__header {
    padding-right: 0;
}

body.night-train-2d .nt-knob-grid[data-section="filter"],
body.night-train-2d .nt-knob-grid[data-section="envelopes"],
body.night-train-2d .nt-knob-grid[data-section="amplitude"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0;
    row-gap: 5px;
    padding-inline: 0;
}

body.night-train-2d .nt-knob-grid[data-section="amplitude"] {
    grid-template-columns: repeat(2, minmax(44px, 1fr));
    column-gap: 1px;
    justify-items: center;
}

body.night-train-2d .nt-knob-grid[data-section="delay"] {
    width: 100%;
    grid-template-columns: repeat(3, minmax(48px, 1fr));
    column-gap: 1px;
    row-gap: 5px;
    padding-inline: 0;
    justify-items: center;
    align-items: start;
}

body.night-train-2d .nt-knob-grid[data-section="delay"] .nt-knob {
    width: 100%;
    max-width: 58px;
}

body.night-train-2d .nt-knob-grid[data-section="oscillators"] .nt-knob {
    width: 100%;
    max-width: 45px;
    min-width: 0;
    contain: layout;
}

body.night-train-2d .nt-knob-grid[data-section="oscillators"] .nt-knob__meta {
    gap: 1px;
    width: 100%;
    min-width: 0;
}

body.night-train-2d .nt-knob-grid[data-section="oscillators"] .nt-knob__label {
    font-size: 0.46rem;
    letter-spacing: 0.07em;
    width: 100%;
    min-width: 0;
}

body.night-train-2d .nt-knob-grid[data-section="oscillators"] .nt-knob__value {
    letter-spacing: 0.07em;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
}

body.night-train-2d .nt-knob {
    display: grid;
    grid-template-rows: 40px 28px auto;
    gap: 3px;
    align-content: start;
    justify-items: center;
    min-width: 0;
    text-align: center;
    padding-inline: 0;
}

body.night-train-2d .nt-knob__top {
    width: 100%;
    display: grid;
    justify-items: center;
    align-items: start;
    gap: 4px;
    min-height: 40px;
}

body.night-train-2d .nt-knob__top--compact {
    min-height: 32px;
}

body.night-train-2d .nt-knob__meta {
    display: grid;
    gap: 2px;
    justify-items: center;
    min-height: 40px;
    grid-template-rows: 24px 14px;
    align-content: start;
}

body.night-train-2d .nt-knob__label {
    font-size: 0.48rem;
    letter-spacing: 0.09em;
    color: rgba(242, 238, 231, 0.88);
    line-height: 1.2;
    min-height: 24px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

body.night-train-2d .nt-knob--voice {
    grid-template-rows: 30px auto;
    gap: 5px;
}

body.night-train-2d .nt-knob--voice .nt-knob__meta {
    min-height: 30px;
    grid-template-rows: 16px 12px;
}

body.night-train-2d .nt-knob--voice .nt-knob__label {
    min-height: 16px;
    font-size: 0.44rem;
    letter-spacing: 0.11em;
}

body.night-train-2d .nt-knob--voice .nt-knob__value {
    min-height: 12px;
    font-size: 0.38rem;
    letter-spacing: 0.08em;
}

body.night-train-2d .nt-knob--voice .nt-knob__dial {
    min-height: 40px;
}

body.night-train-2d .nt-knob--voice .nt-knob__face {
    width: 40px;
    height: 40px;
}

body.night-train-2d .nt-knob__value {
    font-size: 0.44rem;
    letter-spacing: 0.08em;
    color: rgba(242, 210, 155, 0.92);
    line-height: 1.15;
    min-height: 14px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

body.night-train-2d .nt-mini-btn {
    min-width: 0;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

body.night-train-2d .nt-knob__dial {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 44px;
}

body.night-train-2d .nt-knob__face {
    --nt-knob-angle: 0deg;
    --nt-knob-strength: 0;
    position: relative;
    display: block;
    width: clamp(38px, 3vw, 48px);
    height: clamp(38px, 3vw, 48px);
    padding: 0;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.06) 0 52%, transparent 53% 100%),
        linear-gradient(180deg, rgba(34, 34, 36, 0.96), rgba(12, 12, 14, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.10),
        inset 0 -8px 14px rgba(0,0,0,0.30),
        0 8px 16px rgba(0,0,0,0.22),
        0 0 calc(8px + (12px * var(--nt-knob-strength))) rgba(242, 210, 155, calc(0.03 + (0.10 * var(--nt-knob-strength))));
    cursor: ns-resize;
    touch-action: none;
    overflow: visible;
}

body.night-train-2d .nt-knob__face.is-dragging {
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.14),
        inset 0 -8px 14px rgba(0,0,0,0.34),
        0 10px 20px rgba(0,0,0,0.26),
        0 0 18px rgba(242, 210, 155, 0.20);
}

body.night-train-2d .nt-knob__indicator {
    position: absolute;
    left: calc(50% - 1.5px);
    bottom: 50%;
    width: 3px;
    height: 24%;
    border-radius: 999px;
    background: linear-gradient(180deg, #fff7e8 0%, #f2d29b 100%);
    transform: rotate(var(--nt-knob-angle));
    transform-origin: 50% 100%;
    box-shadow: 0 0 6px rgba(242, 210, 155, 0.18);
    z-index: 3;
}

body.night-train-2d .nt-knob__glow {
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    box-shadow:
        inset 0 0 calc(3px + (8px * var(--nt-knob-strength))) rgba(242, 210, 155, calc(0.03 + (0.10 * var(--nt-knob-strength))));
    z-index: 1;
    pointer-events: none;
}

body.night-train-2d .nt-knob__face::before {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 36% 32%, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.08) 18%, rgba(20,20,22,0.96) 58%, rgba(8,8,10,1) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.14),
        inset 0 -8px 12px rgba(0,0,0,0.42);
    z-index: 2;
}

body.night-train-2d .nt-knob__face::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.08);
    opacity: calc(0.35 + (0.22 * var(--nt-knob-strength)));
    z-index: 0;
}

body.night-train-2d .nt-knob__ring {
    position: absolute;
    inset: -4px;
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    overflow: visible;
    pointer-events: none;
    z-index: 1;
}

body.night-train-2d .nt-knob__ring-track,
body.night-train-2d .nt-knob__ring-value {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
}

body.night-train-2d .nt-knob__ring-track {
    stroke: rgba(160, 160, 166, 0.42);
}

body.night-train-2d .nt-knob__ring-value {
    filter: drop-shadow(0 0 4px rgba(242, 210, 155, 0.18));
}

body.night-train-2d .nt-panel {
    overflow: hidden;
    padding: 8px;
    display: grid;
    gap: 8px;
    min-width: 0;
}

body.night-train-2d .nt-panel--utility {
    grid-template-rows: auto auto minmax(0, 1fr);
    align-content: start;
    overflow-x: hidden;
    overflow-y: hidden;
    padding-top: 8px;
    padding-right: 4px;
    scrollbar-gutter: stable;
}

body.night-train-2d .nt-utility-panel {
    position: relative;
    z-index: 1;
}

body.night-train-2d .nt-panel--utility .floating-midi-monitor,
body.night-train-2d .nt-panel--utility [data-floating-midi-monitor],
body.night-train-2d .nt-panel--utility .network-midi-button,
body.night-train-2d .nt-panel--utility .floating-network-button {
    z-index: 0;
}

body.night-train-2d .nt-panel-section--routing {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    min-width: 0;
}

body.night-train-2d .nt-panel-section--routing .nt-action-btn {
    grid-column: 1 / -1;
}

body.night-train-2d .nt-panel-section--learn {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 6px;
    min-height: 0;
    align-content: start;
    overflow: hidden;
}

body.night-train-2d .nt-panel-section--learn .nt-panel-section__title {
    margin: 0;
}

body.night-train-2d .nt-panel-section {
    padding: 8px;
}

body.night-train-2d .nt-field {
    display: grid;
    gap: 2px;
}

body.night-train-2d .nt-field__label {
    font-size: 0.46rem;
    letter-spacing: 0.1em;
    color: rgba(242, 238, 231, 0.68);
}

body.night-train-2d .nt-select,
body.night-train-2d .nt-input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 5px 8px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(8, 10, 15, 0.78);
    color: #f2eee7;
    font-family: 'Orbitron', monospace;
    font-size: 0.58rem;
    letter-spacing: 0.04em;
}

body.night-train-2d .nt-panel--utility .nt-select,
body.night-train-2d .nt-panel--utility .nt-input {
    font-size: 0.58rem;
    padding: 5px 8px;
}

body.night-train-2d .nt-action-btn,
body.night-train-2d .nt-toggle-btn,
body.night-train-2d .nt-mini-btn {
    border: 1px solid rgba(255,255,255,0.12);
    color: #f2eee7;
    font-family: 'Orbitron', monospace;
    cursor: pointer;
}

body.night-train-2d .nt-action-btn,
body.night-train-2d .nt-toggle-btn {
    width: 100%;
    padding: 6px 8px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03));
    font-size: 0.56rem;
    letter-spacing: 0.07em;
}

body.night-train-2d .nt-action-btn--subtle {
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
}

body.night-train-2d .nt-action-btn--danger,
body.night-train-2d .nt-mini-btn--danger {
    background: linear-gradient(180deg, rgba(130, 41, 41, 0.72), rgba(87, 24, 24, 0.56));
}

body.night-train-2d .nt-toggle-btn.is-active,
body.night-train-2d .nt-mini-btn.is-active,
body.night-train-2d .nt-action-btn.is-active {
    background: linear-gradient(180deg, rgba(242, 210, 155, 0.35), rgba(242, 210, 155, 0.12));
    border-color: rgba(242, 210, 155, 0.5);
    color: #fff6e5;
    box-shadow: 0 0 18px rgba(242, 210, 155, 0.18);
}

body.night-train-2d .nt-mini-btn {
    padding: 4px 9px;
    border-radius: 9px;
    background: rgba(255,255,255,0.05);
    font-size: 0.5rem;
    letter-spacing: 0.1em;
    justify-self: center;
}

body.night-train-2d .nt-action-btn--learn {
    width: 100%;
    min-height: 40px;
}

body.night-train-2d .nt-learn-status {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    box-sizing: border-box;
    padding: 5px 9px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(8, 10, 15, 0.78);
    font-size: 0.58rem;
    line-height: 1.35;
    letter-spacing: 0.04em;
    color: rgba(242, 238, 231, 0.82);
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

body.night-train-2d .nt-knob.is-map-armed .nt-knob__face {
    border-color: rgba(242, 210, 155, 0.32);
    box-shadow:
        inset 0 0 0 1px rgba(242, 210, 155, 0.08),
        0 0 14px rgba(242, 210, 155, 0.08);
}

body.night-train-2d .nt-knob.is-learning-target .nt-knob__face {
    border-color: rgba(242, 210, 155, 0.58);
    box-shadow:
        inset 0 0 0 1px rgba(242, 210, 155, 0.16),
        0 0 22px rgba(242, 210, 155, 0.15);
}

body.night-train-2d .nt-panel--utility .nt-status-card {
    margin-bottom: 0;
}

body.night-train-2d .nt-learn-status[data-tone="learning"] {
    border-color: rgba(242, 210, 155, 0.3);
    background: rgba(71, 57, 26, 0.38);
    color: #fff3dc;
}

body.night-train-2d .nt-learn-status[data-tone="success"] {
    border-color: rgba(149, 214, 166, 0.3);
    background: rgba(32, 66, 42, 0.38);
    color: #ebfff1;
}

body.night-train-2d .nt-learn-status[data-tone="error"] {
    border-color: rgba(222, 127, 127, 0.34);
    background: rgba(78, 28, 28, 0.42);
    color: #ffecec;
}

body.night-train-2d .nt-mappings-list {
    display: grid;
    gap: 6px;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 8px;
    align-content: start;
}

body.night-train-2d .nt-mappings-list__empty {
    padding: 8px 0 2px;
    color: rgba(242, 238, 231, 0.45);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
}

body.night-train-2d .nt-mapping-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 8px 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}

body.night-train-2d .nt-mapping-item__text {
    min-width: 0;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    line-height: 1.3;
    color: rgba(242, 238, 231, 0.82);
}

body.night-train-2d .nt-mapping-item .nt-mini-btn--danger {
    justify-self: end;
    margin-right: 2px;
}

body.night-train-2d .nt-wheels-mount {
    height: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

body.night-train-2d .nt-wheels {
    display: flex;
    align-items: flex-start;
    gap: clamp(18px, 2vw, 32px);
}

body.night-train-2d .nt-note-controls-mount {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
}

body.night-train-2d .nt-note-controls-mount,
body.night-train-2d .nt-panel--utility {
    scrollbar-width: thin;
    scrollbar-color: rgba(86, 86, 86, 0.92) rgba(18, 18, 18, 0.98);
}

body.night-train-2d .nt-mappings-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(86, 86, 86, 0.92) rgba(18, 18, 18, 0.98);
}

body.night-train-2d .nt-sequencer,
body.night-train-2d .nt-sequencer__body {
    scrollbar-width: thin;
    scrollbar-color: rgba(86, 86, 86, 0.92) rgba(18, 18, 18, 0.98);
}

body.night-train-2d .nt-note-controls-mount::-webkit-scrollbar,
body.night-train-2d .nt-panel--utility::-webkit-scrollbar,
body.night-train-2d .nt-sequencer::-webkit-scrollbar,
body.night-train-2d .nt-sequencer__body::-webkit-scrollbar {
    width: 10px;
}

body.night-train-2d .nt-mappings-list::-webkit-scrollbar {
    width: 10px;
}

body.night-train-2d .nt-note-controls-mount::-webkit-scrollbar-track,
body.night-train-2d .nt-panel--utility::-webkit-scrollbar-track,
body.night-train-2d .nt-sequencer::-webkit-scrollbar-track,
body.night-train-2d .nt-sequencer__body::-webkit-scrollbar-track {
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.98), rgba(12, 12, 12, 1));
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

body.night-train-2d .nt-mappings-list::-webkit-scrollbar-track {
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.98), rgba(12, 12, 12, 1));
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

body.night-train-2d .nt-note-controls-mount::-webkit-scrollbar-thumb,
body.night-train-2d .nt-panel--utility::-webkit-scrollbar-thumb,
body.night-train-2d .nt-sequencer::-webkit-scrollbar-thumb,
body.night-train-2d .nt-sequencer__body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(92, 92, 92, 0.94), rgba(58, 58, 58, 0.98));
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

body.night-train-2d .nt-mappings-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(92, 92, 92, 0.94), rgba(58, 58, 58, 0.98));
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

body.night-train-2d .nt-note-controls-mount::-webkit-scrollbar-thumb:hover,
body.night-train-2d .nt-panel--utility::-webkit-scrollbar-thumb:hover,
body.night-train-2d .nt-sequencer::-webkit-scrollbar-thumb:hover,
body.night-train-2d .nt-sequencer__body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(112, 112, 112, 0.96), rgba(72, 72, 72, 1));
}

body.night-train-2d .nt-mappings-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(112, 112, 112, 0.96), rgba(72, 72, 72, 1));
}

body.night-train-2d .nt-note-controls-mount::-webkit-scrollbar-corner,
body.night-train-2d .nt-panel--utility::-webkit-scrollbar-corner,
body.night-train-2d .nt-sequencer::-webkit-scrollbar-corner,
body.night-train-2d .nt-sequencer__body::-webkit-scrollbar-corner {
    background: transparent;
}

body.night-train-2d .nt-mappings-list::-webkit-scrollbar-corner {
    background: transparent;
}

body.night-train-2d .nt-note-controls {
    width: min(244px, 100%);
    display: grid;
    gap: 10px;
}

body.night-train-2d .nt-sequencer {
    display: grid;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(46, 45, 42, 0.98), rgba(26, 26, 25, 0.98));
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        0 16px 34px rgba(0,0,0,0.42);
    overflow: hidden;
    isolation: isolate;
    min-height: 0;
    max-height: none;
    box-sizing: border-box;
    pointer-events: auto;
}

body.night-train-2d .nt-sequencer:not([data-collapsed="true"]) {
    height: auto;
    overflow: visible;
}

body.night-train-2d .nt-sequencer__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

body.night-train-2d .nt-sequencer__title-wrap {
    display: grid;
    gap: 2px;
}

body.night-train-2d .nt-sequencer__title {
    margin: 0;
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    color: rgba(242, 238, 231, 0.94);
}

body.night-train-2d .nt-sequencer__subtitle {
    font-size: 0.44rem;
    letter-spacing: 0.12em;
    color: rgba(242, 238, 231, 0.55);
}

body.night-train-2d .nt-sequencer__header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

body.night-train-2d .nt-sequencer__body {
    display: grid;
    gap: 8px;
    min-height: 0;
    overflow: visible;
}

body.night-train-2d .nt-sequencer__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

body.night-train-2d .nt-sequencer:not([data-collapsed="true"]) .nt-sequencer__header {
    display: none;
}

body.night-train-2d .nt-sequencer:not([data-collapsed="true"]) .nt-sequencer__controls {
    justify-content: flex-start;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
}

body.night-train-2d .nt-sequencer:not([data-collapsed="true"]) .nt-sequencer__controls > .nt-sequencer__title-wrap {
    display: none;
}

body.night-train-2d .nt-sequencer:not([data-collapsed="true"]) .nt-sequencer__controls > .nt-sequencer__header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

body.night-train-2d .nt-sequencer__tempo-field {
    display: inline-grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 4px 8px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
}

body.night-train-2d .nt-sequencer__tempo-label {
    font-size: 0.46rem;
    letter-spacing: 0.1em;
    color: rgba(242, 238, 231, 0.64);
}

body.night-train-2d .nt-sequencer__tempo-input {
    width: 54px;
    min-width: 54px;
    height: 22px;
    padding: 0 4px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(8, 10, 15, 0.78);
    color: #f2eee7;
    font-family: 'Orbitron', monospace;
    font-size: 0.5rem;
    letter-spacing: 0.08em;
    text-align: center;
}

body.night-train-2d .nt-sequencer__tempo-input:disabled {
    opacity: 0.48;
}

body.night-train-2d .nt-sequencer__toggle,
body.night-train-2d .nt-sequencer__collapse,
body.night-train-2d .nt-sequencer__rate,
body.night-train-2d .nt-sequencer__clock,
body.night-train-2d .nt-sequencer__pattern-btn {
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    color: #f2eee7;
    font-family: 'Orbitron', monospace;
    font-size: 0.5rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.night-train-2d .nt-sequencer__collapse {
    min-width: 48px;
    width: 48px;
    flex: 0 0 48px;
}

body.night-train-2d .nt-sequencer__toggle {
    min-width: 72px;
    width: 72px;
    flex: 0 0 72px;
}

body.night-train-2d .nt-sequencer__toggle[data-enabled="true"],
body.night-train-2d .nt-sequencer__rate[data-active="true"] {
    background: linear-gradient(180deg, rgba(242, 210, 155, 0.35), rgba(242, 210, 155, 0.12));
    border-color: rgba(242, 210, 155, 0.45);
    color: #fff5e2;
    box-shadow: 0 0 14px rgba(242, 210, 155, 0.12);
}

body.night-train-2d .nt-sequencer[data-collapsed="true"] {
    gap: 0;
    padding-bottom: 8px;
}

body.night-train-2d .nt-sequencer[data-collapsed="true"] .nt-sequencer__body {
    display: none;
}

body.night-train-2d .nt-sequencer__rates {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 5px;
}

body.night-train-2d .nt-sequencer__clock {
    min-width: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(242, 210, 155, 0.92);
}

body.night-train-2d .nt-sequencer__patterns {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 5px;
}

body.night-train-2d .nt-sequencer__header-actions {
    align-items: center;
}

body.night-train-2d .nt-sequencer__pattern-select {
    min-width: 58px;
    width: 58px;
    height: 28px;
    padding: 0 20px 0 8px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(8, 10, 15, 0.78);
    color: #f2eee7;
    font-family: 'Orbitron', monospace;
    font-size: 0.48rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    appearance: none;
    -webkit-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(242, 238, 231, 0.82) 50%),
        linear-gradient(135deg, rgba(242, 238, 231, 0.82) 50%, transparent 50%);
    background-position:
        calc(100% - 12px) 11px,
        calc(100% - 8px) 11px;
    background-size: 4px 4px, 4px 4px;
    background-repeat: no-repeat;
}

body.night-train-2d .nt-sequencer__pattern-btn {
    min-width: 44px;
    padding-inline: 8px;
}

body.night-train-2d .nt-sequencer__grid {
    display: grid;
    grid-template-columns: repeat(16, minmax(0, 1fr));
    gap: 6px;
    align-items: stretch;
}

body.night-train-2d .nt-sequencer-step {
    min-height: 72px;
    padding: 6px 4px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018));
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 6px;
    justify-items: center;
    align-items: center;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

body.night-train-2d .nt-sequencer-step[data-active="true"] {
    border-color: rgba(242, 210, 155, 0.48);
    box-shadow:
        inset 0 0 0 1px rgba(242, 210, 155, 0.12),
        0 0 18px rgba(242, 210, 155, 0.12);
}

body.night-train-2d .nt-sequencer-step[data-mode="rest"] {
    opacity: 0.72;
}

body.night-train-2d .nt-sequencer-step[data-mode="tie"] {
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(242, 210, 155, 0.05));
}

body.night-train-2d .nt-sequencer-step__index {
    font-size: 0.42rem;
    letter-spacing: 0.12em;
    color: rgba(242, 238, 231, 0.54);
}

body.night-train-2d .nt-sequencer-step__offset {
    font-size: 0.64rem;
    letter-spacing: 0.08em;
    color: rgba(242, 210, 155, 0.96);
    line-height: 1;
}

body.night-train-2d .nt-sequencer-step__mode {
    width: 28px;
    height: 24px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(8, 10, 15, 0.78);
    color: #f2eee7;
    font-family: 'Orbitron', monospace;
    font-size: 0.48rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
}

body.night-train-2d .nt-note-card {
    padding: 10px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        0 12px 24px rgba(0,0,0,0.14);
    display: grid;
    gap: 8px;
}

body.night-train-2d .nt-note-card--compact {
    min-height: 84px;
}

body.night-train-2d .nt-note-card--scale {
    min-height: 116px;
}

body.night-train-2d .nt-note-card__title {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    color: rgba(242, 238, 231, 0.94);
}

body.night-train-2d .nt-note-card__row {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    gap: 10px;
    align-items: center;
}

body.night-train-2d .nt-note-stepper,
body.night-train-2d .nt-note-value {
    min-height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.14);
    font-family: 'Orbitron', monospace;
    color: #f2eee7;
}

body.night-train-2d .nt-note-stepper {
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    cursor: pointer;
}

body.night-train-2d .nt-note-value {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 10, 15, 0.78);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
}

body.night-train-2d .nt-note-scale-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

body.night-train-2d .nt-note-card .nt-field {
    gap: 5px;
}

body.night-train-2d .nt-note-card .nt-field__label {
    font-size: 0.46rem;
}

body.night-train-2d .nt-note-card .nt-select {
    min-height: 38px;
}

body.night-train-2d .nt-wheel {
    display: grid;
    justify-items: center;
    grid-template-rows: auto 1fr auto;
    gap: 12px;
}

body.night-train-2d .nt-wheel__label {
    font-size: clamp(1rem, 1.2vw, 1.5rem);
    letter-spacing: 0.08em;
    color: var(--nt-text);
}

body.night-train-2d .nt-wheel__track {
    position: relative;
    width: var(--nt-wheel-w);
    height: var(--nt-wheel-h);
    border-radius: 999px;
    background:
        linear-gradient(180deg, #1a1a1a, #252525 55%, #171717);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.08),
        inset 0 14px 24px rgba(255,255,255,0.03),
        0 18px 30px rgba(0,0,0,0.35),
        0 0 24px rgba(255,255,255,0.06);
    overflow: hidden;
    touch-action: none;
}

body.night-train-2d .nt-wheel__center-line {
    position: absolute;
    inset: 12px auto 12px 50%;
    width: 2px;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.42);
    border-radius: 999px;
}

body.night-train-2d .nt-wheel__thumb {
    position: absolute;
    left: 50%;
    width: calc(var(--nt-wheel-w) - 18px);
    height: calc(var(--nt-wheel-w) - 18px);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 35%, #ffffff 0%, #f0efe9 18%, #b8b6af 46%, #555 100%);
    box-shadow:
        0 0 22px rgba(255,255,255,0.35),
        0 0 42px rgba(255,255,255,0.08);
}

body.night-train-2d .nt-wheel__thumb.is-centered {
    box-shadow:
        0 0 18px rgba(255,255,255,0.22),
        0 0 34px rgba(255,255,255,0.06);
}

body.night-train-2d .nt-wheel__value {
    font-size: 0.8rem;
    color: var(--nt-text-dim);
}

body.night-train-2d .nt-keybed-section {
    width: min(1500px, calc(100% - 24px));
    margin: 0 auto;
    height: 100%;
    min-height: 0;
    align-self: end;
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        0 16px 40px rgba(0,0,0,0.28);
}

body.night-train-2d .nt-keyboard-mount {
    height: 100%;
}

body.night-train-2d .nt-keyboard {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
}

body.night-train-2d .nt-keyboard__white-keys,
body.night-train-2d .nt-keyboard__black-keys {
    position: absolute;
    pointer-events: none;
}

body.night-train-2d .nt-keyboard__white-keys {
    inset: 0 0 18px 0;
}

body.night-train-2d .nt-keyboard__black-keys {
    inset: 0 0 10px 0;
}

body.night-train-2d .nt-key {
    position: absolute;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    cursor: pointer;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

body.night-train-2d .nt-key--white {
    bottom: 0;
    height: 100%;
    border-radius: 0 0 12px 12px;
    background:
          linear-gradient(180deg, #f8f8f6 0%, #e8e6e0 40%, #d6d3cc 100%);
    border-left: 1px solid rgba(0,0,0,0.18);
    border-right: 1px solid rgba(0,0,0,0.12);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.85),
        inset 0 -8px 14px rgba(0,0,0,0.06);
}

body.night-train-2d .nt-key--black {
    top: 0;
    height: 54%;
    border-radius: 0 0 10px 10px;
    background:
          linear-gradient(180deg, #3b3b3b 0%, #1c1c1c 22%, #111 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 8px 18px rgba(0,0,0,0.38);
    z-index: 2;
}

body.night-train-2d .nt-key__label {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

body.night-train-2d .nt-key--white .nt-key__label {
    bottom: 6px;
    font-size: clamp(0.68rem, 0.74vw, 0.9rem);
    color: #2e3540;
}

body.night-train-2d .nt-key--black .nt-key__label {
    bottom: 5px;
    font-size: clamp(0.56rem, 0.58vw, 0.72rem);
    color: #f3efe7;
}

body.night-train-2d .nt-key.is-active.nt-key--white {
    background:
        linear-gradient(180deg, #fff5dc 0%, #f4e2a6 42%, #d5b564 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.9),
        0 0 16px rgba(242, 210, 155, 0.28);
}

body.night-train-2d .nt-key.is-active.nt-key--black {
    background:
        linear-gradient(180deg, #65583d 0%, #2d2419 28%, #18120d 100%);
    box-shadow:
        0 0 18px rgba(242, 210, 155, 0.25),
        inset 0 1px 0 rgba(255,255,255,0.12);
}

@media (max-width: 1240px) {
    body.night-train-2d .nt-performance {
        grid-template-columns: minmax(180px, 196px) minmax(0, 1fr) minmax(214px, 228px);
    }

    body.night-train-2d .nt-header__inner {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    body.night-train-2d .nt-deck-sections {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
}

@media (max-width: 960px) {
    body.night-train-2d .nt-main {
        grid-template-rows: auto auto minmax(260px, 40vh);
    }

    body.night-train-2d .nt-performance {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    body.night-train-2d .nt-deck-topbar {
        grid-template-columns: 1fr;
    }

    body.night-train-2d .nt-deck-sections {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.night-train-2d .nt-panel {
        max-height: 320px;
    }

    body.night-train-2d .nt-wheels {
        justify-content: center;
    }

    body.night-train-2d .nt-performance__left {
        justify-items: center;
    }
}

@media (max-width: 640px) {
    body.night-train-2d .nt-main {
        padding-inline: 14px;
    }

    body.night-train-2d .nt-deck-sections {
        grid-template-columns: 1fr;
    }
}
