.npic-marquee {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--npic-gap);
  width: 100%;
  height: var(--npic-height);
  overflow: hidden;
  position: relative;
}

.npic-marquee.npic-has-fade {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 8%, #000 92%, transparent 100%);
}

.npic-column { min-width: 0; overflow: hidden; }
.npic-track { display: flex; flex-direction: column; will-change: transform; }
.npic-group { display: flex; flex-direction: column; gap: var(--npic-gap); padding-bottom: var(--npic-gap); }
.npic-up .npic-track { animation: npic-scroll-up var(--npic-speed) linear infinite; }
.npic-down .npic-track { animation: npic-scroll-down var(--npic-speed) linear infinite; }

.npic-image {
  flex: 0 0 var(--npic-image-height);
  height: var(--npic-image-height);
  min-height: 0;
  overflow: hidden;
  border-radius: var(--npic-radius);
  background: rgba(127, 127, 127, .12);
}

.npic-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.npss-image-button {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.npss-image-button img { transition: transform .25s ease, filter .25s ease; }
.npss-image-button:hover img, .npss-image-button:focus-visible img { transform: scale(1.035); filter: brightness(1.06); }
.npss-image-button:focus-visible { outline: 3px solid #f39422; outline-offset: -3px; }

.npic-pause-hover:hover .npic-track { animation-play-state: paused; }

@keyframes npic-scroll-up {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -50%, 0); }
}

@keyframes npic-scroll-down {
  from { transform: translate3d(0, -50%, 0); }
  to { transform: translate3d(0, 0, 0); }
}

@media (max-width: 767px) {
  .npic-marquee { height: var(--npic-mobile-height); gap: max(5px, calc(var(--npic-gap) * .6)); }
  .npic-group { gap: max(5px, calc(var(--npic-gap) * .6)); padding-bottom: max(5px, calc(var(--npic-gap) * .6)); }
  .npic-image { flex-basis: var(--npic-mobile-image-height); height: var(--npic-mobile-image-height); }
}

@media (prefers-reduced-motion: reduce) {
  .npic-track { animation-play-state: paused !important; transform: none !important; }
}

.npic-empty { padding: 12px 16px; border-left: 4px solid #dba617; background: #fff8dd; }

.npss-attribution { margin: 9px 0 0; text-align: center; color: #69727d; font-size: 12px; line-height: 1.4; }
.npss-attribution a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

body.npss-modal-open { overflow: hidden; }
.npss-modal[hidden] { display: none !important; }
.npss-modal { position: fixed; inset: 0; z-index: 999999; display: grid; place-items: center; padding: 24px; }
.npss-modal-backdrop { position: absolute; inset: 0; background: rgba(8, 17, 31, .82); backdrop-filter: blur(4px); }
.npss-modal-dialog { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); width: min(1120px, 96vw); max-height: 92vh; overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.4); }
.npss-modal-close { position: absolute; z-index: 3; top: 10px; right: 12px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: rgba(0,0,0,.72); font-size: 30px; line-height: 1; cursor: pointer; }
.npss-modal-close:hover, .npss-modal-close:focus-visible { background: #111827; outline: 2px solid #fff; }
.npss-modal-image-panel { position: relative; display: grid; place-items: center; min-height: 420px; overflow: hidden; background: #111827; }
.npss-modal-image { display: block; width: 100%; height: 100%; max-height: 92vh; object-fit: contain; }
.npss-modal-image-label { position: absolute; left: 18px; bottom: 16px; max-width: calc(100% - 36px); padding: 8px 12px; border-radius: 7px; color: #fff; background: rgba(0,0,0,.7); font-size: 14px; font-weight: 700; }
.npss-modal-content { box-sizing: border-box; max-height: 92vh; overflow-y: auto; padding: 48px 30px 30px; color: #1f2937; }
.npss-modal-content h2 { margin: 0 48px 12px 0; color: #111827; font-size: clamp(25px, 3vw, 38px); line-height: 1.1; }
.npss-modal-message { margin-bottom: 16px; font-size: 16px; line-height: 1.55; }
.npss-selected-style { margin: 0 0 20px; padding: 11px 13px; border-left: 4px solid #f39422; background: #fff7ed; }
.npss-contact-form { margin-top: 18px; }

@media (max-width: 780px) {
  .npss-modal { align-items: end; padding: 10px; }
  .npss-modal-dialog { grid-template-columns: 1fr; width: 100%; max-height: 96vh; border-radius: 14px 14px 8px 8px; overflow-y: auto; }
  .npss-modal-image-panel { min-height: 0; height: 34vh; }
  .npss-modal-image { max-height: 34vh; }
  .npss-modal-content { max-height: none; overflow: visible; padding: 25px 20px 28px; }
  .npss-modal-content h2 { margin-right: 36px; }
  .npss-modal-close { position: fixed; top: 16px; right: 17px; }
}
