/*!
 * gallerylizz.css v1.0.0
 * Galería a pantalla completa + reproductor de video propio.
 * Acompaña a gallerylizz.js
 */

/* ------------------------------------------------------------------
   Elementos disparadores de la galería (data-william="album")
------------------------------------------------------------------- */
[data-william="album"] {
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: transparent;
}
[data-william="album"] img,
[data-william="album"] video {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none; /* el clic lo recibe el contenedor, no la imagen */
}

/* Bloquea el scroll de la página mientras la galería está abierta */
html.gl-lock {
  overflow: hidden !important;
}

/* ------------------------------------------------------------------
   Contenedor principal (100% de la pantalla, z-index máximo)
------------------------------------------------------------------- */
.gl-overlay {
  --gl-accent: #ffb347;
  --gl-fg: #f5f5f3;
  --gl-glass: rgba(20, 20, 20, 0.6);

  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2147483647;
  display: none;
  background: #000;
  color: var(--gl-fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.2;
  overflow: hidden;
  overscroll-behavior: contain;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.gl-overlay.gl-open {
  display: block;
  animation: gl-in 0.18s ease-out;
}
.gl-overlay *,
.gl-overlay *::before,
.gl-overlay *::after {
  box-sizing: border-box;
  -webkit-touch-callout: none;
}
.gl-overlay.gl-idle {
  cursor: none;
}

@keyframes gl-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ------------------------------------------------------------------
   Escenario y medios
------------------------------------------------------------------- */
.gl-stage {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gl-media {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}
.gl-media.gl-ready {
  opacity: 1;
}

.gl-img,
.gl-video {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #000;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Capa transparente que impide clic derecho, arrastrar y "guardar como" */
.gl-shield {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  background: transparent;
}

/* Ocultar los controles nativos del navegador por si acaso */
.gl-video::-webkit-media-controls,
.gl-video::-webkit-media-controls-enclosure,
.gl-video::-webkit-media-controls-panel {
  display: none !important;
  -webkit-appearance: none;
}

/* Mensaje de error */
.gl-error {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 80%;
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--gl-glass);
  text-align: center;
  z-index: 3;
}

/* Cargando */
.gl-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--gl-accent);
  border-radius: 50%;
  z-index: 3;
  display: none;
  pointer-events: none;
  animation: gl-spin 0.8s linear infinite;
}
.gl-overlay.gl-loading .gl-loader {
  display: block;
}
@keyframes gl-spin {
  to { transform: rotate(360deg); }
}

/* ------------------------------------------------------------------
   Botones
------------------------------------------------------------------- */
.gl-overlay button {
  font: inherit;
  color: inherit;
}
.gl-btn {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gl-glass);
  color: var(--gl-fg);
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}
.gl-btn:hover {
  background: rgba(60, 60, 60, 0.85);
}
.gl-btn:focus-visible,
.gl-bigplay:focus-visible {
  outline: 2px solid var(--gl-accent);
  outline-offset: 2px;
}
.gl-btn:disabled {
  opacity: 0.3;
  cursor: default;
}
.gl-btn svg,
.gl-bigplay svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.gl-btn svg.gl-fill,
.gl-bigplay svg.gl-fill {
  fill: currentColor;
  stroke: none;
}

/* Barra superior */
.gl-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px))
           calc(12px + env(safe-area-inset-right, 0px))
           10px
           calc(12px + env(safe-area-inset-left, 0px));
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.gl-topbar > * {
  pointer-events: auto;
}
.gl-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.gl-counter {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--gl-glass);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.gl-title {
  min-width: 0;
  max-width: 60vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.85;
}
.gl-title:empty {
  display: none;
}

/* Flechas anterior / siguiente */
.gl-nav {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  transition: opacity 0.25s ease, background-color 0.15s ease;
}
.gl-prev { left: calc(12px + env(safe-area-inset-left, 0px)); }
.gl-next { right: calc(12px + env(safe-area-inset-right, 0px)); }
.gl-overlay.gl-single .gl-nav {
  display: none;
}

/* Botón grande de play / replay */
.gl-bigplay {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: 76px;
  height: 76px;
  margin: -38px 0 0 -38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gl-glass);
  color: var(--gl-fg);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.gl-bigplay svg {
  width: 34px;
  height: 34px;
}
.gl-media:not(.gl-playing) .gl-bigplay {
  opacity: 1;
  pointer-events: auto;
}
.gl-bigplay:hover {
  transform: scale(1.06);
}
.gl-overlay.gl-loading .gl-bigplay {
  display: none;
}
.gl-bigplay .gl-i-replay { display: none; }
.gl-media.gl-ended .gl-bigplay .gl-i-play   { display: none; }
.gl-media.gl-ended .gl-bigplay .gl-i-replay { display: block; }

