.banner-preview-slot {
    position: relative;
    width: min(100%, 1100px);
    margin: 30px auto;
    padding: 0 6px;
    box-sizing: border-box;
}

.banner-preview-caption {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 2px 7px;
    color: #94a3b8;
    font-size: 9px;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    text-align: center;
    pointer-events: none;
    z-index: 2;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.45);
}

body.light-theme .banner-preview-caption {
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.65);
}

.banner-preview-frame {
    width: min(100%, 728px);
    min-height: 90px;
    aspect-ratio: 728 / 90;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
    border-radius: 18px;
    border: 1px dashed rgba(148, 163, 184, 0.45);
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.74));
    box-shadow: 0 16px 36px rgba(2, 6, 23, 0.18);
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

body.light-theme .banner-preview-frame {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94));
    border-color: rgba(148, 163, 184, 0.55);
    box-shadow: 0 14px 28px rgba(148, 163, 184, 0.16);
}

.banner-preview-label {
    align-self: flex-start;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.15);
    color: #cbd5f5;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}

body.light-theme .banner-preview-label {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.banner-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: inherit;
    display: block;
    background: rgba(2, 6, 23, 0.12);
    transition: opacity 0.28s ease;
}

.banner-preview-image.is-swapping {
    opacity: 0.3;
}

.banner-preview-empty {
    width: 100%;
    flex: 1;
    border-radius: 12px;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    background: rgba(2, 6, 23, 0.08);
    color: var(--muted-1);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 14px;
    font-size: 0.95rem;
    line-height: 1.45;
}

body.light-theme .banner-preview-empty {
    color: var(--muted-3);
    background: rgba(148, 163, 184, 0.08);
}

.banner-preview-empty code {
    font-size: 0.92em;
}

@media (max-width: 820px) {
    .banner-preview-frame {
        width: min(100%, 468px);
        min-height: 60px;
        aspect-ratio: 468 / 60;
    }
}

@media (max-width: 540px) {
    .banner-preview-slot {
        padding: 0;
    }

    .banner-preview-caption {
        font-size: 8px;
    }

    .banner-preview-frame {
        width: min(100%, 320px);
        min-height: 100px;
        aspect-ratio: 320 / 100;
    }

    .banner-preview-label {
        font-size: 0.65rem;
    }
}
