/* Match the confirmed desktop site's transparent native-video overlay. */
.design-dialog.video-mode {
  width: min(1040px, calc(100vw - 32px), calc((100dvh - 100px) * var(--video-ratio, 1.777778)));
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 48px 0 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  color: #f6dfbb;
}
.design-dialog.video-mode::backdrop {
  background: rgba(0, 0, 0, .28);
  backdrop-filter: none;
}
.video-mode .dialog-head {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  display: block;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.video-mode .dialog-head h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.video-mode .dialog-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  flex-basis: 44px;
  padding: 0;
  border: 1px solid #e4bd7b99;
  border-radius: 50%;
  background: #0003;
  color: #f5d49b;
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
  box-shadow: none;
  touch-action: manipulation;
  transition: background .2s, border-color .2s;
}
.video-mode .dialog-close:hover {
  transform: none;
  background: #0006;
  border-color: #f5d49b;
}
.video-mode .dialog-close:focus-visible {
  outline: 2px solid #f5d49b;
  outline-offset: 3px;
}
.video-mode .dialog-body {
  width: 100%;
  max-height: none;
  padding: 0;
  overflow: visible;
  background: transparent;
}
.video-mode .video-player {
  position: relative;
  width: 100%;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
}
.video-mode .dialog-video {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: calc(100dvh - 100px);
  margin: auto;
  aspect-ratio: auto;
  object-fit: contain;
  background: transparent;
  border-radius: 4px;
}
.video-mode .video-player-status {
  position: absolute;
  inset: 50% 12px auto;
  margin: 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: #000b;
  color: #f6dfbb;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  pointer-events: none;
}
.video-mode .video-player-retry {
  position: absolute;
  top: calc(50% + 64px);
  left: 50%;
  display: block;
  margin: 0;
  padding: 8px 24px;
  transform: translateX(-50%);
  border: 1px solid #c69d6c;
  border-radius: 22px;
  background: #000b;
  color: #f6dfbb;
}
.design-dialog.video-mode:has(.original-preview) {
  width: min(1040px, calc(100vw - 32px), calc((100dvh - 220px) * var(--video-ratio, 1.777778)));
}
.video-mode .original-preview {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 220px);
  margin: 0 auto;
  border-radius: 4px;
  object-fit: contain;
  background: #0003;
}
.video-mode .dialog-note {
  margin: 12px 0 0;
  padding: 0 8px;
  color: #f6dfbb;
  background: #0003;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}
.video-mode .dialog-actions {
  justify-content: center;
  margin: 12px 0 0;
  padding: 0 0 8px;
}
.video-mode .dialog-action {
  min-height: 40px;
  max-width: 100%;
  border: 1px solid #c69d6c;
  border-radius: 22px;
  background: #000b;
  color: #f6dfbb;
}
.video-mode .dialog-action:hover,
.video-mode .dialog-action:focus-visible {
  background: #0006;
  border-color: #f5d49b;
  outline-color: #f5d49b;
}