/* ------------------------------------------------------------------
   Controles del reproductor
------------------------------------------------------------------- */
.gl-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  padding: 36px
           calc(14px + env(safe-area-inset-right, 0px))
           calc(8px + env(safe-area-inset-bottom, 0px))
           calc(14px + env(safe-area-inset-left, 0px));
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
  transition: opacity 0.25s ease;
}

/* Barra de progreso */
.gl-seek {
  --p: 0%;
  --b: 0%;
  position: relative;
  height: 22px;
  display: flex;
  align-items: center;
}
.gl-seek-track {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
  transition: height 0.12s ease;
}
.gl-seek:hover .gl-seek-track,
.gl-seek:focus-within .gl-seek-track {
  height: 6px;
}
.gl-seek-buffer,
.gl-seek-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
}
.gl-seek-buffer {
  width: var(--b);
  background: rgba(255, 255, 255, 0.3);
}
.gl-seek-fill {
  width: var(--p);
  background: var(--gl-accent);
}
.gl-seek-thumb {
  position: absolute;
  top: 50%;
  left: var(--p);
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--gl-accent);
  transform: scale(0);
  transition: transform 0.12s ease;
  pointer-events: none;
}
.gl-seek:hover .gl-seek-thumb,
.gl-seek:focus-within .gl-seek-thumb {
  transform: scale(1);
}
.gl-seek-input {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  opacity: 0;
  cursor: pointer;
}

/* Fila de botones */
.gl-bar {
  display: flex;
  align-items: center;
  gap: 4px;
}
.gl-bar .gl-btn {
  width: 40px;
  height: 40px;
  background: transparent;
}
.gl-bar .gl-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}
.gl-spacer {
  flex: 1 1 auto;
}
.gl-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 6px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.gl-sep,
.gl-dur {
  opacity: 0.7;
}

/* Intercambio de iconos según estado */
.gl-ico-pause { display: none; }
.gl-media.gl-playing .gl-ico-play  { display: none; }
.gl-media.gl-playing .gl-ico-pause { display: inline-flex; }

.gl-ico-muted { display: none; }
.gl-media.gl-muted .gl-ico-vol   { display: none; }
.gl-media.gl-muted .gl-ico-muted { display: inline-flex; }

.gl-ico-exit { display: none; }
.gl-overlay.gl-fs .gl-ico-enter { display: none; }
.gl-overlay.gl-fs .gl-ico-exit  { display: inline-flex; }

.gl-ico-play,
.gl-ico-pause,
.gl-ico-vol,
.gl-ico-muted,
.gl-ico-enter,
.gl-ico-exit {
  align-items: center;
  justify-content: center;
}
.gl-ico-play,
.gl-ico-vol,
.gl-ico-enter {
  display: inline-flex;
}

/* Control de volumen */
.gl-vol {
  display: flex;
  align-items: center;
}
.gl-vol-input {
  --v: 80%;
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  height: 4px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  outline: none;
  opacity: 0;
  cursor: pointer;
  background: linear-gradient(to right, var(--gl-accent) var(--v), rgba(255, 255, 255, 0.28) var(--v));
  transition: width 0.18s ease, opacity 0.18s ease, margin 0.18s ease;
}
.gl-vol:hover .gl-vol-input,
.gl-vol:focus-within .gl-vol-input {
  width: 84px;
  margin: 0 10px 0 2px;
  opacity: 1;
}
.gl-vol-input::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
}
.gl-vol-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}
.gl-vol-input::-moz-range-track {
  height: 4px;
  background: transparent;
}
.gl-vol-input::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

/* Ocultar interfaz cuando el video se reproduce y no hay actividad */
.gl-overlay.gl-idle .gl-topbar,
.gl-overlay.gl-idle .gl-nav,
.gl-overlay.gl-idle .gl-controls {
  opacity: 0;
  pointer-events: none;
}

/* ------------------------------------------------------------------
   Responsive
------------------------------------------------------------------- */
@media (hover: none) {
  /* Pantallas táctiles: el slider de volumen siempre visible */
  .gl-vol-input {
    width: 70px;
    margin: 0 8px 0 2px;
    opacity: 1;
  }
}

