.topbar {
  display: grid;
  grid-template-columns: minmax(220px, 0.44fr) minmax(520px, 0.56fr);
  align-items: center;
  justify-content: stretch;
  gap: 8px 14px;
  min-height: 86px;
  padding: 10px;
  border-radius: 8px 8px 0 0;
  font-family: var(--tracker-font);
}

.topbar-identity {
  position: relative;
  min-width: 0;
  padding: 2px 0 4px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--cyan);
  font-family: var(--tracker-font);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.1;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-family: var(--tracker-font);
  font-size: clamp(1.35rem, 3.2vw, 2.6rem);
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}

.neon-logo {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  max-width: 100%;
  padding: 0 0 8px;
  overflow: visible;
  color: var(--cyan);
  white-space: nowrap;
  text-shadow:
    0 0 3px rgba(56, 216, 233, 0.95),
    0 0 10px rgba(56, 216, 233, 0.64),
    0 0 22px rgba(245, 60, 255, 0.42);
  animation: neon-logo-breathe 3.8s ease-in-out infinite;
}

.neon-logo::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 0;
  height: 8px;
  background:
    radial-gradient(ellipse at 12% 45%, rgba(56, 216, 233, 0.95) 0 2px, transparent 3px),
    radial-gradient(ellipse at 32% 58%, rgba(245, 60, 255, 0.95) 0 2px, transparent 3px),
    radial-gradient(ellipse at 52% 42%, rgba(56, 216, 233, 0.95) 0 2px, transparent 3px),
    radial-gradient(ellipse at 72% 55%, rgba(245, 60, 255, 0.95) 0 2px, transparent 3px),
    linear-gradient(90deg, transparent, var(--cyan), var(--pink), var(--cyan), transparent);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 220% 100%;
  filter: drop-shadow(0 0 7px rgba(56, 216, 233, 0.78));
  clip-path: polygon(0 62%, 8% 36%, 16% 70%, 24% 28%, 34% 68%, 43% 34%, 53% 64%, 63% 30%, 73% 68%, 84% 38%, 100% 58%, 100% 100%, 0 100%);
  animation: neon-wave-scan 2.9s linear infinite;
}

.neon-logo-main {
  display: inline-block;
  color: #e8ffff;
  font-size: clamp(1.45rem, 3.6vw, 2.95rem);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.neon-logo-sub {
  display: inline-block;
  color: var(--pink);
  font-size: clamp(0.82rem, 1.7vw, 1.25rem);
  font-weight: 900;
  letter-spacing: 0;
  text-transform: lowercase;
  text-shadow:
    0 0 3px rgba(245, 60, 255, 0.9),
    0 0 12px rgba(245, 60, 255, 0.62);
}

.neon-credit {
  margin: 3px 0 0;
  color: color-mix(in srgb, var(--cyan) 78%, var(--paper));
  font-family: var(--tracker-font);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-transform: uppercase;
  text-shadow:
    0 0 4px rgba(56, 216, 233, 0.72),
    0 0 10px rgba(245, 60, 255, 0.36);
}

h2 {
  font-size: 1.2rem;
}

@keyframes neon-logo-breathe {
  0%,
  100% {
    filter: saturate(1);
    opacity: 0.96;
  }

  50% {
    filter: saturate(1.35);
    opacity: 1;
  }
}

@keyframes neon-wave-scan {
  from {
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
  }

  to {
    background-position: 0 0, 0 0, 0 0, 0 0, -220% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .neon-logo,
  .neon-logo::after {
    animation: none;
  }
}

.transport {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(74px, max-content));
  align-items: center;
  justify-content: end;
  gap: 5px;
  min-width: 0;
  padding: 5px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--tracker-cell) 86%, transparent);
}

.transport:focus-within {
  border-color: color-mix(in srgb, var(--cyan) 38%, var(--line));
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  background: var(--tracker-cell);
}

.mode-tabs:focus-within {
  border-color: color-mix(in srgb, var(--cyan) 42%, var(--line));
}

