.ad-mask {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(8, 18, 40, .55);
    backdrop-filter: blur(4px);
}
.ad-mask.is-show { display: flex; }
.ad-dialog {
    position: relative;
    width: min(420px, 100%);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(10, 40, 90, .35);
    border: 1px solid rgba(255,255,255,.65);
    background:
        linear-gradient(180deg, rgba(255,255,255,.88) 0%, rgba(236,245,255,.78) 42%, rgba(220,238,255,.55) 100%),
        url('/static/dh/images/popup-ad-bg.png?v=1') center bottom / cover no-repeat #e8f3ff;
    color: #163f74;
    animation: adPop .28s ease;
}
@keyframes adPop {
    from { opacity: 0; transform: translateY(12px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.ad-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.72);
    color: #5a6b84;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.ad-close:hover { background: #fff; color: #163f74; }
.ad-body {
    padding: 34px 28px 22px;
    text-align: center;
}
.ad-badge {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(240, 180, 41, .18);
    border: 1px solid rgba(240, 180, 41, .4);
    color: #b8860b;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 14px;
}
.ad-title {
    font-size: 24px;
    font-weight: 900;
    color: #102a56;
    margin-bottom: 12px;
    line-height: 1.35;
}
.ad-content {
    font-size: 14px;
    line-height: 1.85;
    color: #4a607c;
    white-space: pre-wrap;
    margin-bottom: 22px;
    min-height: 72px;
}
.ad-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}
.ad-btn {
    min-width: 148px;
    height: 44px;
    padding: 0 22px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffb34d, #f08a1a);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(240, 138, 26, .28);
}
.ad-btn:hover { filter: brightness(1.05); }
.ad-mute {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6b7c93;
    cursor: pointer;
    user-select: none;
}
.ad-mute input {
    width: 15px;
    height: 15px;
    accent-color: #1f6fd6;
}
@media (max-width: 480px) {
    .ad-body { padding: 30px 18px 18px; }
    .ad-title { font-size: 20px; }
    .ad-dialog { border-radius: 18px; }
}