@media (max-width: 600px) {
  .gl-nav {
    width: 40px;
    height: 40px;
    margin-top: -20px;
    opacity: 0.9;
  }
  .gl-btn { width: 40px; height: 40px; }
  .gl-bar .gl-btn { width: 36px; height: 36px; }
  .gl-bigplay { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
  .gl-bigplay svg { width: 28px; height: 28px; }
  .gl-controls {
    padding-left: calc(10px + env(safe-area-inset-left, 0px));
    padding-right: calc(10px + env(safe-area-inset-right, 0px));
  }
  .gl-time { font-size: 12px; margin-left: 2px; }
}

@media (max-width: 420px) {
  .gl-vol-input { display: none; }
}

@media (max-height: 480px) and (orientation: landscape) {
  .gl-controls { padding-top: 24px; }
  .gl-bigplay { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
}

@media (prefers-reduced-motion: reduce) {
  .gl-overlay.gl-open { animation: none; }
  .gl-controls,
  .gl-topbar,
  .gl-nav,
  .gl-seek-track,
  .gl-seek-thumb,
  .gl-vol-input { transition: none; }
  .gl-loader { animation-duration: 2s; }
}

/* ------------------------------------------------------------------
   Impresión: la galería nunca se imprime
------------------------------------------------------------------- */
@media print {
  .gl-overlay {
    display: none !important;
  }
}


/* ------------------------------------------------------------------
   Barra inferior de miniaturas
   - Pequeña por defecto; al pasar el mouse se amplía.
   - Se desplaza con la rueda del mouse o con el dedo (sin barra visible).
------------------------------------------------------------------- */
.gl-overlay {
  --gl-strip-h: 64px;     /* alto en reposo */
  --gl-strip-open: 128px; /* alto ampliado (hover) */
}

.gl-strip {
  --th: 44px; /* alto de cada miniatura */
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  height: calc(var(--gl-strip-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(10, 10, 10, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  transition: height 0.22s ease;
}
.gl-overlay.gl-has-strip .gl-strip {
  display: block;
}
/* La imagen/video deja libre el espacio de la barra en reposo */
.gl-overlay.gl-has-strip .gl-stage {
  bottom: calc(var(--gl-strip-h) + env(safe-area-inset-bottom, 0px));
}
.gl-overlay.gl-has-strip .gl-controls {
  padding-bottom: 8px;
}

/* Ampliada: la clase la pone gallerylizz.js cuando el mouse está sobre la barra */
.gl-strip.gl-strip-open {
  --th: 96px;
  height: calc(var(--gl-strip-open) + env(safe-area-inset-bottom, 0px));
}

.gl-strip-track {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  overflow-x: auto;             /* permite rueda y dedo... */
  overflow-y: hidden;
  scrollbar-width: none;        /* ...pero sin barra visible */
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
}
.gl-strip-track::-webkit-scrollbar {
  display: none;
}
.gl-strip-inner {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  margin: 0 auto; /* centrado si caben todas; desplazable si no */
  padding: 0 12px;
}

.gl-thumb {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  flex: 0 0 auto;
  height: var(--th);
  width: calc(var(--th) * 1.6);
  padding: 0;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(135deg, #2b2b2b, #151515);
  cursor: pointer;
  opacity: 0.55;
  transition: height 0.22s ease, width 0.22s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}
.gl-thumb:hover {
  opacity: 1;
}
.gl-thumb.gl-active {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--gl-accent);
}
.gl-thumb:focus-visible {
  outline: 2px solid var(--gl-accent);
  outline-offset: 2px;
}
.gl-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Marca de video sobre la miniatura */
.gl-thumb-badge {
  position: absolute;
  left: 4px;
  bottom: 4px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  pointer-events: none;
}
.gl-thumb-badge svg {
  display: block;
  width: 10px;
  height: 10px;
  fill: currentColor;
  stroke: none;
}
/* Video sin imagen todavía (o sin permiso CORS): icono centrado */
.gl-thumb--empty .gl-thumb-badge {
  left: 50%;
  top: 50%;
  bottom: auto;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
}
.gl-thumb--empty .gl-thumb-badge svg {
  width: 14px;
  height: 14px;
}

@media (hover: none) {
  /* Táctil: tamaño fijo cómodo para el dedo (nunca se amplía) */
  .gl-overlay { --gl-strip-h: 72px; }
  .gl-strip { --th: 52px; }
}

@media (max-height: 480px) and (orientation: landscape) {
  .gl-overlay { --gl-strip-h: 52px; --gl-strip-open: 96px; }
  .gl-strip { --th: 34px; }
}

@media (max-height: 480px) and (orientation: landscape) {
  .gl-strip.gl-strip-open { --th: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  .gl-strip,
  .gl-thumb { transition: none; }
}


/* ------------------------------------------------------------------
   Pantalla en negro (señales de captura)
------------------------------------------------------------------- */
.gl-blackout {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  background: #000;
}
.gl-overlay.gl-blackout-on .gl-blackout {
  display: block;
}


/* ------------------------------------------------------------------
   Barra superior: álbum, título y botón de información
------------------------------------------------------------------- */
.gl-info {
  flex: 1 1 auto;
}
.gl-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.gl-album {
  max-width: 60vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--gl-accent);
}
.gl-album:empty {
  display: none;
}
.gl-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gl-infobtn {
  display: none;
}
.gl-overlay.gl-has-desc .gl-infobtn {
  display: inline-flex;
}
.gl-infobtn[aria-pressed="true"] {
  background: var(--gl-accent);
  color: #141414;
}

/* Panel de descripción */
.gl-desc {
  display: none;
  position: absolute;
  z-index: 6;
  top: calc(64px + env(safe-area-inset-top, 0px));
  left: calc(12px + env(safe-area-inset-left, 0px));
  max-width: min(440px, calc(100% - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  max-height: 40%;
  overflow-y: auto;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(18, 18, 18, 0.82);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-line;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  transition: opacity 0.25s ease;
}
.gl-overlay.gl-has-desc.gl-desc-on .gl-desc {
  display: block;
}
.gl-overlay.gl-idle .gl-desc {
  opacity: 0;
  pointer-events: none;
}

/* ------------------------------------------------------------------
   Zoom de imágenes (abajo a la derecha) y arrastre
------------------------------------------------------------------- */
.gl-zoom {
  position: absolute;
  right: calc(12px + env(safe-area-inset-right, 0px));
  bottom: 12px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: var(--gl-glass);
}
.gl-overlay:not(.gl-has-strip) .gl-zoom {
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}
.gl-zoom .gl-btn {
  width: 38px;
  height: 38px;
  background: transparent;
}
.gl-zoom .gl-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
}
.gl-zoom-val {
  min-width: 48px;
  text-align: center;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.gl-img {
  transform-origin: center center;
  transition: transform 0.18s ease;
  will-change: transform;
}
.gl-media--image.gl-pannable .gl-shield {
  cursor: grab;
  touch-action: none; /* el dedo arrastra la imagen, no la página */
}
.gl-media--image.gl-dragging .gl-shield {
  cursor: grabbing;
}
.gl-media--image.gl-dragging .gl-img {
  transition: none;
}

/* ------------------------------------------------------------------
   Transiciones de entrada y salida
   .gl-enter  -> entrada (data-transitionin)
   .gl-leaving -> salida (data-transitionout)
------------------------------------------------------------------- */
.gl-media {
  z-index: 2;
}
@keyframes gl-tin {
  from { opacity: 0; transform: var(--gl-t); filter: var(--gl-f); }
  to   { opacity: 1; transform: none; filter: none; }
}
@keyframes gl-tout {
  from { opacity: 1; transform: none; filter: none; }
  to   { opacity: 0; transform: var(--gl-t); filter: var(--gl-f); }
}
.gl-enter {
  animation: gl-tin var(--gl-tt, 450ms) ease both;
}
.gl-leaving {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
  animation: gl-tout var(--gl-tt, 450ms) ease both;
}
.gl-leaving .gl-controls,
.gl-leaving .gl-bigplay,
.gl-leaving .gl-zoom {
  visibility: hidden;
}

/* En "entrada" el nombre indica de dónde viene; en "salida", hacia dónde se va */
.gl-t-fade        { --gl-t: none;                                  --gl-f: none; }
.gl-t-slide-left  { --gl-t: translateX(-12%);                      --gl-f: none; }
.gl-t-slide-right { --gl-t: translateX(12%);                       --gl-f: none; }
.gl-t-slide-up    { --gl-t: translateY(-12%);                      --gl-f: none; }
.gl-t-slide-down  { --gl-t: translateY(12%);                       --gl-f: none; }
.gl-t-zoom-in     { --gl-t: scale(0.85);                           --gl-f: none; }
.gl-t-zoom-out    { --gl-t: scale(1.15);                           --gl-f: none; }
.gl-t-rotate      { --gl-t: rotate(-6deg) scale(0.9);              --gl-f: none; }
.gl-t-blur        { --gl-t: none;                                  --gl-f: blur(18px); }
.gl-t-flip        { --gl-t: perspective(1200px) rotateY(-75deg);   --gl-f: none; }

@media (prefers-reduced-motion: reduce) {
  .gl-enter,
  .gl-leaving { animation: none; }
  .gl-img { transition: none; }
}

@media (max-width: 600px) {
  .gl-desc { top: calc(58px + env(safe-area-inset-top, 0px)); max-height: 35%; }
  .gl-zoom .gl-btn { width: 36px; height: 36px; }
  .gl-zoom-val { min-width: 44px; font-size: 12px; }
}