.wlmg{--wlmg-accent:#9c78ff;--wlmg-soft:#ece4ff;--wlmg-ink:#0d082b;--wlmg-height:220px;--wlmg-gap:16px;--wlmg-radius:18px;position:relative;isolation:isolate;overflow:hidden;padding:28px 24px 36px;background:radial-gradient(ellipse at 40% 60%,#f7f4ff,#fff 85%);font-family:inherit;direction:rtl}
.wlmg,.wlmg *{box-sizing:border-box}.wlmg--decorated:before,.wlmg--decorated:after{content:"";position:absolute;z-index:-1;width:300px;height:300px;border:48px solid var(--wlmg-soft);border-radius:50%;pointer-events:none;opacity:.65}.wlmg--decorated:before{top:-240px;left:50px}.wlmg--decorated:after{right:-180px;bottom:-240px}
.wlmg .wlmg__heading{display:flex;flex-wrap:wrap;align-items:center;gap:0 .25em;margin:0 0 24px;color:var(--wlmg-ink);font-size:clamp(24px,3vw,38px);font-weight:800;line-height:1.5;overflow-wrap:anywhere}.wlmg__heading span{color:var(--wlmg-accent)}.wlmg--decorated .wlmg__heading:after{content:"";width:80px;height:38px;margin-inline-start:16px;background:radial-gradient(circle,var(--wlmg-accent) 1.5px,transparent 2px) 0 0/14px 14px;opacity:.35}
.wlmg__grid{display:grid;grid-template-columns:repeat(20,minmax(0,1fr));gap:var(--wlmg-gap);grid-auto-rows:var(--wlmg-height);align-items:stretch}
.wlmg .wlmg__tile{appearance:none;position:relative;display:block;min-width:0;width:100%;height:100%;padding:0;margin:0;overflow:hidden;border:1px solid #fff;border-radius:var(--wlmg-radius);background:linear-gradient(135deg,#f8f5ff,var(--wlmg-soft));color:var(--wlmg-ink);font:inherit;box-shadow:0 8px 22px -10px #9d79e642;cursor:pointer;text-align:inherit}
.wlmg--mosaic .wlmg__tile:nth-child(8n+1),.wlmg--mosaic .wlmg__tile:nth-child(8n+2){grid-column:span 4}.wlmg--mosaic .wlmg__tile:nth-child(8n+3){grid-column:span 7}.wlmg--mosaic .wlmg__tile:nth-child(8n+4),.wlmg--mosaic .wlmg__tile:nth-child(8n+5){grid-column:span 5}.wlmg--mosaic .wlmg__tile:nth-child(8n+6){grid-column:span 3}.wlmg--mosaic .wlmg__tile:nth-child(8n+7),.wlmg--mosaic .wlmg__tile:nth-child(8n+8){grid-column:span 6}
.wlmg--equal .wlmg__grid{grid-template-columns:repeat(4,minmax(0,1fr))}.wlmg__image{display:block;width:100%;height:100%;object-fit:contain}.wlmg__placeholder{display:grid;place-items:center;width:100%;height:100%;padding:24px;color:#685090;font-size:16px}.wlmg .wlmg__tile:disabled{cursor:default;opacity:1}
.wlmg__expand{position:absolute;top:12px;left:12px;display:grid;place-items:center;width:36px;height:36px;border:1px solid #ffffff80;border-radius:50%;background:#f7f4ffcf;color:#260868}.wlmg__expand svg{width:19px;height:19px}.wlmg__play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:52px;height:52px;border-radius:50%;background:var(--wlmg-accent);color:#fff;border:2px solid #fff9;box-shadow:0 4px 20px #26086830;font-size:20px}.wlmg__caption{position:absolute;bottom:0;left:0;right:0;padding:24px 14px 12px;background:linear-gradient(transparent,#170d38c9);color:#fff;font-size:14px;line-height:1.6;overflow-wrap:anywhere}
.wlmg--motion .wlmg__image{transition:transform .4s ease}.wlmg--motion .wlmg__tile{animation:wlmg-in .6s ease both}@media(hover:hover){.wlmg--motion .wlmg__tile:not(:disabled):hover .wlmg__image{transform:none}}@keyframes wlmg-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.wlmg .wlmg__tile:focus-visible,.wlmg__dialog button:focus-visible{outline:3px solid var(--wlmg-accent);outline-offset:-4px}
.wlmg__dialog{position:fixed;inset:0;margin:auto;padding:12px;width:min(1100px,94vw);max-width:94vw;max-height:92vh;max-height:92dvh;border:1px solid #ffffff80;border-radius:20px;background:#f8f5ff;color:var(--wlmg-ink);box-shadow:0 24px 80px #15072e60;overflow:auto}.wlmg__dialog::backdrop{background:#130a29d9}.wlmg__toolbar{display:flex;align-items:center;gap:8px;margin-bottom:10px}.wlmg__dialog button{appearance:none;display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:var(--wlmg-soft);color:#260868;font:24px/1 sans-serif;cursor:pointer}.wlmg__counter{flex:1;text-align:center;font-size:14px}.wlmg__viewer{display:grid;place-items:center;min-height:120px}.wlmg__viewer img,.wlmg__viewer video{display:block;max-width:100%;width:auto;max-height:70vh;max-height:70dvh;object-fit:contain;border-radius:10px}.wlmg__description{margin:10px 6px 0;text-align:center;font-size:14px;overflow-wrap:anywhere}
@media(max-width:1024px){.wlmg{--wlmg-height:210px}.wlmg .wlmg__grid{grid-template-columns:repeat(2,minmax(0,1fr))}.wlmg--mosaic .wlmg__tile:nth-child(n){grid-column:auto}.wlmg--mosaic .wlmg__tile:last-child:nth-child(odd){grid-column:1/-1}}
@media(max-width:767px){.wlmg{--wlmg-height:220px;--wlmg-gap:12px;--wlmg-radius:16px;padding:20px 12px 26px}.wlmg .wlmg__heading{font-size:25px;margin-bottom:18px}.wlmg .wlmg__grid{grid-template-columns:minmax(0,1fr)}.wlmg--decorated .wlmg__heading:after{display:none}.wlmg__expand{width:34px;height:34px;top:10px;left:10px}.wlmg__dialog{padding:10px;border-radius:16px}}
@media(prefers-reduced-motion:reduce){.wlmg--motion .wlmg__tile{animation:none}.wlmg--motion .wlmg__image{transition:none}.wlmg--motion .wlmg__tile:not(:disabled):hover .wlmg__image{transform:none}}
/* Bound the media frame independently of intrinsic image size and theme rules. */
.wlmg .wlmg__grid > button.wlmg__tile{display:block!important;position:relative!important;box-sizing:border-box!important;height:var(--wlmg-height)!important;min-height:0!important;max-height:var(--wlmg-height)!important;aspect-ratio:auto!important;padding:0!important;margin:0!important;overflow:hidden!important;line-height:normal!important;align-self:start!important}
.wlmg .wlmg__grid > button.wlmg__tile > img.wlmg__image{display:block!important;position:absolute!important;inset:0!important;box-sizing:border-box!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:100%!important;max-height:100%!important;aspect-ratio:auto!important;object-fit:contain!important;object-position:center!important;transform:none!important;margin:0!important;padding:3px!important;border:0!important;border-radius:0!important;clip-path:none!important}
.wlmg .wlmg__placeholder{min-height:0;line-height:1.7}
.wlmg .wlmg__expand,.wlmg .wlmg__play{z-index:2}