.overlay-editor {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(210px, 270px);
  gap: 28px;
  align-items: center;
  margin-top: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(8, 14, 23, .55);
}
.editor-description h3 { margin: 9px 0 7px; font-size: 18px; }
.editor-description p { max-width: 560px; margin: 0 0 18px; color: var(--muted); }
.editor-badge {
  display: inline-flex;
  padding: 3px 8px;
  border: 1px solid rgba(54, 211, 153, .35);
  border-radius: 999px;
  color: var(--ok);
  background: rgba(54, 211, 153, .09);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
}
.editor-values { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.overlay-file-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 14px; }
.overlay-file-list button {
  max-width: 180px;
  padding: 7px 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: #0d1520;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.overlay-file-list button.active {
  border-color: var(--accent);
  color: white;
  background: rgba(124, 108, 255, .18);
}
.editor-values span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: #0d1520;
  font-size: 12px;
}
.editor-values b { margin-left: 4px; color: var(--accent2); }
.video-stage {
  position: relative;
  justify-self: center;
  width: min(100%, 250px);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 1px solid #3b4c65;
  border-radius: 18px;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    radial-gradient(circle at 50% 20%, #25344b, #101722 68%);
  background-size: 25% 12.5%, 25% 12.5%, auto;
  box-shadow: inset 0 0 45px #0005, 0 16px 35px #0005;
  touch-action: none;
  user-select: none;
}
.video-stage::after {
  content: "";
  position: absolute;
  inset: 2.5%;
  z-index: 1;
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 12px;
  pointer-events: none;
}
.stage-video-preview {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.stage-video-player {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}
.stage-video-label {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 1;
  overflow: hidden;
  padding: 5px 7px;
  border-radius: 7px;
  color: rgba(255,255,255,.8);
  background: rgba(0,0,0,.55);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}
.stage-safe-zone {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  z-index: 1;
  border-top: 1px dashed rgba(165, 152, 255, .15);
  pointer-events: none;
}
.stage-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 4px;
  color: #6f8199;
  text-align: center;
  pointer-events: none;
}
.stage-placeholder span { font-size: 30px; font-weight: 900; color: #8394ab; }
.stage-placeholder small { max-width: 130px; }
.overlay-object {
  position: absolute;
  z-index: 2;
  width: 22%;
  min-width: 20px;
  cursor: grab;
  outline: 1px solid rgba(165, 152, 255, .9);
  box-shadow: 0 0 0 3px rgba(124, 108, 255, .15), 0 7px 20px #0007;
  transform-origin: top left;
}
.overlay-object:active { cursor: grabbing; }
.overlay-object:focus-visible { outline: 2px solid white; }
.overlay-media img, .overlay-media video {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}
.overlay-preview-error {
  display: block;
  min-width: 120px;
  padding: 10px;
  color: white;
  background: #8f3445;
  font-size: 11px;
  text-align: center;
}
.resize-handle {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 17px;
  height: 17px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  cursor: nwse-resize;
  box-shadow: 0 2px 8px #0009;
}
@media (max-width: 720px) {
  .overlay-editor { grid-template-columns: 1fr; }
  .video-stage { grid-row: 1; width: min(78vw, 270px); }
}
