.tournament-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:26px}.gallery-album{display:block;text-decoration:none;color:#10243d;border:1px solid #dce3ee;border-radius:18px;overflow:hidden;background:#fff;box-shadow:0 8px 24px #0616320d}.gallery-square{aspect-ratio:1;position:relative;display:grid;place-items:center;background:linear-gradient(135deg,#061632,#133f79);padding:28px}.gallery-square img{width:85%;height:85%;object-fit:contain}.gallery-square>span{position:absolute;left:18px;top:18px;background:#ffc72c;color:#061632;padding:6px 12px;border-radius:20px;font-weight:800;font-size:12px}.gallery-caption{padding:20px}.gallery-caption h2{font-size:21px;margin:0 0 8px}.gallery-caption p{color:#68748b;margin:0 0 18px}.gallery-caption b{color:#174d87}.gallery-album[href]:hover{box-shadow:0 10px 28px #06163225}.gallery-album:focus-visible{outline:3px solid #f5a800;outline-offset:4px}.gallery-album.is-pending .gallery-caption b{color:#68748b}@media(max-width:900px){.tournament-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:520px){.tournament-gallery{grid-template-columns:1fr}}
button.gallery-album{padding:0;text-align:left;font:inherit;cursor:pointer;width:100%}.gallery-square.has-photo{padding:0}.gallery-square.has-photo img{width:100%;height:100%;object-fit:cover}.gallery-album:hover{box-shadow:0 10px 28px #06163225}.tournament-gallery.is-open{display:block}.gallery-toolbar{margin-bottom:24px}.gallery-toolbar h2{margin:16px 0 6px}.gallery-toolbar button,.gallery-lightbox button{cursor:pointer;border:0;border-radius:10px;padding:12px 18px;font:inherit;background:#ffc72c;color:#10243d}.gallery-photos{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.gallery-photos button{border:0;padding:0;background:#e8edf3;cursor:pointer;overflow:hidden;border-radius:10px;aspect-ratio:3/2}.gallery-photos img{display:block;width:100%;height:100%;object-fit:cover}.gallery-photos button:focus-visible{outline:3px solid #f5a800;outline-offset:3px}.gallery-lightbox{width:min(1100px,96vw);max-width:96vw;max-height:96dvh;padding:16px;background:#10243d;color:#fff;border:0;border-radius:14px;box-sizing:border-box}.gallery-lightbox::backdrop{background:#000c}.gallery-lightbox>img{display:block;width:100%;height:calc(90dvh - 160px);object-fit:contain}.gallery-lightbox>[data-close]{display:block;margin-left:auto;margin-bottom:8px}.gallery-lightbox p{text-align:center;margin:10px 0}.gallery-lightbox-controls{display:flex;justify-content:space-between;gap:10px}@media(max-width:900px){.gallery-photos{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:520px){.gallery-photos{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.gallery-lightbox{padding:10px}.gallery-lightbox button{padding:10px}}

.gallery-lightbox-top{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-bottom:8px}/* Fullscreen image fills the viewport; controls overlay it without reserving space. */
.gallery-lightbox:fullscreen,.gallery-lightbox.is-expanded{position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;overflow:hidden;background:#000}
.gallery-lightbox:fullscreen>img,.gallery-lightbox.is-expanded>img{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;object-fit:contain}
.gallery-lightbox:fullscreen .gallery-lightbox-top,.gallery-lightbox.is-expanded .gallery-lightbox-top{position:absolute;z-index:2;top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));margin:0}
.gallery-lightbox:fullscreen .gallery-lightbox-controls,.gallery-lightbox.is-expanded .gallery-lightbox-controls{position:absolute;z-index:2;left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));top:50%;transform:translateY(-50%);pointer-events:none}
.gallery-lightbox:fullscreen .gallery-lightbox-controls button,.gallery-lightbox.is-expanded .gallery-lightbox-controls button{pointer-events:auto}
.gallery-lightbox:fullscreen>p,.gallery-lightbox.is-expanded>p{position:absolute;z-index:2;bottom:max(12px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);max-width:calc(100% - 48px);margin:0;padding:8px 14px;border-radius:10px;background:#0009;color:#fff;pointer-events:none;font-size:14px}
.gallery-lightbox:fullscreen button,.gallery-lightbox.is-expanded button{background:#10243dbd;color:#fff;box-shadow:0 1px 8px #0006}
.gallery-lightbox:fullscreen button:hover,.gallery-lightbox.is-expanded button:hover{background:#10243d}


.gallery-cover-editor{grid-column:1/-1;min-width:0}.gallery-cover-editor>[data-cover-preview]{display:block;width:180px;height:180px;object-fit:cover;border-radius:12px;margin-bottom:12px}.gallery-cover-editor label{display:block}.gallery-cover-editor input{width:100%;box-sizing:border-box}.gallery-cover-editor details{margin:16px 0}.gallery-cover-editor summary{cursor:pointer;font-weight:700}.gallery-cover-choices{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:8px;max-height:420px;overflow:auto;margin-top:12px}.gallery-cover-choices button{padding:0;border:2px solid transparent;background:none;cursor:pointer}.gallery-cover-choices button:focus-visible{outline:3px solid #ffc72c}.gallery-cover-choices img{display:block;width:100%;height:100px;object-fit:cover}.gallery-cover-editor small{display:block;margin-top:10px}
