.sv-editor {
  scroll-margin-top: 1.5rem;
}

.sv-upload-card,
.sv-editor-panel {
  padding: clamp(1rem, 2.5vw, 1.75rem);
}

.sv-dropzone {
  min-height: 320px;
  border: 2px dashed var(--border);
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-soft);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.sv-dropzone:hover,
.sv-dropzone:focus-visible,
.sv-dropzone.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}

.sv-dropzone.is-dragging { transform: scale(1.005); }
.sv-dropzone h2,
.sv-dropzone p { margin: 0; }
.sv-dropzone h2 { color: var(--text); }

.sv-file-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.sv-file-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.sv-file-copy > div {
  min-width: 0;
  display: grid;
  gap: .15rem;
}

.sv-file-copy strong,
.sv-file-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sv-file-copy span {
  color: var(--text-muted);
  font-size: .9rem;
}

.sv-file-icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: .75rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.sv-compatibility {
  margin: 1rem 0;
  padding: .7rem 1rem;
  border-radius: .75rem;
  color: var(--text-muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.sv-compatibility.is-ready {
  color: #166534;
  border-color: rgba(34, 197, 94, .3);
  background: rgba(34, 197, 94, .08);
}

.sv-compatibility.is-limited {
  color: #92400e;
  border-color: rgba(245, 158, 11, .35);
  background: rgba(245, 158, 11, .09);
}

.sv-compatibility.is-error {
  color: #b91c1c;
  border-color: rgba(239, 68, 68, .35);
  background: rgba(239, 68, 68, .08);
}

html[data-theme="dark"] .sv-compatibility.is-ready { color: #86efac; }
html[data-theme="dark"] .sv-compatibility.is-limited { color: #fcd34d; }
html[data-theme="dark"] .sv-compatibility.is-error { color: #fca5a5; }

.sv-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.sv-preview-panel,
.sv-inspector {
  min-width: 0;
}

.sv-panel-heading,
.sv-timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.sv-panel-heading h2,
.sv-inspector h2,
.sv-timeline-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.sv-preview-help,
.sv-panel-heading > span,
.sv-timeline-header p {
  color: var(--text-muted);
  font-size: .82rem;
}

.sv-preview-stage {
  position: relative;
  container-type: inline-size;
  width: min(100%, 1100px);
  aspect-ratio: 16 / 9;
  margin: .65rem auto 0;
  overflow: hidden;
  border-radius: .85rem;
  background:
    linear-gradient(45deg, rgba(255,255,255,.035) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.035) 75%),
    #050816;
  background-size: 24px 24px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 18px 50px rgba(15,23,42,.2);
  touch-action: none;
}

.sv-preview-stage[data-aspect="9:16"] { width: min(100%, 380px); aspect-ratio: 9 / 16; }
.sv-preview-stage[data-aspect="1:1"] { width: min(100%, 550px); aspect-ratio: 1; }
.sv-preview-stage[data-aspect="4:5"] { width: min(100%, 460px); aspect-ratio: 4 / 5; }
.sv-preview-stage[data-aspect="16:9"] { aspect-ratio: 16 / 9; }

.sv-preview-stage video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #000;
  transform-origin: center;
}

.sv-overlay-root {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.sv-preview-layer {
  position: absolute;
  z-index: 2;
  max-width: 90%;
  transform: translate(-50%, -50%);
  cursor: move;
  user-select: none;
  touch-action: none;
  pointer-events: auto;
}

.sv-preview-layer.is-text {
  min-width: max-content;
  padding: .22em .42em;
  border-radius: .3em;
  font-family: Cairo, Inter, system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 8px rgba(0,0,0,.95), 0 1px 2px rgba(0,0,0,.95);
}

.sv-preview-layer.is-image {
  width: calc(var(--sv-layer-size) * 1%);
}

.sv-preview-layer.is-image img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

.sv-preview-layer.is-selected::after {
  content: '';
  position: absolute;
  inset: -.4rem;
  border: 2px solid #60a5fa;
  border-radius: .35rem;
  box-shadow: 0 0 0 1px rgba(15,23,42,.75), 0 0 0 4px rgba(96,165,250,.18);
  pointer-events: none;
}

.sv-transport {
  display: grid;
  grid-template-columns: auto auto minmax(80px, 1fr) auto;
  align-items: center;
  gap: .65rem;
  margin-top: .75rem;
  padding: .6rem .75rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: var(--bg-soft);
}

.sv-icon-button {
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  cursor: pointer;
}

.sv-transport output {
  min-width: 3.3rem;
  color: var(--text-muted);
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
}

.sv-transport input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.sv-inspector {
  display: grid;
  gap: .75rem;
}

.sv-inspector-section {
  padding: .85rem;
  border: 1px solid var(--border);
  border-radius: .85rem;
  background: var(--bg-soft);
}

.sv-inspector-section[hidden] { display: none; }
.sv-context-inspector[hidden],
.sv-settings-grid[hidden] { display: none; }

.sv-project-settings-block .sv-settings-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sv-project-settings-block .sv-field-wide { grid-column: span 2; }

.sv-project-settings-block,
.sv-clip-inspector-content { min-width: 0; }

.sv-floating-heading-actions {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.sv-properties-close {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text);
  background: var(--panel);
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.sv-properties-close:hover,
.sv-properties-close:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}

.sv-drag-handle {
  margin: -.2rem -.2rem .35rem;
  padding: .2rem;
  cursor: grab;
  touch-action: none;
}

.sv-floating-inspector.is-dragging .sv-drag-handle { cursor: grabbing; }

.sv-floating-inspector:not([hidden]) {
  position: fixed;
  z-index: 120;
  inset-block-start: clamp(5.5rem, 11vh, 7rem);
  inset-inline-end: clamp(.75rem, 2vw, 1.5rem);
  width: min(24rem, calc(100vw - 1.5rem));
  max-height: calc(100vh - 7.5rem);
  overflow: auto;
  overscroll-behavior: contain;
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background: var(--panel-strong);
  box-shadow: 0 20px 55px rgba(15, 23, 42, .28), 0 0 0 1px rgba(255,255,255,.06);
}

.sv-btn-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sv-btn-icon path[d^="m9 7"] { fill: currentColor; stroke: none; }

.sv-play-glyph {
  min-width: 1rem;
  display: inline-grid;
  place-items: center;
  font-size: .9rem;
  line-height: 1;
}

.sv-editor .btn { gap: .45rem; }

.sv-settings-grid,
.sv-time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
  margin-top: .7rem;
}

.sv-field {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: .32rem;
  color: var(--text);
  font-size: .8rem;
  font-weight: 700;
}

.sv-field-wide { grid-column: 1 / -1; }
.sv-field[hidden] { display: none; }

.sv-dual-range {
  position: relative;
  direction: ltr;
  height: 3.6rem;
  margin-top: .85rem;
  padding-top: .75rem;
}

.sv-dual-range-rail {
  position: absolute;
  top: 1.15rem;
  right: .6rem;
  left: .6rem;
  height: .62rem;
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 70%, var(--panel));
  pointer-events: none;
}

.sv-dual-range-fill {
  position: absolute;
  top: -1px;
  bottom: -1px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
}

.sv-dual-range-thumb {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 1.05rem;
  height: 1.65rem;
  border: 3px solid #fff;
  border-radius: .42rem;
  background: #2563eb;
  box-shadow: 0 0 0 2px #1e3a8a, 0 3px 10px rgba(15,23,42,.35);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.sv-dual-range input[type="range"] {
  position: absolute;
  z-index: 2;
  top: .55rem;
  right: 0;
  left: 0;
  width: 100%;
  height: 1.85rem;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  opacity: 0;
  pointer-events: auto;
  cursor: ew-resize;
}

#sv-clip-range-start { clip-path: inset(0 50% 0 0); }
#sv-clip-range-end { z-index: 3; clip-path: inset(0 0 0 50%); }

.sv-dual-range input[type="range"]::-webkit-slider-runnable-track {
  height: .62rem;
  background: transparent;
}

.sv-dual-range input[type="range"]::-webkit-slider-thumb {
  width: 1.28rem;
  height: 1.85rem;
  margin-top: -.62rem;
  appearance: none;
  -webkit-appearance: none;
  border: 3px solid #fff;
  border-radius: .42rem;
  background: #2563eb;
  box-shadow: 0 0 0 2px #1e3a8a, 0 3px 10px rgba(15,23,42,.35);
  cursor: ew-resize;
  pointer-events: auto;
}

.sv-dual-range input[type="range"]::-moz-range-track {
  height: .62rem;
  background: transparent;
}

.sv-dual-range input[type="range"]::-moz-range-thumb {
  width: 1.05rem;
  height: 1.55rem;
  border: 3px solid #fff;
  border-radius: .42rem;
  background: #2563eb;
  box-shadow: 0 0 0 2px #1e3a8a, 0 3px 10px rgba(15,23,42,.35);
  cursor: ew-resize;
  pointer-events: auto;
}

.sv-dual-range input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px var(--panel), 0 0 0 6px #60a5fa;
}

.sv-dual-range input[type="range"]:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 3px var(--panel), 0 0 0 6px #60a5fa;
}

