.gp-unvnin-gallery {
  --gp-gallery-bg-a: rgba(25, 18, 24, 0.94);
  --gp-gallery-bg-b: rgba(9, 10, 13, 0.96);
  --gp-gallery-border: rgba(255, 255, 255, 0.14);
  --gp-gallery-accent: #ff6678;
  --gp-gallery-text: #fff2f5;
  --gp-gallery-muted: rgba(255, 229, 234, 0.76);
  --gp-gallery-padding: clamp(22px, 2.6vw, 34px);
  --gp-gallery-gap: clamp(18px, 2vw, 24px);
  --gp-gallery-grid-gap: clamp(14px, 1.55vw, 20px);
  position: relative;
  isolation: isolate;
  display: grid;
  gap: var(--gp-gallery-gap);
  margin: 24px 0;
  padding: var(--gp-gallery-padding);
  border: 1px solid var(--gp-gallery-border);
  border-radius: 18px;
  background:
    radial-gradient(100% 130% at 0% 0%, rgba(255, 102, 120, 0.17), rgba(255, 102, 120, 0) 58%),
    linear-gradient(145deg, var(--gp-gallery-bg-a), var(--gp-gallery-bg-b));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  color: var(--gp-gallery-text);
  overflow: hidden;
}

.gp-unvnin-gallery.gp-unvnin-gallery {
  padding-block: var(--gp-gallery-padding);
  padding-inline: var(--gp-gallery-padding);
}

.gp-unvnin-gallery::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)),
    radial-gradient(70% 80% at 100% 0%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 62%);
}

.gp-unvnin-gallery__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.gp-unvnin-gallery__heading {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.gp-unvnin-gallery__eyebrow,
.gp-unvnin-gallery__count {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffdce2;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.gp-unvnin-gallery__count {
  flex: 0 0 auto;
  align-self: center;
  color: #fff;
}

.gp-unvnin-gallery__title {
  margin: 0;
  color: #fff;
  font-size: clamp(1.25rem, 2.4vw, 1.85rem);
  line-height: 1.12;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.gp-unvnin-gallery__title a {
  color: inherit;
  text-decoration: none;
}

.gp-unvnin-gallery__subtitle {
  max-width: 72ch;
  margin: 0;
  color: var(--gp-gallery-muted);
  line-height: 1.55;
}

.gp-unvnin-gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gp-gallery-grid-gap);
  align-items: start;
}

.gp-unvnin-gallery--cols-2 .gp-unvnin-gallery__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gp-unvnin-gallery--cols-4 .gp-unvnin-gallery__grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gp-unvnin-gallery__item {
  position: relative;
  align-self: start;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

.gp-unvnin-gallery__item--featured {
  grid-column: span 2;
  grid-row: span 2;
}

.gp-unvnin-gallery--grid .gp-unvnin-gallery__item--featured {
  grid-column: auto;
  grid-row: auto;
}

.gp-unvnin-gallery--feature-strip .gp-unvnin-gallery__grid {
  grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 0.82fr));
}

.gp-unvnin-gallery--feature-strip .gp-unvnin-gallery__item--featured {
  grid-column: span 1;
  grid-row: span 2;
}

.gp-unvnin-gallery__link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.gp-unvnin-gallery__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 0.22s ease, filter 0.22s ease;
}

.gp-unvnin-gallery__item--featured .gp-unvnin-gallery__image {
  min-height: 0;
}

.gp-unvnin-gallery__link:hover .gp-unvnin-gallery__image,
.gp-unvnin-gallery__link:focus-visible .gp-unvnin-gallery__image {
  filter: saturate(1.08) brightness(1.04);
  transform: scale(1.035);
}

.gp-unvnin-gallery__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 3px;
  padding: 28px 12px 11px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.72));
  color: #fff;
  font-size: 0.82rem;
  line-height: 1.35;
  pointer-events: none;
}

