:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  background: #2d2d2d;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

body.admin-view {
  background: #000;
}

body.stochastic-generator-view {
  overflow-x: hidden;
  background-color: #000;
  background-image: radial-gradient(
    circle,
    #151515 0 3px,
    rgba(21, 21, 21, .7) 5px,
    rgba(21, 21, 21, .3) 8px,
    transparent 11px
  );
  background-size: 30px 30px;
  font-family: "Space Grotesk", sans-serif;
}

.stochastic-generator-view button,
.stochastic-generator-view input {
  font-family: inherit;
}

.stochastic-generator-view .generator-log {
  font: 12pt/1.5 "Space Mono", monospace;
  color: #b2b2b2;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  scrollbar-width: none;
  white-space: pre-wrap;
}

.stochastic-generator-view .generator-log::-webkit-scrollbar {
  display: none;
}

.stochastic-masthead {
  width: 90vw;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.stochastic-masthead__title,
.stochastic-masthead__subtitle {
  margin: 0;
  font-size: clamp(28px, 6vw, 86px);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.035em;
  text-align: left;
  white-space: nowrap;
}

.stochastic-masthead__title {
  color: #f4f4f4;
}

.stochastic-masthead__subtitle {
  color: #e6983f;
}

.stochastic-generator-view .controls {
  width: 90vw;
  margin-block: 30px;
  justify-content: flex-start;
}

.stochastic-generator-view button,
.stochastic-generator-view select {
  border-radius: 0;
}

.stochastic-generator-view #stop-button {
  border: 1px solid #fff;
  color: #fff;
  background: #000;
  text-transform: uppercase;
}

.stochastic-generator-view #now-playing {
  width: 90vw;
  color: #fff;
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 700;
  opacity: 1;
  text-align: left;
  text-transform: uppercase;
  transition: opacity 1s ease;
}

.stochastic-generator-view #now-playing.now-playing--changing {
  opacity: 0;
}

.mobile-now-playing {
  display: none;
}

.stochastic-generator-view .now-playing__separator {
  width: 5px;
  height: .85em;
  display: inline-block;
  margin-inline: .35em;
  background: #e6983f;
  vertical-align: -.08em;
}

.audio-settings-button {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 21;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.audio-settings-button img {
  width: 100%;
  height: 100%;
  display: block;
  opacity: .5;
  transition: opacity 120ms ease;
}

.audio-settings-button:hover img,
.audio-settings-button:focus-visible img {
  opacity: .75;
}

.clipping-indicator {
  position: fixed;
  top: max(58px, calc(env(safe-area-inset-top) + 46px));
  right: max(12px, env(safe-area-inset-right));
  z-index: 21;
  width: 38px;
  height: 38px;
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 80ms ease, visibility 80ms ease;
}

.clipping-indicator--visible {
  opacity: 1;
  visibility: visible;
}

.audio-settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
  overflow-y: auto;
  background: rgba(0, 0, 0, .72);
}

.audio-settings-overlay[hidden] {
  display: none;
}

.audio-settings-panel {
  width: min(520px, 100%);
  max-height: 100%;
  padding: 24px;
  border: 1px solid #3b3b3b;
  box-sizing: border-box;
  overflow-y: auto;
  color: #f4f4f4;
  background: #111;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .65);
}

.audio-settings-panel h2 {
  margin: 0 0 22px;
  color: #e6983f;
  font-size: 18px;
  letter-spacing: .08em;
}

.audio-settings-controls {
  display: grid;
  gap: 14px;
}

.audio-setting-control {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 72px;
  gap: 12px;
  align-items: center;
  color: #aaa;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.audio-setting-control output {
  color: #ddd;
  font-variant-numeric: tabular-nums;
  text-align: right;
  text-transform: none;
}

.audio-settings-panel .horizontal-slider {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  height: 32px;
  margin: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  cursor: pointer;
}

.audio-settings-panel .horizontal-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 3px;
  border: 0;
  border-radius: 0;
  background: #666;
}

.audio-settings-panel .horizontal-slider::-webkit-slider-thumb {
  width: 4px;
  height: 24px;
  margin-top: -10.5px;
  border: 0;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
}

