.tvc-square-crop-dialog {
  width: min(440px, calc(100vw - 28px));
  max-width: none;
  max-height: min(92dvh, 760px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #ffffff24;
  border-radius: 18px;
  background: #171716;
  color: #f6f3ee;
  box-shadow: 0 24px 80px #0009;
}
.tvc-square-crop-dialog::backdrop { background: #000a; backdrop-filter: blur(5px); }
.tvc-square-crop-shell {
  display: grid;
  gap: 14px;
  padding: 18px;
  font: 400 14px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.tvc-square-crop-shell header,
.tvc-square-crop-shell footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tvc-square-crop-shell header span {
  color: #e88a78;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.tvc-square-crop-shell h2 { margin: 3px 0 0; font-size: 19px; line-height: 1.2; }
.tvc-square-crop-shell button {
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #ffffff36;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.tvc-square-crop-shell header button {
  width: 38px;
  padding: 0;
  border-radius: 50%;
  font-size: 22px;
}
.tvc-square-crop-shell footer { justify-content: flex-end; flex-wrap: wrap; }
.tvc-square-crop-shell footer .primary {
  border-color: #be4838;
  background: #be4838;
  color: #fff;
  font-weight: 750;
}
.tvc-square-crop-help,
.tvc-square-crop-status { margin: 0; color: #c3beb6; font-size: 12px; }
.tvc-square-crop-status { min-height: 1.3em; font-size: 10px; }
.tvc-square-crop-stage {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 1 / 1;
  justify-self: center;
  overflow: hidden;
  border: 1px solid #ffffff40;
  border-radius: 10px;
  background:
    linear-gradient(45deg,#ffffff0b 25%,transparent 25%,transparent 75%,#ffffff0b 75%),
    linear-gradient(45deg,#ffffff0b 25%,transparent 25%,transparent 75%,#ffffff0b 75%),
    #242321;
  background-position: 0 0,8px 8px;
  background-size: 16px 16px;
  touch-action: none;
  cursor: grab;
}
.tvc-square-crop-stage.is-dragging { cursor: grabbing; }
.tvc-square-crop-stage img {
  position: absolute;
  max-width: none;
  max-height: none;
  transform: translateZ(0);
  user-select: none;
  pointer-events: none;
}
.tvc-square-crop-zoom {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) 36px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
}
.tvc-square-crop-zoom input { width: 100%; accent-color: #e27765; }
.tvc-square-crop-zoom span { color: #c3beb6; text-align: right; }
@media (max-width: 440px) {
  .tvc-square-crop-shell { gap: 12px; padding: 15px; }
  .tvc-square-crop-shell footer { justify-content: stretch; }
  .tvc-square-crop-shell footer button { flex: 1 1 auto; }
}
