/* Lillytime 0.14.5: last-loaded, scoped gallery and editorial refinements. */
/* Hide excess tiles regardless of Gutenberg nested figure / WordPress gallery markup. */
body.single-post .wp-block-post-content :is(.wp-block-gallery,.gallery,.tiled-gallery) .lt140-extra-tile,
body.single-post .wp-block-post-content .wp-block-gallery.has-nested-images > figure.wp-block-image.lt140-extra-tile,
body.single-post .wp-block-post-content :is(.wp-block-gallery,.gallery,.tiled-gallery) [data-lt-gallery-extra="1"] { display:none !important; visibility:hidden !important; }
body.single-post .wp-block-post-content .lt140-more-tile{isolation:isolate}
body.single-post .wp-block-post-content .lt140-more-tile::after{z-index:1}
body.single-post .wp-block-post-content .lt140-more-label{z-index:4}
/* Small outlined heart between two hairlines; no font glyphs or plugin icon dependency. */
body:is(.single-post,.page):where(:not(.home)) .wp-block-post-content hr.is-style-lt-rule-ornament,
.editor-styles-wrapper hr.is-style-lt-rule-ornament,
.editor-styles-wrapper .wp-block-separator.is-style-lt-rule-ornament{
  display:block !important; width:150px !important; max-width:100% !important; height:20px !important;
  margin:3em auto !important; padding:0 !important; border:0 !important;
  background:linear-gradient(var(--lt-editorial-accent),var(--lt-editorial-accent)) left center/57px 1px no-repeat,
             linear-gradient(var(--lt-editorial-accent),var(--lt-editorial-accent)) right center/57px 1px no-repeat !important;
  position:relative !important; overflow:visible !important; opacity:1 !important;
}
body:is(.single-post,.page):where(:not(.home)) .wp-block-post-content hr.is-style-lt-rule-ornament::before,
.editor-styles-wrapper hr.is-style-lt-rule-ornament::before,
.editor-styles-wrapper .wp-block-separator.is-style-lt-rule-ornament::before{
  content:'' !important; display:block !important; position:absolute !important; width:16px !important; height:16px !important;
  left:50% !important; top:50% !important; transform:translate(-50%,-50%) !important;
  background-color:var(--lt-editorial-accent) !important;
  -webkit-mask:url('../decor/heart-outline.svg') center/contain no-repeat !important;
  mask:url('../decor/heart-outline.svg') center/contain no-repeat !important;
}
body:is(.single-post,.page):where(:not(.home)) .wp-block-post-content hr.is-style-lt-rule-ornament::after,
.editor-styles-wrapper hr.is-style-lt-rule-ornament::after,
.editor-styles-wrapper .wp-block-separator.is-style-lt-rule-ornament::after{content:none !important;display:none !important}
/* Editor preview of native editorial styles, always from active palette. */
.editor-styles-wrapper h2.wp-block-heading:not(.is-style-lt-heading-plain):not(.is-style-lt-heading-over)::after,
.editor-styles-wrapper h2:not(.is-style-lt-heading-plain):not(.is-style-lt-heading-over)::after{background:var(--lt-editorial-accent) !important}
.editor-styles-wrapper .wp-block-heading.is-style-lt-heading-over::before{background:var(--lt-editorial-accent) !important}
.editor-styles-wrapper :is(p,.wp-block-group).is-style-lt-note{border-left-color:var(--lt-editorial-accent) !important}
.editor-styles-wrapper .is-style-lt-dropcap:first-letter{color:var(--lt-editorial-accent) !important}
.editor-styles-wrapper .wp-block-quote{border-left-color:var(--lt-editorial-accent) !important;color:var(--lt-deep) !important}
.editor-styles-wrapper .wp-block-quote.is-style-lt-quote-open::before{content:'“';display:block;font:60px/.8 Georgia,serif;color:var(--lt-editorial-accent)}
.editor-styles-wrapper hr.is-style-lt-rule-short{border-color:var(--lt-editorial-accent) !important}
.editor-styles-wrapper .is-style-lt-list-dashes{list-style:none;padding-left:0}
.editor-styles-wrapper .is-style-lt-list-dashes li{position:relative;padding-left:1.3em}
.editor-styles-wrapper .is-style-lt-list-dashes li::before{content:'—';position:absolute;left:0;color:var(--lt-editorial-accent)}
.editor-styles-wrapper li::marker{color:var(--lt-editorial-accent)}
/* Gallery block styles: readable differences in the editor. */
.editor-styles-wrapper .wp-block-gallery.is-style-lt-gallery-natural img{object-fit:contain !important}
.editor-styles-wrapper .wp-block-gallery.is-style-lt-gallery-editorial{gap:10px}
.editor-styles-wrapper .wp-block-gallery.is-style-lt-gallery-editorial figure{overflow:hidden}
.editor-styles-wrapper .wp-block-gallery.is-style-lt-gallery-editorial figure img{object-fit:cover}

/* v0.15.16: retain the viewport fitting box, but never enlarge media
   beyond its intrinsic size. Large images still scale down to fit. */
body.single-post .lt136-lightbox .lt136-lightbox-image,
.lt136-lightbox .lt136-lightbox-image {
  box-sizing: border-box !important;
  width: calc(100vw - 70px) !important;
  height: calc(100dvh - 165px) !important;
  max-width: calc(100vw - 70px) !important;
  max-height: calc(100dvh - 165px) !important;
  object-fit: scale-down !important;
  object-position: center center !important;
}
@media (max-width: 600px) {
  .lt136-lightbox .lt136-lightbox-image {
    width: calc(100vw - 28px) !important;
    height: calc(100dvh - 150px) !important;
    max-width: calc(100vw - 28px) !important;
    max-height: calc(100dvh - 150px) !important;
  }
}

/* v0.15.3: Hide the previous frame immediately while the next image decodes. */
.lt136-lightbox.lt136-loading .lt136-lightbox-image,
.lt136-lightbox.lt136-load-error .lt136-lightbox-image {
  visibility: hidden !important;
  opacity: 0;
}
.lt136-lightbox.lt136-loading .lt136-lightbox-caption { visibility: hidden; }
.lt136-lightbox .lt136-lightbox-image { animation: lt153-image-in 100ms ease-out; }
@keyframes lt153-image-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .lt136-lightbox .lt136-lightbox-image { animation: none !important; }
}

/* Only hide gallery preview captions. Column counts, crop and image framing stay editable. */
.wp-block-post-content :is(.wp-block-gallery,.gallery,.tiled-gallery,.foogallery) :is(figcaption,.gallery-caption,.tiled-gallery-caption),
.editor-styles-wrapper :is(.wp-block-gallery,.gallery,.tiled-gallery,.foogallery) :is(figcaption,.gallery-caption,.tiled-gallery-caption){display:none!important}