.audio-settings-panel .horizontal-slider::-moz-range-track {
  width: 100%;
  height: 3px;
  border: 0;
  border-radius: 0;
  background: #666;
}

.audio-settings-panel .horizontal-slider::-moz-range-thumb {
  width: 4px;
  height: 24px;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.audio-settings-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.audio-settings-defaults,
.audio-settings-dismiss {
  width: 100%;
}

.audio-settings-defaults {
  border: 1px solid #666;
  color: #aaa;
  background: transparent;
}

.audio-settings-dismiss {
  border: 1px solid #e6983f;
  color: #e6983f;
  background: transparent;
}

@media (max-width: 520px) {
  .audio-settings-overlay {
    place-items: stretch;
    padding: 0;
  }

  .audio-settings-panel {
    width: 100%;
    min-height: 100%;
    padding: max(72px, calc(env(safe-area-inset-top) + 48px)) max(18px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
    border: 0;
  }

  .audio-setting-control {
    grid-template-columns: 76px minmax(0, 1fr) 66px;
    gap: 8px;
  }
}

.startup-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #2d2d2d;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  z-index: 10;
}

.startup-screen--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.startup-screen__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
}

.app-background-layer {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -2;
}

main {
  width: min(920px, 96vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.app-title {
  margin: 0;
  color: #f4f4f4;
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}

.app-subtitle {
  margin: 0;
  color: #f4f4f4;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.02em;
}

.crowd-pool-count {
  margin: 4px 0 36px;
  color: #b8b8b8;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.moment-phrase-status {
  margin: -33px 0 10px;
  height: 1em;
  line-height: 1em;
  white-space: nowrap;
}

.controls {
  display: flex;
  gap: 10px;
}

.landing-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.landing-links a {
  padding: 18px 24px;
  border-radius: 3px;
  color: #111;
  background: #e6983f;
  text-decoration: none;
  transition: transform 90ms ease, filter 120ms ease, box-shadow 120ms ease;
}

.landing-links a:active {
  transform: translateY(1px);
  filter: brightness(0.88);
}

.landing-links a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.55), 0 0 0 4px rgba(230, 152, 63, 0.7);
}

.search-view main {
  gap: 14px;
}

.search-form {
  width: min(520px, 90vw);
  margin-top: 48px;
}

.search-fields {
  display: flex;
  gap: 10px;
}

.search-fields input {
  min-width: 0;
  flex: 1;
  padding: 12px 14px;
  border: 1px solid #767676;
  border-radius: 3px;
  box-sizing: border-box;
  color: #f4f4f4;
  background: rgba(0, 0, 0, 0.72);
  font: inherit;
}

.search-fields input:focus-visible {
  outline: none;
  border-color: #e6983f;
  box-shadow: 0 0 0 2px rgba(230, 152, 63, 0.35);
}

.search-fields button {
  min-width: 82px;
  color: #111;
  background: #e6983f;
}

.search-status {
  min-height: 1.25em;
  margin: 8px 0 0;
  color: #d8d8d8;
  text-align: center;
}

.search-status[data-state="error"] {
  color: #ffb4ab;
}

.search-status[data-state="success"] {
  color: #f4f4f4;
}

.stats-view {
  display: block;
  overflow-y: auto;
}

.stats-view main {
  width: min(1400px, 94vw);
  min-height: 100vh;
  margin: 0 auto;
  padding: 38px 0 48px;
  box-sizing: border-box;
  gap: 28px;
}

.stats-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.stats-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

#load-stats-button {
  color: #111;
  background: #e6983f;
}

#load-analysis-button {
  color: #111;
  background: #e6983f;
}

.stats-status {
  min-height: 1.25em;
  margin: 0;
  color: #b8b8b8;
  font-size: 12px;
  text-align: center;
}

.stats-status[data-state="error"] {
  color: #ffb4ab;
}

.stats-status[data-state="success"] {
  color: #d8d8d8;
}

.stats-legend {
  min-height: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
  color: #d8d8d8;
  font-size: 12px;
}

.stats-legend:empty {
  display: none;
}

.stats-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stats-legend-swatch {
  width: 11px;
  height: 11px;
  display: inline-block;
  border-radius: 2px;
}

