:root {
  color-scheme: dark;
  --bg: #101722;
  --panel: #18212e;
  --raised: #232f40;
  --line: #344153;
  --muted: #a0aec0;
  --text: #e7edf6;
  --accent: #8bbcff;
  --blue: #377ac7;
  --header: 76px;
  --editor: 300px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}
body {
  display: grid;
  grid-template-rows: var(--header) minmax(0, 1fr) var(--editor);
  background: var(--bg);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
body.wave-expanded {
  --editor: min(52dvh, 470px);
}
button,
input,
select {
  font: inherit;
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  min-height: 32px;
  border: 1px solid #445267;
  border-radius: 5px;
  background: linear-gradient(#2b384a, #243043);
  box-shadow: inset 0 1px #ffffff08;
  color: var(--text);
  cursor: pointer;
  transition:
    background 0.12s,
    border-color 0.12s;
}
button:hover {
  background: #35475f;
  border-color: #71839c;
}
button:active {
  background: #1b2a40;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
canvas:focus-visible,
a:focus-visible {
  outline: 2px solid #9dc9ff;
  outline-offset: 3px;
}
input,
select {
  background: #111b2a;
  color: var(--text);
  border: 1px solid #46566f;
  border-radius: 4px;
  padding: 8px;
  min-width: 0;
}
input[type="range"] {
  width: 100%;
  accent-color: #83b9ff;
  padding: 0;
  cursor: pointer;
  height: 16px;
}
input[type="checkbox"] {
  accent-color: #83b9ff;
  margin: 0;
  width: 14px;
  height: 14px;
}
input[type="range"]:disabled {
  cursor: default;
}
.ui-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  pointer-events: none;
}
.icon-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.skip-link {
  position: fixed;
  top: -50px;
  left: 15px;
  z-index: 20;
  background: #d5e7ff;
  color: #112440;
  padding: 10px;
}
.skip-link:focus {
  top: 10px;
}
[hidden] {
  display: none !important;
}
.app-toolbar {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid #465269;
  background: linear-gradient(#2b3546, #202a3a);
  box-shadow: 0 2px 10px #07102050;
  z-index: 2;
}
.app-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
.brand {
  font-size: 18px;
  letter-spacing: 2.2px;
  font-weight: 750;
}
.brandmark {
  color: #a2c9fc;
  display: flex;
}
.brandmark .ui-icon {
  width: 25px;
  height: 25px;
}
.beta {
  font-size: 8px;
  color: #b1bdd0;
  letter-spacing: 1px;
  border: 1px solid #536175;
  padding: 3px 5px;
  border-radius: 3px;
}
.event-picker {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
  max-width: 270px;
  flex: 1;
}
.event-picker label {
  font-size: 10px;
  color: #b4c1d3;
}
.event-picker select {
  background: #152032;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 28px 7px 9px;
  width: 100%;
  border-color: #506078;
}
.document-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  padding-left: 20px;
  border-left: 1px solid #485469;
}
.document-actions button {
  font-size: 12px;
  white-space: nowrap;
  min-height: 36px;
  padding: 8px 11px;
}
.document-actions .ui-icon {
  width: 16px;
  height: 16px;
}
.save-state {
  font-size: 10px;
  color: #bdcadb;
  max-width: 150px;
  margin-left: auto;
  line-height: 1.5;
}
.danger {
  background: #502d34;
  border-color: #9c5962;
  color: #ffe4e7;
  white-space: nowrap;
}
.danger:hover {
  background: #743642;
  border-color: #d58991;
}
#panic {
  min-height: 38px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 550;
}
kbd {
  font-size: 10px;
  font-family: inherit;
  border: 1px solid #af7e86;
  padding: 1px 4px;
  border-radius: 3px;
  color: #e7c6cb;
  margin-left: 5px;
}
.workspace {
  display: grid;
  grid-template-columns: 226px minmax(400px, 1fr) 276px;
  min-height: 0;
  overflow: hidden;
}
.library,
.queue {
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #151f2e;
  padding: 17px 14px;
  gap: 13px;
  overflow: hidden;
}
.library {
  border-right: 1px solid var(--line);
}
.section-label,
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15px;
  color: #c5d0df;
}
.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-label > span,
#library-count {
  font-size: 10px;
  color: #a0afc6;
  background: #263347;
  padding: 2px 6px;
  border-radius: 3px;
}
.import {
  background: #325d90;
  border-color: #6b94c7;
  color: #f0f6ff;
  font-weight: 550;
  min-height: 35px;
}
.import:hover {
  background: #3d71aa;
}
.search {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #101926;
  border: 1px solid #3d4c62;
  border-radius: 5px;
  padding: 0 9px;
  color: #9cacc2;
}
.search input {
  width: 100%;
  border: 0;
  background: none;
  padding: 9px 0;
  font-size: 11px;
}
.search .ui-icon {
  width: 15px;
  height: 15px;
}
.sub {
  color: #8fa0b8;
  font-size: 10px;
  margin-top: 3px;
}
nav {
  display: grid;
  gap: 3px;
}
nav button {
  border-color: transparent;
  background: none;
  box-shadow: none;
  justify-content: space-between;
  text-align: left;
  padding: 8px;
  font-size: 11px;
  color: #b8c5d8;
  min-height: 31px;
}
nav button.active {
  background: #314967;
  border-color: #4c6d96;
  color: #eff6ff;
}
nav button > span:first-child {
  white-space: nowrap;
}
nav button > span:last-child {
  font-size: 10px;
  color: #b7c9e1;
}
.library-heading {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #c6d1e0;
  border-top: 1px solid #354256;
  padding-top: 13px;
}
.library-heading span {
  font-size: 9px;
  color: #9aacc4;
}
#library-list {
  flex: 1;
  overflow: auto;
  min-height: 50px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.library-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border-bottom: 1px solid #2c394a66;
}
.audio-start {
  border: 0;
  box-shadow: none;
  background: none;
  flex: 1;
  min-width: 0;
  text-align: left;
  display: block;
  padding: 7px 4px;
}
.audio-start strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.audio-start small {
  display: block;
  font-size: 10px;
  color: #9bacc4;
  margin-top: 5px;
}
.small-add {
  min-height: 27px;
  width: 27px;
  padding: 0;
  font-size: 19px;
  background: #23344b;
}
.local-note {
  display: flex;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid #344153;
  color: #94a7c1;
  font-size: 9px;
}
.local-note strong {
  font-size: 10px;
  font-weight: 500;
  color: #bac9dd;
}
.local-note p {
  font-size: 9px;
  line-height: 1.6;
  margin: 5px 0 0;
}
.local-dot {
  width: 5px;
  height: 5px;
  background: #90b9ee;
  display: inline-block;
  border-radius: 50%;
  margin-top: 4px;
  margin-right: 4px;
  flex-shrink: 0;
}
main {
  padding: 14px 18px 10px;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: 25px auto 40px minmax(0, 1fr) auto 18px;
  gap: 12px;
  background: #101824;
}
.main-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
h1 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1px;
  margin: 0;
  color: #e0e8f4;
}
.activity-state {
  font-size: 10px;
  color: #93a3bb;
  display: flex;
  align-items: center;
  gap: 7px;
}
.activity-state:before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #68778d;
}
.activity-state.is-playing {
  color: #bed9fb;
}
.activity-state.is-playing:before {
  background: #8bbcff;
  box-shadow: 0 0 6px #6199db70;
}
.mixer-section {
  border: 1px solid #34455e;
  border-radius: 6px;
  overflow: hidden;
  background: #192436;
  min-width: 0;
}
.mixer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: #222f42;
  border-bottom: 1px solid #354660;
}
.mixer-heading > span:last-child {
  font-size: 10px;
  color: #9eafc7;
}
.mixer {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 10px;
  min-height: 90px;
}
.mixer-empty {
  padding: 9px 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  max-width: 550px;
}
.mixer-empty strong {
  font-size: 12px;
  color: #c4cfdf;
  font-weight: 500;
}
.mixer-empty span {
  font-size: 10px;
  line-height: 1.6;
  color: #94a6bf;
}
.channel {
  background: linear-gradient(#29394f, #213047);
  border: 1px solid #4c5d75;
  border-radius: 4px;
  min-width: 192px;
  max-width: 245px;
  flex: 1;
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}
.channel.selected {
  border-color: #91bced;
  box-shadow: inset 0 2px #91bced;
  background: linear-gradient(#304663, #253750);
}
.channel-select {
  position: relative;
  border: 0;
  background: none;
  box-shadow: none;
  display: block;
  min-height: 0;
  text-align: left;
  padding: 0 0 0 12px;
  overflow: hidden;
}
.channel-select strong {
  font-size: 11px;
  display: block;
  font-weight: 600;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.channel-select small {
  font-size: 9px;
  color: #a8bed9;
  display: block;
  margin-top: 5px;
}
.channel-indicator {
  position: absolute;
  left: 0;
  top: 4px;
  width: 5px;
  height: 5px;
  background: #a8d1ff;
  border-radius: 50%;
}
.channel-indicator.paused {
  background: #8d9db3;
}
.channel-volume {
  display: flex;
  align-items: center;
  gap: 9px;
}
.channel-volume output {
  font-size: 10px;
  color: #d1e0f4;
  min-width: 27px;
  text-align: right;
}
.channel-actions {
  display: flex;
  gap: 6px;
}
.channel-actions button {
  font-size: 10px;
  min-height: 26px;
  padding: 4px 8px;
  flex: 1;
  background: #1b2a3e;
  border-color: #475e7b;
}
.channel-actions .ui-icon {
  width: 12px;
  height: 12px;
}
.board-toolbar {
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid #354153;
  padding-bottom: 9px;
  min-width: 0;
}
.bank-label {
  font-size: 10px;
  color: #acb9ce;
  white-space: nowrap;
}
.tabs {
  display: flex;
  background: #0b1421;
  border: 1px solid #3f4e65;
  border-radius: 5px;
  padding: 2px;
  gap: 2px;
  overflow: auto;
}
.tabs button {
  border: 0;
  background: none;
  box-shadow: none;
  color: #aebed4;
  font-size: 11px;
  padding: 5px 12px;
  min-height: 25px;
  white-space: nowrap;
  border-radius: 3px;
}
.tabs button.active {
  background: #49698f;
  color: #f5f9ff;
  box-shadow: inset 0 1px #bedbff30;
}
.quiet {
  background: none;
  box-shadow: none;
  color: #c3d0e3;
  font-size: 11px;
}
.board-toolbar > .quiet {
  margin-left: auto;
  min-height: 28px;
  padding: 5px 9px;
  white-space: nowrap;
}
.board-toolbar > .quiet .ui-icon {
  width: 14px;
  height: 14px;
}
.pads {
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
  padding: 1px 2px 3px;
}
.pad {
  --pad: #93bdf0;
  min-height: 112px;
  position: relative;
  background: linear-gradient(#263549, #1e2c3f);
  border: 1px solid #455a75;
  border-left: 3px solid var(--pad);
  border-radius: 5px;
  overflow: hidden;
}
.pad[data-color="green"] {
  --pad: #8cbcc9;
}
.pad[data-color="amber"] {
  --pad: #d2b48a;
}
.pad[data-color="purple"] {
  --pad: #b5a3cf;
}
.pad[data-color="blue"] {
  --pad: #8bbcff;
}
.pad[data-color="rose"] {
  --pad: #c69fb5;
}
.pad:hover {
  border-top-color: #7189a8;
  background: #2d405b;
}
.pad.playing {
  background: #344f70;
  box-shadow: inset 0 0 0 1px var(--pad);
  border-color: var(--pad);
}
.pad-trigger {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  min-height: 112px;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 13px;
  text-align: left;
}
.pad-trigger:hover {
  background: #ffffff05;
}
.pad-icon {
  color: var(--pad);
  margin-bottom: 9px;
  display: flex;
}
.pad-icon .ui-icon {
  width: 19px;
  height: 19px;
}
.pad-trigger strong {
  font-size: 12px;
  font-weight: 550;
  max-width: 100%;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.pad-trigger small {
  font-size: 10px;
  color: #a5b6cd;
  margin-top: 7px;
  padding-right: 20px;
}
.pad-key {
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 10px;
  border: 1px solid #5f738e;
  background: #142137;
  color: #c5d4e8;
  padding: 2px 5px;
  border-radius: 3px;
  pointer-events: none;
}
.pad-edit {
  position: absolute;
  bottom: 7px;
  right: 7px;
  min-height: 24px;
  width: 24px;
  padding: 3px;
  border: 0;
  background: none;
  box-shadow: none;
  color: #a9bfdc;
}
.pad-edit .ui-icon {
  width: 13px;
  height: 13px;
}
.utility {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #39485e;
  padding-top: 10px;
}
.utility > div:first-child {
  min-width: 100px;
}
.utility .section-label {
  font-size: 11px;
}
.utility p {
  font-size: 9px;
  line-height: 1.5;
  margin: 4px 0;
  color: #91a3bd;
}
.scene-buttons {
  margin-left: auto;
  display: flex;
  gap: 7px;
}
.scene-buttons button {
  font-size: 10px;
  padding: 8px 10px;
  min-height: 36px;
  white-space: nowrap;
}
.scene-buttons .ui-icon {
  width: 16px;
  height: 16px;
}
.scene-buttons button.active {
  border-color: #8bbcff;
  background: #3a5d87;
  color: #eef6ff;
}
.board-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9px;
  color: #8ea1bd;
  gap: 10px;
}
.queue {
  border-left: 1px solid var(--line);
  gap: 12px;
}
.queue-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.eyebrow {
  color: #95a9c4;
  font-size: 9px;
  font-weight: 400;
}
h2 {
  font-size: 14px;
  font-weight: 550;
  margin: 7px 0 0;
}
h2 span {
  font-size: 10px;
  background: #2c3b51;
  color: #ccdaf0;
  padding: 3px 6px;
  border-radius: 3px;
  margin-left: 5px;
}
.icon-button {
  background: none;
  border-color: transparent;
  box-shadow: none;
  color: #bdcde2;
  padding: 6px;
  min-height: 30px;
}
.icon-button:hover {
  background: #34465f;
  border-color: #5b7496;
}
.icon-button.active {
  background: #33577f;
  border-color: #79a4d9;
  color: #dcecff;
}
.queue-options {
  display: grid;
  gap: 12px;
  padding: 12px 0;
  border-block: 1px solid #35445b;
  flex-shrink: 0;
}
.queue-options label {
  font-size: 10px;
  color: #bdcce1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.queue-options select {
  margin-left: auto;
  padding: 4px 7px;
  font-size: 10px;
  background: #23334b;
}
.queue-options label:first-child {
  padding: 2px 0;
}
#queue-list {
  min-height: 60px;
  flex: 1;
  overflow: auto;
}
.queue-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  border-bottom: 1px solid #2b3b51;
  border-radius: 3px;
}
.queue-item.current {
  background: #2d496a;
  box-shadow: inset 2px 0 #94c5ff;
}
.queue-number {
  font-size: 10px;
  font-family: ui-monospace, monospace;
  color: #92a8c4;
  min-width: 17px;
}
.queue-song {
  border: 0;
  background: none;
  box-shadow: none;
  flex: 1;
  min-width: 0;
  text-align: left;
  display: block;
  padding: 2px 0;
  min-height: 0;
}
.queue-song strong {
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  display: block;
}
.queue-song small {
  font-size: 9px;
  color: #9fb3ce;
  display: block;
  margin-top: 5px;
}
.queue-actions {
  display: grid;
  gap: 2px;
}
.queue-actions button {
  padding: 0 3px;
  min-height: 15px;
  border: 0;
  background: none;
  box-shadow: none;
  font-size: 12px;
  color: #a2bad9;
}
.queue-bottom {
  padding-top: 10px;
  border-top: 1px solid #35445b;
  display: grid;
  gap: 6px;
  flex-shrink: 0;
}
#queue-duration {
  font-size: 10px;
  color: #bdcee4;
}
.queue-help {
  font-size: 9px;
  line-height: 1.5;
  color: #8b9eba;
}
.video-preview {
  flex-shrink: 0;
  border: 1px solid #4a5b74;
  background: #101827;
  border-radius: 4px;
  overflow: hidden;
}
.video-preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 9px;
  background: #233148;
  color: #b6c8e2;
  font-size: 9px;
  letter-spacing: 0.4px;
}
.video-preview-heading button {
  padding: 0 5px;
  border: 0;
  background: none;
  box-shadow: none;
  min-height: 20px;
  font-size: 16px;
}
.video-preview video {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: contain;
  background: #080b11;
  max-height: 150px;
}
.video-preview-caption {
  display: grid;
  gap: 4px;
  padding: 7px 9px;
  min-width: 0;
}
.video-preview-caption strong {
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.video-preview-caption span {
  font-size: 9px;
  color: #96abc7;
}
#video-preview-error {
  font-size: 11px;
  line-height: 1.6;
  padding: 8px;
}
.player {
  min-height: 0;
  background: #172337;
  border-top: 1px solid #5c7392;
  padding: 10px 20px;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto 125px 180px;
  grid-template-rows: 46px minmax(0, 1fr);
  gap: 10px 24px;
  overflow: hidden;
}
.track-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.album {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  background: #324969;
  border: 1px solid #5d7da4;
  border-radius: 4px;
  color: #b5d6ff;
  flex-shrink: 0;
}
.track-info > div {
  min-width: 0;
}
.track-info strong {
  font-size: 12px;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
.track-info span:not(.album) {
  display: block;
  font-size: 10px;
  color: #9fb4d0;
  margin-top: 5px;
}
.transport {
  display: flex;
  align-items: center;
  gap: 3px;
  background: #101b2b;
  border: 1px solid #455772;
  padding: 3px;
  border-radius: 5px;
}
.transport button {
  border-radius: 3px;
  min-width: 32px;
  min-height: 30px;
  padding: 5px 7px;
}
.transport .play {
  background: #4379b9;
  border-color: #77a6dc;
  color: white;
  min-width: 112px;
  font-size: 11px;
  box-shadow: inset 0 1px #c7e2ff30;
}
.transport .play.is-playing {
  background: #355e8e;
}
.transport .ui-icon {
  width: 16px;
  height: 16px;
}
.transport-clock {
  padding-left: 16px;
  border-left: 1px solid #435773;
  display: grid;
  gap: 5px;
}
.transport-clock > span {
  font-size: 8px;
  letter-spacing: 1px;
  color: #9cafc8;
}
.transport-clock output {
  font:
    19px ui-monospace,
    "SFMono-Regular",
    monospace;
  letter-spacing: 0.4px;
  color: #d6e8ff;
}
.master {
  display: grid;
  gap: 9px;
}
.master > span {
  font-size: 10px;
  color: #b4c8e3;
  display: flex;
  justify-content: space-between;
}
.master output {
  color: #e1edfd;
}
.wave-area {
  grid-column: 1/-1;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  height: 100%;
  align-self: stretch;
  display: grid;
  grid-template-rows: 24px 20px minmax(0, 1fr) 10px 19px;
  overflow: hidden;
}
.wave-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.wave-label strong {
  font-size: 11px;
  font-weight: 550;
  color: #d4e3f7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wave-label strong span {
  font-size: 10px;
  font-weight: 400;
  color: #99b4d6;
  margin-left: 7px;
}
.wave-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.wave-tools button {
  font-size: 10px;
  padding: 2px 7px;
  min-height: 22px;
  border-color: #4c6484;
  background: #263c58;
}
.wave-tools output {
  font-size: 10px;
  color: #b5cbe8;
  min-width: 22px;
  text-align: center;
}
.wave-tools label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  color: #a1b9d9;
  margin-left: 7px;
}
.wave-times {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-family: ui-monospace, monospace;
  color: #a5bfdf;
}
#elapsed {
  font-weight: 600;
  color: #d6e9ff;
}
.marker-button {
  background: none;
  box-shadow: none;
  border: 0;
  color: #a9c4e5;
  font-size: 10px;
  min-height: 20px;
  padding: 2px 6px;
}
#waveform {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  contain: size;
  display: block;
  border: 1px solid #445d7f;
  border-radius: 3px;
  cursor: crosshair;
  align-self: stretch;
}
#wave-scroll {
  align-self: center;
  height: 7px;
  opacity: 0.7;
  margin: 0;
}
.markers {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow: auto;
  align-items: center;
}
.markers button {
  white-space: nowrap;
  font-size: 9px;
  padding: 1px 6px;
  min-height: 16px;
  border-color: #7b704e;
  color: #e0c89f;
  background: #3b3540;
}
.empty {
  color: #9fb0c8;
  font-size: 11px;
  line-height: 1.7;
  padding: 20px 10px;
  grid-column: 1/-1;
}
dialog {
  width: 390px;
  max-width: calc(100vw - 30px);
  background: #202d41;
  color: #e7edf6;
  border: 1px solid #6c83a4;
  border-radius: 9px;
  padding: 23px;
  box-shadow: 0 20px 80px #050d1f99;
}
dialog::backdrop {
  background: #050b18a6;
  backdrop-filter: blur(4px);
}
.dialog-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}
.dialog-title h2 {
  margin: 0;
  font-size: 16px;
}
.dialog-title .icon-button {
  font-size: 22px;
}
form > label {
  display: grid;
  gap: 8px;
  color: #c5d2e6;
  font-size: 12px;
  margin: 16px 0;
}
form > label.check {
  display: flex;
  align-items: center;
}
.dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}
.primary {
  background: #4278b8;
  color: white;
  border-color: #89b8f0;
}
.primary:hover {
  background: #528bd0;
}
#toast {
  position: fixed;
  bottom: calc(var(--editor) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: #c5ddfa;
  color: #13263e;
  padding: 11px 18px;
  border: 1px solid #f0f6ff;
  border-radius: 5px;
  max-width: min(90vw, 650px);
  font-size: 12px;
  box-shadow: 0 4px 20px #0005;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
#toast.visible {
  opacity: 1;
}
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #152033;
}
::-webkit-scrollbar-thumb {
  background: #4b5c76;
  border: 2px solid #152033;
  border-radius: 4px;
}
@media (min-width: 1700px) {
  .workspace {
    grid-template-columns: 250px minmax(0, 1fr) 310px;
  }
  .pads {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .pad,
  .pad-trigger {
    min-height: 130px;
  }
  main {
    padding: 18px 24px;
    gap: 14px;
  }
}
@media (max-width: 1200px) {
  .app-toolbar {
    gap: 12px;
    padding-inline: 14px;
  }
  .beta {
    display: none;
  }
  .document-actions {
    padding-left: 12px;
    gap: 5px;
  }
  .document-actions button {
    font-size: 11px;
    padding: 7px 9px;
  }
  .save-state {
    font-size: 9px;
    max-width: 96px;
  }
  .workspace {
    grid-template-columns: 194px minmax(350px, 1fr) 250px;
  }
  main {
    padding: 12px;
    gap: 10px;
  }
  .bank-label {
    display: none;
  }
  .tabs button {
    padding: 5px 9px;
  }
  .mixer-heading > span:last-child {
    font-size: 9px;
  }
  .scene-buttons {
    gap: 5px;
  }
  .scene-buttons button {
    padding: 7px;
    font-size: 9px;
    gap: 5px;
  }
  .utility > div:first-child {
    min-width: 70px;
    max-width: 105px;
  }
  .utility p {
    display: none;
  }
  .player {
    grid-template-columns: minmax(150px, 1fr) auto 110px 130px;
    gap: 10px 14px;
    padding-inline: 14px;
  }
  .transport .play {
    min-width: 100px;
  }
  .transport button {
    min-width: 28px;
  }
  .transport-clock {
    padding-left: 10px;
  }
  .transport-clock output {
    font-size: 17px;
  }
  .board-foot > span:first-child {
    display: none;
  }
  .board-foot {
    justify-content: flex-end;
  }
  .pad-trigger {
    padding: 12px 10px;
  }
  .pad-trigger small {
    font-size: 9px;
  }
  .mixer {
    padding: 8px;
  }
  .event-picker {
    min-width: 145px;
  }
}
@media (max-width: 980px) {
  .app-toolbar {
    gap: 10px;
  }
  .app-identity .brand {
    font-size: 15px;
  }
  .brandmark .ui-icon {
    width: 20px;
  }
  .event-picker {
    min-width: 135px;
  }
  .save-state {
    display: none;
  }
  .document-actions {
    padding-left: 10px;
  }
  .workspace {
    grid-template-columns: 175px minmax(330px, 1fr) 230px;
  }
  .library,
  .queue {
    padding: 14px 10px;
  }
  .scene-buttons button .ui-icon {
    display: none;
  }
  .utility > div:first-child {
    display: none;
  }
  .scene-buttons {
    width: 100%;
  }
  .scene-buttons button {
    flex: 1;
  }
  .channel {
    min-width: 172px;
  }
  .player {
    grid-template-columns: minmax(140px, 1fr) auto 105px;
  }
  .master {
    grid-column: 3;
    grid-row: 1;
  }
  .transport-clock {
    display: none;
  }
  .wave-tools label {
    display: none;
  }
  .pads {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  :root {
    --header: auto;
    --editor: 290px;
  }
  html,
  body {
    height: auto;
    overflow: auto;
  }
  body {
    display: block;
    padding-bottom: var(--editor);
  }
  .app-toolbar {
    position: relative;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
  }
  .app-identity {
    margin-right: 5px;
  }
  .event-picker {
    flex: 1;
    max-width: none;
    min-width: 160px;
  }
  .event-picker label {
    display: none;
  }
  .document-actions {
    order: 4;
    width: auto;
    flex: 1;
    border: 0;
    padding: 0;
  }
  .document-actions button {
    min-height: 32px;
  }
  #panic {
    order: 5;
    min-height: 32px;
    font-size: 11px;
  }
  .workspace {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    min-height: 540px;
    overflow: visible;
  }
  .library {
    overflow: hidden;
    max-height: 640px;
  }
  .library #library-list {
    max-height: 250px;
  }
  main {
    min-height: 540px;
    grid-template-rows: 25px auto 40px minmax(220px, 1fr) auto 18px;
  }
  .queue {
    grid-column: 1/-1;
    min-height: 230px;
    border-top: 1px solid #344153;
    display: grid;
    grid-template-columns: 1fr 230px;
    grid-template-rows: auto auto 1fr auto;
    gap: 12px;
    overflow: visible;
  }
  .queue-top {
    grid-column: 1;
  }
  .queue-options {
    grid-column: 1;
    display: flex;
    justify-content: space-between;
  }
  .queue-options select {
    margin-left: 4px;
  }
  .queue #queue-list {
    grid-column: 1;
    min-height: 50px;
    max-height: 220px;
  }
  .queue-bottom {
    grid-column: 1;
  }
  .video-preview {
    grid-column: 2;
    grid-row: 1/5;
    align-self: start;
    margin-top: 4px;
  }
  .player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--editor);
    z-index: 3;
    grid-template-columns: minmax(180px, 1fr) auto 130px;
    background: #172337;
    box-shadow: 0 -5px 20px #07102066;
  }
  .wave-label strong span {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: bottom;
  }
  .activity-state {
    font-size: 9px;
  }
  .mixer-heading > span:last-child {
    display: none;
  }
  body.wave-expanded {
    --editor: 430px;
  }
}
@media (max-width: 580px) {
  :root {
    --editor: 300px;
  }
  .app-toolbar {
    gap: 10px;
  }
  .app-identity {
    gap: 6px;
  }
  .event-picker {
    min-width: 150px;
  }
  .document-actions {
    gap: 5px;
  }
  .document-actions button {
    font-size: 10px;
    gap: 5px;
    padding: 6px 8px;
    flex: 1;
  }
  .document-actions .ui-icon {
    width: 13px;
    height: 13px;
  }
  .document-actions {
    order: 4;
    flex-basis: 100%;
    width: 100%;
  }
  #panic {
    order: 3;
    min-height: 31px;
    width: 100%;
    padding: 7px;
    justify-content: center;
  }
  #panic kbd {
    display: none;
  }
  .workspace {
    display: flex;
    flex-direction: column;
  }
  .library {
    max-height: none;
    padding: 15px;
    gap: 11px;
  }
  .library .sub,
  .local-note {
    display: none;
  }
  .library nav {
    display: flex;
    overflow: auto;
    padding-bottom: 4px;
  }
  .library nav button {
    white-space: nowrap;
    flex-shrink: 0;
    gap: 12px;
  }
  .library-heading {
    padding-top: 10px;
  }
  .library #library-list {
    max-height: 155px;
    min-height: 100px;
    flex: none;
  }
  .library .import {
    width: 100%;
  }
  main {
    min-height: 620px;
    padding: 14px;
    grid-template-rows: 25px auto 40px minmax(250px, 1fr) auto 18px;
    gap: 12px;
  }
  .queue {
    display: flex;
    min-height: 250px;
    padding: 15px;
    gap: 13px;
  }
  .queue-options {
    display: flex;
  }
  .queue #queue-list {
    min-height: 100px;
    max-height: 220px;
  }
  .video-preview {
    width: 100%;
    max-width: 280px;
    align-self: center;
  }
  .player {
    padding: 9px 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 42px 22px minmax(0, 1fr);
    gap: 7px 10px;
  }
  .track-info {
    gap: 7px;
  }
  .album {
    display: none;
  }
  .track-info strong {
    font-size: 11px;
  }
  .track-info span:not(.album) {
    font-size: 9px;
    margin-top: 4px;
  }
  .transport {
    gap: 0;
    padding: 2px;
  }
  .transport button {
    min-width: 24px;
    padding: 4px;
    min-height: 29px;
  }
  .transport .play {
    min-width: 37px;
    padding: 5px;
  }
  .transport .play span {
    display: none;
  }
  .transport .ui-icon {
    width: 15px;
    height: 15px;
  }
  .master {
    grid-column: 1/-1;
    grid-row: 2;
    display: flex;
    gap: 13px;
    align-items: center;
  }
  .master > span {
    min-width: 125px;
    font-size: 9px;
    gap: 14px;
  }
  .wave-area {
    grid-row: 3;
    grid-template-rows: 24px 20px minmax(0, 1fr) 10px 19px;
  }
  .wave-label strong {
    font-size: 9px;
  }
  .wave-label strong span {
    display: none;
  }
  .wave-tools {
    gap: 3px;
  }
  .wave-tools button {
    font-size: 9px;
    padding: 2px 4px;
  }
  .wave-tools output {
    min-width: 17px;
    font-size: 9px;
  }
  .marker-button {
    font-size: 9px;
  }
  .wave-times {
    font-size: 9px;
  }
  .tabs button {
    padding: 5px 8px;
    font-size: 10px;
  }
  .board-toolbar {
    gap: 7px;
  }
  .board-toolbar > .quiet {
    font-size: 10px;
    padding: 5px 7px;
    gap: 4px;
  }
  .pad-trigger strong {
    font-size: 12px;
  }
  .scene-buttons button {
    font-size: 9px;
    padding: 7px 6px;
  }
  .activity-state {
    font-size: 9px;
  }
  .board-foot {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
/* Compact, labeled effect pads. Their identity stays visible while playing. */
.pad,
.pad-trigger {
  min-height: 82px;
}
.pad-trigger {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 12px 29px 31px 12px;
}
.pad-icon {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: 25px;
  line-height: 1;
  margin: 0;
  width: 29px;
  text-align: center;
  flex-shrink: 0;
}
.pad-copy {
  display: block;
  min-width: 0;
}
.pad-copy strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pad-copy small {
  display: block;
  margin-top: 5px;
  padding: 0;
  font-size: 9px;
}
.pad-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  position: absolute;
  left: 10px;
  right: 7px;
  bottom: 5px;
}
.pad-actions button {
  min-height: 22px;
  width: 24px;
  padding: 3px;
  border: 0;
  box-shadow: none;
  background: transparent;
  color: #b7c9e2;
  font-size: 12px;
}
.pad-actions button:hover {
  background: #486486;
}
.pad-actions .ui-icon {
  width: 13px;
  height: 13px;
}
.pad-actions button[data-pad-wave] {
  margin-left: auto;
}
.drag-grip {
  font-size: 18px;
  color: #899eb9;
  cursor: grab;
  margin-right: 3px;
}
.pad.inspected {
  outline: 1px solid #a7cfff;
  outline-offset: -2px;
}
.pad.dragging,
.queue-item.dragging {
  opacity: 0.4;
}
.pad.drop-target,
.queue-item.drop-target {
  box-shadow: inset 3px 0 #b5d7ff;
  outline: 1px solid #a4ceff;
}
.pad[draggable="true"],
.queue-item[draggable="true"] {
  cursor: grab;
}
.pad[draggable="true"]:active,
.queue-item[draggable="true"]:active {
  cursor: grabbing;
}
.queue-actions {
  grid-template-columns: repeat(3, 21px);
  align-items: center;
  gap: 0;
}
.queue-actions button {
  min-height: 27px;
  font-size: 14px;
}
.library {
  gap: 10px;
}
.library > * {
  flex-shrink: 0;
}
.library #library-list {
  flex-shrink: 1;
}
.library nav button {
  min-height: 27px;
  padding: 6px 8px;
}
.mixer {
  min-height: 76px;
}
#editor input[name="icon"] {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: 22px;
  max-width: 90px;
  text-align: center;
}
.main-heading h1 {
  flex-shrink: 0;
}
@media (max-width: 1200px) {
  .pad-trigger {
    gap: 8px;
    padding-left: 10px;
  }
  .pad-icon {
    font-size: 23px;
    width: 25px;
  }
  .pad-copy strong {
    font-size: 11px;
  }
  .queue-actions {
    grid-template-columns: repeat(3, 17px);
  }
  .queue-actions button {
    padding: 0 2px;
    font-size: 12px;
  }
}
@media (max-width: 580px) {
  .pad,
  .pad-trigger {
    min-height: 88px;
  }
  .pad-trigger {
    padding-right: 22px;
    gap: 7px;
  }
  .pad-icon {
    font-size: 23px;
    width: 25px;
  }
  .pad-copy strong {
    font-size: 11px;
  }
  .pad-actions button {
    width: 26px;
    min-height: 25px;
  }
  .pad-key {
    right: 7px;
    top: 7px;
    font-size: 9px;
  }
  .queue-actions {
    grid-template-columns: repeat(3, 27px);
  }
  .queue-actions button {
    min-height: 30px;
  }
}

