.bm-gallery {
  --bm-accent: #e58700; --bm-teal: #109a9d; --bm-ink: #0f3e3b; --bm-muted: #526b69; --bm-soft: #edf6f5;
  box-sizing: border-box; max-width: 1360px; margin: 0 auto;
  padding: clamp(28px, 5vw, 72px) clamp(20px, 3vw, 40px);
  color: #333; font-family: 'Poppins', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.8;
}
.bm-gallery *, .bm-gallery *::before, .bm-gallery *::after { box-sizing: border-box; }
.bm-gallery a { color: var(--bm-ink); text-underline-offset: 4px; }
.bm-gallery-heading { max-width: 900px; margin-bottom: 44px; }
.bm-gallery .bm-gallery-eyebrow { margin: 0 0 10px; color: var(--bm-muted); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.bm-gallery h1 { margin: 0 0 24px; padding: 0; color: var(--bm-teal); font-family: inherit; font-size: clamp(44px, 5.4vw, 72px); font-weight: 800; line-height: 1.12; letter-spacing: -.045em; overflow-wrap: anywhere; }
.bm-gallery .bm-gallery-intro { max-width: 790px; margin: 0; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.85; }
.bm-gallery .bm-gallery-preview { display: block; width: fit-content; margin: 0 0 38px; padding: 8px 14px; border: 1px solid #cfdfdd; border-radius: 9px; background: #f4f9f8; color: #46635f; font-size: 12px; line-height: 1.6; }
.bm-gallery-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; }
.bm-gallery a.bm-gallery-card { display: block; min-width: 0; border: 1px solid #dce9e7; border-radius: 24px; background: #fff; color: var(--bm-ink); text-decoration: none; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.bm-gallery-card:hover { transform: translateY(-5px); box-shadow: 0 14px 36px #0f3e3b12; }
.bm-gallery-cover { position: relative; aspect-ratio: 3 / 4; background: var(--bm-soft); overflow: hidden; }
.bm-gallery-cover img { display: block; width: 100%; height: 100%; object-fit: contain; }
.bm-gallery-badge { position: absolute; top: 16px; right: 16px; padding: 5px 13px; border-radius: 999px; background: #fffffff2; color: var(--bm-ink); font-size: 12px; font-weight: 600; box-shadow: 0 2px 12px #0f3e3b0a; }
.bm-gallery-card-content { padding: 24px; }
.bm-gallery .bm-gallery-date { margin: 0; color: var(--bm-muted); font-size: 14px; font-weight: 400; }
.bm-gallery-card h2 { margin: 8px 0 24px; padding: 0; color: var(--bm-ink); font-family: inherit; font-size: clamp(21px, 2vw, 27px); font-weight: 800; line-height: 1.3; letter-spacing: -.035em; overflow-wrap: anywhere; }
.bm-gallery-open { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #986000; font-size: 14px; font-weight: 600; }
.bm-gallery-open span { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--bm-accent); color: #fff; font-size: 21px; }
.bm-gallery .bm-gallery-back { display: inline-block; min-height: 44px; margin: 0 0 26px; padding: 8px 0; color: #416b68; font-size: 14px; font-weight: 600; text-decoration: none; }
.bm-gallery-back:hover { text-decoration: underline; }
.bm-gallery-album-heading { max-width: 1050px; margin-bottom: 32px; }
.bm-gallery-album-heading h1 { font-size: clamp(32px, 4.4vw, 56px); }
.bm-gallery-album-heading .bm-gallery-date { display: flex; gap: 12px; align-items: center; }
.bm-gallery-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.bm-gallery-photos button { display: flex; align-items: center; justify-content: center; min-width: 0; padding: 0; border: 1px solid #e3edeb; border-radius: 16px; background: #eaf1ef; cursor: pointer; aspect-ratio: 4 / 3; overflow: hidden; transition: box-shadow .2s ease; }
.bm-gallery-photos button:hover { box-shadow: 0 0 0 3px var(--bm-teal); }
.bm-gallery-photos img { display: block; width: 100%; height: 100%; object-fit: contain; }
.bm-gallery :focus-visible { outline: 3px solid var(--bm-accent); outline-offset: 5px; }
.bm-gallery-note { margin-top: clamp(48px, 7vw, 88px); padding: clamp(24px, 4vw, 42px); border-radius: 24px; background: var(--bm-soft); }
.bm-gallery-note h2 { margin: 0 0 16px; padding: 0; color: var(--bm-ink); font-family: inherit; font-size: clamp(24px, 2.5vw, 32px); font-weight: 800; line-height: 1.3; letter-spacing: -.035em; }
.bm-gallery-note p { max-width: 900px; margin: 0 0 14px; font-size: 14px; line-height: 1.9; }
.bm-gallery-note p:last-child { margin-bottom: 0; }
.bm-gallery-note a { font-weight: 600; overflow-wrap: anywhere; }
.bm-gallery-page { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: 28px 6px 0 0; border: 1px solid #cfdfdd; border-radius: 50%; text-decoration: none; }
.bm-gallery-viewer { box-sizing: border-box; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 76px 76px 100px; border: 0; background: #071d1cfb; color: #fff; overflow: hidden; }
.bm-gallery-viewer::backdrop { background: #071d1c; }
.bm-gallery-viewer[open] { display: flex; align-items: center; justify-content: center; }
.bm-gallery-viewer > img { max-width: 100%; max-height: 100%; object-fit: contain; touch-action: pan-y; }
.bm-gallery-viewer button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid #ffffff40; border-radius: 50%; background: #ffffff12; color: #fff; font: 25px/1 Arial, sans-serif; cursor: pointer; }
.bm-gallery-viewer button:hover { background: #ffffff28; }
.bm-gallery-viewer [data-close] { top: max(16px, env(safe-area-inset-top)); right: max(20px, env(safe-area-inset-right)); }
.bm-gallery-viewer [data-prev] { left: 16px; top: calc(50% - 24px); }
.bm-gallery-viewer [data-next] { right: 16px; top: calc(50% - 24px); }
.bm-gallery-viewer footer { position: absolute; right: 20px; bottom: max(18px, env(safe-area-inset-bottom)); left: 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 28px; font-size: 14px; }
.bm-gallery-viewer footer [role='status'] { min-width: 64px; font-variant-numeric: tabular-nums; text-align: center; }
.bm-gallery-viewer footer a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 20px; border: 1px solid #ffffff60; border-radius: 999px; color: #fff; text-decoration: none; }
.bm-gallery-viewer footer a:hover { background: #fff; color: #0f3e3b; }
.bm-gallery-viewer [data-error] { flex-basis: 100%; margin: 0; color: #ffd5a0; font-size: 13px; text-align: center; }
.bm-gallery-viewer [hidden] { display: none; }
@media (max-width: 980px) { .bm-gallery-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bm-gallery-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .bm-gallery-cards { grid-template-columns: 1fr; gap: 28px; }
  .bm-gallery-heading { margin-bottom: 30px; }
  .bm-gallery-cover { aspect-ratio: 4 / 3; }
  .bm-gallery-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .bm-gallery-photos button { border-radius: 10px; }
  .bm-gallery-card-content { padding: 22px; }
  .bm-gallery-viewer { padding: 72px 10px 144px; }
  .bm-gallery-viewer [data-prev], .bm-gallery-viewer [data-next] { top: auto; bottom: max(82px, calc(env(safe-area-inset-bottom) + 68px)); }
  .bm-gallery-viewer footer { gap: 16px; }
}
@media (max-height: 500px) and (min-width: 601px) { .bm-gallery-viewer { padding-top: 16px; padding-bottom: 70px; } }
@media (prefers-reduced-motion: reduce) { .bm-gallery-card, .bm-gallery-photos button { transition: none; } }
