.post-ad {
    --post-ad-label-bg: #fff;
    --post-ad-border: rgba(0, 0, 0, .1);
    --post-ad-label-color: rgba(0, 0, 0, .36);
    box-sizing: border-box;
    position: relative;
    margin: 2.5rem 0;
    padding: 1.5rem 1rem 1rem;
    min-height: 120px;
    border: 1px solid var(--post-ad-border);
    border-radius: 4px;
    text-align: center;
}

.post-ad::before {
    content: attr(data-label);
    position: absolute;
    top: -10px;
    left: 50%;
    padding: 0 10px;
    background: var(--post-ad-label-bg);
    color: var(--post-ad-label-color);
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .1em;
    transform: translateX(-50%);
}

.post-ad .adsbygoogle {
    display: block;
    width: 100%;
    min-height: 90px;
}

/* 广告位内部清零，避免主题的全局 iframe 样式（margin-bottom 等）干扰 */
.post-ad .adsbygoogle,
.post-ad iframe {
    margin: 0 !important;
}

html.theme-dark .post-ad,
body.theme-dark .post-ad {
    --post-ad-label-bg: #1a1a1a;
    --post-ad-border: rgba(255, 255, 255, .15);
    --post-ad-label-color: rgba(255, 255, 255, .42);
}

@media screen and (max-width: 767px) {
    .post-ad {
        /* 去掉左右内边距，把完整宽度留给广告 */
        margin: 1.75rem 0 1.35rem;
        padding: 1.25rem 0 .75rem;
        min-height: 110px;
    }
}
