/* Anuncio antes de descargar o copiar (js/anuncio.js): <dialog> nativo, pantalla 16:9 tipo reproductor, barra de progreso y pie con las acciones.
   Sin blur ni sombras grandes: tiene que abrir fluido aunque el navegador dibuje sin GPU. */
.anuncio { width: min(100% - 32px, 640px); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--fg); overflow: auto; overscroll-behavior: contain; }
.anuncio::backdrop { background: rgb(0 0 0 / .72); overflow: hidden; overscroll-behavior: contain; }
/* Sin overflow: hidden a propósito: así el 16:9 crece si el aviso no entra (celu angosto) en vez de cortarlo */
.anuncio-pantalla { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; background: #0A0C10; color: #E8ECF2; }
.anuncio-pantalla > :is(video, iframe, ins) { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.anuncio-pantalla > ins[data-ad-status="unfilled"] { display: none; } /* sin anuncio de la red: queda el aviso propio */
.anuncio-chip { position: absolute; left: 10px; top: 10px; padding: 3px 8px; border-radius: 6px; background: rgb(0 0 0 / .65); font: 600 .7rem var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.anuncio-casa { display: grid; justify-items: center; gap: 8px; padding: 24px; text-align: center; }
.anuncio-casa img { width: 56px; height: 56px; }
.anuncio-casa b { font: 700 1.3rem var(--display); }
.anuncio-casa p { max-width: 40ch; color: #A9B4C0; font-size: .92rem; }
.anuncio-casa a { color: #E8ECF2; font-weight: 600; text-underline-offset: 3px; }
.anuncio-barra { height: 4px; background: var(--line); }
.anuncio-barra i { display: block; height: 100%; background: var(--op); transform-origin: 0 50%; transform: scaleX(0); }
.anuncio-pie { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 10px; padding: 16px; }
.anuncio-pie > div { flex: 1 1 240px; display: grid; gap: 2px; }
.anuncio-pie h2 { font-size: 1.05rem; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.anuncio-pie h2 b { color: var(--op); }
.anuncio-pie p { color: var(--muted); font-size: .88rem; }
.anuncio-pie .btn { min-height: 44px; justify-content: center; }
@media (max-width: 480px) {
  .anuncio-casa { padding: 40px 16px 16px; } /* arriba deja lugar al chip de Publicidad */
  .anuncio-pie > div { flex-basis: 100%; }
  .anuncio-pie .btn { flex: 1 1 0; padding-inline: 12px; }
}
@media (prefers-reduced-motion: no-preference) {
  .anuncio[open] { animation: sube .3s cubic-bezier(.22, 1, .36, 1); }
  .anuncio-barra i { transition: transform .2s linear; }
}
.anuncio.muro .anuncio-barra { display: none; }
