/* Общее для всех версий: лайтбокс, плашка версий, скрытый текст. */

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

html.lb-lock { overflow: hidden; }

/* ── Лайтбокс ───────────────────────────────────────── */
.lb {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
}
.lb[hidden] { display: none; }
.lb__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 4, 0.92);
  backdrop-filter: blur(6px);
}
.lb__stage {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}
.lb__media,
.lb__full {
  position: absolute !important;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lb__full { object-fit: contain; background: #000; }
.lb-placeholder { position: absolute; inset: 0; display: block; }
.lb__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(16px, 3vh);
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font: 500 13px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
  text-align: center;
  pointer-events: none;
}
.lb__close {
  position: absolute;
  top: max(14px, 2.4vh);
  right: max(14px, 2.4vw);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: #fff;
  background: rgba(20, 20, 20, 0.6);
  cursor: pointer;
}
.lb__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.lb__close:hover { background: rgba(60, 60, 60, 0.7); }
.lb__close:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ── Плашка версий ──────────────────────────────────── */
.vswitch {
  position: fixed;
  left: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 950;
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(12, 12, 12, 0.72);
  backdrop-filter: blur(10px);
  font: 600 11px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0.04em;
}
.vswitch a {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}
.vswitch a:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.vswitch a[aria-current="page"] { color: #0a0a0a; background: #fff; }
.vswitch a:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
@media print { .vswitch { display: none; } }
