/* 상단 배너 (헤더 중앙 3등분, 화면 너비를 최대한 활용) */
.header-ad-banners {
  display: flex;
  gap: 2px;
  flex: 1;
  margin: 0 12px;
  align-items: center;
  min-width: 0;
}
.header-ad-banners a {
  flex: 1 1 0;
  display: block;
  border-radius: 4px;
  overflow: hidden;
  height: 50px;
  min-width: 0;
  background: #f3f5f7;
}
.header-ad-banners img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 하단 플로팅 배너 (4슬롯, 화면 너비 4등분, 간격 최소화) */
.footer-ad-floating {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(255,255,255,.97);
  border-top: 1px solid #d7dee6;
  box-shadow: 0 -4px 16px rgba(0,0,0,.08);
  display: flex;
  gap: 2px;
  padding: 6px 36px 6px 6px;
  align-items: center;
}
.footer-ad-floating a {
  flex: 1 1 0;
  display: block;
  border-radius: 4px;
  overflow: hidden;
  height: 70px;
  min-width: 0;
  background: #f3f5f7;
}
.footer-ad-floating img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.footer-ad-close {
  position: absolute;
  top: 4px;
  right: 10px;
  background: rgba(0,0,0,.4);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: .7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 중앙 팝업 */
.center-popup-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 10000;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
}
.center-popup-box {
  background: #fff;
  border-radius: 16px;
  max-width: 480px;
  width: 90%;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.center-popup-box img {
  width: 100%;
  display: block;
}
.center-popup-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  font-size: .85rem;
}
.center-popup-controls label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #55626a;
  cursor: pointer;
}
.center-popup-controls button {
  padding: 6px 20px;
  border-radius: 999px;
  border: 1px solid #ccc;
  background: #fff;
  font: inherit;
  cursor: pointer;
}
.center-popup-controls button:hover {
  background: #f5f5f5;
}

@media (max-width: 768px) {
  .header-ad-banners { margin: 0 6px; gap: 1px; }
  .header-ad-banners a { height: 36px; }
  .footer-ad-floating { padding: 4px 28px 4px 4px; }
  .footer-ad-floating a { height: 50px; }
}
