.oep-download-layout {
    container-type: inline-size;
    width: min(calc(100% - 24px), 1120px);
    margin: 0 auto 16px;
}

.oep-download-grid {
    display: grid;
    justify-items: center;
    gap: 12px;
}

.oep-download-ad {
    box-sizing: border-box;
    display: grid;
    align-content: center;
    justify-items: center;
    width: min(100%, 320px);
    aspect-ratio: 320 / 100;
    padding: 6px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    color: #475569;
    font: 600 .75rem/1.25 system-ui, sans-serif;
    text-align: center;
}

.oep-download-ad[data-ad-slot="download-left"],
.oep-download-ad[data-ad-slot="download-right"] {
    display: none;
}

@container (min-width: 48rem) {
    .oep-download-grid {
        grid-template-columns: 160px minmax(0, 1fr) 160px;
        align-items: start;
    }

    .oep-download-ad[data-ad-slot="download-left"],
    .oep-download-ad[data-ad-slot="download-right"] {
        display: grid;
        width: 160px;
        aspect-ratio: 160 / 600;
    }

    .oep-download-ad[data-ad-slot="download-mobile"] { display: none; }
}

#oep-download-panel {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: clamp(64px, 16%, 136px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(10px, 2vw, 22px);
    width: min(100%, 760px);
    margin: 0;
    padding: clamp(12px, 2.6vw, 24px);
    border: 1px solid #fed7aa;
    border-radius: 18px;
    background: linear-gradient(125deg, #fff7ed, #fff 46%);
    color: #0f172a;
    box-shadow: 0 8px 24px rgb(15 23 42 / 9%);
    scroll-margin-block-start: var(--oep-download-scroll-margin, 88px);
    text-align: start;
}

.oep-download-fox {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

#oep-download-title {
    margin: 0;
    font-size: clamp(1rem, 2.8vw, 1.3rem);
    font-weight: 800;
    line-height: 1.25;
}

.oep-download-instructions {
    margin: 6px 0 12px;
    color: #475569;
    font-size: .875rem;
    line-height: 1.4;
}

.oep-download-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    align-items: center;
}

.oep-download-actions :is(a, button) {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 6px 11px;
    border: 1px solid transparent;
    border-radius: 10px;
    font: inherit;
    font-size: .8rem;
    font-weight: 750;
    line-height: 1.25;
    white-space: normal;
    cursor: pointer;
}

#oep-download-panel .oep-download-sponsor {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #9a3412;
    text-decoration: underline;
}

.oep-download-file {
    background: #b91c1c;
    color: #fff;
}

.oep-download-file:disabled {
    background: #e2e8f0;
    color: #475569;
    cursor: default;
}

.oep-download-cancel {
    background: transparent;
    color: #475569;
}

.oep-download-count {
    min-width: 3em;
    padding: 5px 8px;
    border-radius: 1em;
    background: #ffedd5;
    color: #9a3412;
    font-size: .8rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.oep-download-status {
    display: block;
    margin-top: 8px;
    color: #334155;
    font-size: .8rem;
}

.oep-download-status:empty { margin: 0; }

#app-main { --oep-download-scroll-margin: 168px; }

@media (max-width: 760px) {
    #app-main { --oep-download-scroll-margin: 194px; }
}
