.mbpv-gallery {
  --mbpv-gap: clamp(8px, 2.2vw, 24px);
  --mbpv-radius: clamp(12px, 2vw, 24px);
  --mbpv-ink: #232722;
  --mbpv-focus: #1e6545;
  clear: both;
  box-sizing: border-box;
  width: 100%;
  max-width: 1040px;
  margin: 24px auto;
  padding: 0;
  font-family: inherit;
  color: var(--mbpv-ink);
}
.mbpv-gallery *, .mbpv-dialog * { box-sizing: border-box; }
.mbpv-gallery .mbpv-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.mbpv-gallery .mbpv-heading { margin: 0; font: inherit; font-weight: 700; font-size: clamp(16px, 2vw, 21px); line-height: 1.5; color: inherit; }
.mbpv-gallery .mbpv-motion { margin-inline-start: auto; padding: 8px 2px; min-height: 44px; border: 0; border-radius: 4px; background: transparent; color: inherit; font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; box-shadow: none; }
.mbpv-gallery .mbpv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--mbpv-gap); margin: 0; padding: 0; }
.mbpv-gallery .mbpv-card { position: relative; display: block; isolation: isolate; width: 100%; min-width: 0; aspect-ratio: 9 / 16; padding: 0; margin: 0; border: 0; border-radius: var(--mbpv-radius); overflow: hidden; background: #e9e5df; color: #fff; text-decoration: none; box-shadow: none; -webkit-tap-highlight-color: transparent; }
.mbpv-gallery .mbpv-card::after { content: ""; position: absolute; inset: 0; z-index: 1; background: rgb(0 0 0 / 5%); pointer-events: none; }
.mbpv-gallery .mbpv-poster, .mbpv-gallery .mbpv-preview { position: absolute; display: block; inset: 0; width: 100%; height: 100%; max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; object-fit: cover; pointer-events: none; }
.mbpv-gallery .mbpv-preview { opacity: 0; }
.mbpv-gallery .mbpv-card.mbpv-playing .mbpv-preview { opacity: 1; }
.mbpv-gallery .mbpv-play { position: absolute; z-index: 2; top: 50%; left: 50%; display: grid; place-items: center; width: clamp(42px, 9vw, 94px); height: clamp(42px, 9vw, 94px); border-radius: 50%; transform: translate(-50%, -50%); color: #fff; background: rgb(37 31 24 / 45%); pointer-events: none; }
.mbpv-gallery .mbpv-play svg { display: block; width: 40%; height: 40%; margin-inline-start: 3%; }
.mbpv-gallery .mbpv-fallback-label { position: absolute; bottom: 10px; inset-inline: 6px; text-align: center; color: #25241f; font: inherit; font-size: 12px; line-height: 1.4; }
.mbpv-gallery .mbpv-poster ~ .mbpv-fallback-label, .mbpv-gallery .mbpv-playing .mbpv-fallback-label { display: none; }
.mbpv-gallery .mbpv-card:focus-visible, .mbpv-gallery button:focus-visible { outline: 3px solid var(--mbpv-focus); outline-offset: 4px; }
.mbpv-gallery .mbpv-card:hover .mbpv-play { background: rgb(21 19 16 / 65%); }
.mbpv-dialog:not([open]) { display: none; }
.mbpv-dialog[open] { display: flex; }
.mbpv-dialog { position: fixed; inset: 0; z-index: 2147483646; align-items: center; justify-content: center; width: 100%; max-width: 100%; height: 100%; height: 100dvh; max-height: 100%; margin: 0; padding: 16px; border: 0; background: transparent; color: #fff; font-family: inherit; overscroll-behavior: contain; }
.mbpv-dialog::backdrop { background: rgb(0 0 0 / 88%); }
.mbpv-dialog .mbpv-player-shell { width: min(100%, 480px); max-height: 100%; display: flex; flex-direction: column; gap: 8px; }
.mbpv-dialog .mbpv-player-header, .mbpv-dialog .mbpv-player-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-shrink: 0; }
.mbpv-dialog .mbpv-player-title { color: #fff; margin: 0; font: inherit; font-size: 16px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.mbpv-dialog .mbpv-player-video { display: block; width: 100%; height: min(72vh, 800px); height: min(72dvh, 800px); min-height: 0; object-fit: contain; margin: 0; padding: 0; border: 0; border-radius: 12px; background: #000; }
.mbpv-dialog button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: 0; padding: 8px 12px; border: 1px solid #6d6d6d; border-radius: 8px; background: #222; color: #fff; font: inherit; font-size: 14px; line-height: 1.3; cursor: pointer; box-shadow: none; }
.mbpv-dialog .mbpv-close { font-size: 26px; line-height: 1; padding: 4px; flex-shrink: 0; }
.mbpv-dialog button:disabled { opacity: .4; cursor: default; }
.mbpv-dialog button:focus-visible, .mbpv-dialog a:focus-visible, .mbpv-dialog video:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.mbpv-dialog .mbpv-player-error { margin: 0; color: #fff; font: inherit; font-size: 14px; line-height: 1.5; }
.mbpv-dialog .mbpv-player-error[hidden] { display: none; }
.mbpv-dialog .mbpv-player-error a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.mbpv-dialog .mbpv-counter { font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; color: #eee; }
@media (max-width: 480px) { .mbpv-gallery { margin-block: 20px; } .mbpv-dialog { padding: 12px; } }
@media (max-height: 500px) and (orientation: landscape) { .mbpv-dialog .mbpv-player-shell { width: min(100%, 680px); gap: 2px; } .mbpv-dialog .mbpv-player-video { height: 65dvh; } }