.mode-guard-status,
.patch-ownership-status,
.slot-write-status {
  grid-column: 1 / -1;
  min-height: 24px;
  padding: 5px 8px 3px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  color: var(--muted);
  background: color-mix(in srgb, var(--tracker-cell) 84%, black 10%);
  font-family: var(--tracker-font);
  font-size: 0.6rem;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.patch-ownership-status {
  margin-top: -4px;
  border-color: color-mix(in srgb, var(--cyan) 24%, var(--line));
  color: color-mix(in srgb, var(--cyan) 74%, var(--muted));
}

.slot-write-status {
  margin-top: -4px;
  border-color: color-mix(in srgb, var(--line) 80%, transparent);
  color: color-mix(in srgb, var(--muted) 84%, var(--paper));
}

.mode-guard-status[data-state="preview"] {
  border-color: color-mix(in srgb, var(--amber) 62%, var(--line));
  color: var(--amber);
  background: color-mix(in srgb, var(--amber) 9%, var(--tracker-cell));
}

.mode-guard-status[data-state="dirty"] {
  border-color: color-mix(in srgb, var(--lime) 54%, var(--line));
  color: var(--lime);
  background: color-mix(in srgb, var(--lime) 8%, var(--tracker-cell));
}

.patch-ownership-status[data-state="preview"] {
  border-color: color-mix(in srgb, var(--amber) 58%, var(--line));
  color: var(--amber);
  background: color-mix(in srgb, var(--amber) 8%, var(--tracker-cell));
}

.patch-ownership-status[data-state="split"] {
  border-color: color-mix(in srgb, var(--amber) 62%, var(--line));
  color: var(--amber);
  background: color-mix(in srgb, var(--amber) 7%, var(--tracker-cell));
}

.patch-ownership-status[data-state="match"] {
  border-color: color-mix(in srgb, var(--lime) 44%, var(--line));
  color: color-mix(in srgb, var(--lime) 76%, var(--muted));
  background: color-mix(in srgb, var(--lime) 5%, var(--tracker-cell));
}

.slot-write-status[data-state="active"] {
  border-color: color-mix(in srgb, var(--lime) 46%, var(--line));
  color: color-mix(in srgb, var(--lime) 74%, var(--muted));
  background: color-mix(in srgb, var(--lime) 5%, var(--tracker-cell));
}

html[data-work-mode="tracking"] .topbar .preset-rack,
html[data-work-mode="tracking"] .topbar .dice-rack,
html[data-work-mode="tracking"] .topbar .audition-rack,
html[data-work-mode="tracking"] #savePresetBtn,
html[data-work-mode="tracking"] #randomPatchBtn,
html[data-work-mode="modulation"] .topbar .preset-rack,
html[data-work-mode="modulation"] .topbar .dice-rack,
html[data-work-mode="modulation"] .topbar .audition-rack,
html[data-work-mode="modulation"] #savePresetBtn,
html[data-work-mode="modulation"] #randomPatchBtn,
html[data-work-mode="effects"] .topbar .preset-rack,
html[data-work-mode="effects"] .topbar .dice-rack,
html[data-work-mode="effects"] #savePresetBtn,
html[data-work-mode="effects"] #randomPatchBtn,
html[data-work-mode="performance"] .topbar .preset-rack,
html[data-work-mode="performance"] .topbar .dice-rack,
html[data-work-mode="performance"] .topbar .audition-rack,
html[data-work-mode="performance"] #savePresetBtn,
html[data-work-mode="performance"] #randomPatchBtn {
  display: none;
}

html[data-work-mode="synth"] .transport {
  justify-content: start;
}

html[data-work-mode="tracking"] .transport,
html[data-work-mode="modulation"] .transport,
html[data-work-mode="effects"] .transport,
html[data-work-mode="performance"] .transport {
  grid-column: 1 / -1;
  justify-self: end;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.mode-tab {
  min-height: 32px;
  min-width: 0;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--muted);
  background: var(--tracker-cell-2);
  font-family: var(--tracker-font);
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}