.sv-dual-range-values {
  position: absolute;
  right: .1rem;
  bottom: 0;
  left: .1rem;
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
}

.sv-field select,
.sv-field textarea,
.sv-field input[type="number"],
.sv-field input[type="color"] {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: .58rem;
  color: var(--text);
  background: var(--panel);
  font: inherit;
  font-weight: 500;
}

.sv-field select,
.sv-field textarea,
.sv-field input[type="number"] {
  padding: .58rem .62rem;
}

.sv-field textarea {
  min-height: 4.5rem;
  margin-top: .7rem;
  resize: vertical;
}

.sv-field input[type="color"] {
  min-height: 2.4rem;
  padding: .2rem;
}

.sv-field input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.sv-field output {
  color: var(--text-muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.sv-field select:focus-visible,
.sv-field textarea:focus-visible,
.sv-field input:focus-visible,
.sv-icon-button:focus-visible,
.sv-preview-layer:focus-visible,
.sv-clip:focus-visible,
.sv-layer-bar:focus-visible {
  outline: 3px solid var(--accent-soft);
  border-color: var(--accent);
}

.sv-compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .65rem;
}

.sv-editor .btn-primary { color: #fff; }
.sv-editor .btn-secondary,
.sv-editor .btn-ghost { color: var(--text); }

html[data-theme="dark"] .sv-editor .btn-primary {
  color: #fff;
  background: #2563eb;
}

html[data-theme="dark"] .sv-editor .btn-secondary,
html[data-theme="dark"] .sv-editor .btn-ghost {
  color: #e5e7eb;
  border-color: rgba(148,163,184,.34);
  background: #172033;
}

html[data-theme="dark"] .sv-editor .btn-secondary:hover,
html[data-theme="dark"] .sv-editor .btn-ghost:hover {
  color: #fff;
  border-color: #60a5fa;
  background: #243147;
}

.sv-editor .btn:disabled,
html[data-theme="dark"] .sv-editor .btn:disabled {
  color: #94a3b8;
  cursor: not-allowed;
  opacity: .68;
}

.btn-danger {
  margin-top: .75rem;
  color: #b91c1c;
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.08);
}

html[data-theme="dark"] .btn-danger { color: #fca5a5; }

.sv-timeline-section {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--bg-soft) 78%, #0f172a 22%);
}

.sv-timeline-header > div:first-child {
  display: grid;
  gap: .2rem;
}

.sv-timeline-header p { margin: 0; }
.sv-timeline-header p.is-invalid strong { color: #dc2626; }

.sv-timeline-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .45rem;
}

.sv-timeline {
  --sv-track-label-width: 6rem;
  position: relative;
  direction: ltr;
  min-width: 600px;
  margin-top: .85rem;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,.28);
  border-radius: .75rem;
  background: #0b1120;
  color: #e2e8f0;
}

