dialog.yc-gambling-notice {
    position: fixed;
    inset: 0;
    z-index: 10001;
    margin: auto;
    /* La media de los dos lados da al gráfico de 408:288 al menos el 15 % del área. */
    width: min(calc(24vw + 24vh), 96vw, 112vh);
    width: min(calc(24vw + 24dvh), 96vw, 112dvh);
    height: fit-content;
    max-width: none;
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    background: white;
    color: #141414;
}
.yc-gambling-notice:not([open]) { display: none; }
.yc-gambling-notice::backdrop { background: rgb(0 0 0 / 62%); }
.yc-gambling-notice form {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin: 0;
}
dialog.yc-gambling-notice button {
    display: block;
    padding: 4px 12px;
    min-height: 32px;
    border: 1px solid #222;
    background: white;
    color: black;
    font: 600 15px/1.3 system-ui, sans-serif;
    cursor: pointer;
}
.yc-gambling-notice a, .yc-gambling-notice img {
    display: block;
    width: 100%;
    height: auto;
}
.yc-warning-portal:focus-visible, .yc-warning-banda:focus-visible,
.yc-gambling-notice button:focus-visible { outline: 3px solid #2780dc; outline-offset: -3px; }

/* Reserva tres partes por cada diecisiete de creatividad, incluso si cambia de altura.
   La última fila conserva además la proporción nativa del gráfico sin recortarlo. */
.yc-ad-unit {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 17fr) minmax(0, 3fr) auto;
    min-width: 0;
}
.yc-ad-unit::after {
    content: "";
    grid-area: 3 / 1;
    aspect-ratio: 2424 / 474;
    pointer-events: none;
}
.yc-ad-unit > .yc-warning-banda {
    grid-area: 2 / 1 / 4;
    display: grid;
    align-content: center;
    contain: size;
    background: white;
}
.yc-ad-unit > a.yc-warning-banda > img {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    max-height: none;
    object-fit: contain;
    padding: 0;
    border-radius: 0;
}

body:has(#yc-cookies:not([hidden])) #campaign-popup,
body:has(.yc-gambling-notice[open]) #campaign-popup { visibility: hidden; }
