#sertop-contest-popup {
    --sertop-popup-ready: 1;
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    margin: auto;
    padding: 0;
    border: 0;
    width: min(540px, calc(100vw - 32px), calc((100vh - 104px) * .8));
    width: min(540px, calc(100vw - 32px), calc((100dvh - 104px) * .8));
    max-width: none;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow: auto;
    background: #fff;
    color: #191919;
    border-radius: 12px;
    box-shadow: 0 16px 64px #0006;
    overscroll-behavior: contain;
}
#sertop-contest-popup:not([open]) { display: none !important; }
#sertop-contest-popup::backdrop { background: rgb(0 0 0 / 65%); }
#sertop-contest-popup .sertop-popup-toolbar {
    display: flex;
    justify-content: flex-end;
    padding: 4px 8px;
    background: #fff;
}
#sertop-contest-popup .sertop-popup-close {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    min-width: 48px;
    margin: 0;
    padding: 8px 12px;
    border: 0;
    border-radius: 6px;
    background: #fff;
    color: #191919;
    font: 600 16px/1.25 system-ui, sans-serif;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
    touch-action: manipulation;
}
#sertop-contest-popup .sertop-popup-close span { font: 32px/1 system-ui, sans-serif;margin-top: -5px; }
#sertop-contest-popup .sertop-popup-close:hover { background: #eee; }
#sertop-contest-popup .sertop-popup-link { display: block; margin: 0; padding: 0; line-height: 0; }
#sertop-contest-popup .sertop-popup-link img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
}
#sertop-contest-popup :focus-visible { outline: 3px solid #29215e; outline-offset: -4px; }
@media (prefers-reduced-motion: no-preference) {
    #sertop-contest-popup[open] { animation: sertop-popup-in 180ms ease-out; }
    @keyframes sertop-popup-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
}
