 .r2-photo-section{margin:2rem 0 1rem;padding:1rem;border:1px solid rgba(255,255,255,.25);border-radius:.5rem}.r2-photo-section select,.r2-photo-section input[type=text]{max-width:100%}.r2-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(115px,1fr));gap:.6rem;margin:1rem 0}.r2-tile{aspect-ratio:1;overflow:hidden;border-radius:.35rem;cursor:pointer;background:rgba(255,255,255,.08)}.r2-tile img{width:100%;height:100%;object-fit:cover}.r2-preview:not([hidden]){position:fixed;inset:0;z-index:100010;background:rgba(0,0,0,.96);display:flex;align-items:center;justify-content:space-between;padding:3rem .5rem}.r2-preview-image{max-width:80vw;text-align:center}.r2-preview-image img{display:block;max-width:80vw;max-height:72vh;object-fit:contain}.r2-preview button{min-width:2rem;padding:.3rem}.r2-preview #r2-close{position:absolute;top:1rem;right:1rem}.r2-preview a{display:inline-block;margin-top:.5rem}.r2-photo-section input[type=checkbox]{appearance:auto;opacity:1;margin-right:.5rem}#guest-credit-wrap{margin:1rem 0}#guest-photo-files{max-width:100%;margin:1rem 0}
/* Kategóriák automatikusan, rögzített sorrendben */
.r2-category-group{margin:1.8rem 0 2.3rem}.r2-category-group h3{margin:0 0 .6rem}.r2-upload-toggle{display:block;width:100%;margin:0 0 .75rem;text-align:center}.r2-upload-panel{padding:1rem;border:1px solid rgba(255,255,255,.22);border-radius:.4rem;margin-bottom:1.5rem}.r2-upload-panel[hidden],#guest-photo-upload[hidden],.r2-preview[hidden]{display:none!important}.r2-category-galleries{margin-top:1rem}.r2-tile{padding:0;border:0;min-width:0;height:auto;line-height:normal}.r2-tile img{display:block}.r2-preview-image img{margin:auto}

/* A feltöltőűrlap önálló Dimension-almenüben nyílik meg. */
#photo-upload .r2-upload-panel{display:block!important}#guest-photo-upload[hidden]{display:none!important}

