.weto-open {
  margin-top: 12px;
  width: 100%;
}

body.weto-lock {
  overflow: hidden;
}

.weto-modal[aria-hidden="true"] {
  display: none;
}

.weto-modal[aria-hidden="false"] {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.weto-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
}

.weto-modal__panel {
  position: relative;
  width: min(960px, 100%);
  max-height: 94vh;
  overflow: auto;
  background: #fff;
  color: #111;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.weto-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #f2f2f2;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.weto-help,
.weto-privacy {
  margin: 6px 0 16px;
  color: #555;
  font-size: 14px;
}

.weto-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #111;
  border-radius: 14px;
  touch-action: none;
}

#weto-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

#weto-overlay {
  position: absolute;
  top: 48%;
  left: 50%;
  width: min(32vw, 260px);
  max-width: 48%;
  cursor: grab;
  user-select: none;
  transform-origin: center;
  will-change: transform, left, top;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
}

#weto-overlay:active {
  cursor: grabbing;
}

.weto-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.weto-controls label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.weto-controls input[type="range"] {
  width: 100%;
}

.weto-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.weto-download[hidden] {
  display: none !important;
}

@media (max-width: 700px) {
  .weto-modal__panel {
    padding: 18px;
  }

  .weto-controls {
    grid-template-columns: 1fr;
  }

  .weto-stage {
    aspect-ratio: 3 / 4;
  }

  #weto-overlay {
    width: min(52vw, 230px);
  }
}