.analysis-note {
  margin: 0;
  color: #8f8f8f;
  font-size: 11px;
  text-align: center;
}

.analysis-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.18);
}

.analysis-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  color: #d8d8d8;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.analysis-table th,
.analysis-table td {
  padding: 9px 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  text-align: right;
  white-space: nowrap;
}

.analysis-table thead th {
  color: #f4f4f4;
  background: #202020;
  text-align: center;
}

.analysis-table thead tr:first-child th:not(:first-child) {
  border-bottom-color: rgba(230, 152, 63, 0.45);
}

.analysis-table tbody th {
  color: #f4f4f4;
  font-weight: 400;
  text-align: left;
}

.analysis-record-count {
  color: #f4f4f4;
  text-align: center !important;
}

.analysis-table .analysis-class-column,
.analysis-table tbody th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 142px;
  background: #191919;
}

.analysis-table thead .analysis-class-column {
  z-index: 2;
  background: #202020;
}

.analysis-table tr:last-child th,
.analysis-table tr:last-child td {
  border-bottom: 0;
}

.analysis-table th:last-child,
.analysis-table td:last-child {
  border-right: 0;
}

.stats-panels {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.stats-panel {
  min-width: 0;
  padding: 24px 22px 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.18);
}

.stats-panel h3 {
  margin: 0 0 24px;
  color: #f4f4f4;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: lowercase;
}

.stats-chart {
  display: grid;
  gap: 10px;
}

.stats-chart-row {
  min-height: 22px;
  display: grid;
  grid-template-columns: minmax(126px, 34%) minmax(80px, 1fr) 44px;
  align-items: center;
  gap: 10px;
}

.stats-chart-label {
  min-width: 0;
  color: #d8d8d8;
  font-size: 12px;
  overflow-wrap: anywhere;
  text-align: right;
}

.stats-chart-bar {
  height: 14px;
  display: flex;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.stats-chart-bar-segment {
  height: 100%;
  display: block;
  flex: 0 0 auto;
  min-width: 0;
  transition: width 300ms ease-out;
}

.stats-chart-count {
  color: #f4f4f4;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: left;
}

@media (max-width: 800px) {
  .stats-panels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 440px) {
  .stats-panel {
    padding-right: 12px;
    padding-left: 12px;
  }

  .stats-chart-row {
    grid-template-columns: minmax(100px, 38%) minmax(50px, 1fr) 34px;
    gap: 7px;
  }
}

.mix-controls-narrow {
  width: min(700px, 96vw);
  display: grid;
  gap: 8px;
  margin-top: 50px;
}

.mix-controls-wide {
  width: min(950px, 96vw);
  display: grid;
  gap: 8px;
  margin-top: 50px;
}

.master-controls {
  width: min(920px, 96vw);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}

.master-knob {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.mix-header {
  display: grid;
  grid-template-columns: 52px repeat(5, minmax(0, 1fr)) minmax(280px, 1.5fr);
  align-items: center;
  gap: 10px;
  color: #b8b8b8;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.mix-header span {
  justify-self: center;
}

.mix-header span:first-child,
.mix-header span:last-child {
  justify-self: start;
}

.mix-control {
  display: grid;
  grid-template-columns: 52px repeat(5, minmax(0, 1fr)) minmax(280px, 1.5fr);
  align-items: center;
  gap: 10px;
  color: #d8d8d8;
  font-size: 13px;
  transition: opacity 150ms ease;
}

.client-view .mix-header,
.client-view .mix-control {
  grid-template-columns: 52px repeat(5, minmax(0, 1fr));
}

.client-view .mix-header span:last-child {
  justify-self: center;
}

.client-view .controls #register-button {
  margin-left: 0;
}

.client-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transition: opacity 400ms ease, visibility 400ms ease;
}

.label-controls {
  width: min(700px, 92vw);
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 12px 16px;
}

.label-controls label {
  display: grid;
  gap: 6px;
  color: #b8b8b8;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.label-controls select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #767676;
  border-radius: 3px;
  box-sizing: border-box;
  color: #f4f4f4;
  background: rgba(0, 0, 0, 0.72);
  font: inherit;
  text-transform: none;
}