.mode-tab.active {
  border-color: rgba(56, 216, 233, 0.68);
  color: #071011;
  background: var(--cyan);
  box-shadow: inset 0 -2px 0 rgba(7, 16, 17, 0.32);
}

.mode-tab:hover,
.mode-tab:focus-visible {
  border-color: color-mix(in srgb, var(--cyan) 54%, var(--line));
  color: var(--text);
  outline: 1px solid color-mix(in srgb, var(--cyan) 42%, transparent);
  outline-offset: 1px;
}

.primary-button,
.ghost-button,
.icon-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
  background: var(--tracker-cell-2);
  font-family: var(--tracker-font);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}

.primary-button {
  padding: 0 14px;
  border-color: rgba(185, 244, 91, 0.42);
  color: #09100c;
  background: var(--lime);
  box-shadow: inset 0 -2px 0 rgba(5, 7, 6, 0.24);
}

.primary-button:hover,
.primary-button:focus-visible {
  border-color: color-mix(in srgb, var(--lime) 84%, white 8%);
  outline: 1px solid color-mix(in srgb, var(--lime) 58%, transparent);
  outline-offset: 1px;
}

.ghost-button {
  padding: 0 11px;
}

.ghost-button:hover,
.ghost-button:focus-visible {
  border-color: color-mix(in srgb, var(--cyan) 46%, var(--line));
  color: var(--text);
  background: color-mix(in srgb, var(--tracker-cell-2) 72%, var(--cyan) 12%);
  outline: 1px solid color-mix(in srgb, var(--cyan) 34%, transparent);
  outline-offset: 1px;
}

.ghost-button.active {
  color: #071011;
  background: var(--cyan);
  box-shadow: inset 0 -2px 0 rgba(7, 16, 17, 0.24);
}

.audition-button:active,
.audition-button:focus-visible {
  border-color: color-mix(in srgb, var(--cyan) 72%, white 8%);
  color: #071011;
  background: var(--cyan);
  outline: 1px solid color-mix(in srgb, var(--cyan) 64%, transparent);
  outline-offset: 1px;
}

.hold-note-button.active {
  border-color: color-mix(in srgb, var(--lime) 78%, white 6%);
  color: #050706;
  background: var(--lime);
  box-shadow:
    inset 0 0 0 1px rgba(5, 7, 6, 0.28),
    0 0 0 1px color-mix(in srgb, var(--lime) 32%, transparent);
}

.hold-note-button:active,
.hold-note-button:focus-visible,
.hold-note-button.active:active,
.hold-note-button.active:focus-visible {
  border-color: color-mix(in srgb, var(--lime) 82%, white 8%);
  color: #050706;
  background: var(--lime);
  outline: 1px solid color-mix(in srgb, var(--lime) 62%, transparent);
  outline-offset: 1px;
}

.icon-button {
  min-width: 58px;
  padding: 0 10px;
  border-color: rgba(56, 216, 233, 0.38);
}

.icon-button.active {
  color: #071011;
  background: var(--cyan);
}

.tempo,
.preset-rack,
.dice-rack,
.audition-rack,
.theme-rack,
.about-rack {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--tracker-cell);
  color: var(--muted);
  font-family: var(--tracker-font);
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 0;
  text-transform: uppercase;
}

.tempo:focus-within,
.preset-rack:focus-within,
.dice-rack:focus-within,
.audition-rack:focus-within,
.theme-rack:focus-within,
.about-rack:focus-within {
  border-color: color-mix(in srgb, var(--amber) 42%, var(--line));
}

.tempo label,
.preset-rack label,
.dice-rack label,
.audition-rack label,
.theme-rack label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preset-rack {
  grid-template-columns: auto 148px;
}

.dice-rack {
  grid-template-columns: auto 104px;
}

.audition-rack {
  grid-template-columns: 54px 54px 62px;
  gap: 5px;
}

.audition-rack > label[for="auditionNoteSelect"] {
  display: none;
}

.theme-rack {
  grid-template-columns: auto 132px;
}

.about-rack {
  position: relative;
  display: block;
  min-width: 86px;
  padding: 0;
}

