:root {
  color-scheme: dark;
  --panel: #303234;
  --panel-dark: #242627;
  --panel-raised: #3b3e40;
  --line: #85898a;
  --soft-line: #4c5052;
  --text: #f2f1eb;
  --muted: #a7abad;
  --orange: #ff6d2d;
  --orange-hot: #ff3b1f;
  --blue: #596fd1;
  --green: #56e579;
  --yellow: #ebdc4b;
  --red: #ff4137;
}

* { box-sizing: border-box; }

html, body { width: 100%; min-height: 100%; margin: 0; background: #161718; }

body {
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overscroll-behavior: none;
  touch-action: manipulation;
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.mixer-shell {
  width: min(1400px, 100%);
  height: calc(100vh - 24px);
  min-height: calc(100vh - 24px);
  margin: 0 auto;
  overflow: hidden;
  background: linear-gradient(145deg, #393b3d 0%, var(--panel) 38%, #292b2c 100%);
  border: 1px solid #5b5e60;
  border-radius: 24px;
  box-shadow: 0 24px 70px #000a, inset 0 1px #747779, inset 0 -1px #151617;
}

@media (display-mode: standalone) and (pointer: coarse) {
  .mixer-shell {
    padding-top: max(env(safe-area-inset-top), 24px);
  }
}

.left-brand { display: flex; align-items: baseline; justify-content: center; gap: 5px; padding: 13px 4px 8px; white-space: nowrap; }
.left-brand .zoom { font-size: 17px; font-weight: 900; letter-spacing: -1px; }
.left-brand .model { font-size: 17px; font-weight: 800; }
body.l6max .left-brand .zoom,
body.l6max .left-brand .model { font-size: 14px; }

.status-pill, .icon-button {
  height: 38px;
  border: 1px solid #606466;
  color: var(--text);
  background: #252728;
  border-radius: 10px;
  box-shadow: inset 0 1px #4c5052, 0 2px 4px #0006;
}
.status-pill { padding: 0 13px; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #f5b842; box-shadow: 0 0 9px #f5b842; }
.icon-button { width: 38px; font-size: 18px; }

.workspace {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 92px minmax(720px, 6fr) minmax(108px, 1fr);
  padding: 14px 14px 10px;
  gap: 10px;
}

.layer-panel, .master-panel {
  background: #292b2ccc;
  border: 1px solid #515456;
  border-radius: 14px;
  box-shadow: inset 0 1px #676a6c, 0 5px 14px #0005;
}

.layer-panel { min-height: 0; display: flex; flex-direction: column; align-items: stretch; }

.layer-buttons { display: grid; gap: 7px; padding: 6px 0 0 9px; }
.layer-button {
  min-height: 42px;
  border: 1px solid #626669;
  border-radius: 7px;
  background: linear-gradient(#4c5052, #36393b);
  color: #e8e8e5;
  font-size: 10px;
  font-weight: 800;
  box-shadow: inset 0 1px #74787a, 0 2px 3px #0007;
}
.layer-button.active {
  color: #fff;
  background: linear-gradient(#637be0, #4055ae);
  border-color: #8394e5;
  box-shadow: 0 0 0 1px #202b70, 0 0 15px #526bd277, inset 0 1px #9ba9eb;
}

.channels {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(108px, 1fr));
  border: 1px solid #171819;
  border-radius: 15px;
  overflow: hidden;
  background: #222425;
  box-shadow: 0 5px 18px #0007;
}


.channel-strip {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 48px 22px minmax(0, 1fr) 25px minmax(0, 1fr);
  position: relative;
  background: linear-gradient(90deg, #2b2d2f, #353739 52%, #292b2d);
  border-right: 1px solid #686b6d;
  box-shadow: inset -1px 0 #171819;
}
.channel-strip:last-child { border-right: 0; }

.channel-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 9px 5px; border-bottom: 1px solid #4b4e50; }
.channel-number { font-size: 22px; font-weight: 800; }
.channel-kind { display: block; margin-top: -2px; color: #9da0a1; font-size: 8px; font-weight: 700; letter-spacing: .08em; }
.route-button {
  min-width: 36px; height: 27px; padding: 0 6px; border: 1px solid #686c6e; border-radius: 5px; color: #d9dad7;
  background: linear-gradient(#515557, #373a3c); font-size: 8px; font-weight: 800;
}
.route-button:empty { display: none; }
.signal-row { display: flex; align-items: center; justify-content: center; gap: 5px; color: #999d9e; font-size: 7px; letter-spacing: .08em; }
.signal-led { width: 6px; height: 6px; border-radius: 50%; background: #55595a; box-shadow: inset 0 0 2px #111; }
.signal-led.active { background: var(--green); box-shadow: 0 0 7px var(--green); }

.upper-zone, .lower-zone { min-height: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; position: relative; }
.parameter-name { margin-top: 4px; color: #91a5ff; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.fader-value { color: #f6f6f2; font-variant-numeric: tabular-nums; font-size: 11px; font-weight: 800; }
.parameter-value { margin-top: 3px; }
.fader-and-meter { flex: 1; min-height: 0; width: 100%; display: flex; justify-content: center; gap: 8px; padding: 4px 10px 0 14px; }
.level-fader-and-meter { align-items: stretch; padding-top: 4px; padding-bottom: 8px; }
.upper-zone > .fader-and-meter { padding-bottom: 39px; }
.fader-wrap { --fader-value: .5; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; transform: translateX(-5px); }
.fader-wrap::before { content: ""; position: absolute; top: 18px; bottom: 18px; left: 50%; width: 7px; transform: translateX(-50%); background: #111213; border: 1px solid #55595b; border-radius: 5px; box-shadow: inset 0 1px 3px #000; }
.upper-fader-wrap { flex: 1; }
.level-fader-wrap { flex: 1; width: 100%; }

.vertical-fader {
  position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; min-height: 90px; margin: 0; opacity: 0;
  -webkit-appearance: slider-vertical; appearance: slider-vertical; writing-mode: vertical-lr; direction: rtl;
  cursor: ns-resize; touch-action: none;
}

.fader-cap { position: absolute; z-index: 2; left: 50%; bottom: calc(-10px + var(--fader-value) * (100% - 36px)); width: 28px; height: 56px; transform: translateX(-50%); pointer-events: none; border: 1px solid #8f9395; border-radius: 5px; background: linear-gradient(180deg, #676b6d 0 46%, #e6e7e5 47% 51%, #303335 52% 100%); box-shadow: 0 3px 7px #000b, inset 0 1px #a9adaf; }
.level-cap { border-color: #ff8755; box-shadow: 0 0 0 1px #8d2c15, 0 0 12px #ff5a2e66, 0 3px 7px #000b; }

.channel-meters { min-height: 0; margin: 18px 0; align-self: stretch; display: flex; align-items: stretch; gap: 4px; }
.upper-meter-spacer { visibility: hidden; pointer-events: none; }
.channel-meter { width: 13px; height: 100%; min-height: 0; position: relative; overflow: hidden; border-radius: 3px; background: repeating-linear-gradient(to top, #17251a 0 5px, #111 5px 7px); box-shadow: inset 0 0 3px #000; }
.channel-meter i { position: absolute; left: 1px; right: 1px; bottom: 1px; height: var(--meter); background: linear-gradient(to top, #35de5e 0 70%, #f0df3e 82%, #ff443c 100%); filter: saturate(1.1); }
.channel-meter b { position: absolute; top: 2px; left: 1px; right: 1px; height: 3px; background: #ff4038; opacity: 0; }

.lfo-button { position: absolute; right: 10px; bottom: 8px; width: calc((100% - 27px) / 2); height: 32px; }

.level-divider { display: flex; align-items: center; gap: 6px; color: #ff8a5d; font-size: 8px; font-weight: 900; letter-spacing: .1em; }
.channel-strip > .level-divider,
.master-panel > .level-divider {
  width: 100%;
  height: 25px;
  min-height: 25px;
  margin: 0;
  padding: 0;
  align-self: stretch;
  line-height: 25px;
  background: #202223;
  box-sizing: border-box;
}
.channel-strip > .level-divider span,
.master-panel > .level-divider span { display: block; height: 25px; line-height: 25px; }
.level-divider::before, .level-divider::after { content: ""; height: 1px; flex: 1; background: #76503f; }
.level-value { margin: 2px 0 1px; }
.lower-actions { width: calc(100% - 20px); height: 32px; margin: 4px 0 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.mute-button,
.level-lfo-button,
.lfo-button { margin: 0; border: 1px solid #777b7c; border-radius: 2px; color: #ddd; background: linear-gradient(#515556, #303334); font-size: 10px; font-weight: 900; box-shadow: inset 0 1px #888c8d, 0 1px 2px #000; }
.mute-button,
.level-lfo-button { width: 100%; height: 32px; }
.mute-button svg { width: 25px; height: 19px; fill: currentColor; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.mute-button.active { color: #fff; background: linear-gradient(#f4574c, #a9211b); border-color: #ff837a; box-shadow: 0 0 14px #ff3e32aa; }
.level-lfo-button.active,
.lfo-button.active { color: #fff; border-color: #ff8b7f; background: linear-gradient(#ff5b49, #b31c12); box-shadow: 0 0 10px #ff3528; }
.level-lfo-button.paused,
.lfo-button.paused { color: #241c09; border-color: #ffd975; background: linear-gradient(#ffd86a, #bd8a22); box-shadow: 0 0 9px #e8ae36; }

.master-panel { min-height: 0; display: flex; flex-direction: column; align-items: center; padding: 0 9px 10px; }
.master-panel {
  padding: 0;
  display: grid;
  grid-template-rows: 48px 22px minmax(0, 1fr) 25px minmax(0, 1fr);
  overflow: hidden;
  border-radius: 15px;
}
.master-header { width: 100%; height: 48px; min-height: 48px; padding: 7px 9px 4px; align-self: stretch; }
.master-panel > .master-header { grid-row: 1; }
.master-panel > .signal-row { grid-row: 2; }
.master-header .channel-number { font-size: 20px; letter-spacing: 0; }
.comp-button { height: 27px; padding: 0 7px; border: 1px solid #5fbd72; border-radius: 5px; color: #7ef290; background: #29452f; font-size: 8px; font-weight: 900; }
.master-upper { grid-row: 3; min-height: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding: 5px 10px 8px; }
.master-scenes { width: 100%; margin: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.master-scenes .scene-title { margin: 0 0 2px; font-size: 10px; }
.master-scenes .scene-buttons { width: 100%; flex-direction: column; align-items: center; gap: 9px; }
.master-scenes .scene-buttons button { width: min(68px, calc(100% - 20px)); height: 50px; font-size: 16px; font-weight: 900; }
.master-meter-area { flex: 1; min-height: 0; width: 100%; display: flex; justify-content: center; padding: 12px 0 4px; }
.master-channel-meters { height: 100%; min-height: 0; display: flex; align-items: stretch; gap: 5px; }
.master-channel-meters .channel-meter { width: 13px; height: auto; min-height: 0; align-self: stretch; }
.master-panel > .level-divider { grid-row: 4; }
.master-lower { grid-row: 5; width: 100%; min-height: 0; overflow: hidden; align-self: stretch; }
.scene-title { margin: 7px 0 4px; color: #aeb1b1; font-size: 8px; letter-spacing: .12em; }
.scene-buttons { display: flex; gap: 4px; }
.scene-buttons button { width: 27px; height: 27px; border: 1px solid #636769; border-radius: 5px; color: #ddd; background: #393c3e; font-size: 9px; font-weight: 900; }
.scene-buttons button.active { background: #e9e9e4; color: #282a2b; box-shadow: 0 0 10px #fff5; }
.scene-buttons button:disabled { opacity: .38; cursor: not-allowed; }
.master-spacer { width: calc(100% - 20px); height: 32px; margin: 4px 0 8px; display: grid; place-items: center; border: 1px solid #4d5153; border-radius: 6px; color: #9da1a2; background: #303335; font-size: 9px; font-weight: 900; letter-spacing: .08em; }

@media (max-width: 980px) {
  body { padding: 0; }
  .mixer-shell { min-width: 900px; height: 100vh; min-height: 100vh; border-radius: 0; }
  .workspace { height: 100%; grid-template-columns: 84px minmax(680px, 6fr) minmax(108px, 1fr); }
}

/* Eight L6max strips retain touch-sized faders in landscape. */
@media (min-width: 981px) {
  body.l6max .workspace { grid-template-columns: 104px minmax(0, 1fr); }
  body.l6max .channels { grid-template-columns: repeat(8, minmax(88px, 1fr)); }
}

body.l6max .scene-panel { display: grid; justify-items: center; gap: 5px; margin: 10px 8px 3px; padding: 8px 2px; border-top: 1px solid #4c5052; border-bottom: 1px solid #4c5052; }
body.l6max .scene-panel .scene-title { margin: 0; }
body.l6max .scene-panel .scene-buttons { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
body.l6max .scene-panel .scene-buttons button { width: 100%; height: 38px; min-width: 0; font-size: 12px; }

/* Hardware-console visual language inspired by the ZOOM LiveTrak family. */
html, body { background: #1b1c1d; }

body { padding: 0; }

.mixer-shell {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  background: #252728;
  box-shadow: none;
}

.workspace {
  padding: 0;
  gap: 0;
  grid-template-columns: 104px minmax(720px, 6fr) minmax(120px, 1fr);
  background: #202223;
}

.layer-panel,
.master-panel {
  border: 0;
  border-radius: 0;
  background: #242627;
  box-shadow: none;
}

.layer-panel {
  border-right: 2px solid #b6b9b8;
  background: linear-gradient(90deg, #202223, #292b2c);
}

.left-brand {
  height: 48px;
  min-height: 48px;
  padding: 4px;
  flex-direction: column;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid #a7aaa9;
  background: #17191a;
}

.brand-line { display: flex; align-items: baseline; justify-content: center; gap: 5px; white-space: nowrap; }
.left-brand .zoom { font-size: 15px; line-height: 16px; }
.left-brand .model { color: #d6d8d6; font-size: 16px; line-height: 16px; }
.left-midi,
.left-audio,
.left-awake { display: flex; align-items: center; justify-content: center; gap: 8px; width: auto; height: 48px; margin: 7px 9px 0; color: #d4d6d5; background: #3b3e3f; border-color: #777b7c; border-radius: 2px; font-size: 12px; font-weight: 900; letter-spacing: .08em; box-shadow: none; cursor: pointer; }
.left-audio { margin-top: auto; }
.left-awake svg { width: 24px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.left-awake.active { color: #dfffe4; border-color: #4fa960; background: #1f3c27; box-shadow: 0 0 10px #43ee6744; }
.left-awake { margin-bottom: 10px; }
.connection-led { width: 7px; height: 7px; border-radius: 50%; background: #5d6162; box-shadow: inset 0 0 2px #111; }
.left-midi.connected, .left-audio.connected { color: #dfffe4; border-color: #4fa960; }
.left-midi.connected .connection-led, .left-audio.connected .connection-led { background: #43ee67; box-shadow: 0 0 8px #43ee67, inset 0 0 2px #effff1; }
.left-midi.attention, .left-audio.attention { color: #ffe39b; border-color: #9b792d; }
.left-midi.attention .connection-led, .left-audio.attention .connection-led { background: #f2b632; box-shadow: 0 0 7px #d49319; }
.left-midi.error, .left-audio.error { color: #ffc0bc; border-color: #a34c47; }
.left-midi.error .connection-led, .left-audio.error .connection-led { background: #ed4b43; box-shadow: 0 0 7px #c92f29; }

.layer-buttons { gap: 5px; padding: 6px 0 0 9px; }

.layer-button {
  min-height: 38px;
  margin-right: 9px;
  border-radius: 3px;
  border-color: #686c6d;
  background: linear-gradient(#55595a, #343738);
  box-shadow: inset 0 1px #85898a, 0 1px 1px #000;
  font-size: 13px;
  line-height: 1;
  letter-spacing: .02em;
}

.layer-button.active {
  position: relative;
  z-index: 4;
  margin-right: -2px;
  color: #aab6ff;
  background: #292b2c;
  border-color: #aeb1b0;
  border-right: 0;
  border-radius: 3px 0 0 3px;
  box-shadow: inset 4px 0 #3e58cf;
}

.left-device-state {
  border-top: 1px solid #686c6d;
  background: #17191a;
}

.channels {
  border: 0;
  border-radius: 0;
  background: #242627;
  box-shadow: none;
}

.channel-strip {
  background: #292b2c;
  border-right: 1px solid #aeb1b0;
  box-shadow: inset -1px 0 #101112;
}

.channel-header {
  padding: 7px 9px 4px;
  border-bottom: 1px solid #a3a6a5;
  background: #202223;
}

.channel-number { font-size: 20px; }

.route-button,
.comp-button {
  border-radius: 2px;
  box-shadow: none;
}

.route-button {
  color: #f1f1ed;
  background: #424647;
  border-color: #747879;
}

.route-button.active {
  color: #fff;
  background: linear-gradient(#ff5b49, #b31c12);
  border-color: #ff8b7f;
  box-shadow: 0 0 10px #ff3528, inset 0 1px #ff9b91;
}

.signal-row {
  border-bottom: 1px solid #3e4142;
  background: #252728;
}

.upper-zone,
.master-upper { background: #292b2c; }

.parameter-name {
  color: #8fa0ff;
  font-size: 9px;
  letter-spacing: .05em;
}

.fader-value { font-size: 12px; }

.fader-wrap::before {
  width: 6px;
  border-color: #505455;
  border-radius: 1px;
  background: #0d0e0f;
}

.fader-wrap::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 18px;
  bottom: 18px;
  left: calc(50% - 19px);
  width: 38px;
  opacity: .68;
  background:
    linear-gradient(#f0f1ef, #f0f1ef) left center / 11px 3px no-repeat,
    linear-gradient(#f0f1ef, #f0f1ef) right center / 11px 3px no-repeat,
    linear-gradient(to bottom, transparent 0 6px, #d0d2d0 6px 7px, transparent 7px 13px) left center / 8px 13px repeat-y,
    linear-gradient(to bottom, transparent 0 6px, #d0d2d0 6px 7px, transparent 7px 13px) right center / 8px 13px repeat-y;
}

.fader-cap {
  width: 28px;
  height: 56px;
  overflow: hidden;
  border: 1px solid #8f9392;
  border-radius: 2px;
  clip-path: polygon(8% 0, 92% 0, 100% 4%, 100% 96%, 92% 100%, 8% 100%, 0 96%, 0 4%);
  background:
    repeating-linear-gradient(to bottom, rgba(255,255,255,.28) 0 1px, rgba(55,58,58,.28) 1px 3px),
    linear-gradient(90deg, #575b5a 0, #aeb2b0 16%, #c0c3c1 48%, #929694 82%, #505453 100%);
  box-shadow: 0 3px 6px #000c, inset 1px 0 1px #eceeec66, inset -2px 0 2px #20222288;
}

.fader-cap::before {
  content: "";
  position: absolute;
  inset: 5px 3px;
  border-left: 1px solid #c5c8c666;
  border-right: 1px solid #24262799;
  pointer-events: none;
}

.fader-cap::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 1px;
  right: 1px;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  background: #f2f2ed;
  border-top: 1px solid #fff;
  border-bottom: 1px solid #303233;
  box-shadow: 0 1px 2px #0008;
  pointer-events: none;
}

.level-cap {
  border-color: #8f9392;
  box-shadow: 0 3px 6px #000c, inset 1px 0 1px #eceeec66, inset -2px 0 2px #20222288;
}

.channel-meter {
  border-radius: 0;
  background: repeating-linear-gradient(to top, #18221a 0 6px, #090a09 6px 8px);
}

.level-divider {
  color: #ff6843;
  background: #202223;
}

.level-divider::before,
.level-divider::after { background: #df5e41; }

.lower-zone { background: #242627; }

.master-spacer {
  width: calc(100% - 16px);
  border-radius: 2px;
  border-color: #777b7c;
  background: linear-gradient(#515556, #303334);
  box-shadow: inset 0 1px #888c8d, 0 1px 2px #000;
}

.mute-button.active {
  background: linear-gradient(#ff5b49, #b31c12);
  border-color: #ff8b7f;
  box-shadow: 0 0 10px #ff3528;
}

.master-panel {
  border-left: 2px solid #c0c3c2;
  background: #1d1f20;
}

.master-header { background: #17191a; }
.master-header .channel-number { font-size: 20px; }
.master-panel > .signal-row { background: #1b1d1e; }
.master-panel > .master-signal-spacer { border-bottom: 0; background: #202223; }
.master-panel > .master-upper { background: #202223; }
.master-panel > .level-divider { background: #17191a; }
.master-panel > .master-lower { background: #1d1f20; }
.master-panel .master-spacer { background: #17191a; }

.comp-button {
  color: #aeb2b1;
  background: #303334;
  border-color: #696d6e;
}
.comp-button.active { color: #8bf59c; background: #183d24; border-color: #64d47e; box-shadow: 0 0 8px #43ee6766; }

.scene-buttons button {
  border-radius: 2px;
  background: #3d4041;
}

.scene-buttons button.active {
  color: #fff;
  background: #dc3025;
  border-color: #ff776c;
  box-shadow: 0 0 8px #ef392e;
}

@media (max-width: 980px) {
  .workspace { grid-template-columns: 92px minmax(680px, 6fr) minmax(112px, 1fr); }
}

.midi-dialog {
  width: min(620px, calc(100vw - 32px));
  color: #efefeb;
  background: #202223;
  border: 1px solid #979b9a;
  border-radius: 4px;
  box-shadow: 0 20px 60px #000c;
}
.midi-dialog::backdrop { background: #000a; }
.midi-dialog-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.midi-dialog-header strong { font-size: 14px; letter-spacing: .08em; }
.midi-dialog-header button { width: 42px; height: 42px; color: #fff; background: #3a3d3e; border: 1px solid #777b7c; font-size: 24px; }
.midi-dialog label { display: grid; grid-template-columns: 80px 1fr; align-items: center; gap: 10px; margin: 9px 0; font-size: 11px; font-weight: 800; }
.midi-dialog select { min-width: 0; height: 44px; padding: 0 10px; color: #fff; background: #303334; border: 1px solid #777b7c; font-size: 14px; }
.midi-dialog-actions { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; margin: 15px 0; }
.midi-dialog-actions button { min-height: 48px; color: #fff; background: #343738; border: 1px solid #777b7c; font-size: 11px; font-weight: 900; }
#midiApplyPorts { opacity: .55; }
#midiApplyPorts.ready { opacity: 1; background: linear-gradient(#5166c6, #33458f); border-color: #8594df; box-shadow: inset 0 1px #9ca9eb, 0 0 10px #4058ba55; }
#midiAutoConnect { background: #263b9e; border-color: #7890ef; }
#midiDisconnect { background: #5a211d; border-color: #aa534c; }
#midiLog { height: 180px; margin: 0; padding: 10px; overflow: auto; color: #9befaa; background: #101112; border: 1px solid #46494a; font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.ios-midi-dialog { width: min(520px, calc(100vw - 32px)); }
.ios-midi-dialog p { margin: 0 0 18px; color: #d7d9d7; font-size: 15px; line-height: 1.5; }
.ios-midi-app-link,
.ios-midi-continue { display: flex; min-height: 54px; align-items: center; justify-content: center; box-sizing: border-box; border-radius: 2px; font-size: 13px; font-weight: 900; letter-spacing: .04em; text-decoration: none; }
.ios-midi-app-link { color: #fff; background: #263b9e; border: 1px solid #7890ef; }
.ios-midi-continue { width: 100%; margin-top: 10px; color: #d9dcda; background: #343738; border: 1px solid #777b7c; }
.audio-device-info { min-height: 42px; margin: 12px 0; padding: 12px; color: #b7d4ff; background: #151718; border: 1px solid #46494a; font-size: 12px; }
.audio-device-info.warning { color: #ffe29a; border-color: #a77e2e; background: #2c2618; line-height: 1.45; }
.audio-channel-note { margin: 12px 0 0; color: #aeb2b1; font-size: 11px; line-height: 1.5; }
#audioAutoConnect { background: #263b9e; border-color: #7890ef; }
#audioDisconnect { background: #5a211d; border-color: #aa534c; }

.lfo-dialog { width: min(650px, calc(100vw - 32px)); }
.lfo-main-layout { height: 330px; display: grid; grid-template-columns: minmax(280px, 1fr) 290px; gap: 14px; }
.lfo-fader-controls { height: 100%; display: flex; justify-content: center; gap: 55px; margin: 0; }
.lfo-dialog label.lfo-fader-control { width: 110px; height: 100%; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; color: #c8cbca; font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.lfo-fader-control > b { color: #8fa0ff; font-size: 13px; font-variant-numeric: tabular-nums; }
.lfo-editor-fader-wrap { flex: 1; width: 74px; margin-top: 3px; transform: none; }
.lfo-editor-fader-wrap .fader-cap { border-color: #8f9395; box-shadow: 0 3px 7px #000b, inset 0 1px #a9adaf; }
.lfo-side-options { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lfo-options { min-height: 0; margin: 0; padding: 7px; border: 1px solid #55595a; }
.lfo-options legend { padding: 0 7px; color: #aeb2b1; font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.lfo-options > div { display: grid; grid-auto-flow: row; grid-auto-rows: 44px; align-content: start; gap: 6px; }
.lfo-options button,
.lfo-dialog-actions button { min-height: 43px; color: #d9dcda; background: linear-gradient(#515556, #303334); border: 1px solid #777b7c; border-radius: 2px; font-size: 10px; font-weight: 900; }
.lfo-options button { width: 100%; min-height: 0; height: 44px; display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 8px; padding: 5px 10px; }
.lfo-options button.active { color: #fff; background: linear-gradient(#6075d4, #35489e); border-color: #8294ed; box-shadow: 0 0 8px #536ee577; }
.option-radio { width: 14px; height: 14px; border: 2px solid #aeb2b1; border-radius: 50%; background: #202223; box-shadow: inset 0 0 0 3px #202223; }
.lfo-options button.active .option-radio { border-color: #dce2ff; background: #91a3ff; }
.wave-icon,
.direction-icon { width: 64px; height: 28px; justify-self: center; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.direction-icon .center-line { stroke: #8d9293; stroke-width: 1.2; stroke-dasharray: 3 3; }
.lfo-dialog-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 10px; }
.lfo-dialog-actions #lfoEnable.active { color: #fff; background: linear-gradient(#ff5b49, #b31c12); border-color: #ff8b7f; box-shadow: 0 0 10px #ff3528; }
.lfo-dialog-actions #lfoPause.active { color: #241c09; background: linear-gradient(#ffd86a, #bd8a22); border-color: #ffd975; }
.lfo-dialog-actions #lfoRandom { color: #eee9ff; background: linear-gradient(#66569c, #3c315f); border-color: #8e7ac9; }
.lfo-dialog-actions #lfoRandom:active { background: linear-gradient(#806cc0, #4b3d76); box-shadow: 0 0 9px #765fbd; }
.lfo-dialog-actions button:disabled { opacity: .35; }