.label-controls select:focus-visible {
  outline: none;
  border-color: #e6983f;
  box-shadow: 0 0 0 2px rgba(230, 152, 63, 0.35);
}

.label-controls select:disabled {
  opacity: .5;
}

.scene-class-description {
  grid-column: 1 / -1;
  min-height: 2.8em;
  margin: 0;
  color: #d8d8d8;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.scene-class-description[data-state="error"] {
  color: #ffb4ab;
}

.label-view .mix-controls-narrow {
  margin-top: 20px;
}

.label-view {
  padding: 24px 0;
  box-sizing: border-box;
  overflow-y: auto;
}

@media (max-width: 520px) {
  .label-controls {
    grid-template-columns: 1fr;
  }

  .scene-class-description {
    grid-column: 1;
  }
}

.client-view--moment-saved .client-controls {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.client-moment-confirmation {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 24px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 400ms ease, visibility 400ms ease;
  transform: translateY(40px);
}

.client-view--moment-saved .client-moment-confirmation {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.client-moment-phrase {
  margin: 8px 0 0;
  color: #f4f4f4;
  font-size: clamp(22px, 4.5vw, 54px);
  font-weight: 700;
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-align: center;
}

.client-moment-message {
  margin: 0 0 -16px;
  color: #d8d8d8;
  font-size: clamp(16px, 2vw, 24px);
  text-align: center;
}

.client-similar-class {
  margin: -12px 0 0;
  color: #e6983f;
  font-size: clamp(16px, 2vw, 24px);
  text-align: center;
}

.client-similar-class-description {
  max-width: 720px;
  margin: -20px 0 0;
  color: #c9c9c9;
  font-size: clamp(12px, 1.4vw, 16px);
  line-height: 1.4;
  text-align: center;
}

#continue-button {
  color: #111;
  background: #e6983f;
  font-size: 16px;
  margin-top: 24px;
}

.mix-control > :nth-child(n + 2):nth-child(-n + 6) {
  justify-self: center;
}

.mix-label {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.knob-container {
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: grab;
}

.knob-container:active {
  cursor: grabbing;
}

.knob-canvas {
  display: block;
}

.sample-name {
  min-height: 1em;
  font-size: 12px;
  color: #c8c8c8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.randomize-button {
  width: 64px;
  padding: 6px 8px;
  border: 1px solid #e6983f;
  border-radius: 3px;
  color: #fff;
  background: #000;
  font-size: 10px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

button {
  padding: 10px 18px;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  transform: translateY(0);
  transition: transform 90ms ease, filter 120ms ease, box-shadow 120ms ease;
}

button:active:not(:disabled) {
  transform: translateY(1px);
  filter: brightness(0.88);
}

button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.55), 0 0 0 4px rgba(230, 152, 63, 0.7);
}

#start-button,
#play-button,
#random-button,
#crowd-button {
  color: #111;
  background: #e6983f;
}

#play-button {
  margin-left: 40px;
}

#random-button {
  margin-left: 40px;
}

#stop-button {
  color: #f2f2f2;
  background: #7a3a3a;
}

#register-button {
  margin-left: 40px;
  color: #fff;
  background: #000;
}

button:disabled {
  opacity: .35;
  cursor: default;
}

#now-playing {
  margin: 0;
  color: #b8b8b8;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.generator-status,
.queue-status {
  min-height: 1.25em;
  margin: 0;
  color: #d8d8d8;
  font-size: 12px;
  text-align: center;
}

.generator-status[data-state="error"] {
  color: #ffb4ab;
}

.generator-status[data-state="warning"] {
  color: #ffd18a;
}

.generator-view .generator-status {
  margin-top: 20px;
}

.generator-view .queue-status {
  margin-bottom: 20px;
}

.generator-view #generate-button {
  color: #111;
  background: #e6983f;
}

.generator-template-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b8b8b8;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.generator-template-label select {
  min-width: 220px;
  padding: 10px 12px;
  border: 1px solid #767676;
  border-radius: 3px;
  color: #f4f4f4;
  background: rgba(0, 0, 0, 0.72);
  font: inherit;
  text-transform: none;
}