.sv-timeline-playhead:focus-visible {
  outline: none;
}

.sv-timeline-playhead:focus-visible span {
  filter: drop-shadow(0 0 4px #60a5fa);
}

.sv-timeline-section {
  overflow-x: auto;
}

.sv-ruler {
  position: relative;
  height: 1.65rem;
  margin-inline-start: var(--sv-track-label-width);
  border-bottom: 1px solid rgba(148,163,184,.2);
  background: rgba(15,23,42,.96);
}

.sv-ruler-spacer { display: none; }

.sv-ruler-tick {
  position: absolute;
  top: .25rem;
  transform: translateX(-50%);
  color: #94a3b8;
  font-size: .67rem;
  font-variant-numeric: tabular-nums;
}

.sv-ruler-tick::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 1rem;
  height: .42rem;
  border-left: 1px solid rgba(148,163,184,.32);
}

.sv-track-row {
  display: grid;
  grid-template-columns: var(--sv-track-label-width) minmax(0, 1fr);
  min-height: 4.5rem;
  border-bottom: 1px solid rgba(148,163,184,.16);
}

.sv-layer-row { min-height: 2.8rem; }
.sv-track-row:last-child { border-bottom: 0; }

.sv-track-label {
  min-width: 0;
  padding: .55rem .5rem;
  border: 0;
  border-inline-end: 1px solid rgba(148,163,184,.2);
  display: flex;
  align-items: center;
  color: #cbd5e1;
  background: rgba(15,23,42,.92);
  font: inherit;
  font-size: .72rem;
  text-align: start;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button.sv-track-label { cursor: pointer; }

html[dir="rtl"] .sv-track-label {
  direction: rtl;
  text-align: right;
}

.sv-track-content {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent calc(10% - 1px), rgba(148,163,184,.09) calc(10% - 1px), rgba(148,163,184,.09) 10%);
}

