.m2-studio {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
.m2-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.m2-tabs, .m2-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.m2-presets span { font-size: 12px; color: var(--muted); }
.m2-tab, .m2-chip {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
}
.m2-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.m2-chip { font-size: 12px; padding: 5px 10px; }
.m2-chip:hover { border-color: var(--accent); color: var(--ink); }
.m2-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 16px;
  align-items: start;
}
.m2-panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 14px;
}
.m2-field { display: grid; gap: 6px; }
.m2-field label { font-size: 12px; font-weight: 600; color: var(--muted); }
.m2-field input, .m2-field select, .m2-field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 14px;
}
.m2-field input[type="range"] { padding: 4px 0; accent-color: var(--accent); }
.m2-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m2-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.m2-audio-box, .m2-mode-extra {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 10px;
}
.m2-box-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.m2-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.m2-switch input { accent-color: var(--accent); }
.m2-hint, .m2-note { margin: 0; font-size: 12px; color: var(--muted); }
.m2-monitor-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
.m2-monitor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--muted);
  margin-bottom: 10px;
}
.m2-rec { color: var(--signal); font-weight: 700; }
.m2-stage {
  height: 150px;
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px;
}
.m2-viewport {
  border: 1.5px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border-radius: 6px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 10px;
  max-width: 100%;
  max-height: 128px;
  transition: width .2s, height .2s;
}
.m2-vp-label { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--accent-soft); }
.m2-vp-cam { font-size: 11px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m2-vp-aud { font-family: var(--font-mono); font-size: 11px; color: var(--signal); }
.m2-cost-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.m2-metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  gap: 2px;
}
.m2-metric span { font-size: 11px; color: var(--muted); }
.m2-metric strong { font-family: var(--font-display); font-size: 19px; color: var(--accent-soft); }
.m2-metric small { font-size: 11px; color: var(--muted); }
.m2-out-block { display: grid; gap: 6px; }
.m2-out-block pre {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  max-height: 165px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
@media (max-width: 900px) {
  .m2-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .m2-row2, .m2-row3, .m2-cost-grid { grid-template-columns: 1fr; }
  .m2-studio { padding: 12px; }
}
