/* E-06 STUDIOREGIE — dunkler Raum, cleanes Chrome, stilisierter Mischer */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: #030303;
  color: #b0b0b0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  cursor: crosshair;
}

.stage {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: clamp(148px, 22vh, 200px);
}

#stage {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.mixer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(148px, 22vh, 200px);
  background: linear-gradient(180deg, #0a0a0c 0%, #060608 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: stretch;
  gap: clamp(8px, 1.2vw, 16px);
  padding: clamp(10px, 1.4vh, 14px) clamp(12px, 2vw, 24px) clamp(12px, 1.6vh, 16px);
  z-index: 20;
  pointer-events: auto;
}

.mixer-strips {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(6px, 0.9vw, 10px);
  min-width: 0;
}

.strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.strip:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.28);
  outline-offset: 2px;
}

.strip-label {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: clamp(7px, 0.75vw, 9px);
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.38);
  text-align: center;
  line-height: 1.25;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.strip-credit {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: clamp(6px, 0.65vw, 8px);
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.2);
  text-align: center;
  line-height: 1.3;
  width: 100%;
  min-height: 2.4em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 70ms steps(2), box-shadow 70ms steps(2);
}

.led.pvw.on {
  background: #3ecf8e;
  box-shadow: 0 0 6px rgba(62, 207, 142, 0.45);
}

.led.pgm.on {
  background: #e85c4a;
  box-shadow: 0 0 6px rgba(232, 92, 74, 0.45);
}

.fader-track {
  position: relative;
  flex: 1;
  width: clamp(22px, 2.8vw, 32px);
  min-height: 48px;
  background: linear-gradient(180deg, #141416 0%, #0c0c0e 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 2px;
  touch-action: none;
}

.fader-cap {
  position: absolute;
  left: 2px;
  right: 2px;
  height: 14px;
  bottom: 4px;
  background: linear-gradient(180deg, #3a3a3e 0%, #222226 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1px;
  transition: bottom 120ms steps(4);
  pointer-events: none;
}

.strip.preview .fader-cap {
  bottom: calc(100% - 18px);
  background: linear-gradient(180deg, #4a4a50 0%, #2e2e34 100%);
}

.strip.program .fader-cap {
  border-color: rgba(232, 92, 74, 0.35);
}

.strip-num {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.28);
}

.mixer-transport {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  width: clamp(52px, 6vw, 72px);
}

.transport-btn {
  flex: 1;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  background: #121214;
  color: rgba(255, 255, 255, 0.55);
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: background 70ms steps(2), color 70ms steps(2), border-color 70ms steps(2);
}

.transport-btn:hover:not(:disabled) {
  background: #1a1a1e;
  color: rgba(255, 255, 255, 0.82);
}

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

.transport-btn.cut.ready {
  border-color: rgba(232, 92, 74, 0.45);
  color: rgba(255, 200, 190, 0.9);
}

.transport-btn.auto.ready {
  border-color: rgba(210, 170, 90, 0.45);
  color: rgba(240, 220, 180, 0.9);
}

.transport-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.chrome {
  position: fixed;
  inset: 0;
  bottom: clamp(148px, 22vh, 200px);
  pointer-events: none;
  z-index: 10;
}

.hud-top {
  position: absolute;
  top: clamp(16px, 3vh, 28px);
  left: clamp(16px, 3vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hud-label {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.36);
}

.hud-work {
  font-size: clamp(12px, 1.5vw, 15px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.74);
  max-width: 42ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 1.2em;
}

.hud-hint {
  position: absolute;
  bottom: clamp(12px, 2vh, 20px);
  left: clamp(16px, 3vw, 28px);
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.22);
  line-height: 1.7;
}

.osd {
  position: absolute;
  top: clamp(16px, 3vh, 28px);
  right: clamp(16px, 3vw, 28px);
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: clamp(10px, 1.2vw, 12px);
  letter-spacing: 0.1em;
  color: rgba(220, 220, 220, 0.88);
  text-align: right;
  line-height: 1.65;
  white-space: pre-line;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

.telemetry {
  position: absolute;
  bottom: clamp(12px, 2vh, 20px);
  right: clamp(16px, 3vw, 28px);
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.16);
  text-align: right;
}

.sr-works {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-works a { color: inherit; }

body.taking { cursor: wait; }

@media (max-width: 720px) {
  .mixer-strips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, 1fr);
  }

  .mixer {
    height: clamp(200px, 32vh, 260px);
    flex-direction: column;
  }

  .mixer-transport {
    flex-direction: row;
    width: 100%;
  }

  .stage,
  .chrome {
    bottom: clamp(200px, 32vh, 260px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fader-cap,
  .led,
  .transport-btn { transition: none; }
}
