
.dmg-wrap{margin:0 0 18px;padding:22px;background:#fff;border:1px solid #e4e7ec;border-radius:16px;min-width:0}
.dmg-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.dmg-head h2{margin:0}.dmg-head span{font-size:13px;color:#667085}
.dmg-stage{position:relative;aspect-ratio:16/9;overflow:hidden;border-radius:14px;background:#0f172a}.dmg-slides,.dmg-slide{width:100%;height:100%}.dmg-slide{display:none;position:relative;align-items:center;justify-content:center}.dmg-slide.is-active{display:flex}
.dmg-image{display:block;width:100%;height:100%;padding:0;border:0;background:#0f172a;cursor:zoom-in}.dmg-image img,.dmg-video>img{display:block;width:100%;height:100%;object-fit:contain}.dmg-video{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.dmg-video-bg{color:#fff;font-size:24px}.dmg-video iframe{position:absolute;inset:0;width:100%;height:100%;border:0}.dmg-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:66px;height:66px;border:0;border-radius:50%;font-size:27px;cursor:pointer}.dmg-video.is-playing>img,.dmg-video.is-playing>.dmg-video-bg,.dmg-video.is-playing>.dmg-play{display:none}
.dmg-arrow{position:absolute;z-index:5;top:50%;transform:translateY(-50%);width:44px;height:44px;border:0;border-radius:50%;background:rgba(2,6,23,.65);color:#fff;font-size:31px;cursor:pointer}.dmg-prev{left:12px}.dmg-next{right:12px}.dmg-count{position:absolute;z-index:5;right:12px;bottom:10px;background:rgba(2,6,23,.7);color:#fff;border-radius:999px;padding:5px 9px;font-size:12px}.dmg-caption{position:absolute;left:12px;bottom:10px;max-width:70%;background:rgba(2,6,23,.7);color:#fff;padding:6px 9px;border-radius:8px;font-size:13px}
.dmg-thumbs{display:flex;gap:8px;overflow-x:auto;padding-top:10px}.dmg-thumb{position:relative;flex:0 0 86px;height:60px;padding:0;border:2px solid transparent;border-radius:9px;overflow:hidden;background:#e2e8f0;cursor:pointer}.dmg-thumb.is-active{border-color:#2563eb}.dmg-thumb img{width:100%;height:100%;object-fit:cover}.dmg-thumb>b{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:rgba(2,6,23,.7);color:#fff;border-radius:50%;width:27px;height:27px;display:grid;place-items:center}
.dmg-lightbox{position:fixed;inset:0;z-index:2147483645;background:rgba(2,6,23,.94);display:grid;place-items:center;padding:18px}.dmg-lightbox[hidden]{display:none}.dmg-lightbox img{max-width:94vw;max-height:92vh;object-fit:contain}.dmg-close{position:fixed;right:15px;top:15px;width:44px;height:44px;border:0;border-radius:50%;background:rgba(255,255,255,.16);color:#fff;font-size:28px}
.dmg-admin-items{display:grid;gap:8px;margin:16px 0}.dmg-admin-item{display:grid;grid-template-columns:70px 1fr auto;gap:12px;align-items:center;padding:9px;border:1px solid #ddd;border-radius:9px;background:#fff}.dmg-admin-item img{width:70px;height:52px;object-fit:cover;border-radius:6px}.dmg-editor textarea{width:100%;max-width:800px}
@media(max-width:700px){.dmg-wrap{padding:16px}.dmg-stage{aspect-ratio:4/3}.dmg-arrow{width:38px;height:38px}.dmg-thumb{flex-basis:72px;height:52px}}

/* v1.3.0 plugin-owned gallery presentation */
.dmg-wrap{box-sizing:border-box;width:100%;max-width:100%;min-width:0;margin:0 0 16px;padding:0;border:0;background:transparent}
.dmg-stage{height:var(--dmg-stage-h,500px)!important;aspect-ratio:auto!important;border-radius:var(--dmg-radius,14px)!important}
.dmg-image img,.dmg-video>img{object-fit:var(--dmg-fit,contain)!important}
.dmg-thumb{flex-basis:var(--dmg-thumb-w,82px)!important;width:var(--dmg-thumb-w,82px)!important;height:var(--dmg-thumb-h,58px)!important}
@media(max-width:700px){.dmg-stage{height:var(--dmg-mobile-h,300px)!important;aspect-ratio:auto!important}}

/* v1.4.2: compact property-only gallery. Directory gallery settings are unchanged. */
.dmg-wrap.dmg-property-gallery .dmg-stage{height:clamp(250px,32vw,440px)!important;max-height:440px!important;background:#f0f3f8!important}
.dmg-wrap.dmg-property-gallery .dmg-image{background:#f0f3f8!important}
.dmg-wrap.dmg-property-gallery .dmg-image img,.dmg-wrap.dmg-property-gallery .dmg-video>img{object-fit:contain!important}
.dmg-wrap.dmg-property-gallery .dmg-head{margin-bottom:10px}
.dmg-wrap.dmg-property-gallery .dmg-thumbs{padding-top:8px}
@media(max-width:700px){.dmg-wrap.dmg-property-gallery .dmg-stage{height:clamp(210px,65vw,310px)!important;max-height:310px!important}.dmg-wrap.dmg-property-gallery .dmg-thumb{flex-basis:66px!important;width:66px!important;height:48px!important}}
