/* Native dialog lightbox: only [open] gets a display mode (closed dialogs stay hidden). */
html.tut-lightbox-open { overflow: hidden; }
a[data-tut-lightbox][aria-haspopup="dialog"] { cursor: zoom-in; }
.tut-lightbox { position: fixed; inset: 0; margin: 0; padding: 16px 24px; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; background: rgba(6, 5, 20, .97); color: #f1ecff; box-sizing: border-box; }
.tut-lightbox[open] { display: flex; flex-direction: column; gap: 12px; }
.tut-lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.tut-lightbox__toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex: 0 0 auto; min-height: 44px; }
.tut-lightbox__counter { font-variant-numeric: tabular-nums; color: #d1c6ea; }
.tut-lightbox .tut-lightbox__original { margin-left: auto; color: #a4e5ff; text-decoration: underline; text-underline-offset: 3px; }
.tut-lightbox button { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(255, 255, 255, .25); border-radius: 10px; color: #fff; background: #211b3b; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.tut-lightbox button:hover { background: #413066; }
.tut-lightbox button:focus-visible, .tut-lightbox a:focus-visible { outline: 3px solid #91dcff; outline-offset: 3px; }
.tut-lightbox [hidden] { display: none; }
.tut-lightbox__stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; }
.tut-lightbox__image { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.tut-lightbox__bottom { display: flex; align-items: center; justify-content: center; gap: 16px; flex: 0 0 auto; }
.tut-lightbox__caption { flex: 0 1 64rem; min-width: 0; margin: 0; text-align: center; font-size: .95rem; line-height: 1.5; color: #e3dcf4; max-height: 18dvh; overflow: auto; }
@media (max-width: 767px) {
  .tut-lightbox { padding: 8px 10px; gap: 8px; }
  .tut-lightbox__toolbar, .tut-lightbox__bottom { gap: 10px; }
  .tut-lightbox__original, .tut-lightbox__caption { font-size: .85rem; }
}
