.ml-app {
  --ml-ink: #e9f0fc;
  --ml-muted: #9eb0ca;
  --ml-border: #29354c;
  background: #0b1120;
  color: var(--ml-ink);
  border-radius: 28px;
  padding: clamp(18px, 3vw, 38px);
  margin: 12px 0 40px;
}
.ml-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
  margin-bottom: 30px;
}
.ml-kicker {
  font: 11px monospace;
  letter-spacing: 0.18em;
  color: #6ee7b7;
}
.ml-heading h2 {
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
  max-width: 650px;
  margin: 14px 0;
}
.ml-heading p {
  color: var(--ml-muted);
  max-width: 650px;
}
.ml-local {
  white-space: nowrap;
  border: 1px solid #33544f;
  border-radius: 30px;
  padding: 10px;
  font-size: 11px;
  color: #6ee7b7;
}
.ml-layout {
  display: grid;
  grid-template-columns: minmax(260px, 350px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.ml-panel {
  background: #141d2e;
  padding: 20px;
  border: 1px solid var(--ml-border);
  border-radius: 18px;
  display: grid;
  gap: 16px;
}
.ml-app label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  min-width: 0;
}
.ml-app input,
.ml-app select,
.ml-app button,
.ml-app a.ml-primary {
  font: inherit;
  color: inherit;
}
.ml-app input:not([type="range"]),
.ml-app select {
  background: #0b1322;
  color: #e9f0fc;
  border: 1px solid #35425c;
  border-radius: 9px;
  min-width: 0;
  width: 100%;
  padding: 10px;
}
.ml-app input[type="range"] {
  width: 100%;
  accent-color: #86efac;
}
.ml-app input[type="color"] {
  height: 40px;
  padding: 3px;
}
.ml-app output {
  color: #6ee7b7;
  font: 11px monospace;
}
.ml-app fieldset {
  border: 1px solid var(--ml-border);
  border-radius: 10px;
  padding: 14px;
  display: grid;
  gap: 14px;
  min-width: 0;
}
.ml-app legend {
  padding: 0 6px;
  font-size: 12px;
  color: #c9d4e8;
}
.ml-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ml-app details summary {
  cursor: pointer;
  font-size: 13px;
  margin-bottom: 14px;
}
.ml-app details[open] {
  display: grid;
  gap: 12px;
}
.ml-app details label {
  margin-bottom: 12px;
}
.ml-app button,
.ml-app a.ml-primary {
  border: 1px solid #35425c;
  background: #1b2940;
  padding: 11px 16px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.ml-app button:hover {
  border-color: #6ee7b7;
}
.ml-app button:focus-visible,
.ml-app input:focus-visible,
.ml-app select:focus-visible {
  outline: 2px solid #6ee7b7;
  outline-offset: 3px;
}
.ml-app button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.ml-app .ml-primary {
  background: #b9f278;
  color: #102216;
  font-weight: 700;
  border: 0;
}
.ml-stage {
  position: sticky;
  top: 100px;
  min-width: 0;
}
.ml-canvas-wrap {
  position: relative;
  border-radius: 16px;
  background: #070b18;
  overflow: hidden;
  display: flex;
  justify-content: center;
  border: 1px solid var(--ml-border);
}
#mlCanvas {
  display: block;
  max-width: 100%;
  width: auto;
  max-height: 650px;
  object-fit: contain;
}
.ml-live {
  position: absolute;
  top: 14px;
  left: 14px;
  font: 10px monospace;
  letter-spacing: 0.1em;
  background: #162335d9;
  color: #6ee7b7;
  padding: 6px 9px;
  border-radius: 20px;
}
.ml-transport {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}
.ml-transport span {
  margin-inline-start: auto;
  font: 12px monospace;
  color: #9eb0ca;
}
.ml-export {
  padding: 18px;
  background: #141d2e;
  border: 1px solid var(--ml-border);
  border-radius: 14px;
}
.ml-export p {
  font-size: 13px;
  margin: 12px 0 0;
}
.ml-export progress {
  width: 100%;
  margin-top: 12px;
  accent-color: #b9f278;
}
.ml-export a {
  display: block;
  margin-top: 14px;
}
.ml-export video {
  width: 100%;
  max-height: 380px;
  margin-top: 15px;
  border-radius: 10px;
}
.ml-muted {
  font-size: 12px;
  line-height: 1.7;
  color: var(--ml-muted);
}
.ml-library {
  margin-top: 35px;
  border-top: 1px solid var(--ml-border);
  padding-top: 20px;
}
#mlGallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
#mlGallery button {
  text-align: start;
  padding: 0;
  overflow: hidden;
}
#mlGallery canvas {
  display: block;
  width: 100%;
  height: 145px;
  object-fit: cover;
  background: #070b18;
}
#mlGallery span {
  display: block;
  padding: 12px;
  font-size: 12px;
}
#mlGallery button[aria-pressed="true"] {
  border-color: #b9f278;
  box-shadow: 0 0 0 1px #b9f278;
}
.ml-app [hidden] {
  display: none !important;
}
@media (max-width: 800px) {
  .ml-layout {
    grid-template-columns: 1fr;
  }
  .ml-stage {
    position: static;
    grid-row: 1;
  }
  .ml-heading {
    display: block;
  }
  .ml-local {
    display: inline-block;
  }
  .ml-heading h2 {
    font-size: 30px;
  }
  #mlCanvas {
    max-height: 520px;
  }
  .ml-panel {
    max-height: none;
  }
  .ml-app {
    border-radius: 18px;
  }
  #mlGallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ml-app * {
    scroll-behavior: auto;
  }
}