.generator-template-label select:focus-visible {
  outline: none;
  border-color: #e6983f;
  box-shadow: 0 0 0 2px rgba(230, 152, 63, 0.35);
}

.generator-template-label select:disabled {
  opacity: .5;
}

.generator-view .generator-mix {
  width: 100%;
  margin-top: 0;
}

.generator-view {
  overflow-y: auto;
}

.generator-view main {
  width: min(1440px, 96vw);
  padding: 32px 0;
}

.generator-workspace {
  width: 100%;
  display: grid;
  grid-template-columns: 500px 592px;
  align-items: stretch;
  justify-content: center;
  gap: 20px;
}

.stochastic-generator-view .generator-workspace {
  width: 90vw;
  grid-template-columns: 872px 350px;
  column-gap: 40px;
  justify-content: start;
}

.stochastic-generator-view .generator-mix {
  --sample-column-left-space: 24px;
  order: -1;
  gap: 0;
}

.stochastic-generator-view .mix-label {
  font-size: 16px;
  font-weight: 600;
}

.stochastic-generator-view .mix-header {
  padding-block: 7px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  font-size: 13.2px;
}

.stochastic-generator-view .mix-control {
  padding-block: 4px;
  border-top: 1px solid rgba(255, 255, 255, .16);
}

.stochastic-generator-view .mix-control:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, .16);
}

.stochastic-generator-view .generator-log-panel {
  width: min(350px, 100%);
  grid-template-rows: minmax(0, 1fr);
}

.generator-log-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.generator-log-label {
  color: #b8b8b8;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.generator-log {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 12px;
  border: 0;
  border-radius: 0;
  outline: 0;
  box-shadow: none;
  box-sizing: border-box;
  resize: none;
  color: #e4e4e4;
  background: transparent;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  tab-size: 10;
}

.generator-view .knob-canvas {
  pointer-events: none;
}

.generator-view .mix-header,
.generator-view .mix-control {
  grid-template-columns:
    42px
    50px 50px
    50px 50px
    50px 50px
    50px
    200px;
  column-gap: 0;
  row-gap: 4px;
}

.stochastic-generator-view .mix-header,
.stochastic-generator-view .mix-control {
  grid-template-columns:
    62px
    50px 50px
    50px 50px
    50px 50px
    50px
    200px
    minmax(0, 280px);
}

.generator-view .mix-header > :nth-child(1),
.generator-view .mix-control > :nth-child(1) {
  grid-column: 1;
}

.generator-view .mix-header > :nth-child(2),
.generator-view .mix-control > :nth-child(2) {
  grid-column: 2;
}

.generator-view .mix-header > :nth-child(3),
.generator-view .mix-control > :nth-child(3) {
  grid-column: 4;
}

.generator-view .mix-header > :nth-child(4),
.generator-view .mix-control > :nth-child(4) {
  grid-column: 6;
}

.generator-view .mix-header > :nth-child(5),
.generator-view .mix-control > :nth-child(5) {
  grid-column: 8;
}

.generator-view .mix-header > :nth-child(6),
.generator-view .mix-control > :nth-child(6) {
  grid-column: 9;
}

.stochastic-generator-view .mix-control > :nth-child(7) {
  grid-column: 10;
}

.generator-view .mix-control > :nth-child(n + 2):nth-child(-n + 5) {
  justify-self: center;
}

.generator-view .mix-control > .sample-name {
  min-width: 0;
  max-width: 100%;
  justify-self: stretch;
  padding-left: 12px;
  box-sizing: border-box;
  text-align: left;
}

.stochastic-generator-view .track-waveform {
  width: 100%;
  height: 50px;
  display: block;
  background: transparent;
}

.stochastic-generator-view .mix-control > .sample-name {
  width: calc(100% - var(--sample-column-left-space));
  margin-left: var(--sample-column-left-space);
  padding-inline: 16px;
}

.generator-view .mix-header > :nth-child(6) {
  width: 100%;
  padding-left: 12px;
  box-sizing: border-box;
  justify-self: stretch;
  text-align: left;
}

.stochastic-generator-view .mix-header > :nth-child(6) {
  width: calc(100% - var(--sample-column-left-space));
  margin-left: var(--sample-column-left-space);
}

