.dm-ad { position:relative; flex-shrink:0; }
.dm-v3 .dm-ad a,.dm-v3 .dm-ad a:hover,
.dm-work-root.dm-v3-shell .dm-v3 .dm-ad[data-ad-slot] a,
.dm-work-root.dm-v3-shell .dm-v3 .dm-ad[data-ad-slot] a:hover { color:var(--text-secondary); text-decoration:none; }
.dm-ad a:focus-visible,.dm-ad-control:focus-visible,.dm-ad-popup :focus-visible { outline:2px solid var(--focus-visible, #416dff); outline-offset:2px; }
.dm-ad-control { display:flex; align-items:center; justify-content:center; width:24px; height:24px; padding:0; border:0; border-radius:8px; color:var(--text-secondary); background:var(--surface-panel); box-shadow:var(--shadow-xs); cursor:pointer; transition:background-color 150ms,color 150ms; flex-shrink:0; }
.dm-ad-control:hover { background:var(--surface-hover); color:var(--text-primary); }
.dm-ad-card-link { display:block; overflow:hidden; border-radius:inherit; }
.dm-ad-image { width:100%; height:100%; position:relative; overflow:hidden; }
.dm-ad-image img { display:block; width:100%; height:100%; -o-object-fit:cover; object-fit:cover; -o-object-position:center; object-position:center; }
.dm-ad-skeleton { position:absolute; inset:0; background:var(--skeleton-base, #f2f3f5); }
.dm-ad-sidebar_banner { width:248px; height:96px; margin:0 12px 12px; border-radius:8px; }
.dm-ad-sidebar_banner .dm-ad-card-link,.dm-ad-membership_banner .dm-ad-card-link { height:100%; }
.dm-ad-sidebar_banner > .dm-ad-control { position:absolute; top:4px; right:4px; }
/* Membership v4Stack already supplies a 24px gap: offset by 8px to yield 16px. */
.dm-ad-membership_banner { width:100%; height:88px; margin-top:-8px; border-radius:12px; }
.dm-ad-membership_banner > .dm-ad-control { position:absolute; top:6px; right:6px; }
.dm-v3-home.dm-ad-home { display:flex; flex-direction:column; justify-content:flex-start; padding:0; position:relative; }
.dm-ad-home > .dm-v3-home-content { margin:0 auto; padding:clamp(0px,calc(14vh - 120px),32px) 32px 120px; max-width:914px; }
.dm-ad-home-title { height:96px; min-height:96px; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; }
.dm-ad-home-title .dm-ad-home_title_pill { margin-bottom:12px; }
.dm-ad-home_title_pill { height:28px; max-width:min(360px,100%); border-radius:999px; background:var(--surface-selected); }
.dm-ad-home_title_pill a { display:flex; align-items:center; gap:4px; height:28px; padding:0 6px 0 12px; font-size:12px; font-weight:500; }
.dm-v3 .dm-ad-home_title_pill a:hover,.dm-v3 .dm-ad-home_topbar_pill a:hover,
.dm-work-root.dm-v3-shell .dm-v3 .dm-ad-home_title_pill[data-ad-slot] a:hover,
.dm-work-root.dm-v3-shell .dm-v3 .dm-ad-home_topbar_pill[data-ad-slot] a:hover { color:var(--text-primary); }
.dm-ad-home_title_pill span,.dm-ad-home_topbar_pill span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dm-ad-home_title_pill svg,.dm-ad-home_topbar_pill svg { flex-shrink:0; }
.dm-ad-topbar { height:64px; min-height:64px; display:flex; align-items:center; justify-content:center; padding:0 24px; }
.dm-ad-home_topbar_pill { display:flex; align-items:center; gap:2px; height:32px; max-width:min(480px,100%); padding:0 4px 0 12px; border-radius:999px; background:var(--surface-selected); }
.dm-ad-home_topbar_pill a { display:flex; align-items:center; min-width:0; height:32px; font-size:13px; font-weight:400; }
.dm-ad-home_topbar_pill a > svg { color:var(--text-muted); }
.dm-ad-home_topbar_pill span { padding:0 6px; }
.dm-ad-home_topbar_pill .dm-ad-control { border-radius:50%; background:transparent; box-shadow:none; color:var(--text-muted); }
.dm-ad-home_topbar_pill .dm-ad-control:hover { background:var(--surface-hover); color:var(--text-primary); }
.dm-ad-dock { position:fixed; right:24px; bottom:24px; z-index:100; display:flex; flex-direction:column; align-items:flex-end; gap:12px; }
.dm-ad-round { width:44px; height:44px; border-radius:50%; border:1px solid var(--border-hairline); background:var(--surface-raised); box-shadow:var(--shadow-dropdown); }
.dm-ad-home_float { width:220px; background:var(--surface-raised); border:1px solid var(--border-hairline); border-radius:12px; box-shadow:var(--shadow-dropdown); animation:dm-ad-in 200ms var(--ease-enter, ease); }
.dm-ad-home_float .dm-ad-image { height:124px; }
.dm-ad-home_float > .dm-ad-control { position:absolute; top:6px; right:6px; }
.dm-ad-float-copy { display:flex; flex-direction:column; gap:2px; padding:10px 12px 12px; }
.dm-ad-float-copy strong,.dm-ad-float-copy span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dm-ad-float-copy strong { font-size:13px; font-weight:600; color:var(--text-primary); }
.dm-ad-float-copy span { font-size:12px; font-weight:400; color:var(--text-secondary); }
.dm-ad-float-collapsed { animation:dm-ad-in 200ms var(--ease-enter, ease); }
.dm-ad-overlay { position:fixed; inset:0; z-index:800; background:var(--surface-scrim,rgba(0,0,0,.45)); display:flex; align-items:center; justify-content:center; padding:16px; animation:dm-ad-in 200ms var(--ease-enter,ease); }
.dm-ad-popup { width:400px; max-width:100%; max-height:calc(100dvh - 32px); overflow-y:auto; border-radius:12px; background:var(--surface-panel); box-shadow:var(--shadow-modal); }
.dm-ad-popup-image { width:100%; aspect-ratio:400 / 176; position:relative; }
.dm-ad-popup-image > .dm-ad-control { position:absolute; right:8px; top:8px; width:28px; height:28px; }
.dm-ad-popup-copy { padding:16px 20px 20px; display:flex; flex-direction:column; gap:10px; }
.dm-ad-popup-copy h2 { font-size:16px; font-weight:600; margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dm-ad-popup-copy p { font-size:14px; font-weight:400; line-height:1.6; color:var(--text-secondary); margin:0; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.dm-ad-popup-copy label { display:flex; align-items:center; justify-content:center; gap:8px; font-size:12px; color:var(--text-muted); cursor:pointer; }
.dm-ad-popup .dm-ad-cta { display:flex; align-items:center; justify-content:center; width:100%; height:40px; border-radius:8px; background:var(--action-primary); color:var(--text-on-action); text-decoration:none; font-size:14px; font-weight:500; transition:background-color 150ms; }
.dm-ad-popup .dm-ad-cta:hover { background:var(--action-hover); color:var(--text-on-action); }
.dm-ad-exiting { animation:dm-ad-out 200ms var(--ease-exit,ease) forwards; }
@keyframes dm-ad-in { from { opacity:0 } to { opacity:1 } }
@keyframes dm-ad-out { from { opacity:1 } to { opacity:0 } }
@media(max-height:719px) { .dm-ad-sidebar_banner { display:none; } }
@media(max-width:760px) { .dm-ad-home > .dm-v3-home-content { padding-left:16px; padding-right:16px; } }
@media(prefers-reduced-motion:reduce) { .dm-ad-overlay,.dm-ad-home_float,.dm-ad-float-collapsed,.dm-ad-exiting { animation:none; } .dm-ad-exiting { opacity:0; } .dm-ad *,.dm-ad-popup * { animation:none!important; transition:none!important; } }

