/* HATORI HILLS 5.6.1 — gallery: cover-only description, visible mobile arrows,
   large pictures, touch gestures. Loaded after the legacy gallery styles. */
#hatori-gallery .gallery-caption-copy[hidden],
#hatori-gallery .gallery-caption p[hidden]{display:none!important}
#hatori-gallery.gallery-image-only .gallery-caption{
  justify-content:flex-end;min-height:30px;padding:8px 6px 1px;
}
#hatori-gallery .gallery-picture{position:relative;isolation:isolate}
#hatori-gallery .gallery-picture img{display:block;width:auto;max-width:100%;height:auto;object-fit:contain}
#hatori-gallery .gallery-mobile-controls{display:none}
@media (max-width:767px){
  #hatori-gallery{
    box-sizing:border-box;width:calc(100vw - 16px);max-width:calc(100vw - 16px);
    max-height:calc(100dvh - 18px);padding:10px;border-radius:17px;
    overscroll-behavior:contain;
  }
  #hatori-gallery .gallery-close{
    width:40px;height:40px;z-index:15;margin-bottom:7px;
  }
  #hatori-gallery .gallery-picture{width:100%;min-height:0;clear:both;touch-action:pan-y}
  #hatori-gallery .gallery-picture img{
    width:100%;max-width:100%;height:auto;max-height:72dvh;
    object-fit:contain;border-radius:9px;
  }
  #hatori-gallery .gallery-mobile-controls{
    display:flex!important;position:absolute;inset:0;z-index:5;
    align-items:center;justify-content:space-between;
    padding:0 2px;pointer-events:none;
  }
  #hatori-gallery .gallery-mobile-controls button{
    display:flex;align-items:center;justify-content:center;
    pointer-events:auto;cursor:pointer;touch-action:manipulation;
    width:42px;height:54px;padding:0;
    border:1px solid rgba(244,207,155,.94);border-radius:13px;
    background:rgba(24,17,45,.82);color:#ffe2b3;
    font-family:Arial,sans-serif;font-size:36px;font-weight:500;line-height:1;
    backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
    box-shadow:0 3px 16px rgba(0,0,0,.48);
  }
  #hatori-gallery .gallery-mobile-controls button:disabled{opacity:.35;cursor:default}
  #hatori-gallery .gallery-mobile-controls button:focus-visible{
    outline:3px solid #ffdfa1;outline-offset:2px;
  }
  #hatori-gallery .gallery-controls{display:none!important}
  #hatori-gallery .gallery-caption{gap:10px;padding:11px 4px 3px;align-items:flex-start}
  #hatori-gallery .gallery-caption-copy{min-width:0;flex:1 1 auto}
  #hatori-gallery .gallery-caption-copy strong{font-size:clamp(18px,5vw,23px)}
  #hatori-gallery .gallery-caption-copy p{font-size:13px;line-height:1.55;overflow-wrap:anywhere}
  #hatori-gallery .gallery-counter{margin-left:auto;padding-top:3px;font-size:13px}
  #hatori-gallery .gallery-thumbs{gap:7px;padding:9px 1px 2px;scrollbar-width:thin}
  #hatori-gallery .gallery-thumbs button{flex-basis:68px;height:57px}
}