@media (max-width: 1180px) {
  .generator-workspace {
    grid-template-columns: minmax(0, 592px);
  }

  .stochastic-generator-view .generator-workspace {
    grid-template-columns: minmax(0, 592px);
  }

  .generator-log-panel {
    width: min(500px, 100%);
    justify-self: center;
  }

  .generator-log {
    min-height: 180px;
  }
}

@media (max-width: 1410px) {
  .stochastic-generator-view .generator-workspace {
    grid-template-columns: minmax(0, 872px);
  }
}

@media (max-width: 960px) {
  .stochastic-generator-view .mix-header,
  .stochastic-generator-view .mix-control {
    grid-template-columns:
      62px
      50px minmax(12px, 1fr)
      50px minmax(12px, 1fr)
      50px minmax(12px, 1fr)
      50px
      200px;
  }

  .stochastic-generator-view .mix-control > .track-waveform {
    height: 60px;
    grid-column: 1 / -1;
    margin-top: 4px;
  }
}

@media (max-width: 680px) {
  .stochastic-generator-view .controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
  }

  .stochastic-generator-view .generator-template-label {
    min-width: 0;
  }

  .stochastic-generator-view .generator-template-label select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .stochastic-generator-view .generator-workspace {
    width: 90vw;
    grid-template-columns: minmax(0, 1fr);
  }

  .stochastic-generator-view .generator-mix,
  .stochastic-generator-view .generator-log-panel {
    width: 100%;
  }

  .stochastic-generator-view .generator-log-panel {
    grid-template-rows: auto minmax(180px, 1fr);
    justify-self: stretch;
  }

  .stochastic-generator-view .generator-log {
    padding-right: 0;
    padding-left: 0;
    font-size: 12px;
  }

  .stochastic-generator-view #now-playing {
    display: none;
  }

  .stochastic-generator-view .mobile-now-playing {
    display: block;
    margin: 12px 0 2px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    opacity: 1;
    text-align: left;
    text-transform: uppercase;
    transition: opacity 1s ease;
  }

  .stochastic-generator-view .mobile-now-playing.now-playing--changing {
    opacity: 0;
  }

  .generator-view .mix-header,
  .generator-view .mix-control {
    grid-template-columns:
      42px
      50px minmax(12px, 1fr)
      50px minmax(12px, 1fr)
      50px minmax(12px, 1fr)
      50px
      200px;
  }

  .stochastic-generator-view .mix-header,
  .stochastic-generator-view .mix-control {
    grid-template-columns:
      62px
      repeat(4, 50px)
      10px
      minmax(40px, 1fr);
  }

  .stochastic-generator-view .mix-header {
    font-size: 10.56px;
  }

  .stochastic-generator-view .mix-header > :nth-child(2),
  .stochastic-generator-view .mix-control > :nth-child(2) {
    grid-column: 2;
  }

  .stochastic-generator-view .mix-header > :nth-child(3),
  .stochastic-generator-view .mix-control > :nth-child(3) {
    grid-column: 3;
  }

  .stochastic-generator-view .mix-header > :nth-child(4),
  .stochastic-generator-view .mix-control > :nth-child(4) {
    grid-column: 4;
  }

  .stochastic-generator-view .mix-header > :nth-child(5),
  .stochastic-generator-view .mix-control > :nth-child(5) {
    grid-column: 5;
  }

  .stochastic-generator-view .mix-header > :nth-child(6),
  .stochastic-generator-view .mix-control > .sample-name {
    display: none;
  }

  .stochastic-generator-view .mix-control > .track-waveform {
    min-width: 0;
    height: 50px;
    grid-column: 7;
    margin-top: 0;
  }
}

@media (max-width: 350px) {
  .stochastic-generator-view .mix-header,
  .stochastic-generator-view .mix-control {
    grid-template-columns:
      56px
      repeat(4, 44px)
      10px
      minmax(46px, 1fr);
  }

  .stochastic-generator-view .mix-control .knob-container {
    width: 44px !important;
    height: 44px !important;
  }

  .stochastic-generator-view .mix-control .knob-canvas {
    width: 44px;
    height: 44px;
  }

  .stochastic-generator-view .mix-control > .track-waveform {
    height: 44px;
  }
}
