.m2-studio {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
  gap: 0;
  align-items: stretch;
  background: linear-gradient(180deg, #161b24 0%, #0e1118 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(209, 254, 23, 0.08);
}
.m2-panel {
  background: rgba(13, 16, 23, 0.92);
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.m2-monitor {
  background: radial-gradient(circle at 50% 0%, rgba(209, 254, 23, 0.06), transparent 55%), #0b0e14;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.m2-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #080a0f;
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 4px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.m2-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 13px/1.2 var(--font-body);
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.m2-tab[aria-selected="true"] {
  background: var(--accent);
  color: #07080a;
}
.m2-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.m2-field {
  margin-bottom: 16px;
}
.m2-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.m2-label {
  font: 600 12px/1.2 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.m2-hint {
  font: 400 12px/1.2 var(--font-mono);
  color: var(--muted);
}
.m2-textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  background: #080a0f;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
  font: 400 14px/1.55 var(--font-body);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.m2-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(209, 254, 23, 0.14);
}
.m2-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.m2-preset-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font: 400 12px/1.2 var(--font-mono);
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.m2-preset-btn:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(209, 254, 23, 0.08);
}
.m2-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.m2-select {
  width: 100%;
  min-height: 42px;
  background: #080a0f;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0 12px;
  font: 400 13px/1 var(--font-body);
}
.m2-select:focus {
  outline: none;
  border-color: var(--accent);
}
.m2-upload-box {
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: #080a0f;
  padding: 12px;
  text-align: center;
}
.m2-upload-box input[type="file"] {
  width: 100%;
  color: var(--muted);
  font-size: 13px;
}
.m2-upload-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  text-align: left;
}
.m2-upload-preview img {
  width: 64px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.m2-clear-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--text);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.m2-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  background: #080a0f;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.m2-toggle strong {
  color: var(--text);
}
.m2-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}
.m2-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}
.m2-submit {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #07080a;
  font: 700 15px/1 var(--font-heading);
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.m2-submit:hover:not(:disabled) {
  filter: brightness(0.94);
}
.m2-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.m2-submit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.m2-quota-note {
  font: 400 12px/1.4 var(--font-mono);
  color: var(--muted);
  margin: 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.m2-status {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  background: rgba(209, 254, 23, 0.1);
  border: 1px solid rgba(209, 254, 23, 0.3);
  color: var(--text);
}
.m2-status[data-tone="error"] {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.36);
}
.m2-monitor-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  font: 400 12px/1.2 var(--font-mono);
  color: var(--muted);
}
.m2-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(209, 254, 23, 0.1);
  border: 1px solid rgba(209, 254, 23, 0.28);
  color: var(--accent);
  font-weight: 600;
}
.m2-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.m2-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 12px;
  background: #06080c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}
.m2-stage::before,
.m2-stage::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: rgba(209, 254, 23, 0.65);
  border-style: solid;
  pointer-events: none;
  z-index: 2;
}
.m2-stage::before {
  top: 12px;
  left: 12px;
  border-width: 2px 0 0 2px;
}
.m2-stage::after {
  bottom: 12px;
  right: 12px;
  border-width: 0 2px 2px 0;
}
.m2-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
}
.m2-idle-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.m2-stage > video[data-m2-video] {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}
.m2-placeholder-title {
  font: 700 20px/1.25 var(--font-heading);
  color: var(--text);
  margin: 0 0 8px;
}
.m2-placeholder-sub {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.m2-progress-wrap {
  width: 100%;
  padding: 24px;
  text-align: center;
}
.m2-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0 10px;
}
.m2-progress-fill {
  height: 100%;
  width: 24%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.35s ease;
}
.m2-output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.m2-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #07080a;
  font: 600 14px/1 var(--font-body);
  text-decoration: none;
}
.m2-track-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font: 400 12px/1.3 var(--font-mono);
  color: var(--muted);
}
@media (max-width: 900px) {
  .m2-studio {
    grid-template-columns: 1fr;
  }
  .m2-panel {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  }
}
@media (max-width: 640px) {
  .m2-panel,
  .m2-monitor {
    padding: 16px;
  }
  .m2-row {
    grid-template-columns: 1fr;
  }
}