/* Full-screen lightbox, independent of transformed Dimension articles */
body.wedding-viewer-open{overflow:hidden!important}
.r2-preview[hidden]{display:none!important}
.r2-preview:not([hidden]){position:fixed!important;inset:0!important;width:100vw;height:100vh;height:100dvh;z-index:2147483000;display:grid!important;grid-template-columns:2.6rem minmax(0,1fr) 2.6rem;grid-template-rows:minmax(0,1fr);align-items:center;justify-items:center;gap:.2rem;padding:3.4rem .5rem 1rem!important;box-sizing:border-box;overflow:hidden;background:rgba(12,13,18,.985)}
.r2-preview-image{grid-column:2;grid-row:1;display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:0;min-height:0;width:100%;height:100%;max-width:100%!important;overflow:hidden;text-align:center}
.r2-preview-image img{display:block;flex:1 1 auto;min-height:0;min-width:0;width:auto;height:auto;max-width:100%!important;max-height:calc(100% - 4.5rem)!important;object-fit:contain!important;margin:auto}
.r2-preview-image p{margin:.15rem 0;max-width:100%;font-size:.8rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.r2-preview-image a{display:block;flex:0 0 auto;margin:.35rem 0 0;font-size:.75rem;line-height:1.4}
.r2-preview #r2-prev{grid-column:1;grid-row:1}.r2-preview #r2-next{grid-column:3;grid-row:1}
.r2-preview #r2-close{position:absolute!important;top:max(.5rem,env(safe-area-inset-top))!important;right:max(.5rem,env(safe-area-inset-right))!important;z-index:4}
.r2-preview button{display:grid;place-items:center;min-width:2.5rem;width:2.5rem;height:2.5rem;padding:0!important;border-radius:50%;border:1px solid rgba(255,255,255,.55);background:rgba(0,0,0,.6);box-shadow:none;font-size:1.5rem;line-height:1}
.r2-upload-toggle{display:block;width:100%;max-width:100%;box-sizing:border-box;white-space:normal!important;overflow-wrap:anywhere;line-height:1.4!important;height:auto!important;min-height:2.75rem;padding:.7rem .6rem!important;font-size:1rem!important;letter-spacing:.11em;text-align:center}
#guest-photo-files{width:100%;max-width:100%;box-sizing:border-box;color:inherit}
#guest-photo-files::file-selector-button{background:transparent;color:inherit;border:1px solid rgba(255,255,255,.5);border-radius:.25rem;font:inherit;font-size:.8rem;padding:.5rem .75rem;margin-right:.5rem}
@media(max-width:600px){.r2-preview:not([hidden]){grid-template-columns:1.8rem minmax(0,1fr) 1.8rem;padding:3.2rem .2rem .6rem!important;gap:0}.r2-preview button{width:1.85rem;min-width:1.85rem;height:2.3rem;font-size:1.25rem}.r2-preview-image a{font-size:.7rem}.r2-upload-toggle{font-size:.9rem!important;letter-spacing:.06em}}


/* Refined full-viewport viewer: square translucent controls, image can use all free space. */
#gallery-viewer:not([hidden]),.r2-preview:not([hidden]){position:fixed!important;inset:0!important;width:100%!important;height:100dvh!important;display:block!important;padding:0!important;overflow:hidden!important;box-sizing:border-box;background:#090a0e!important;z-index:2147483000!important}
#gallery-viewer #viewer-image,.r2-preview .r2-preview-image img{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;min-width:0!important;min-height:0!important;object-fit:contain!important;margin:0!important;cursor:pointer;display:block!important}
#gallery-viewer .viewer-icon-button,.r2-preview #r2-close,.r2-preview #r2-prev,.r2-preview #r2-next{position:absolute!important;z-index:8!important;display:flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;width:2.8rem!important;height:2.8rem!important;min-width:2.8rem!important;min-height:2.8rem!important;padding:0!important;border:1px solid rgba(255,255,255,.55)!important;border-radius:.28rem!important;background:rgba(12,13,18,.55)!important;color:#fff!important;font:400 1.65rem/1 Arial,sans-serif!important;letter-spacing:0!important;box-shadow:none!important;transform:none!important;transition:opacity .2s ease,background .2s ease!important}
#gallery-viewer #viewer-close,.r2-preview #r2-close{top:max(.7rem,env(safe-area-inset-top))!important;right:max(.7rem,env(safe-area-inset-right))!important;left:auto!important;bottom:auto!important}
#gallery-viewer #viewer-prev,.r2-preview #r2-prev{left:.5rem!important;right:auto!important;top:50%!important;bottom:auto!important;translate:0 -50%}
#gallery-viewer #viewer-next,.r2-preview #r2-next{right:.5rem!important;left:auto!important;top:50%!important;bottom:auto!important;translate:0 -50%}
#gallery-viewer .viewer-icon-button:disabled,.r2-preview button:disabled{opacity:.22!important}
#gallery-viewer .viewer-tools{position:absolute!important;z-index:9!important;bottom:max(.7rem,env(safe-area-inset-bottom))!important;left:.5rem!important;right:.5rem!important;top:auto!important;width:auto!important;max-width:none!important;max-height:none!important;overflow:visible!important;display:flex!important;flex-direction:column!important;gap:.5rem!important;align-items:center!important;justify-content:center!important;padding:0!important;margin:0!important;transform:none!important}
#gallery-viewer #viewer-counter{display:block!important;order:0!important;font-size:.9rem!important;line-height:1.4!important;letter-spacing:.07em!important;text-align:center!important;text-shadow:0 1px 5px #000}
#gallery-viewer .viewer-actions{order:1;display:grid!important;grid-template-columns:auto auto auto auto!important;align-items:center!important;justify-content:center!important;gap:.35rem!important;max-width:100%!important}
#gallery-viewer .viewer-actions button,#gallery-viewer .viewer-actions select,#gallery-viewer #viewer-delete{display:flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;height:2.7rem!important;min-height:2.7rem!important;max-height:2.7rem!important;width:auto!important;min-width:0!important;line-height:1.1!important;padding:0 .55rem!important;margin:0!important;border:1px solid rgba(255,255,255,.55)!important;border-radius:.25rem!important;background:rgba(18,19,24,.82)!important;color:white!important;font-size:.72rem!important;font-weight:400!important;letter-spacing:.035em!important;text-align:center!important;text-transform:uppercase!important;box-shadow:none!important;white-space:nowrap!important}
#gallery-viewer .viewer-actions select{max-width:9rem!important;appearance:auto!important;padding:0 .2rem!important;text-align:left!important;text-align-last:left!important}
#gallery-viewer #viewer-public{background:rgba(135,48,56,.65)!important;border-color:rgba(232,131,138,.65)!important}
#gallery-viewer #viewer-public.is-public{background:rgba(35,105,72,.72)!important;border-color:rgba(130,209,159,.65)!important}
#gallery-viewer #viewer-delete{order:2!important;height:2.35rem!important;min-height:2.35rem!important;padding:0 1.25rem!important}
#gallery-viewer.viewer-controls-hidden .viewer-tools,#gallery-viewer.viewer-controls-hidden .viewer-icon-button,.r2-preview.viewer-controls-hidden #r2-close,.r2-preview.viewer-controls-hidden #r2-prev,.r2-preview.viewer-controls-hidden #r2-next,.r2-preview.viewer-controls-hidden .r2-preview-image p,.r2-preview.viewer-controls-hidden .r2-preview-image a{opacity:0!important;pointer-events:none!important}
#gallery-viewer .viewer-tools,#gallery-viewer .viewer-icon-button,.r2-preview #r2-close,.r2-preview #r2-prev,.r2-preview #r2-next,.r2-preview .r2-preview-image p,.r2-preview .r2-preview-image a{transition:opacity .2s ease!important}
.r2-preview .r2-preview-image{position:static!important;display:contents!important}
.r2-preview .r2-preview-image p,.r2-preview .r2-preview-image a{position:absolute!important;z-index:7!important;left:50%!important;transform:translateX(-50%)!important;max-width:calc(100vw - 1rem)!important;margin:0!important;text-align:center!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;background:rgba(12,13,18,.6)!important;padding:.25rem .6rem!important;border-radius:.2rem!important}
.r2-preview .r2-preview-image p{bottom:calc(max(.6rem,env(safe-area-inset-bottom)) + 2.3rem)!important}
.r2-preview .r2-preview-image a{bottom:max(.6rem,env(safe-area-inset-bottom))!important}
@media(max-width:600px){#gallery-viewer .viewer-actions{gap:.2rem!important}#gallery-viewer .viewer-actions button,#gallery-viewer .viewer-actions select{font-size:.62rem!important;height:2.5rem!important;min-height:2.5rem!important;padding:0 .35rem!important}#gallery-viewer .viewer-actions select{max-width:7.6rem!important}#gallery-viewer .viewer-icon-button,.r2-preview #r2-close,.r2-preview #r2-prev,.r2-preview #r2-next{width:2.25rem!important;height:2.6rem!important;min-width:2.25rem!important;min-height:2.6rem!important;font-size:1.4rem!important}}

/* Keep upload submenu heading inside the Dimension article on narrow phones */
#photo-upload h2.major{font-size:clamp(1rem,5vw,1.6rem)!important;letter-spacing:.12em!important;overflow-wrap:anywhere;max-width:100%;box-sizing:border-box}
#guest-upload-toggle{font-size:clamp(.9rem,2.8vw,1.05rem)!important;letter-spacing:.1em!important;overflow-wrap:anywhere;white-space:normal!important;display:flex!important;align-items:center;justify-content:center;text-align:center;line-height:1.45!important}
.r2-preview #r2-image{z-index:1!important;will-change:translate;touch-action:pan-y}
.r2-preview #r2-close,.r2-preview #r2-prev,.r2-preview #r2-next{z-index:10!important}

/* Mobile: suppress Chromium/WebKit tap highlight without disabling keyboard focus. */
#gallery-viewer, #gallery-viewer *, .admin-gallery-grid, .admin-gallery-grid *,
.r2-preview, .r2-preview *, .r2-gallery, .r2-gallery *,
.r2-tile, .r2-tile *, .admin-gallery-tile, .admin-gallery-tile * {
  -webkit-tap-highlight-color: transparent !important;
}
/* Avoid accidental text selection while swiping photos or tapping thumbnails. */
#gallery-viewer #viewer-image, .r2-preview #r2-image,
.r2-tile, .admin-gallery-tile { user-select: none; -webkit-user-select: none; }
/* Retain visible focus indication for keyboard navigation. */
#gallery-viewer button:focus-visible, .r2-preview button:focus-visible,
.r2-tile:focus-visible, .admin-gallery-tile:focus-visible {
  outline: 2px solid rgba(255,255,255,.85) !important;
  outline-offset: 2px;
}
