.klmc-mobile-gallery {
  display: none;
}

.klmc-no-scroll {
  overflow: hidden;
}

@media (max-width: 767.98px) {
  .klmc-mobile-gallery {
    display: block;
    margin: 1rem 0;
    padding: 0.75rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  }

  .klmc-strip {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 0.25rem;
  }

  .klmc-thumb,
  .klmc-miniature {
    border: 1px solid #e5e5e5;
    background: #fff;
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
    flex: 0 0 auto;
  }

  .klmc-thumb.is-active,
  .klmc-miniature.is-active {
    border-color: #111;
  }

  .klmc-thumb img {
    width: 84px;
    height: 84px;
    object-fit: cover;
    display: block;
  }

  .klmc-actions {
    margin-top: 0.75rem;
    text-align: center;
  }

  .klmc-open {
    width: 100%;
  }

  .klmc-lightbox {
    display: none;
  }

  .klmc-lightbox.is-open {
    position: fixed;
    inset: 0;
    display: block;
    z-index: 99999;
  }

  .klmc-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.98);
  }

  .klmc-dialog {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
  }

  .klmc-close {
    align-self: flex-end;
    font-size: 2rem;
    line-height: 1;
    border: 0;
    background: transparent;
    padding: 0.75rem 1rem 0 1rem;
    color: #111;
  }

  .klmc-stage {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 2.75rem;
    min-height: 0;
  }

  .klmc-full-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  .klmc-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    font-size: 1.6rem;
    line-height: 20px;
    color: #111;
  }

  .klmc-prev {
    left: 0.5rem;
  }

  .klmc-next {
    right: 0.5rem;
  }

  .klmc-caption {
    padding: 0 1rem 0.75rem;
    text-align: center;
    color: #333;
    font-size: 0.95rem;
    min-height: 1.5rem;
  }

  .klmc-miniatures {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0 0.75rem 1rem;
    -webkit-overflow-scrolling: touch;
    justify-content:center;
  }

  .klmc-miniature img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    display: block;
  }
}
