.wenix-gallery {
  display: grid;
  gap: 0.65rem;
  width: 100%;
  max-width: 520px;
  min-width: 0;
  margin-inline: auto;
}

.wenix-screen {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(184, 195, 212, 0.23);
  border-radius: 14px;
  background: #0a1322;
}

.wenix-preview {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  touch-action: pan-y pinch-zoom;
}

.wenix-preview:disabled {
  cursor: default;
}

.wenix-main {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wenix-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
}

.wenix-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(184, 195, 212, 0.25);
  border-radius: 8px;
  color: var(--cyan);
  background: #101a2a;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.wenix-caption {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
}

.wenix-caption .wenix-count {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}

.wenix-thumbnails {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.2rem 0.2rem 0.45rem;
  scrollbar-width: thin;
  scrollbar-color: #4b5b70 transparent;
  overscroll-behavior-inline: contain;
}

.wenix-thumb {
  flex: 0 0 72px;
  height: 48px;
  padding: 0;
  overflow: hidden;
  border: 2px solid rgba(184, 195, 212, 0.25);
  border-radius: 7px;
  background: #0a1322;
  cursor: pointer;
}

.wenix-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wenix-thumb[aria-pressed="true"],
.wenix-controls button:hover {
  border-color: var(--cyan);
}

.wenix-gallery button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.wenix-preview:focus-visible {
  outline-offset: -3px;
}

.wenix-gallery [hidden] {
  display: none;
}

.wenix-viewer-open {
  overflow: hidden;
}