.about-rack summary {
  display: grid;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.about-rack summary::-webkit-details-marker {
  display: none;
}

.about-rack summary::after {
  content: "0.1a";
  margin-left: 8px;
  color: var(--cyan);
  font-size: 0.58rem;
  text-shadow: 0 0 6px rgba(56, 216, 233, 0.68);
}

.about-panel {
  position: absolute;
  z-index: 60;
  right: 0;
  top: calc(100% + 6px);
  display: grid;
  gap: 6px;
  width: min(320px, 82vw);
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--cyan) 42%, var(--line));
  color: var(--text);
  background: color-mix(in srgb, var(--tracker-cell) 96%, black 4%);
  box-shadow:
    0 0 0 1px rgba(245, 60, 255, 0.16),
    0 14px 34px rgba(0, 0, 0, 0.44),
    0 0 22px rgba(56, 216, 233, 0.16);
}

.about-panel strong {
  color: #e8ffff;
  font-size: 0.86rem;
  text-shadow:
    0 0 4px rgba(56, 216, 233, 0.82),
    0 0 12px rgba(245, 60, 255, 0.42);
  text-transform: uppercase;
}

.about-panel span {
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.about-panel span:nth-child(3),
.about-panel span:nth-child(4) {
  color: color-mix(in srgb, var(--cyan) 80%, var(--paper));
}

.tempo input,
.preset-rack select,
.dice-rack select,
.audition-rack select,
.theme-rack select {
  width: 72px;
  border: 0;
  color: var(--text);
  background: transparent;
  font-weight: 800;
  min-width: 0;
}

.tempo input:focus-visible,
.preset-rack select:focus-visible,
.dice-rack select:focus-visible,
.audition-rack select:focus-visible,
.theme-rack select:focus-visible {
  outline: 1px solid color-mix(in srgb, var(--amber) 64%, transparent);
  outline-offset: 1px;
}

.preset-rack select,
.dice-rack select,
.audition-rack select,
.theme-rack select {
  cursor: pointer;
}

.tempo-controls {
  display: grid;
  grid-template-columns: 26px 78px 26px;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.tempo-controls .tempo-step-button {
  min-height: 28px;
  min-width: 26px;
  padding: 0;
}

.tempo-controls input {
  width: 100%;
  min-height: 28px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.preset-rack select {
  width: 148px;
}

.dice-rack select {
  width: 104px;
}

.dice-taming {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: auto minmax(46px, 1fr) 28px;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
}

.dice-taming span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dice-taming input {
  width: 100%;
  min-width: 0;
  accent-color: var(--amber);
}

.dice-taming strong {
  display: inline-grid;
  place-items: center;
  min-height: 20px;
  border: 1px solid color-mix(in srgb, var(--amber) 34%, var(--line));
  color: var(--amber);
  background: #11131a;
  font-size: 0.58rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.audition-rack select {
  width: 54px;
}

.audition-rack .ghost-button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 0.64rem;
}

.audition-button {
  min-width: 54px;
}

.hold-note-button {
  min-width: 62px;
}

.audition-status {
  grid-column: 1 / -1;
  min-height: 24px;
  width: 100%;
  padding: 5px 7px 3px;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.audition-status[data-state="held"] {
  border-color: color-mix(in srgb, var(--lime) 62%, var(--line));
  color: var(--lime);
  background: color-mix(in srgb, var(--tracker-cell) 72%, var(--lime) 12%);
}

.audition-rack .ghost-button,
.tempo-controls .tempo-step-button {
  align-self: center;
}

.panel-command {
  min-height: 36px;
  padding-inline: 10px;
  max-width: 120px;
}

.synth-control-strip .panel-command {
  align-self: stretch;
}

.theme-rack select {
  width: 132px;
}

.visual-panel {
  position: relative;
  overflow: hidden;
  height: 210px;
  border-top: 0;
  border-radius: 0;
  background:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px),
    #101118;
  background-size: 36px 36px;
}

#scope {
  display: block;
  width: 100%;
  height: 100%;
}

.readout {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-family: var(--tracker-font);
  font-size: 0.72rem;
  font-weight: 800;
}

.scope-mode {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.scope-mode select {
  width: 132px;
  min-height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0;
  color: var(--text);
  background: var(--tracker-cell);
  font-family: var(--tracker-font);
  font-size: 0.68rem;
  font-weight: 800;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0;
}

html[data-work-mode="synth"] .visual-panel {
  height: 150px;
}

html[data-work-mode="synth"] .controls-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  margin-top: 6px;
}

html[data-work-mode="synth"] .module {
  min-height: 142px;
  padding: 7px;
}

html[data-work-mode="synth"] .module-title {
  min-height: 24px;
  margin-bottom: 6px;
  padding: 3px 6px;
}

html[data-work-mode="synth"] .field {
  margin: 4px 0;
}

html[data-work-mode="synth"] .keyboard {
  margin-top: 6px;
}

html[data-work-mode="modulation"] .visual-panel,
html[data-work-mode="effects"] .visual-panel,
html[data-work-mode="performance"] .visual-panel {
  height: 170px;
}

html[data-work-mode="tracking"] .controls-grid .module:not(.module-rack):not(.module-export):not(.module-project),
html[data-work-mode="synth"] .controls-grid .module-lfo,
html[data-work-mode="synth"] .controls-grid .module-macros,
html[data-work-mode="synth"] .controls-grid .module-matrix,
html[data-work-mode="synth"] .controls-grid .module-studio-mixer,
html[data-work-mode="synth"] .controls-grid .module-modulation-guide,
html[data-work-mode="synth"] .controls-grid .module-modulation-signal,
html[data-work-mode="synth"] .controls-grid .module-effect-guide,
html[data-work-mode="synth"] .controls-grid .module-effect-signal,
html[data-work-mode="synth"] .controls-grid .module-effect-xy,
html[data-work-mode="synth"] .controls-grid .module-effect-rack,
html[data-work-mode="synth"] .controls-grid .module-effect-routing,
html[data-work-mode="synth"] .controls-grid .module-effect-parameters,
html[data-work-mode="modulation"] .controls-grid .module-osc,
html[data-work-mode="modulation"] .controls-grid .module-source,
html[data-work-mode="modulation"] .controls-grid .module-digital,
html[data-work-mode="modulation"] .controls-grid .module-filter,
html[data-work-mode="modulation"] .controls-grid .module-env,
html[data-work-mode="modulation"] .controls-grid .module-live-slot,
html[data-work-mode="modulation"] .controls-grid .module-space,
html[data-work-mode="modulation"] .controls-grid .module-arp,
html[data-work-mode="modulation"] .controls-grid .module-effect-guide,
html[data-work-mode="modulation"] .controls-grid .module-effect-signal,
html[data-work-mode="modulation"] .controls-grid .module-effect-xy,
html[data-work-mode="modulation"] .controls-grid .module-effect-rack,
html[data-work-mode="modulation"] .controls-grid .module-effect-routing,
html[data-work-mode="modulation"] .controls-grid .module-effect-parameters,
html[data-work-mode="performance"] .controls-grid .module-osc,
html[data-work-mode="performance"] .controls-grid .module-source,
html[data-work-mode="performance"] .controls-grid .module-digital,
html[data-work-mode="performance"] .controls-grid .module-filter,
html[data-work-mode="performance"] .controls-grid .module-env,
html[data-work-mode="performance"] .controls-grid,
html[data-work-mode="effects"] .controls-grid .module-osc,
html[data-work-mode="effects"] .controls-grid .module-source,
html[data-work-mode="effects"] .controls-grid .module-env,
html[data-work-mode="effects"] .controls-grid .module-digital,
html[data-work-mode="effects"] .controls-grid .module-live-slot,
html[data-work-mode="effects"] .controls-grid .module-motion,
html[data-work-mode="effects"] .controls-grid .module-macros,
html[data-work-mode="effects"] .controls-grid .module-matrix,
html[data-work-mode="effects"] .controls-grid .module-studio-mixer,
html[data-work-mode="effects"] .controls-grid .module-modulation-guide,
html[data-work-mode="effects"] .controls-grid .module-modulation-signal,
html[data-work-mode="synth"] .sequencer,
html[data-work-mode="synth"] .tracker,
html[data-work-mode="synth"] .drums,
html[data-work-mode="synth"] .performance-surface,
html[data-work-mode="modulation"] .sequencer,
html[data-work-mode="modulation"] .tracker,
html[data-work-mode="modulation"] .drums,
html[data-work-mode="modulation"] .keyboard,
html[data-work-mode="modulation"] .performance-surface,
html[data-work-mode="effects"] .sequencer,
html[data-work-mode="effects"] .tracker,
html[data-work-mode="effects"] .drums,
html[data-work-mode="effects"] .keyboard,
html[data-work-mode="effects"] .performance-surface,
html[data-work-mode="performance"] .sequencer,
html[data-work-mode="performance"] .tracker,
html[data-work-mode="performance"] .drums,
html[data-work-mode="performance"] .keyboard,
html[data-work-mode="tracking"] .performance-surface {
  display: none;
}

html[data-work-mode="tracking"] .controls-grid,
html[data-work-mode="modulation"] .controls-grid,
html[data-work-mode="effects"] .controls-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

html[data-work-mode="effects"] .controls-grid .module-space {
  display: block;
}

html[data-work-mode="effects"] .controls-grid .module-effect-guide {
  order: 1;
  grid-column: span 2;
}

html[data-work-mode="effects"] .controls-grid .module-effect-signal {
  order: 2;
  grid-column: span 2;
}

html[data-work-mode="effects"] .controls-grid .module-effect-rack {
  order: 3;
  grid-column: span 2;
}

html[data-work-mode="effects"] .controls-grid .module-effect-xy {
  order: 4;
  grid-column: span 2;
}

html[data-work-mode="effects"] .controls-grid .module-effect-parameters {
  order: 5;
  grid-column: span 2;
}

html[data-work-mode="effects"] .controls-grid .module-effect-routing {
  order: 6;
  grid-column: span 2;
}

html[data-work-mode="effects"] .controls-grid .module-space {
  order: 7;
}

html[data-work-mode="modulation"] .controls-grid .module-modulation-guide {
  order: 2;
  grid-column: span 2;
}

html[data-work-mode="modulation"] .controls-grid .module-modulation-signal {
  order: 3;
  grid-column: span 2;
}

html[data-work-mode="modulation"] .controls-grid .module-studio-mixer {
  order: 1;
  grid-column: span 4;
}

html[data-work-mode="modulation"] .controls-grid .module-macros {
  order: 4;
  grid-column: span 2;
}

html[data-work-mode="modulation"] .controls-grid .module-matrix {
  order: 5;
  grid-column: span 3;
}

html[data-work-mode="modulation"] .controls-grid .module-lfo {
  order: 6;
}

html[data-work-mode="performance"] .visual-panel,
html[data-work-mode="modulation"] .visual-panel,
html[data-work-mode="effects"] .visual-panel {
  border-radius: 0;
}

html[data-work-mode="tracking"] .visual-panel {
  height: 118px;
  order: 1;
  margin-bottom: 8px;
  border-radius: 0;
}

html[data-work-mode="tracking"] .topbar {
  order: 0;
  margin-bottom: 8px;
  border-radius: 8px;
}

html[data-work-mode="tracking"] .tracker {
  order: 2;
  margin-top: 0;
}

html[data-work-mode="tracking"] .sequencer {
  order: 3;
}

html[data-work-mode="tracking"] .controls-grid {
  order: 3;
  margin: 8px 0 0;
}

html[data-work-mode="tracking"] .drums {
  order: 4;
}

html[data-work-mode="tracking"] .keyboard {
  order: 5;
}

html[data-work-mode="tracking"] .module-rack,
html[data-work-mode="tracking"] .module-project,
html[data-work-mode="tracking"] .module-export {
  min-height: 0;
}
