/* Controls: buttons, turntables, track pads, LCD, sliders, W.A.R.P. pad,
   mixer strips, FX units and studio panel widgets. */

/* ----------------------------------------------------------------- buttons */
.btn {
  min-height: 26px;
  padding: 3px 10px;
  border: 2px solid;
  border-color: #6b7493 #151926 #151926 #6b7493;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #4a5372, #343b55);
  color: var(--text);
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.btn:hover {
  background: linear-gradient(180deg, #56607f, #3c4461);
}

.btn:active,
.btn.is-down,
.btn[aria-pressed="true"] {
  border-color: #151926 #6b7493 #6b7493 #151926;
  background: linear-gradient(180deg, #2b3147, #3a4260);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-menu {
  min-height: 24px;
  padding: 2px 8px;
}

.btn-accent {
  background: linear-gradient(180deg, #ffa53a, #d86c00);
  border-color: #ffd29a #6a3300 #6a3300 #ffd29a;
  color: #1c0d00;
}

.btn-accent:hover {
  background: linear-gradient(180deg, #ffb75c, #e57a0a);
}

.btn-danger {
  background: linear-gradient(180deg, #c84040, #8c1f1f);
  border-color: #f09090 #3a0808 #3a0808 #f09090;
}

.btn-mini {
  min-height: 22px;
  padding: 1px 6px;
  font-size: 10px;
}

.btn-power {
  min-height: 48px;
  padding: 8px 26px;
  font-size: 16px;
  background: linear-gradient(180deg, #ffa53a, #d86c00);
  border-color: #ffd29a #6a3300 #6a3300 #ffd29a;
  color: #1c0d00;
}

.power-icon {
  font-size: 18px;
}

/* Light-colored panel context: buttons stay dark for contrast. */
.studio-panel .btn {
  color: var(--text);
}

.field,
.studio-panel select,
.studio-panel input[type="text"],
.studio-panel input[type="number"] {
  min-height: 24px;
  padding: 2px 5px;
  border: 2px solid;
  border-color: var(--panel-lo) var(--panel-hi) var(--panel-hi) var(--panel-lo);
  background: #f4f6fb;
  color: var(--panel-text);
  border-radius: 0;
}

.dialog .field {
  width: 100%;
  margin-top: 6px;
}

/* -------------------------------------------------------------- turntables */
.deck-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: var(--tt);
  max-width: 100%;
}

.deck-letter {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  background: var(--accent);
  color: #1c0d00;
  font-family: "Arial Black", var(--font-ui);
  font-weight: 900;
  border-radius: 2px;
}

.deck-title {
  flex: 1;
  font-weight: bold;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.tt {
  position: relative;
  width: var(--tt);
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  /* chrome bezel around a dark platter, like a studio turntable seen from above */
  background:
    radial-gradient(circle at 50% 50%, transparent 0 96%, rgba(0, 0, 0, 0.55) 97% 100%),
    conic-gradient(from 210deg, #f4f6fb, #7d8497 18%, #dfe3ec 36%, #5b6174 54%, #eef1f7 72%, #848b9e 88%, #f4f6fb);
  box-shadow: 0 0 0 2px #0a0b10, 0 10px 26px rgba(0, 0, 0, 0.65), inset 0 0 0 3px rgba(255, 255, 255, 0.25);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.tt-platter {
  position: absolute;
  inset: 3.5%;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 24%, rgba(255, 255, 255, 0.05) 24.5% 25%, transparent 25.5%),
    repeating-radial-gradient(circle, #17181e 0 2px, #0b0c10 2px 4px),
    var(--vinyl);
  box-shadow: inset 0 0 0 3px #2b2c36, inset 0 0 30px rgba(0, 0, 0, 0.8);
  cursor: grab;
  will-change: transform;
}

.tt-platter.is-scratching {
  cursor: grabbing;
  box-shadow: inset 0 0 0 3px var(--accent), 0 0 18px rgba(255, 138, 0, 0.5);
}

/* Strobe marks so rotation is visible. */
.tt-platter::before {
  content: "";
  position: absolute;
  inset: 1.5%;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.2) 0 1.2deg, transparent 1.2deg 7.5deg);
  -webkit-mask: radial-gradient(circle, transparent 0 95%, #000 96%);
  mask: radial-gradient(circle, transparent 0 95%, #000 96%);
}

.tt-platter::after {
  content: "";
  position: absolute;
  top: 12%;
  left: 49.2%;
  width: 1.6%;
  height: 7%;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 6px var(--accent);
}

.pad {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 21%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid;
  border-color: color-mix(in srgb, var(--c) 40%, #fff) color-mix(in srgb, var(--c) 40%, #000)
    color-mix(in srgb, var(--c) 40%, #000) color-mix(in srgb, var(--c) 40%, #fff);
  background:
    radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 45%, #fff) 0%, transparent 45%),
    color-mix(in srgb, var(--c) 42%, #111);
  color: #fff;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: background-color 60ms, box-shadow 60ms;
  font-size: clamp(8px, calc(var(--tt) * 0.03), 11px);
  text-shadow: 0 1px 1px #000;
  z-index: 2;
}

/* Progress ring (loop position / one-shot progress). */
.pad::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--p, 0) * 360deg), transparent 0);
  -webkit-mask: radial-gradient(circle, transparent 0 66%, #000 67%);
  mask: radial-gradient(circle, transparent 0 66%, #000 67%);
  opacity: 0;
  pointer-events: none;
}

.pad.is-on::before {
  opacity: 1;
}

.pad.is-on {
  background:
    radial-gradient(circle at 35% 30%, #fff 0%, transparent 50%),
    var(--c);
  box-shadow: 0 0 18px var(--c), 0 0 4px #fff inset;
  color: #000;
  text-shadow: none;
}

.pad.is-held {
  transform: translate(-50%, -50%) scale(0.94);
}

.pad.is-locked::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px dashed #fff;
  pointer-events: none;
}

.pad.is-pending {
  animation: pad-blink 0.25s steps(2) infinite;
}

.pad.is-empty {
  --c: #4b5062;
  border-style: dashed;
  color: #c3c7d4;
  cursor: default;
}

.pad.is-break {
  filter: grayscale(0.85) brightness(0.6);
}

.pad.is-selected {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.pad-key {
  font-family: var(--font-lcd);
  font-weight: bold;
  font-size: 1.7em;
  line-height: 1;
}

.pad-name {
  max-width: 92%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.85em;
  line-height: 1.1;
}

.pad-hit {
  position: absolute;
  top: 10%;
  font-size: 0.8em;
}

@keyframes pad-blink {
  50% {
    filter: brightness(1.7);
  }
}

.tt-lock {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 25%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3px solid;
  border-color: #f0f2f7 #50566a #50566a #f0f2f7;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.55), 0 3px 8px rgba(0, 0, 0, 0.6);
  background: radial-gradient(circle at 35% 30%, #fff, #b9bfcc 45%, #7c8396);
  color: #23283a;
  font-weight: 900;
  font-size: clamp(9px, calc(var(--tt) * 0.035), 13px);
  letter-spacing: 0.06em;
  cursor: pointer;
  z-index: 2;
  touch-action: manipulation;
}

.tt-lock:active,
.tt-lock[aria-pressed="true"] {
  background: radial-gradient(circle at 35% 30%, #ffe0b0, var(--accent) 50%, #a35000);
  color: #1c0d00;
}

.deck-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  width: var(--tt);
  max-width: 100%;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
}

/* ----------------------------------------------------------------- console */
.console {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: linear-gradient(180deg, #343c57, #262c40);
  border: 2px solid;
  border-color: var(--chassis-hi) var(--chassis-lo) var(--chassis-lo) var(--chassis-hi);
  border-radius: 6px;
}

.lcd {
  padding: 6px 8px;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 2px),
    var(--lcd-bg);
  color: var(--lcd-fg);
  font-family: var(--font-lcd);
  border: 2px solid;
  border-color: var(--chassis-lo) var(--chassis-hi) var(--chassis-hi) var(--chassis-lo);
  text-shadow: 0 0 4px rgba(166, 255, 112, 0.5);
  font-variant-numeric: tabular-nums;
}

.lcd-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.lcd-small {
  font-size: 10px;
  color: var(--lcd-fg);
  overflow: hidden;
  text-overflow: ellipsis;
}

.lcd-big {
  font-size: 24px;
  letter-spacing: 0.04em;
}

.lcd-unit {
  font-size: 10px;
  margin-left: 2px;
}

.lcd-ind {
  font-size: 10px;
  color: var(--lcd-dim);
  text-shadow: none;
}

.lcd-ind.on {
  color: var(--lcd-fg);
  text-shadow: 0 0 4px rgba(166, 255, 112, 0.6);
}

.lcd-ind.rec.on {
  color: var(--rec);
  text-shadow: 0 0 6px var(--rec);
  animation: rec-blink 1s steps(2) infinite;
}

@keyframes rec-blink {
  50% {
    opacity: 0.35;
  }
}

.beat-leds {
  display: flex;
  gap: 4px;
}

.beat-led {
  width: 10px;
  height: 6px;
  background: var(--lcd-dim);
}

.beat-led.on {
  background: var(--lcd-fg);
  box-shadow: 0 0 5px var(--lcd-fg);
}

.beat-led.on.downbeat {
  background: var(--lcd-amber);
  box-shadow: 0 0 5px var(--lcd-amber);
}

.transport {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.tbtn {
  min-height: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 10px;
}

.tbtn .glyph {
  font-size: 15px;
  line-height: 1;
}

.tbtn-rec .glyph {
  color: var(--rec);
}

.tbtn-rec[aria-pressed="true"] {
  background: linear-gradient(180deg, #8a1010, #c42020);
  box-shadow: 0 0 10px rgba(255, 45, 45, 0.6);
}

.tbtn-rec[aria-pressed="true"] .glyph {
  color: #fff;
}

.tbtn-play[aria-pressed="true"] .glyph {
  color: var(--play);
  text-shadow: 0 0 6px var(--play);
}

.tbtn-mix[aria-pressed="true"] .glyph {
  color: var(--lcd-amber);
}

.ctl-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ctl-label {
  min-width: 44px;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.ctl-value {
  min-width: 42px;
  text-align: right;
  font-family: var(--font-lcd);
  font-size: 11px;
  color: var(--lcd-fg);
}

.bpm-input {
  width: 64px;
  padding: 2px 4px;
  background: var(--lcd-bg);
  color: var(--lcd-fg);
  font-family: var(--font-lcd);
  border: 2px solid;
  border-color: var(--chassis-lo) var(--chassis-hi) var(--chassis-hi) var(--chassis-lo);
}

.select-dark {
  padding: 2px 4px;
  background: #1b2030;
  border: 2px solid;
  border-color: var(--chassis-lo) var(--chassis-hi) var(--chassis-hi) var(--chassis-lo);
  font-size: 11px;
}

.solo-bar {
  width: 100%;
  min-height: 34px;
  font-size: 12px;
  letter-spacing: 0.3em;
}

.solo-bar[aria-pressed="true"],
.solo-bar.is-down {
  background: linear-gradient(180deg, #ffe066, #e0a800);
  border-color: #fff3b8 #6b4f00 #6b4f00 #fff3b8;
  color: #221800;
}

/* Range sliders styled as hardware faders. */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 0;
  height: 22px;
  background: transparent;
  cursor: pointer;
  touch-action: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: #0b0d14;
  border: 1px solid;
  border-color: var(--chassis-lo) var(--chassis-hi) var(--chassis-hi) var(--chassis-lo);
}

input[type="range"]::-moz-range-track {
  height: 6px;
  background: #0b0d14;
  border: 1px solid var(--chassis-lo);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 20px;
  margin-top: -8px;
  border: 1px solid #111;
  border-radius: 2px;
  background: linear-gradient(90deg, #8b92a6, #eef1f7 45%, #eef1f7 55%, #8b92a6);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 20px;
  border: 1px solid #111;
  border-radius: 2px;
  background: linear-gradient(90deg, #8b92a6, #eef1f7 45%, #eef1f7 55%, #8b92a6);
}

.xfader input[type="range"]::-webkit-slider-thumb {
  width: 22px;
  background: linear-gradient(90deg, #a35000, #ffc266 45%, #ffc266 55%, #a35000);
}

.xfader input[type="range"]::-moz-range-thumb {
  width: 22px;
  background: linear-gradient(90deg, #a35000, #ffc266 45%, #ffc266 55%, #a35000);
}

/* Vertical faders (mixer). */
input[type="range"].vfader {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 22px;
  height: 96px;
  flex: none;
}

input[type="range"].vfader::-webkit-slider-runnable-track {
  width: 6px;
  height: auto;
}

input[type="range"].vfader::-webkit-slider-thumb {
  width: 20px;
  height: 12px;
  margin-top: 0;
  margin-left: -8px;
  background: linear-gradient(180deg, #8b92a6, #eef1f7 45%, #eef1f7 55%, #8b92a6);
}

input[type="range"].vfader::-moz-range-track {
  width: 6px;
  height: auto;
}

input[type="range"].vfader::-moz-range-thumb {
  width: 20px;
  height: 12px;
}

.meter {
  position: relative;
  height: 8px;
  background: #0b0d14;
  border: 1px solid var(--chassis-lo);
  overflow: hidden;
}

.meter-fill {
  position: absolute;
  inset: 0;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(90deg, #2bd94f 0 65%, #ffd23a 65% 85%, #ff3b3b 85%);
}

.meter-v {
  width: 6px;
  height: 96px;
}

.meter-v .meter-fill {
  transform-origin: bottom;
  transform: scaleY(0);
  background: linear-gradient(0deg, #2bd94f 0 65%, #ffd23a 65% 85%, #ff3b3b 85%);
}

/* ------------------------------------------------------------- W.A.R.P. */
.warp {
  display: grid;
  grid-template-columns: 1fr 74px;
  gap: 6px;
}

.warp-pad {
  position: relative;
  aspect-ratio: 1.6;
  min-height: 90px;
  background:
    linear-gradient(rgba(166, 255, 112, 0.08) 1px, transparent 1px) 0 0 / 12.5% 25%,
    linear-gradient(90deg, rgba(166, 255, 112, 0.08) 1px, transparent 1px) 0 0 / 12.5% 25%,
    radial-gradient(circle at 50% 50%, #183a1c, var(--lcd-bg));
  border: 2px solid;
  border-color: var(--chassis-lo) var(--chassis-hi) var(--chassis-hi) var(--chassis-lo);
  cursor: crosshair;
  touch-action: none;
  overflow: hidden;
}

.warp-pad.is-active {
  box-shadow: 0 0 12px rgba(166, 255, 112, 0.5) inset;
}

.warp-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  border: 2px solid var(--lcd-fg);
  pointer-events: none;
  opacity: 0.35;
}

.warp-pad.is-active .warp-dot {
  opacity: 1;
  background: var(--lcd-fg);
  box-shadow: 0 0 12px var(--lcd-fg);
}

.warp-caption {
  position: absolute;
  left: 4px;
  top: 2px;
  font-family: var(--font-lcd);
  font-size: 9px;
  color: var(--lcd-fg);
  opacity: 0.8;
  pointer-events: none;
}

.warp-targets {
  display: grid;
  gap: 3px;
}

.warp-targets .btn {
  min-height: 22px;
  padding: 1px 4px;
  font-size: 10px;
}

/* ----------------------------------------------------------------- tabs */
.tab {
  padding: 5px 14px;
  border: 2px solid;
  border-bottom: 0;
  border-color: #6b7493 #151926 transparent #6b7493;
  background: linear-gradient(180deg, #3d4562, #2b3147);
  color: var(--text-dim);
  font-weight: bold;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}

.tab[aria-selected="true"] {
  background: var(--panel);
  border-color: var(--panel-hi) var(--panel-lo) transparent var(--panel-hi);
  color: var(--panel-text);
}

/* --------------------------------------------------------------- mixer */
.mixer-strips {
  display: flex;
  gap: 4px;
  min-width: max-content;
}

.mixer-divider {
  width: 4px;
  background: var(--panel-lo);
  margin: 0 4px;
}

.strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 62px;
  padding: 4px 3px;
  background: linear-gradient(180deg, #c3c8d4, #9da3b4);
  border: 2px solid;
  border-color: var(--panel-hi) var(--panel-lo) var(--panel-lo) var(--panel-hi);
}

.strip.is-selected {
  outline: 2px solid #1b2a8a;
}

.strip-name {
  width: 100%;
  padding: 1px 2px;
  border: 0;
  border-top: 4px solid var(--c);
  background: #242a3d;
  color: #fff;
  font-size: 10px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.strip-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #333;
  border: 1px solid #111;
}

.strip-led.on {
  background: var(--c);
  box-shadow: 0 0 6px var(--c);
}

.strip-fader {
  display: flex;
  gap: 4px;
  align-items: stretch;
}

.strip-val {
  font-family: var(--font-lcd);
  font-size: 10px;
}

.strip-pan {
  width: 54px;
  height: 18px;
}

.strip-ms {
  display: flex;
  gap: 2px;
}

.btn-ms {
  min-width: 24px;
  min-height: 22px;
  padding: 0 4px;
  font-size: 10px;
}

.btn-ms.mute[aria-pressed="true"] {
  background: linear-gradient(180deg, #d83a3a, #8e1414);
}

.btn-ms.solo[aria-pressed="true"] {
  background: linear-gradient(180deg, #ffe066, #d49b00);
  color: #221800;
}

.master-strip {
  background: linear-gradient(180deg, #ffcf8a, #e09a45);
}

/* ------------------------------------------------------------- FX studio */
.fx-rack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.fx-unit {
  padding: 8px;
  background: linear-gradient(180deg, #2f3650, #23283a);
  color: var(--text);
  border: 2px solid;
  border-color: var(--chassis-hi) var(--chassis-lo) var(--chassis-lo) var(--chassis-hi);
}

.fx-unit.is-on {
  box-shadow: inset 0 0 0 1px var(--lcd-fg);
}

.fx-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.fx-head h3 {
  flex: 1;
  margin: 0;
  color: var(--accent-hi);
}

.fx-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #333;
}

.fx-unit.is-on .fx-led {
  background: var(--lcd-fg);
  box-shadow: 0 0 6px var(--lcd-fg);
}

.fx-param {
  display: grid;
  grid-template-columns: 52px 1fr 54px;
  align-items: center;
  gap: 6px;
  margin: 2px 0;
}

.fx-param label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* --------------------------------------------------------------- sounds */
.sounds-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr);
  gap: 10px;
}

.box {
  padding: 8px;
  background: #c6cbd7;
  border: 2px solid;
  border-color: var(--panel-lo) var(--panel-hi) var(--panel-hi) var(--panel-lo);
}

.box h3 {
  color: #1b2a8a;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.drop-zone {
  padding: 8px;
  border: 2px dashed var(--panel-lo);
  text-align: center;
  color: #39405a;
  font-size: 11px;
}

.drop-zone.is-over {
  border-color: #1b2a8a;
  background: #dfe4f3;
}

.table-wrap {
  max-height: 260px;
  overflow: auto;
  background: #f4f6fb;
  border: 1px solid var(--panel-lo);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.data-table th,
.data-table td {
  padding: 3px 5px;
  border-bottom: 1px solid #c9cedb;
  text-align: left;
  white-space: nowrap;
}

.data-table th {
  position: sticky;
  top: 0;
  background: #dde1ea;
  font-size: 10px;
  text-transform: uppercase;
}

.data-table td.name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table .btn {
  min-height: 20px;
  padding: 0 6px;
  font-size: 10px;
}

.chip {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  vertical-align: -1px;
  background: var(--c);
  border: 1px solid #000;
}

.form-grid {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 5px 8px;
  align-items: center;
}

.form-grid label {
  font-size: 11px;
  font-weight: bold;
}

.form-grid select,
.form-grid input {
  width: 100%;
}

.inline-msg {
  min-height: 1.4em;
  margin-top: 6px;
  font-size: 11px;
}

.inline-msg[data-level="error"] {
  color: #9b0000;
}

.inline-msg[data-level="ok"] {
  color: #0d5a1a;
}

.inline-msg[data-level="warn"] {
  color: #7a4b00;
}

/* --------------------------------------------- recording & control room */
.panel-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.kv {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 2px 8px;
  margin: 6px 0;
  font-size: 11px;
}

.kv dt {
  font-weight: bold;
}

.kv dd {
  margin: 0;
  font-family: var(--font-lcd);
}

.check {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
}

.check input {
  width: 16px;
  height: 16px;
}

.list-plain {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-plain li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  border-bottom: 1px solid #b8bdca;
}

.list-plain li .grow {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress {
  height: 8px;
  margin-top: 6px;
  background: #f4f6fb;
  border: 1px solid var(--panel-lo);
}

.progress > div {
  height: 100%;
  width: 0;
  background: #1b2a8a;
}

.progress.indeterminate > div {
  width: 30%;
  animation: indet 1s linear infinite;
}

@keyframes indet {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(340%);
  }
}

audio.capture-player {
  width: 100%;
  margin-top: 6px;
}

/* Hints on the light studio panels need a darker tone for contrast. */
.studio-panel .hint {
  color: #3a4058;
}

.studio-panel .fx-unit .hint {
  color: var(--text-dim);
}

/* ------------------------------------------- arranging circles & menus */
.hint-inline {
  font-size: 10px;
  color: var(--text-dim);
}

.remix-studio.is-arranging .pad {
  cursor: grab;
  outline: 2px dashed var(--focus);
  outline-offset: 3px;
  animation: arrange-wiggle 0.5s ease-in-out infinite alternate;
}

.remix-studio.is-arranging .pad:active {
  cursor: grabbing;
}

@keyframes arrange-wiggle {
  from {
    filter: brightness(1);
  }
  to {
    filter: brightness(1.25);
  }
}

.pad.drop-target,
.mini-pad.drop-target {
  outline: 3px solid var(--lcd-fg);
  outline-offset: 3px;
  filter: brightness(1.3);
}

body.is-dragging-circle,
body.is-dragging-circle * {
  cursor: grabbing !important;
  user-select: none !important;
}

.drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  min-width: 56px;
  max-width: 120px;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--c, #666);
  border: 2px solid #fff;
  color: #000;
  font: bold 11px var(--font-ui);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 0 16px var(--c, #000), 0 6px 14px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0.92;
}

.ctx-menu {
  position: fixed;
  z-index: 120;
  min-width: 220px;
  padding: 3px;
  background: linear-gradient(180deg, #2f3650, #23283a);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.65);
}

.ctx-title {
  padding: 4px 8px;
  border-bottom: 1px solid var(--chassis-hi);
  margin-bottom: 3px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-hi);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ctx-item {
  display: block;
  width: 100%;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 12px;
  cursor: pointer;
}

.ctx-item:hover,
.ctx-item:focus-visible {
  background: var(--accent);
  color: #1c0d00;
  outline: none;
}

.ctx-item:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Key map in the Sounds studio */
.box-wide {
  grid-column: 1 / -1;
}

.mini-decks {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 12px;
  margin: 8px 0;
}

.mini-deck {
  text-align: center;
}

.mini-title {
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #39405a;
}

.mini-tt {
  position: relative;
  width: 230px;
  max-width: 100%;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle, #1a1b22 0 60%, #3b3e4c 61% 64%, #0d0e12 65%);
  box-shadow: inset 0 0 0 3px #7d8497;
}

.mini-pad {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 26%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--c) 45%, #fff);
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 45%, #fff), transparent 55%), color-mix(in srgb, var(--c) 55%, #111);
  color: #fff;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  text-shadow: 0 1px 1px #000;
}

.mini-pad.is-empty {
  border-style: dashed;
  color: #c3c7d4;
}

.mini-pad.is-selected {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.mini-key {
  font: bold 15px var(--font-lcd);
  line-height: 1;
}

.mini-name {
  max-width: 94%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  line-height: 1.1;
}
