/* MIB Musikzentrale: compact responsive shell.  The working tools stay untouched. */
:root {
  --mz-responsive-ground: #0b0f11;
  --mz-responsive-shell: #101517;
  --mz-responsive-panel: #151b1e;
  --mz-responsive-line: #2a353a;
  --mz-responsive-text: #edf1f2;
  --mz-responsive-muted: #9aa6aa;
  --mz-responsive-cyan: #32b7cf;
  --mz-responsive-gold: #d1a44f;
}

html,
body {
  background: var(--mz-responsive-ground) !important;
  color: var(--mz-responsive-text) !important;
  overflow: hidden;
}

.mz-main-viewport,
.tab-content,
.tab-content iframe {
  min-width: 0;
  min-height: 0;
}

.mz-main-viewport {
  overscroll-behavior: contain;
}

.mz-tool-select select {
  appearance: auto;
  min-width: 0;
}

/* The desktop rail remains the fast navigation. */
@media (min-width: 901px) {
  .mz-bottom-dock {
    overflow: hidden;
  }

  .mz-dock-btn {
    flex: 0 0 48px !important;
  }
}

/* On compact screens the Werkzeug select is the single navigation surface.
   This prevents a second, horizontally scrolling button rail. */
@media (max-width: 900px) {
  body {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100dvh;
  }

  .mz-topbar {
    flex: 0 0 52px !important;
    min-height: 52px !important;
    height: 52px !important;
    gap: 8px;
  }

  .mz-topbar > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }

  .mz-tool-select {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 0;
  }

  .mz-tool-select select {
    min-width: 0;
    width: 100%;
    text-overflow: ellipsis;
  }

  .mz-main-viewport {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0;
  }

  .mz-bottom-dock {
    display: none !important;
  }

  .scrollable-tab-view,
  #view-musikschule {
    overscroll-behavior: contain;
    padding: 12px 10px 22px !important;
  }

  .scrollable-tab-view > div,
  #view-musikschule > div {
    max-width: none !important;
  }
}

@media (max-width: 520px) {
  .mz-topbar {
    padding-inline: 8px !important;
  }

  .mz-tool-select {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  .mz-tool-select span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .mz-tool-select select {
    min-height: 38px;
    border: 1px solid #3b4b52 !important;
    border-radius: 5px !important;
    background: #182126 !important;
    font-size: 13px !important;
  }

  .mz-main-viewport {
    height: calc(100dvh - 52px) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tab-content.active {
    animation: none !important;
  }
}
