.bpm-image-dialog { border:0; padding:0; background:transparent; color:white; width:min(96vw,1700px); max-width:96vw; max-height:96dvh; overflow:visible; }
.bpm-image-dialog::backdrop { background:rgba(3,8,21,.94); }
.bpm-image-dialog img { display:block; max-width:100%; max-height:94dvh; width:auto; height:auto; margin:auto; object-fit:contain; }
.bpm-image-close { position:absolute; z-index:2; right:8px; top:8px; display:grid; place-items:center; border:0; border-radius:50%; width:44px; height:44px; padding:0; background:#10213b; color:white; font-size:0; cursor:pointer; }
.bpm-image-close::before { content:""; display:block; width:18px; height:18px; background:linear-gradient(45deg, transparent 45%, white 45% 55%, transparent 55%),linear-gradient(-45deg, transparent 45%, white 45% 55%, transparent 55%); }
.momente-close > span { font-size:0; }
.momente-close > span::before { content:""; display:block; width:16px; height:16px; background:linear-gradient(45deg, transparent 45%, white 45% 55%, transparent 55%),linear-gradient(-45deg, transparent 45%, white 45% 55%, transparent 55%); }
img[role="button"] { cursor:zoom-in; }
img[role="button"]:focus-visible { outline:3px solid #f4ad23; outline-offset:3px; }
.bpm-archive-actions { display:flex; flex-wrap:wrap; gap:12px; }
.bpm-category-visit { display:inline-block; margin:14px 0 20px; }
.advent-gallery.bpm-buffet-gallery { grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items:stretch; gap:14px; }
.advent-gallery.bpm-buffet-gallery figure { margin:0; transform:none; }
.advent-gallery.bpm-buffet-gallery .bpm-buffet-side { display:grid; grid-template-rows:1fr 1fr; gap:12px; }
.advent-gallery.bpm-buffet-gallery .bpm-buffet-side figure img { aspect-ratio:16/9; }
.advent-gallery.bpm-buffet-gallery > figure img { width:100%; height:100%; min-height:260px; aspect-ratio:auto; object-fit:cover; }
@media(max-width:600px) { .advent-gallery.bpm-buffet-gallery { gap:8px; } .advent-gallery.bpm-buffet-gallery > figure img { min-height:190px; } }
/* Public tournament directory, aligned with the manager's list without admin actions. */
.bpm-public-directory { min-height:100vh; background:#08111f; color:#e9f1ff; padding:32px 18px 64px; }
.bpm-public-directory .bpm-directory-inner { max-width:1050px; margin:auto; }
.bpm-public-directory h1 { margin:8px 0 8px; color:white; }
.bpm-public-directory .bpm-directory-panel { background:#121e30; border:1px solid #334761; border-radius:12px; padding:24px; margin-top:24px; }
.bpm-public-directory .bpm-filters { display:flex; flex-wrap:wrap; gap:8px; margin:18px 0; }
.bpm-public-directory .bpm-filter { display:inline-block; padding:9px 14px; border:1px solid #406087; background:#1b2d46; color:#f1f6ff; border-radius:6px; text-decoration:none; }
.bpm-public-directory .bpm-filter[aria-current="page"] { background:#f51b48; border-color:#f51b48; color:#fff; }
.bpm-public-directory .bpm-tournament-list { padding:0; margin:0; list-style:none; }
.bpm-public-directory .bpm-tournament-list li { border-top:1px solid #34465e; }
.bpm-public-directory .bpm-tournament-list a { display:flex; flex-direction:column; gap:4px; padding:16px 2px; text-decoration:none; color:#f1f6ff; }
.bpm-public-directory .bpm-tournament-list a:hover strong { color:#fa637c; }
.bpm-public-directory .bpm-tournament-list small { color:#b2c8e5; }

/* Match frame width to the motif and keep complete pictures visible. */
.bpm-photo-strip.bpm-balanced-strip { align-items:stretch; }
.bpm-photo-strip.bpm-balanced-strip figure { display:flex; align-items:center; justify-content:center; }
.bpm-photo-strip.bpm-balanced-strip img { width:100%; height:clamp(230px,26vw,390px); max-height:none; object-fit:contain; object-position:center; }
.gallery.bpm-own-photos img { object-fit:contain; object-position:center; }
/* Draw both strokes from the exact centre, independently of font metrics. */
.bpm-image-dialog > .bpm-image-close::before,
.bpm-image-dialog > .bpm-image-close::after { content:""; position:absolute; left:50%; top:50%; margin:0; padding:0; width:18px; height:2px; background:#fff; transform-origin:center; border:0; border-radius:1px; }
.bpm-image-dialog > .bpm-image-close::before { transform:translate(-50%,-50%) rotate(45deg); }
.bpm-image-dialog > .bpm-image-close::after { transform:translate(-50%,-50%) rotate(-45deg); }
.momente-close > span { position:relative; }
.momente-close > span::before, .momente-close > span::after { content:""; position:absolute; left:50%; top:50%; width:16px; height:2px; background:white; }
.momente-close > span::before { transform:translate(-50%,-50%) rotate(45deg); }
.momente-close > span::after { transform:translate(-50%,-50%) rotate(-45deg); }
@media(max-width:600px) { .bpm-photo-strip.bpm-balanced-strip img { height:210px; } }

/* Keep calendar shortcuts alongside the registration confirmation. */
.registration-action-row { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:12px 0; scroll-margin:20px; }
.registration-action-row .calendar-actions { display:flex; flex-wrap:wrap; gap:10px; margin:0; }
.registration-action-row .calendar-actions[hidden] { display:none; }
.registration-action-row .btn { margin:0; padding:12px 16px; font-size:14px; }
@media(max-width:600px) { .registration-action-row .calendar-actions { width:100%; } .registration-action-row .calendar-actions .btn { flex:1; text-align:center; } }

.h2h-control { align-items:stretch; }
.h2h-control input, .h2h-control .h2h-toggle { box-sizing:border-box; height:52px; min-height:52px; margin:0; }
.h2h-control .h2h-toggle { padding:0; display:grid; place-items:center; }
.hof-history { font-size:15px; }
.hof-history span { font-size:24px; color:var(--text); }
.bpm-name-red { color:var(--red); font-weight:700; }
.bpm-name-blue { color:var(--blue); font-weight:700; }
.bpm-list-footer { text-align:center; padding:10px!important; background:var(--panel); }
.bpm-list-footer .list-toggle { margin:0; padding:8px 18px; font-size:14px; border-color:var(--blue); }
.bpm-mobile-list-toggle { display:none; }
@media(max-width:1050px) { .bpm-mobile-list-toggle:not([hidden]) { display:block; width:100%; margin:0; padding:10px; border-radius:0 0 10px 10px; border-color:var(--blue); } }

.card > .tournament-details-link { display:block; margin:0 22px 22px; }
