.site-ad-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000001;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 24px;
  background: rgba(8, 21, 37, .68);
  backdrop-filter: blur(5px);
}
.site-ad-overlay[hidden],
.site-ad-slide[hidden],
.site-ad-controls[hidden] { display: none; }
.site-ad-open { overflow: hidden; }
.site-ad-card {
  display: flex;
  width: min(720px, calc(100vw - 48px), calc(94vh - 210px));
  height: auto;
  max-height: calc(100vh - 48px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(0,0,0,.36);
  color: #17364b;
  font-family: 'Outfit',sans-serif;
  animation: site-ad-enter .22s ease-out;
}
.site-ad-progress-track {
  height: 4px;
  flex: 0 0 4px;
  overflow: hidden;
  background: #dbeafe;
}
.site-ad-progress {
  display: block;
  width: 100%;
  height: 100%;
  background: #2563eb;
  transform: scaleX(0);
  transform-origin: left center;
}
.site-ad-progress.is-running {
  animation: site-ad-progress-fill var(--site-ad-dismiss-duration, 5s) linear forwards;
}
.site-ad-carousel-topline {
  display: flex;
  flex: 0 0 auto;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px 9px 18px;
  border-bottom: 1px solid #e8eef4;
  background: linear-gradient(110deg,#f8fbff,#fff);
}
.site-ad-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #526e82;
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.site-ad-label span { color: #c4994e; font-size: 1rem; }
.site-ad-header-actions { display: flex; align-items: center; gap: 8px; }
.site-ad-skip {
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: transparent;
  color: #718394;
  font: inherit;
  font-size: .74rem;
  cursor: pointer;
}
.site-ad-skip:hover { background: #eef4f7; color: #17364b; }
.site-ad-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #e0e8ee;
  border-radius: 50%;
  background: #fff;
  color: #526e82;
  cursor: pointer;
}
.site-ad-close:hover { background: #f0f5f8; color: #17364b; }
.site-ad-close svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.site-ad-skip:focus-visible,
.site-ad-close:focus-visible,
.site-ad-controls button:focus-visible,
.site-ad-button:focus-visible { outline: 3px solid rgba(47,122,229,.36); outline-offset: 3px; }
.site-ad-slides {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
}
.site-ad-slide {
  display: flex;
  height: auto;
  flex-direction: column;
}
.site-ad-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
}
.site-ad-content h2 {
  flex: 1;
  margin: 0;
  color: #17364b;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.site-ad-image-frame {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  overflow: hidden;
  background: #eaf0f5;
}
.site-ad-image-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.site-ad-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 10px;
  padding: 10px 16px;
  background: linear-gradient(110deg,#123e53,#17636c);
  color: #fff;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  transition: filter .18s, transform .18s;
}
.site-ad-button:hover { filter: brightness(1.1); transform: translateY(-1px); }
.site-ad-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.site-ad-controls {
  display: flex;
  flex: 0 0 auto;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 15px;
  border-top: 1px solid #edf1f5;
  color: #718394;
  font-size: .76rem;
  font-weight: 700;
}
.site-ad-controls button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #dfe7ef;
  border-radius: 50%;
  background: #fff;
  color: #315a70;
  cursor: pointer;
}
.site-ad-controls button:hover { border-color: #9eb8ca; background: #f3f8fb; }
.site-ad-controls svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@keyframes site-ad-enter {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes site-ad-progress-fill {
  to { transform: scaleX(1); }
}
@media (max-width: 600px) {
  .site-ad-overlay {
    place-items: start center;
    padding: max(12px, env(safe-area-inset-top)) 10px 12px;
  }
  .site-ad-card {
    width: min(calc(100vw - 20px), calc(94vh - 220px));
    max-height: calc(100vh - 24px);
    border-radius: 18px;
  }
  .site-ad-carousel-topline { min-height: 48px; gap: 6px; padding: 7px 10px 7px 13px; }
  .site-ad-header-actions { gap: 3px; }
  .site-ad-skip { padding: 7px 6px; font-size: .69rem; }
  .site-ad-close { width: 32px; height: 32px; }
  .site-ad-content { gap: 8px; padding: 12px; }
  .site-ad-content h2 { min-width: 0; font-size: 1.05rem; }
  .site-ad-button { min-height: 40px; padding: 8px 10px; font-size: .76rem; }
  .site-ad-controls { min-height: 46px; }
}
@media (max-width: 360px) {
  .site-ad-overlay { padding: 8px; }
  .site-ad-card { width: min(calc(100vw - 16px), calc(95vh - 220px)); max-height: calc(100vh - 16px); }
  .site-ad-label { font-size: .68rem; }
  .site-ad-skip { max-width: 128px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-ad-card { animation: none; }
  .site-ad-button { transition: none; }
}
