.domain-media-upload { padding: 14px; border: 1px dashed #9ba6b4; border-radius: 12px; }
.domain-media-upload input[type=file] { display: block; width: 100%; margin-top: 10px; }
.domain-media-upload p { font-size: 12px; line-height: 1.6; }
.domain-media-preview, .domain-existing-media { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.domain-media-preview figure, .domain-existing-media figure { width: 140px; max-width: 100%; margin: 0; overflow-wrap: anywhere; }
.domain-media-preview img, .domain-media-preview video, .domain-existing-media img, .domain-existing-media video { display: block; width: 100%; height: 100px; object-fit: contain; background: #eef1f5; border-radius: 8px; }
.domain-media-preview figcaption, .domain-existing-media label { display: block; font-size: 12px; margin-top: 6px; }

.domain-public-gallery { position: relative; width: 100%; min-width: 0; max-width: 100%; direction: ltr; }
.domain-public-gallery:focus-visible { outline: 3px solid #1b75bc; outline-offset: 3px; }
.domain-gallery-viewport { display: flex; width: 100%; aspect-ratio: 622 / 427; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; border-radius: 8px; background: #000; }
.domain-gallery-viewport::-webkit-scrollbar { display: none; }
.video-area .domain-gallery-viewport > img, .video-area .domain-gallery-viewport > video { display: block; flex: 0 0 100%; width: 100%; min-width: 0; max-width: 100%; height: 100%; margin: 0; aspect-ratio: auto; object-fit: contain; scroll-snap-align: start; scroll-snap-stop: always; }
.domain-gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #ffffff80; border-radius: 50%; color: #fff; background: #0009; font-size: 23px; cursor: pointer; touch-action: manipulation; }
.domain-gallery-arrow:hover { background: #000d; }
.domain-gallery-arrow:focus-visible { outline: 3px solid #64c9ff; outline-offset: 2px; }
.domain-gallery-prev { left: 8px; }
.domain-gallery-next { right: 8px; }
.domain-gallery-counter { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); padding: 3px 10px; border-radius: 12px; background: #000b; color: #fff; font-size: 12px; line-height: 1.5; pointer-events: none; }
@media (max-width: 480px) {
  .domain-gallery-arrow { width: 44px; height: 44px; font-size: 20px; }
  .domain-gallery-prev { left: 4px; }
  .domain-gallery-next { right: 4px; }
}