.credits-button {
  background: none;
  border: 0;
  box-shadow: none;
  padding: 4px 0;
  min-height: 20px;
  font-size: 9px;
  color: #b5cfee;
  text-decoration: underline;
}
.credits-button:hover {
  background: none;
  color: white;
}
#credits-dialog {
  width: 620px;
  max-height: 80dvh;
  overflow: auto;
}
.credits-intro {
  color: #b2c4dc;
  font-size: 11px;
  line-height: 1.6;
}
#credits-list article {
  border-top: 1px solid #445976;
  padding: 13px 0;
}
#credits-list strong {
  font-size: 13px;
}
#credits-list p {
  font-size: 11px;
  color: #b8c9df;
  line-height: 1.6;
  margin: 6px 0;
}
#credits-list a {
  font-size: 11px;
  color: #acd0ff;
}
@media (max-width: 580px) {
  .local-note {
    display: flex;
  }
  .library .local-note p {
    display: none;
  }
}

/* Keep media selection visible and usable within the viewport. */
#editor, #media-import-dialog {width:min(460px,calc(100vw - 32px)); max-height:90dvh; overflow:auto;}
#pad-form select[name="audio"] {min-height:150px; padding:6px;}
#pad-form select[name="audio"] option {padding:9px 8px; background:#142033; color:#e4ecf7;}
#pad-form select[name="audio"] option:checked {background:#315b91; color:white;}
#pad-audio-status, .scope-choice small {font-size:12px; line-height:1.5; color:#9badc6;}
#media-import-form .scope-choice {display:flex; gap:12px; align-items:flex-start; padding:14px; border:1px solid #35445d; border-radius:8px;}
.scope-choice input {width:auto; margin-top:4px; accent-color:#6598e3;}
.scope-choice span {display:grid; gap:5px;}
.scope-choice:has(input:checked) {background:#1c304b; border-color:#6598e3;}

/* A/B loop editing stays beside the original waveform. */
body.loop-editing { --editor: 380px; }
body.loop-editing.wave-expanded { --editor: min(65dvh,560px); }
.wave-area {grid-template-rows:24px 20px auto minmax(0,1fr) 10px 19px;}
/* Keep the canvas in its flexible row when the loop form is hidden. */
.wave-label {grid-row:1;}
.wave-times {grid-row:2;}
#loop-controls {grid-row:3;}
#waveform {grid-row:4;}
#wave-scroll {grid-row:5;}
#markers {grid-row:6;}
.loop-controls {padding:7px 0; border-block:1px solid #405775; min-width:0;}
.loop-controls[hidden] {display:none;}
.loop-inputs {display:flex; align-items:end; gap:8px; flex-wrap:wrap;}
.loop-inputs label {display:grid; gap:3px; color:#b8cce5; font-size:10px;}
.loop-inputs label.check {display:flex;align-items:center; align-self:center;white-space:nowrap;}
.loop-inputs input[type=number] {width:94px;min-height:28px;background:#101e30;color:#e8f3ff;border:1px solid #577193;border-radius:4px;padding:4px 6px;}
.loop-inputs button {font-size:11px;min-height:28px;padding:4px 8px;}
#loop-status {font-size:11px;color:#adc6e5;margin:6px 0 0;line-height:1.4;}
#loop-editor-toggle.active {background:#38649a;color:#fff;}
#waveform {touch-action:none;}
@media(max-width:980px){body.loop-editing{--editor:420px;}}
@media(max-width:580px){body.loop-editing,body.loop-editing.wave-expanded{--editor:520px;} .loop-inputs {gap:6px;} .loop-inputs input[type=number]{width:84px;} .loop-inputs label.check{flex-basis:100%;} .wave-area{grid-template-rows:24px 20px auto minmax(0,1fr) 10px 19px;} #loop-editor-toggle {font-size:9px;}}

.mixer-heading {flex-wrap:wrap;gap:8px;}
.mix-mode {display:flex;gap:2px;margin-left:auto;padding:2px;border:1px solid #4c6789;border-radius:5px;background:#101e30;}
.mix-mode button {min-height:25px;padding:3px 9px;border:0;background:transparent;color:#abc1de;font-size:11px;box-shadow:none;}
.mix-mode button[aria-pressed="true"] {background:#3f6898;color:white;}

.library-delete {border:0;box-shadow:none;background:transparent;color:#adc0db;width:25px;min-height:28px;padding:3px;}
.library-delete:hover{background:#703c4a;color:#fff;}
#cloud-dialog,#library-delete-dialog{width:min(520px,calc(100vw - 32px));max-height:90dvh;overflow:auto;}
#cloud-dialog p,#library-delete-message{font-size:13px;line-height:1.6;color:#bed0e6;}
#cloud-error{color:#ffc2c2!important;}
.cloud-actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0;}
#cloud-conflicts article{border:1px solid #8a6c3f;background:#282b35;border-radius:6px;padding:12px;margin:12px 0;}
#cloud-conflicts button{margin:3px;}
#offline-state{cursor:pointer;}
#offline-state[data-ready="false"]{color:#f2c686;}
#cloud-connect{font-size:11px;white-space:nowrap;}

.library-item {grid-template-columns:minmax(0,1fr) 26px 25px;}
