.image-lightbox { position:fixed;inset:0;width:100%;height:100dvh;max-width:none;max-height:none;padding:0;margin:0;overflow:hidden;border:0;border-radius:0;background:#0c0c0ef7;color:#f0f0f1; }
.image-lightbox[open] { display:grid;grid-template-rows:64px minmax(0,1fr) auto;animation:gallery-appear .2s ease-out; }
.image-lightbox::backdrop { background:#000d; }
.image-lightbox-head { display:flex;align-items:center;justify-content:space-between;position:static;height:auto;padding:12px 24px;background:none; }
.image-lightbox-head::before { content:'';width:40px; }
.image-lightbox-count { font-size:13px;color:#b5b5bd;font-variant-numeric:tabular-nums; }
.image-lightbox button { display:inline-grid;place-items:center;flex-shrink:0;width:40px;height:40px;padding:0;border:1px solid #ffffff18;border-radius:7px;background:#1c1c20;color:#d6d6dc;cursor:pointer;transition:background .18s,color .18s,border-color .18s; }
.image-lightbox button:hover { background:#303035;border-color:#66666f;color:#fff; }
.image-lightbox button:disabled { cursor:default;opacity:.4; }
.image-lightbox button:focus-visible { outline:2px solid #b7b7c0;outline-offset:3px; }
.image-lightbox button svg { width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round; }
.image-lightbox-view { position:relative;min-height:0; }
.image-lightbox-stage { position:absolute;inset:0;overflow:hidden;touch-action:none;user-select:none; }
.image-lightbox-stage.is-zoomed { cursor:grab; }
.image-lightbox-stage.is-dragging { cursor:grabbing; }
.image-lightbox-stage img { position:absolute;left:50%;top:50%;max-width:none;max-height:none;object-fit:contain;transform-origin:center;opacity:0;transition:opacity .18s;user-select:none;will-change:transform;filter:none; }
.image-lightbox-stage img.is-loaded { opacity:1; }
.image-lightbox-step { position:absolute;top:50%;transform:translateY(-50%);z-index:1; }
.image-lightbox-step.is-previous { left:24px; }
.image-lightbox-step.is-next { right:24px; }
.image-lightbox-step.is-previous svg { transform:rotate(180deg); }
.image-lightbox-bottom { min-width:0;display:flex;flex-direction:column;align-items:center;gap:12px;padding:16px 24px max(20px,env(safe-area-inset-bottom)); }
.image-lightbox-tools { display:flex;align-items:center;gap:6px;padding:5px;border:1px solid #ffffff12;border-radius:9px;background:#151518; }
.image-lightbox-tools button { width:34px;height:34px;background:transparent;border-color:transparent; }
.image-lightbox-tools [data-zoom-value] { min-width:52px;text-align:center;color:#b9b9c2;font-size:12px;font-variant-numeric:tabular-nums; }
.image-lightbox-thumbs { position:relative;display:flex;gap:8px;max-width:100%;padding:1px;overflow-x:auto;scrollbar-width:thin; }
.image-lightbox-thumbs button { width:60px;height:42px;padding:2px;border-color:transparent;opacity:.45;background:transparent; }
.image-lightbox-thumbs button[aria-pressed=true] { opacity:1;border-color:#a3a3ae; }
.image-lightbox-thumbs button:hover { opacity:1;background:transparent; }
.image-lightbox-thumbs img { width:100%;height:100%;object-fit:cover;border-radius:4px; }
.image-lightbox-error { position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:24px 60px;text-align:center;font-size:14px;color:#b5b5bd;pointer-events:none; }
.image-lightbox-error button { width:auto;padding:0 16px;pointer-events:auto; }
.gallery-loading { position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:12px;padding:16px;color:#d6d6dc;background:#101011a6;font-size:13px;pointer-events:none; }
.gallery-loading::before { content:'';flex:0 0 20px;width:20px;height:20px;border:2px solid #ffffff26;border-top-color:#d6d6dc;border-radius:50%;animation:gallery-spin .8s linear infinite; }
@keyframes gallery-appear { from {opacity:0;} to {opacity:1;} }
@keyframes gallery-spin { to {transform:rotate(360deg);} }
@media(max-width:660px) {
  .image-lightbox-head { padding:10px 12px; }
  .image-lightbox-step.is-previous { left:10px; }.image-lightbox-step.is-next { right:10px; }
  .image-lightbox-bottom { padding:12px 16px max(18px,env(safe-area-inset-bottom)); }
}
@media(prefers-reduced-motion:reduce) {
  .image-lightbox[open],.gallery-loading::before { animation:none; }
  .image-lightbox button,.image-lightbox-stage img { transition:none; }
}
