/* Baby Mellow V2.2: profile gallery, accessible modal & story image trigger */
.bm-profiles .bm-prof-heading{max-width:780px;margin:0 auto 30px;text-align:center}
.bm-prof-grid{display:grid;grid-template-columns:repeat(var(--bm-prof-cols,2),minmax(0,1fr));gap:var(--bm-prof-gap,20px);max-width:820px;margin:0 auto}
.bm-prof-card{min-width:0;position:relative}
.bm-prof-card-button{position:relative;isolation:isolate;display:block;width:100%;aspect-ratio:3/4;overflow:hidden;padding:0;border:0;border-radius:var(--bm-prof-radius,18px);background:#dde3dd;color:var(--bm-prof-card-ink,#fff);font:inherit;cursor:pointer;text-align:left}
.bm-prof-card-button:focus-visible,.bm-story-profile-trigger:focus-visible{outline:3px solid #416A66;outline-offset:4px}
.bm-prof-card-photo{width:100%;height:100%;object-fit:cover;display:block;transition:transform .25s ease}
.bm-prof-card-button:hover .bm-prof-card-photo{transform:scale(1.035)}
.bm-prof-card-button::after{content:"";position:absolute;inset:30% 0 0;z-index:0;background:linear-gradient(to bottom,transparent,color-mix(in srgb,var(--bm-prof-overlay,#18221F) 85%,transparent))}
.bm-prof-plus,.bm-story-profile-plus{display:grid;place-items:center;position:absolute;z-index:1;top:14px;right:14px;width:38px;height:38px;border-radius:50%;background:#fff;color:#343c39;font-size:24px;line-height:1;box-shadow:0 2px 14px #0001}
.bm-prof-card-caption{position:absolute;z-index:1;bottom:0;left:0;right:0;display:flex;flex-direction:column;gap:6px;padding:22px 20px;color:var(--bm-prof-card-ink,#fff)}
.bm-prof-card-name{font-family:var(--bm-sec-body-font,var(--bm-global-body-font));font-size:var(--bm-prof-card-title-size,20px);font-weight:700;line-height:1.2;letter-spacing:-.015em;color:inherit}
.bm-prof-card-role{font-size:var(--bm-prof-card-role-size,14px);line-height:1.4;color:inherit}
.bm-prof-empty{border:1px dashed #9CAFA7;border-radius:12px;padding:35px;color:#59645F;text-align:center}
.bm-prof-placeholder{position:absolute;inset:0;display:grid;place-items:center;text-align:center;padding:25px;color:#343C39}
.bm-prof-dialog{--bm-prof-modal-bg:#FFFFFF;--bm-prof-modal-text:#343C39;--bm-prof-modal-accent:#416A66;--bm-prof-modal-name-size:24px;--bm-prof-modal-body-size:16px;position:fixed;inset:0;margin:auto;padding:0;border:0;border-radius:18px;max-width:min(640px,calc(100vw - 36px));width:100%;max-height:calc(100dvh - 36px);overflow:auto;background:var(--bm-prof-modal-bg);color:var(--bm-prof-modal-text);box-shadow:0 20px 80px #0004;z-index:9999}
.bm-prof-dialog::backdrop{background:rgba(20,29,25,.64);backdrop-filter:blur(3px)}
.bm-prof-dialog-head{display:flex;align-items:center;gap:18px;padding:24px 25px;border-bottom:1px solid #e6e8e7;min-height:110px}
.bm-prof-dialog-avatar{width:78px;height:78px;object-fit:cover;border-radius:12px;flex-shrink:0}
.bm-prof-dialog-titles{min-width:0;flex:1}
.bm-prof-dialog .bm-prof-dialog-titles h3{font-family:var(--bm-sec-body-font,var(--bm-global-body-font));font-size:var(--bm-prof-modal-name-size) !important;color:var(--bm-prof-modal-text) !important;line-height:1.24;margin:0 0 7px;font-weight:700}
.bm-prof-dialog .bm-prof-dialog-role{font-size:14px !important;color:var(--bm-prof-modal-accent) !important;line-height:1.4;margin:0}
.bm-prof-dialog-close{flex-shrink:0;align-self:flex-start;display:grid;place-items:center;width:36px;height:36px;border:0;background:transparent;color:var(--bm-prof-modal-text);cursor:pointer;font-size:26px;border-radius:50%}
.bm-prof-dialog-close:hover,.bm-prof-dialog-close:focus-visible{background:#0000000a}
.bm-prof-dialog-body{padding:26px 28px 34px;color:var(--bm-prof-modal-text);font-family:var(--bm-sec-body-font,var(--bm-global-body-font))}
.bm-prof-dialog .bm-prof-dialog-body :is(p,li){font-size:var(--bm-prof-modal-body-size) !important;line-height:1.7;color:var(--bm-prof-modal-text) !important;margin:0 0 15px}
.bm-prof-dialog-body>*:last-child{margin-bottom:0}
.bm-story-profile-trigger{position:relative;width:100%;display:block;border:0;padding:0;background:transparent;cursor:pointer}
.bm-story-profile-trigger img{display:block;width:100%;height:auto}
.bm-story-profile-plus{width:44px;height:44px}
@media(max-width:749px){
  .bm-prof-grid{grid-template-columns:repeat(var(--bm-prof-cols-mobile,2),minmax(0,1fr));gap:12px}
  .bm-prof-card-caption{padding:14px 11px;gap:5px}
  .bm-prof-card-name{font-size:clamp(13px,4vw,var(--bm-prof-card-title-size,20px))}
  .bm-prof-card-role{font-size:clamp(10px,2.75vw,var(--bm-prof-card-role-size,14px))}
  .bm-prof-plus{top:10px;right:10px;width:31px;height:31px;font-size:22px}
  .bm-prof-dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);border-radius:14px}
  .bm-prof-dialog-head{padding:18px 16px;gap:12px;min-height:94px}
  .bm-prof-dialog-avatar{width:65px;height:65px}
  .bm-prof-dialog .bm-prof-dialog-titles h3{font-size:clamp(18px,4.8vw,var(--bm-prof-modal-name-size,24px))}
  .bm-prof-dialog-body{padding:19px 18px 24px}
}
@media(prefers-reduced-motion:reduce){.bm-prof-card-photo{transition:none}.bm-prof-dialog::backdrop{backdrop-filter:none}}
