/* Mic, Speaker & Screen Tester - adapts via @container only (Rule 35). */
.mst-panel[hidden], .mst-playback[hidden], .mst-pixel-stage[hidden], .mst-pixel-hud[hidden] { display: none; }
.mst-pane { min-height: 250px; }
.mst-panel { display: flex; flex-direction: column; gap: 1rem; width: 100%; }
.mst-stereo-stage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
.mst-ear-card {
  display: flex; align-items: center; gap: 0.85rem; padding: 1rem 1.1rem;
  border-radius: var(--radius-md); border: 1.5px solid var(--border); background: var(--surface);
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}
.mst-ear-card.is-playing {
  border-color: var(--brand); background: var(--brand-soft);
  box-shadow: 0 0 0 2px rgba(234, 109, 56, 0.18);
}
.mst-ear-badge {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--radius-ctrl);
  border: 1px solid var(--border); background: var(--background); color: var(--text-primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 700;
}
.mst-ear-card.is-playing .mst-ear-badge { background: var(--brand-ink); border-color: var(--brand-ink); color: #FFFFFF; }
.mst-ear-copy { display: flex; flex-direction: column; gap: 0.18rem; min-width: 0; }
.mst-ear-title { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.mst-ear-sub { font-size: 0.76rem; font-family: var(--font-mono); color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.mst-readout { margin: 0; font-size: 0.86rem; color: var(--text-secondary); line-height: 1.45; }
.mst-spk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.65rem; }
.mst-spk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 48px; padding: 0.6rem 0.85rem; border-radius: var(--radius-ctrl);
  border: 1px solid var(--border); background: var(--surface); color: var(--text-primary);
  font-family: var(--font-family); font-size: 0.86rem; font-weight: 600; cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.mst-spk-btn:hover, .mst-spk-btn:focus-visible { border-color: var(--brand-ink); background: var(--surface-elevated); }
.mst-spk-auto { background: var(--cta-bg); border-color: var(--cta-bg); color: var(--cta-text); }
.mst-spk-auto:hover, .mst-spk-auto:focus-visible { background: var(--cta-hover); border-color: var(--cta-hover); color: var(--cta-text); }
.mst-mic-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; }
.mst-btn-lg { min-height: 44px; padding: 0.5rem 0.95rem; font-size: 0.86rem; }
.mst-device-field { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.mst-meter-box {
  display: flex; flex-direction: column; gap: 0.65rem; padding: 1rem;
  border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface);
}
.mst-meter-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.mst-meter-status { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }
.mst-meter-track { height: 8px; width: 100%; border-radius: var(--radius-pill); background: var(--border); overflow: hidden; }
.mst-meter-fill { height: 100%; width: 0%; border-radius: var(--radius-pill); background: var(--brand); transition: width 0.08s linear; }
.mst-meter-fill.is-clip { background: #D92D20; }
.mst-canvas { width: 100%; height: 88px; display: block; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--background); }
.mst-playback { display: flex; flex-direction: column; gap: 0.45rem; padding: 0.85rem 1rem; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface); }
.mst-audio { width: 100%; height: 44px; }
.mst-screen-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; }
.mst-swatch-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.55rem; }
.mst-swatch-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 44px; padding: 0.45rem 0.65rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text-primary);
  font-family: var(--font-family); font-size: 0.8rem; font-weight: 500; cursor: pointer;
}
.mst-swatch-btn:hover, .mst-swatch-btn:focus-visible { border-color: var(--brand-ink); background: var(--surface-elevated); }
.mst-dot { width: 20px; height: 20px; border-radius: var(--radius-chip); border: 1px solid rgba(0, 0, 0, 0.2); flex-shrink: 0; }
.mst-dot-black { background: #000000; }
.mst-dot-white { background: #FFFFFF; }
.mst-dot-red { background: #FF0000; }
.mst-dot-green { background: #00FF00; }
.mst-dot-blue { background: #0000FF; }
.mst-pixel-stage { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: flex-end; justify-content: center; padding: 1.25rem; cursor: pointer; user-select: none; }
.mst-pixel-stage[data-color="black"] { background: #000000; }
.mst-pixel-stage[data-color="white"] { background: #FFFFFF; }
.mst-pixel-stage[data-color="red"] { background: #FF0000; }
.mst-pixel-stage[data-color="green"] { background: #00FF00; }
.mst-pixel-stage[data-color="blue"] { background: #0000FF; }
.mst-pixel-hud {
  display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; max-width: 100%;
  padding: 0.55rem 0.75rem; border-radius: var(--radius-md); background: #17191C; color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.24); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); cursor: default;
}
.mst-pixel-label { font-size: 0.84rem; font-weight: 500; padding-inline: 0.25rem; }
.mst-pixel-actions { display: inline-flex; align-items: center; gap: 0.4rem; }
.mst-hud-btn {
  min-height: 44px; min-width: 44px; padding: 0.4rem 0.75rem; border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.28); background: #26282C; color: #FFFFFF;
  font-family: var(--font-family); font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.mst-hud-exit { background: #EA6D38; border-color: #EA6D38; color: #17191C; }
@container (max-width: 760px) {
  .mst-spk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mst-swatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 520px) {
  .mst-stereo-stage, .mst-spk-grid, .mst-swatch-grid { grid-template-columns: 1fr; }
}