.gp-unvnin-gallery__caption-text,
.gp-unvnin-gallery__caption-source {
  display: block;
}

.gp-unvnin-gallery__caption-source {
  color: rgba(255, 224, 230, 0.78);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gp-unvnin-gallery--empty {
  padding: clamp(22px, 2.6vw, 34px);
}

.gp-unvnin-gallery__empty-title {
  color: #fff;
  font-weight: 800;
}

.gp-unvnin-gallery--empty p {
  margin: 6px 0 0;
  color: var(--gp-gallery-muted);
}

.editor-styles-wrapper .gp-unvnin-gallery {
  margin-top: 12px;
  margin-bottom: 12px;
  padding: clamp(22px, 3vw, 36px);
}

.editor-styles-wrapper .gp-game-gallery-editor-item,
.gp-game-gallery-editor-item {
  position: relative;
}

.editor-styles-wrapper .gp-game-gallery-editor-item.is-selected,
.gp-game-gallery-editor-item.is-selected {
  box-shadow: 0 0 0 2px rgba(168, 47, 75, 0.16), 0 12px 24px rgba(92, 22, 39, 0.12);
}

.editor-styles-wrapper .gp-game-gallery-editor-item:focus-visible,
.gp-game-gallery-editor-item:focus-visible {
  outline: 2px solid #b83250;
  outline-offset: 2px;
}

.gp-game-gallery-editor-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f1e2e8;
  color: #4a2634;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.gp-game-gallery-editor-selected {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(130, 31, 52, 0.13);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
}

.gp-game-gallery-editor-selected__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gp-game-gallery-editor-selected__title {
  margin: 0;
  color: #704858;
  font-size: 0.78rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.editor-styles-wrapper .gp-game-gallery-editor-preview .gp-unvnin-gallery__item {
  cursor: grab;
}

.editor-styles-wrapper .gp-game-gallery-editor-preview .gp-unvnin-gallery__item:active {
  cursor: grabbing;
}

.editor-styles-wrapper .gp-game-gallery-editor-preview .gp-unvnin-gallery__link {
  cursor: inherit;
}

.editor-styles-wrapper .gp-game-gallery-editor-preview .gp-unvnin-gallery__item:hover,
.editor-styles-wrapper .gp-game-gallery-editor-preview .gp-unvnin-gallery__item:focus-within {
  outline: 2px solid rgba(255, 102, 120, 0.75);
  outline-offset: 2px;
}

@media (max-width: 860px) {
  .gp-unvnin-gallery__grid,
  .gp-unvnin-gallery--cols-2 .gp-unvnin-gallery__grid,
  .gp-unvnin-gallery--cols-4 .gp-unvnin-gallery__grid,
  .gp-unvnin-gallery--feature-strip .gp-unvnin-gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gp-unvnin-gallery__item--featured,
  .gp-unvnin-gallery--feature-strip .gp-unvnin-gallery__item--featured {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .gp-unvnin-gallery {
    --gp-gallery-padding: 16px;
    --gp-gallery-gap: 14px;
    --gp-gallery-grid-gap: 12px;
    border-radius: 15px;
  }

  .gp-unvnin-gallery__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .gp-unvnin-gallery__count {
    align-self: flex-start;
  }

  .gp-unvnin-gallery__grid,
  .gp-unvnin-gallery--cols-2 .gp-unvnin-gallery__grid,
  .gp-unvnin-gallery--cols-4 .gp-unvnin-gallery__grid,
  .gp-unvnin-gallery--feature-strip .gp-unvnin-gallery__grid {
    grid-template-columns: 1fr;
  }

  .gp-unvnin-gallery__item--featured,
  .gp-unvnin-gallery--feature-strip .gp-unvnin-gallery__item--featured {
    grid-column: auto;
  }

  .gp-unvnin-gallery__item--featured .gp-unvnin-gallery__image,
  .gp-unvnin-gallery__image {
    min-height: 0;
  }
}