.sv-clip {
  position: relative;
  min-width: 2.4rem;
  overflow: hidden;
  border: 2px solid transparent;
  border-inline-end-color: rgba(15,23,42,.92);
  display: flex;
  align-items: flex-end;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(37,99,235,.5), rgba(124,58,237,.45));
  isolation: isolate;
}

.sv-clip.is-selected {
  border-color: #60a5fa;
  box-shadow: inset 0 0 0 1px #0f172a;
}

.sv-thumbnail-strip {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: flex;
  opacity: .66;
}

.sv-thumbnail-strip img {
  min-width: 0;
  width: 25%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.78) contrast(1.08);
}

.sv-clip-title {
  width: 100%;
  padding: .28rem .45rem;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(transparent, rgba(2,6,23,.88));
  font-size: .69rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sv-clip-handle,
.sv-layer-handle {
  position: absolute;
  z-index: 5;
  top: 0;
  bottom: 0;
  width: .78rem;
  cursor: ew-resize;
  background:
    linear-gradient(90deg, transparent 38%, rgba(255,255,255,.9) 38%, rgba(255,255,255,.9) 62%, transparent 62%),
    rgba(37,99,235,.96);
  opacity: .8;
  transition: opacity .15s ease;
  touch-action: none;
}

.sv-clip:hover .sv-clip-handle,
.sv-clip.is-selected .sv-clip-handle,
.sv-layer-bar:hover .sv-layer-handle,
.sv-layer-bar.is-selected .sv-layer-handle { opacity: 1; }

.sv-clip-handle.is-start,
.sv-layer-handle.is-start { inset-inline-start: 0; }
.sv-clip-handle.is-end,
.sv-layer-handle.is-end { inset-inline-end: 0; }

.sv-clip-handle {
  top: .22rem;
  bottom: .22rem;
  width: 1rem;
  border: 2px solid #fff;
  border-radius: .32rem;
  box-shadow: 0 0 0 2px rgba(15,23,42,.72), 0 3px 10px rgba(15,23,42,.45);
  opacity: 1;
}

.sv-clip-handle.is-start { inset-inline-start: .22rem; }
.sv-clip-handle.is-end { inset-inline-end: .22rem; }

.sv-layer-track {
  min-height: 2.8rem;
  align-items: center;
}

.sv-layer-bar {
  position: absolute;
  height: 1.75rem;
  min-width: 1.3rem;
  padding: .25rem .65rem;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: .35rem;
  color: #fff;
  font-size: .68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: grab;
  touch-action: none;
}

.sv-layer-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.sv-is-timing-drag,
.sv-is-timing-drag * { user-select: none; }

.sv-layer-bar.is-text { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.sv-layer-bar.is-image { background: linear-gradient(135deg, #0891b2, #2563eb); }
.sv-layer-bar.is-audio { background: linear-gradient(135deg, #059669, #0d9488); }
.sv-layer-bar.is-selected { box-shadow: 0 0 0 2px #f8fafc, 0 0 0 4px #3b82f6; }

.sv-timeline-playhead {
  position: absolute;
  z-index: 10;
  top: 0;
  bottom: 0;
  width: 12px;
  background: transparent;
  transform: translateX(-6px);
  cursor: ew-resize;
  touch-action: none;
  pointer-events: auto;
}

.sv-timeline-playhead::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #f43f5e;
  transform: translateX(-50%);
}

.sv-timeline-playhead span {
  position: absolute;
  top: 0;
  left: 50%;
  width: .72rem;
  height: .72rem;
  transform: translate(-50%, -10%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: #f43f5e;
}

.sv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1rem;
}

.sv-actions .btn-primary { min-width: 11rem; }

.sv-progress { margin-top: 1rem; }
.sv-progress-track {
  height: .6rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--border);
}

.sv-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #7c3aed, #06b6d4);
  transition: width .2s ease;
}

.sv-progress p {
  margin: .5rem 0 0;
  color: var(--text-muted);
}

.sv-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(34,197,94,.32);
  border-radius: .85rem;
  background: rgba(34,197,94,.08);
}

.sv-result[hidden] { display: none; }
.sv-result > div { display: grid; gap: .2rem; }
.sv-result span { color: var(--text-muted); font-size: .9rem; }

@media (max-width: 1050px) {
  .sv-project-settings-block .sv-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .sv-editor-panel { padding: .8rem; }
  .sv-file-bar,
  .sv-result,
  .sv-timeline-header { align-items: stretch; flex-direction: column; }
  .sv-inspector { grid-template-columns: 1fr; }
  .sv-timeline-tools { justify-content: flex-start; }
  .sv-timeline-tools .btn { flex: 1 1 calc(50% - .5rem); }
  .sv-preview-help { display: none; }
  .sv-floating-inspector:not([hidden]) {
    inset: auto .65rem .65rem;
    width: auto;
    max-height: min(70vh, 38rem);
  }
}

@media (max-width: 520px) {
  .sv-upload-card,
  .sv-editor-panel { padding: .65rem; }
  .sv-dropzone { min-height: 250px; }
  .sv-settings-grid,
  .sv-time-grid { grid-template-columns: 1fr; }
  .sv-project-settings-block .sv-settings-grid { grid-template-columns: 1fr; }
  .sv-project-settings-block .sv-field-wide { grid-column: auto; }
  .sv-field-wide { grid-column: auto; }
  .sv-transport { grid-template-columns: auto auto minmax(50px, 1fr) auto; gap: .4rem; padding: .5rem; }
  .sv-transport output { min-width: 2.9rem; font-size: .72rem; }
  .sv-actions .btn,
  .sv-result .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .sv-dropzone,
  .sv-progress-track span,
  .sv-clip-handle,
  .sv-layer-handle { transition: none; }
}
