#i2v-motion-studio {
  --ms-ink: #dce8e6;
  --ms-muted: #879a9c;
  --ms-panel: #101a20;
  --ms-panel-raised: #142229;
  --ms-line: rgba(154, 190, 185, .15);
  --ms-teal: #46d6c2;
  --ms-amber: #f0b84a;
  color: var(--ms-ink);
  margin: 4px 0 20px;
  font-family: inherit;
}
#i2v-motion-studio * { box-sizing: border-box; }
.ms-shell { display: grid; gap: 13px; }
.ms-heading {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 17px; border: 1px solid var(--ms-line); border-radius: 13px;
  background: linear-gradient(110deg, rgba(70,214,194,.09), transparent 50%), #0c151b;
}
.ms-heading h3 { margin: 2px 0 3px; color: #edf6f3; font-size: 17px; font-weight: 750; letter-spacing: -.025em; }
.ms-heading p, .ms-section-head p { margin: 0; color: var(--ms-muted); font-size: 11px; line-height: 1.5; }
.ms-scene-context { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border: 1px solid rgba(240,184,74,.24); border-radius: 8px; color: #efd28f; background: rgba(240,184,74,.07); font-size: 11px; }
.ms-eyebrow { margin: 0; color: var(--ms-teal); font: 700 9px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .16em; }
.ms-mark { display: grid; width: 38px; height: 38px; place-items: center; color: var(--ms-teal); border: 1px solid rgba(70,214,194,.28); border-radius: 11px; background: rgba(70,214,194,.08); font: 700 11px ui-monospace, monospace; }
.ms-card, .ms-preview-card { min-width: 0; padding: 15px; border: 1px solid var(--ms-line); border-radius: 12px; background: var(--ms-panel); }
.ms-preview-card { background: #0a1318; }
.ms-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 13px; }
.ms-section-head h4 { margin: 0 0 4px; color: #e9f2ef; font-size: 13px; font-weight: 750; }
.ms-live-dot { width: 8px; height: 8px; flex: 0 0 auto; margin: 4px 3px; border-radius: 50%; background: var(--ms-teal); box-shadow: 0 0 0 4px rgba(70,214,194,.1); }
.ms-preview { display: block; width: 100%; max-width: 640px; max-height: 360px; object-fit: contain; margin: 0 auto; border-radius: 6px; background: #080d11; }
.ms-transport { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.ms-transport input[type=range] { min-width: 50px; flex: 1; accent-color: var(--ms-teal); }
.ms-transport output { width: 52px; color: #a3b4b1; font: 11px ui-monospace, monospace; text-align: end; }
.ms-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.ms-range-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 16px; row-gap: 11px; }
.ms-control { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 5px 8px; min-width: 0; color: #c2d0ce; font-size: 11px; }
.ms-control output { color: var(--ms-teal); font: 11px ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.ms-control input { grid-column: 1 / -1; width: 100%; height: 4px; margin: 3px 0 0; accent-color: var(--ms-teal); cursor: pointer; }
.ms-select-label { display: grid; gap: 6px; margin: 11px 0 0; color: #c2d0ce; font-size: 11px; }
.ms-select-label select, .ms-geometry input {
  min-width: 0; width: 100%; min-height: 36px; padding: 7px 9px;
  border: 1px solid rgba(154,190,185,.19); border-radius: 7px;
  color: #e4eeeb; background: #0b1419; font: inherit;
}
.ms-select-label select:focus, .ms-geometry input:focus, .ms-button:focus-visible, .ms-region-item:focus-visible, .ms-region-canvas:focus-visible {
  outline: 2px solid var(--ms-teal); outline-offset: 2px;
}
.ms-camera .ms-section-head { align-items: center; }
.ms-toggle { display: flex; align-items: center; gap: 8px; color: #b8c8c5; font-size: 11px; cursor: pointer; }
.ms-toggle input { width: 16px; height: 16px; accent-color: var(--ms-teal); }
.ms-camera .ms-range-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.ms-regions { overflow: hidden; }
.ms-count { flex: 0 0 auto; padding: 4px 8px; border: 1px solid rgba(70,214,194,.2); border-radius: 6px; color: var(--ms-teal); background: rgba(70,214,194,.07); font: 11px ui-monospace, monospace; }
.ms-editor-layout { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(220px,1fr); gap: 14px; align-items: start; }
.ms-editor-stage { position: relative; display: grid; min-height: 180px; place-items: center; overflow: hidden; border: 1px solid rgba(154,190,185,.16); border-radius: 8px; background-color: #0a1116; background-image: linear-gradient(45deg,#101a20 25%,transparent 25%),linear-gradient(-45deg,#101a20 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#101a20 75%),linear-gradient(-45deg,transparent 75%,#101a20 75%); background-position: 0 0,0 8px,8px -8px,-8px 0; background-size: 16px 16px; }
.ms-region-canvas { display: block; width: 100%; max-width: 640px; max-height: 520px; object-fit: contain; touch-action: none; cursor: crosshair; }
.ms-no-source { position: absolute; max-width: 260px; padding: 12px 15px; border: 1px solid var(--ms-line); border-radius: 8px; color: #9aacaa; background: rgba(9,17,22,.88); font-size: 11px; line-height: 1.5; text-align: center; pointer-events: none; }
.ms-no-source[hidden] { display: none; }
.ms-region-tools { min-width: 0; }
.ms-draw-row { display: flex; align-items: end; gap: 8px; }
.ms-draw-row .ms-select-label { flex: 1; min-width: 0; margin-top: 0; }
.ms-button { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; gap: 6px; padding: 7px 10px; border: 1px solid rgba(154,190,185,.2); border-radius: 7px; color: #c9d6d3; background: #142127; font-family: inherit; font-size: 10px; font-weight: 600; line-height: 1.25; cursor: pointer; transition: background .16s ease, border-color .16s ease, color .16s ease; }
.ms-button:hover:not(:disabled) { border-color: rgba(70,214,194,.5); color: #fff; background: #1a2c31; }
.ms-button:disabled { opacity: .42; cursor: not-allowed; }
.ms-button.ms-accent { flex: 0 0 auto; border-color: rgba(70,214,194,.28); color: #80eadc; background: rgba(70,214,194,.11); }
.ms-button[aria-pressed=true] { border-color: rgba(240,184,74,.6); color: #f5cf7b; background: rgba(240,184,74,.1); }
.ms-button.ms-danger { color: #c8aaa1; }
.ms-pivot-hint, .ms-limit { margin: 8px 0; color: #8b9e9d; font-size: 10px; line-height: 1.45; }
.ms-region-list { display: grid; gap: 5px; max-height: 176px; overflow: auto; margin: 8px 0; }
.ms-region-item { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; gap: 8px; min-width: 0; padding: 8px; border: 1px solid transparent; border-radius: 6px; color: #becdca; background: rgba(255,255,255,.025); font-family: inherit; font-size: 11px; text-align: start; cursor: pointer; }
.ms-region-item.selected { border-color: rgba(240,184,74,.34); background: rgba(240,184,74,.07); color: #f1d18f; }
.ms-region-swatch { width: 7px; height: 7px; border-radius: 2px; background: var(--ms-teal); }
.ms-swatch-1 { background: #6db8f1; }.ms-swatch-2 { background: #c4a3ed; }.ms-swatch-3,.ms-swatch-4 { background: #f0b84a; }.ms-swatch-5,.ms-swatch-6 { background: #ef957d; }.ms-swatch-7 { background: #81d591; }
.ms-region-dim { color: #899b99; font: 10px ui-monospace, monospace; white-space: nowrap; }
.ms-empty-regions { margin: 0; padding: 10px; border: 1px dashed rgba(154,190,185,.16); border-radius: 6px; color: #839594; font-size: 10px; line-height: 1.5; }
.ms-region-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ms-geometry { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; margin: 10px 0 0; padding: 9px; border: 1px solid var(--ms-line); border-radius: 7px; }
.ms-geometry legend { padding: 0 5px; color: #9eafac; font-size: 10px; }
.ms-geometry label { display: grid; gap: 4px; color: #94a6a3; font-size: 9px; }
.ms-geometry input { min-height: 30px; padding: 4px 5px; font: 10px ui-monospace, monospace; }
.ms-error { min-height: 15px; margin: 7px 0 0; color: #e99b8b; font-size: 10px; line-height: 1.4; }
.ms-play { flex: 0 0 auto; min-width: 88px; border-color: rgba(70,214,194,.32); color: var(--ms-teal); }
.motion-studio-scene-button { color: #82e8d9 !important; border-color: rgba(70,214,194,.28) !important; }
.motion-studio-scene-button i { margin-inline-end: 7px; }
@media (max-width: 767px) {
  #i2v-motion-studio { margin-inline: -2px; }
  .ms-heading, .ms-card, .ms-preview-card { padding: 12px; }
  .ms-columns { grid-template-columns: 1fr; }
  .ms-camera .ms-range-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ms-editor-layout { grid-template-columns: 1fr; }
  .ms-region-tools { display: grid; }
  .ms-editor-stage { min-height: 160px; }
  .ms-region-canvas { max-height: 380px; }
  .ms-geometry { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 390px) {
  .ms-range-grid { column-gap: 10px; }
  .ms-region-actions .ms-button { flex: 1 1 30%; }
  .ms-geometry { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
[dir="rtl"] .ms-transport output { text-align: start; }
@media (prefers-reduced-motion: reduce) {
  .ms-button { transition: none; }
}
