/* Hide marked images before scripts run, including newly rendered post blocks. */
[data-adult-content][data-adult-hidden="1"] img:not([data-adult-revealed="1"]),
#postGalleryImage[data-adult-blocked="1"] {
  filter: blur(28px) !important;
  user-select: none;
}
.adult-content-label { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: #6b7280; font-size: 13px; }
.adult-content-label > span { color: #fff; background: #111; border-radius: 5px; padding: 3px 6px; font-weight: 600; }
html.dark .adult-content-label { color: #9ca3af; }
.adult-media-frame { position: relative; overflow: hidden; }
.adult-media-wrap { display: inline-grid; max-width: 100%; vertical-align: middle; border-radius: inherit; }
.adult-media-cover { display: inline-grid; position: relative; max-width: 100%; }
.adult-media-controls {
  position: absolute; z-index: 3; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px; padding: 12px;
  background: rgb(17 24 39 / 35%); color: #fff; text-align: center;
}
.adult-media-controls[hidden] { display: none; }
.adult-media-title { font: 600 18px/1.3 system-ui, sans-serif; text-shadow: 0 1px 3px #0006; }
.adult-media-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.adult-media-actions > :is(button,a) {
  display: inline-flex; align-items: center; justify-content: center; padding: 9px 16px;
  border: 1px solid #d1d5db; border-radius: 12px; background: #fff; color: #111;
  font: 500 14px/1.3 system-ui, sans-serif; text-decoration: none; cursor: pointer;
}
.adult-media-actions > :is(button,a):hover { background: #f1f5f9; color: #111; }
.adult-media-actions > :is(button,a):focus-visible { outline: 3px solid #3479e5; outline-offset: 3px; }
.adult-media-frame :is(.pc-arrow,.pc-tools) { z-index: 4; }
#postGallery .adult-media-controls { inset: 8px; border-radius: 8px; }
#adult-content-settings { scroll-margin-top: 100px; }
.post-editor-adult-toggle { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 600; }
.post-editor-adult-toggle:has(input:checked) { color: #fff; background: #111; }
@media (max-width: 520px) {
  .adult-media-controls { gap: 10px; padding: 8px; }
  .adult-media-title { font-size: 15px; }
  .adult-media-actions { gap: 6px; }
  .adult-media-actions > :is(button,a) { padding: 8px 10px; font-size: 13px; }
  .post-mosaic__item:not(.post-mosaic__item--big) .adult-media-actions { gap: 3px; }
  .post-mosaic__item:not(.post-mosaic__item--big) .adult-media-actions > :is(button,a) { padding: 4px 6px; font-size: 11px; }
  .post-mosaic__item:not(.post-mosaic__item--big) .adult-media-controls { gap: 5px; }
}

.adult-media-frame { border-radius: .675rem; }
.ejs-image--stretched .adult-media-frame { border-radius: 0; }
[data-adult-content] .post-mosaic__item > a { display: block; width: 100%; height: 100%; }
#postGallery :is(.post-gallery-nav,.post-gallery-counter) { z-index: 4; }

.adult-media-frame .post-preview-gallery-badge { z-index: 4; }
[data-adult-content] .post-mosaic__overlay, [data-adult-content] .post-mosaic__item--more::after { pointer-events: none; }

.adult-zoom-label { position: absolute; top: 12px; left: 12px; z-index: 4; padding: 5px 8px; border-radius: 5px; background: #000; color: #fff; font: 600 14px/1.3 system-ui, sans-serif; }
.adult-zoom-label[hidden] { display: none; }
