.lx-gallery-trigger {
  display: inline-flex;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  cursor: zoom-in;
}
.lx-gallery-trigger:focus-visible {
  outline: 3px solid var(--blue-bright);
  outline-offset: 3px;
}
.lx-gallery-trigger:hover .list-item-thumb { border-color: var(--blue-bright); }

.lx-gallery {
  width: min(720px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid var(--line-strong, var(--line));
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.38);
  overflow: auto;
}
.lx-gallery::backdrop { background: rgb(3 9 20 / 0.82); }
.lx-gallery-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.lx-gallery-heading { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; min-width: 0; }
.lx-gallery-heading strong { font-size: 1.1rem; overflow-wrap: anywhere; }
.lx-gallery-heading span { color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.lx-gallery-close,
.lx-gallery-controls button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-deep);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.lx-gallery-close { flex: 0 0 44px; width: 44px; padding: 0; font-size: 1.5rem; line-height: 1; }
.lx-gallery-controls button:disabled { opacity: 0.45; cursor: default; }
.lx-gallery-close:focus-visible,
.lx-gallery-controls button:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 2px; }
.lx-gallery-media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: min(60dvh, 520px);
  min-height: 180px;
  padding: 16px;
  background: var(--bg);
  touch-action: pan-y;
}
.lx-gallery-media img { width: 100%; height: 100%; object-fit: contain; }
.lx-gallery-controls { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; }

@media (max-width: 480px) {
  .lx-gallery { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .lx-gallery-bar, .lx-gallery-controls { padding: 10px 12px; }
  .lx-gallery-media { height: min(55dvh, 420px); padding: 10px; }
}
