.dac{box-sizing:border-box}
.dac *,.dac *::before,.dac *::after{box-sizing:inherit}
.dac[hidden]{display:none!important}
.dac-ad{display:block;line-height:0;text-decoration:none}
.dac-ad img{display:block;width:100%;height:auto;border:0;max-width:100%}

.dac-grid{display:grid;gap:0;grid-template-columns:repeat(var(--dac-cols,2),minmax(0,1fr));width:100%;margin:12px auto}
#dac-banner_homepage,#dac-homepage_banners,#dac-banner_special{padding:0 10vw}
.dac-grid .dac-ad{grid-column:span var(--dac-cs,1);grid-row:span var(--dac-rs,1)}
/* Banners of slightly different shapes share one box (the section's most common ratio) so every tile is equal. */
.dac-grid .dac-eq{aspect-ratio:var(--dac-ratio)}
.dac-grid .dac-eq img{height:100%;object-fit:var(--dac-fit,fill)}
/* A banner about twice as tall as the usual one takes two rows, and "dense" lets the next banners fill the space beside it. */
.dac-grid{grid-auto-flow:row dense}
.dac-grid .dac-tall{grid-row:span 2;align-self:stretch}
.dac-grid .dac-tall img{height:100%;object-fit:var(--dac-fit,fill)}
@media (max-width:767px){
  .dac-grid{grid-template-columns:repeat(var(--dac-cols-m,1),minmax(0,1fr))}
  .dac-grid .dac-ad{grid-column:auto;grid-row:auto}
}

.dac-float{position:fixed;z-index:99990;max-width:100vw;max-height:100vh;overflow:visible}
.dac-float-inner{display:flex;flex-direction:column;gap:0;max-height:100vh;overflow:hidden}
.dac-float .dac-ad img{width:auto;max-width:100%;max-height:100vh;height:auto}
.dac-pos-tl{top:0;left:0}
.dac-pos-tc{top:0;left:50%;transform:translateX(-50%)}
.dac-pos-tr{top:0;right:0}
.dac-pos-ml{top:50%;left:0;transform:translateY(-50%)}
.dac-pos-mc{top:50%;left:50%;transform:translate(-50%,-50%);box-shadow:0 10px 40px rgba(0,0,0,.5)}
.dac-pos-mr{top:50%;right:0;transform:translateY(-50%)}
.dac-pos-bl{bottom:0;left:0}
.dac-pos-bc{bottom:0;left:50%;transform:translateX(-50%)}
.dac-pos-br{bottom:0;right:0}
@media (max-width:767px){
  /* Side floats stay visible on phones, but never wider than a third of the screen so the page stays readable. */
  .dac-pos-ml,.dac-pos-mr{max-width:15vw}
  .dac-pos-mc{max-width:92vw}
  /* Floats along the top or bottom edge use the full width of the phone, and their banners stretch to fit it. */
  .dac-pos-tl,.dac-pos-tc,.dac-pos-tr,.dac-pos-bl,.dac-pos-bc,.dac-pos-br{left:0;right:0;width:100%;transform:none}
  .dac-pos-tl .dac-ad img,.dac-pos-tc .dac-ad img,.dac-pos-tr .dac-ad img,
  .dac-pos-bl .dac-ad img,.dac-pos-bc .dac-ad img,.dac-pos-br .dac-ad img{width:100%}
}
.dac-close{position:absolute;top:0;right:0;z-index:2;width:30px;height:30px;padding:0;margin:0;border:0;border-radius:0;
  background:rgba(0,0,0,.72);color:#fff;font:700 20px/30px Arial,sans-serif;text-align:center;cursor:pointer}
.dac-close:hover{background:#000}
