.tsv-gallery { position: absolute; inset: 1rem 1rem auto auto; z-index: 3; max-width: calc(100% - 2rem); }
.tsv-gallery__open,
.tsv-gallery__dialog button { display: inline-flex; min-height: 44px; min-width: 44px; align-items: center; justify-content: center; padding: .6rem 1rem; border: 1px solid #819ba5; border-radius: .55rem; background: #10272e; color: #fff; font: inherit; line-height: 1.4; text-decoration: none; cursor: pointer; }
.tsv-gallery__open { background: #10272ef0; }
.tsv-gallery__open:focus-visible,
.tsv-gallery__dialog :focus-visible { outline: 3px solid #73e5d0; outline-offset: 3px; }
.tsv-gallery__dialog { box-sizing: border-box; width: min(1120px, 96vw); max-width: 96vw; max-height: 94dvh; padding: 1rem; overflow: auto; overscroll-behavior: contain; border: 1px solid #819ba5; border-radius: .75rem; background: #101b20; color: #eef4f7; }
.tsv-gallery__dialog::backdrop { background: #02080bef; }
.tsv-gallery__dialog:not([open]) { display: none; }
.tsv-gallery__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.tsv-gallery__toolbar h2 { margin: 0; color: inherit; font-size: clamp(1rem, 3vw, 1.35rem); }
.tsv-gallery__dialog button.tsv-gallery__close { flex-shrink: 0; }
.tsv-gallery__dialog .tsv-gallery__stage { display: block; position: static; width: auto; height: auto; margin: 1rem 0; }
.tsv-gallery__dialog img.tsv-gallery__image { display: block; position: static; z-index: auto; width: 100%; height: min(57dvh, 640px); object-fit: contain; object-position: center; background: #061014; touch-action: pan-y pinch-zoom; }
.tsv-gallery__dialog .tsv-gallery__caption { position: static; padding: .5rem 0 0; background: transparent; color: #c9d7de; font-size: .8rem; line-height: 1.5; }
.tsv-gallery__dialog a { color: #a4e9e1; }
.tsv-gallery__navigation { display: flex; justify-content: center; align-items: center; gap: 1rem; }
.tsv-gallery__status { margin: 0; font-size: .85rem; text-align: center; }
.tsv-gallery__dialog button:disabled { opacity: .5; cursor: default; }
.tsv-gallery__thumbs { display: flex; gap: .6rem; padding: .5rem; margin-top: .5rem; overflow-x: auto; }
.tsv-gallery__dialog .tsv-gallery__thumbs button { flex: 0 0 72px; min-height: 54px; padding: 2px; border: 2px solid transparent; border-radius: .3rem; background: transparent; }
.tsv-gallery__dialog .tsv-gallery__thumbs button[aria-pressed="true"] { border-color: #73e5d0; }
.tsv-gallery__dialog .tsv-gallery__thumbs img { position: static; z-index: auto; display: block; width: 64px; height: 48px; object-fit: cover; border-radius: .15rem; }
.tsv-gallery__help { margin: .4rem 0 0; color: #c9d7de; font-size: .75rem; }
@media (max-width: 600px) {
	.tsv-gallery { inset: .65rem .65rem auto auto; }
	.tsv-gallery__dialog { padding: .7rem; }
	.tsv-gallery__toolbar { gap: .5rem; }
	.tsv-gallery__dialog button { padding: .5rem; font-size: .8rem; }
	.tsv-gallery__navigation { gap: .5rem; }
	.tsv-gallery__dialog img.tsv-gallery__image { height: min(48dvh, 500px); }
}
@media (prefers-reduced-motion: reduce) {
	.tsv-gallery__dialog, .tsv-gallery__dialog * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
