/* ads_banner — placard 표준형 위 배너 전용 additive CSS */

/* ── 목록: 빠른보기·모달 ── */
.pl-wrap .bn-card-imgbtn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: zoom-in;
  background: repeating-conic-gradient(#f2f4f8 0% 25%, #e9edf3 0% 50%) 50% / 22px 22px;
  position: relative;
}
.pl-wrap .bn-card-imgbtn img {
  object-fit: contain;
  background: transparent;
}
.pl-wrap .bn-quick {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(15, 23, 42, .46);
  color: #fff;
  font-weight: 700;
  opacity: 0;
  transition: opacity .18s;
  pointer-events: none;
}
.pl-wrap .bn-card-imgbtn:hover .bn-quick,
.pl-wrap .bn-card-imgbtn:focus-visible .bn-quick {
  opacity: 1;
}
.pl-wrap .bn-card-img-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 120px;
  color: #fff;
  font-size: var(--fs-sm, 15px);
  font-weight: 600;
}
.pl-wrap .bn-card-img-ph i {
  font-size: 28px;
}

.bn-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.bn-modal[hidden] { display: none; }
.bn-modal-ov {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 30, .62);
  backdrop-filter: blur(2px);
}
.bn-modal-box {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 16px;
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .4);
  animation: bnPop .18s ease;
}
@keyframes bnPop {
  from { transform: translateY(14px) scale(.98); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.bn-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: rgba(15, 23, 42, .55);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bn-modal-img {
  width: 100%;
  background: repeating-conic-gradient(#f2f4f8 0% 25%, #e9edf3 0% 50%) 50% / 22px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px 16px 0 0;
  min-height: 200px;
  max-height: 54vh;
  overflow: hidden;
}
.bn-modal-img img {
  max-width: 100%;
  max-height: 54vh;
  object-fit: contain;
  display: block;
}
.bn-modal-body { padding: 20px 24px 24px; }
.bn-modal-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.bn-modal-badges span {
  font-size: var(--fs-xs, 14px);
  font-weight: 700;
  border-radius: 99px;
  padding: 3px 11px;
}
.bn-b-active { background: #dcfce7; color: #15803d; }
.bn-b-upcoming { background: #fef3c7; color: #b45309; }
.bn-b-ended { background: #eef0f4; color: #64748b; }
.bn-b-type { background: #eef0ff; color: #4338ca; }
.bn-b-theme { background: #eff6ff; color: #1d4ed8; }
.bn-modal-title {
  font-size: var(--fs-xl, 20px);
  font-weight: 800;
  color: #161a26;
  margin: 2px 0 6px;
  line-height: 1.35;
}
.bn-modal-org {
  color: #5b6270;
  font-size: var(--fs-sm, 15px);
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
}
.bn-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: #5b6270;
  font-size: var(--fs-sm, 15px);
  margin-bottom: 14px;
}
.bn-modal-meta i { color: #9aa0ab; width: 15px; text-align: center; }
.bn-modal-desc {
  color: #3c424f;
  font-size: var(--fs-sm, 15px);
  line-height: 1.65;
  white-space: pre-line;
  border-top: 1px solid #eef0f4;
  padding-top: 14px;
  margin-bottom: 18px;
  max-height: 240px;
  overflow: auto;
}
.bn-modal-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.bn-modal-acts a {
  flex: 1 1 auto;
  text-align: center;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  min-width: 140px;
}
.bn-act-link { background: #10b981; color: #fff; }
.bn-act-detail { background: #6366f1; color: #fff; }

/* ── 목록: CTA ── */
.bn-promote-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #eef0ff, #f6f7ff);
  border: 1px solid #d9ddff;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 0 0 16px;
}

/* ── 폼: 배너 유형 라디오 ── */
.bn-type-grid { display: flex; flex-direction: column; gap: 8px; }
.bn-type-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.bn-type-item:has(input:checked) {
  border-color: var(--pub-accent, #1a73e8);
  background: #eff6ff;
}
.bn-type-item input[type=radio] {
  margin-top: 2px;
  accent-color: var(--pub-accent, #1a73e8);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.bn-type-info { display: flex; flex-direction: column; gap: 2px; }
.bn-type-label { font-size: var(--fs-sm, 15px); font-weight: 600; color: #1e293b; }
.bn-type-desc { font-size: var(--fs-sm, 15px); color: #64748b; line-height: 1.45; }
.bn-type-desc.is-slot-match { color: #047857; font-weight: 600; }
.bn-type-desc.is-slot-mismatch { color: #94a3b8; }
.bn-type-item.is-linked {
  border-color: #6366f1;
  background: #eef2ff;
  box-shadow: 0 0 0 1px #c7d2fe;
}
.bn-type-item.is-muted {
  opacity: .45;
  pointer-events: none;
}
.bn-slot-spec-card {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #c7d2fe;
  background: linear-gradient(180deg, #f8faff 0%, #eef2ff 100%);
}
.bn-slot-spec-title {
  font-size: var(--fs-sm, 15px);
  font-weight: 700;
  color: #4338ca;
  margin-bottom: 8px;
}
.bn-slot-spec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.bn-slot-spec-grid--pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.bn-scope-locked {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1.5px solid #c7d2fe;
  border-radius: 10px;
  background: #f8fafc;
}
.bn-scope-locked__badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: var(--fs-sm, 15px);
  font-weight: 700;
}
.bn-scope-locked__text {
  margin: 0;
  font-size: var(--fs-sm, 15px);
  color: #334155;
  line-height: 1.5;
}
.bn-slot-spec-grid .k {
  display: block;
  font-size: var(--fs-xs, 14px);
  color: #64748b;
  margin-bottom: 2px;
}
.bn-slot-spec-grid strong {
  font-size: var(--fs-sm, 15px);
  color: #1e293b;
}
.bn-slot-spec-note {
  margin: 8px 0 0;
  font-size: var(--fs-sm, 15px);
  color: #475569;
}
@media (max-width: 640px) {
  .bn-slot-spec-grid { grid-template-columns: 1fr; }
}

/* ── 폼: 이미지 업로드 미리보기 ── */
.bn-upload-preview { display: none; margin-top: 12px; text-align: center; }
.bn-upload-preview img {
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  object-fit: contain;
}
.bn-preview-landscape img { max-width: 100%; height: auto; max-height: 200px; }
.bn-preview-portrait img { max-width: 200px; height: auto; }
.bn-preview-square img { width: 200px; height: 200px; object-fit: cover; }
.bn-preview-custom img,
.bn-preview-text_line img { max-width: 100%; height: auto; max-height: 200px; }
.bn-existing-img { margin-bottom: 10px; }
.bn-existing-img img {
  max-width: 100%;
  max-height: 160px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}
.bn-dim-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bn-dim-group .pw-input { width: 120px; flex: none; }
.bn-dim-ratio-hint {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #c7d2fe;
  background: #f8faff;
  font-size: var(--fs-sm, 15px);
  line-height: 1.45;
  color: #3730a3;
}
.bn-dim-ratio-hint strong { font-weight: 700; color: #312e81; }
.bn-dim-unit { font-size: var(--fs-sm, 15px); color: #64748b; }

@media (min-width: 768px) {
  .bn-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
}
@media (max-width: 560px) {
  .bn-modal-acts a { flex: 1 1 100%; }
}

/* ── 상세: 배너 뷰어·정보 박스 ── */
.bnd-viewer { background: #1e293b; padding: 24px 16px; margin-bottom: 18px; border-radius: 12px; }
.bnd-viewer-inner { width: 100%; box-sizing: border-box; }
.bnd-viewer-label {
  font-size: var(--fs-sm, 15px);
  color: #94a3b8;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bnd-viewer-frame {
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: zoom-in;
  position: relative;
}
.bnd-viewer-frame img {
  border-radius: 6px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .4);
}
.bnd-viewer-landscape img { max-width: 100%; height: auto; max-height: 300px; }
.bnd-viewer-portrait img { max-width: 300px; height: auto; }
.bnd-viewer-square img { max-width: 400px; max-height: 400px; width: 100%; }
.bnd-viewer-custom img { max-width: 100%; height: auto; max-height: 360px; }
.bnd-viewer-zoom {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: var(--fs-xs, 14px);
  pointer-events: none;
}
.bnd-viewer-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #64748b;
  padding: 40px 0;
  font-size: var(--fs-sm, 15px);
}
.bnd-viewer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #334155;
}
.bnd-viewer-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm, 15px);
  color: #94a3b8;
}
.bnd-infobox {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 18px;
}
.bnd-infobox-header {
  padding: 14px 18px;
  font-size: var(--fs-sm, 15px);
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #f1f5f9;
}
.bnd-infobox-row {
  display: flex;
  padding: 11px 18px;
  border-bottom: 1px solid #f8fafc;
  gap: 12px;
}
.bnd-infobox-row:last-child { border-bottom: none; }
.bnd-inforow-label {
  min-width: 100px;
  font-size: var(--fs-sm, 15px);
  font-weight: 500;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.bnd-inforow-val {
  font-size: var(--fs-base, 16px);
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
  line-height: 1.6;
}
.bnd-link-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.bnd-content-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 18px;
}
.bnd-content-body {
  padding: 18px;
  font-size: var(--fs-sm, 15px);
  color: #334155;
  line-height: 1.75;
  white-space: pre-line;
}
.bnd-prevnext {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 18px;
}
.bnd-pn-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  text-decoration: none;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  font-size: var(--fs-sm, 15px);
}
.bnd-pn-item:last-child { border-bottom: none; }
.bnd-pn-item:hover { background: #f8fafc; }
.bnd-pn-dir {
  min-width: 52px;
  color: #94a3b8;
  font-size: var(--fs-sm, 15px);
  display: flex;
  align-items: center;
  gap: 4px;
}
.bnd-pn-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bnd-sidebar-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}
.bnd-sidebar-header {
  padding: 12px 16px;
  font-size: var(--fs-sm, 15px);
  font-weight: 700;
  color: #1e293b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bnd-rel-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
}
.bnd-rel-item:hover { background: #f8fafc; }
.bnd-rel-thumb {
  width: 60px;
  height: 40px;
  overflow: hidden;
  border-radius: 4px;
  background: #f1f5f9;
  flex-shrink: 0;
}
.bnd-rel-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bnd-rel-title {
  font-size: var(--fs-sm, 15px);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bnd-rel-meta { font-size: var(--fs-sm, 15px); color: #94a3b8; }
#bndLightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .85);
  z-index: 9000;
  align-items: center;
  justify-content: center;
}
#bndLightbox.open { display: flex; }
#bndLightboxImg { max-width: 92vw; max-height: 88vh; border-radius: 6px; }
#bndLightboxClose {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(255, 255, 255, .15);
  border: none;
  color: #fff;
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}
#bnPwModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 8000;
  align-items: center;
  justify-content: center;
}
#bnPwModal.open { display: flex; }
.bn-pw-modal-box {
  background: #fff;
  border-radius: 14px;
  padding: 32px 28px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .2);
}
.bn-pw-modal-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: var(--fs-sm, 15px);
  box-sizing: border-box;
  margin-bottom: 14px;
}
.bn-pw-modal-submit,
.bn-pw-modal-cancel {
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: var(--fs-sm, 15px);
  font-weight: 700;
  cursor: pointer;
}
.bn-pw-modal-submit { background: #1a73e8; color: #fff; }
.bn-pw-modal-cancel { background: #e2e8f0; color: #334155; margin-left: 8px; }

/* ── 등록·수정 폼: 오류 안내·필드 유지 ── */
.pw-alert--detail .pw-alert-lead {
  margin: 6px 0 0;
  font-size: 14px;
  color: #991b1b;
  line-height: 1.5;
}
.pw-alert--detail .pw-alert-list {
  margin: 10px 0 0;
  padding-left: 20px;
}
.pw-alert--detail .pw-alert-list li {
  margin: 4px 0;
  line-height: 1.45;
}
.pw-row--error .pw-input,
.pw-row--error .pw-select,
.pw-row--error .pw-textarea,
.pw-row--error .pw-banner-upload {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, .25);
}
.pw-row--error .pw-label {
  color: #b91c1c;
}
.bn-staged-img {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  background: #f0fdf4;
}
.bn-staged-img img {
  display: block;
  max-width: 100%;
  border-radius: 8px;
}
.bn-staged-img--sm img {
  max-width: 220px;
}

.bn-pw-modal-cancel { background: #f1f5f9; color: #475569; font-weight: 600; }

/* ── 신청·등록·관리 허브 (bnp/pl SSOT — purchase.php 패턴 공유) ── */
.pl-wrap .bnp-wrap,
.pl-wrap .bnp-hub-wrap {
  max-width: 860px;
  margin: 0 auto 28px;
  padding: 0;
  color: #1f2330;
}
.bnp-steps {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  flex-wrap: wrap;
}
.bnp-step {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: var(--fs-sm, 15px);
  color: #9aa0ab;
  background: #f4f5f8;
  border-radius: 999px;
  padding: 6px 14px;
}
.bnp-step b {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #cbd0da;
  color: #fff;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs, 14px);
  font-weight: 700;
}
.bnp-step.on {
  color: #4338ca;
  background: #eef0ff;
}
.bnp-step.on b { background: #6366f1; }
.bnp-alert {
  background: #fde8e8;
  border: 1px solid #f5b5b5;
  color: #a51d2d;
  padding: 11px 15px;
  border-radius: 9px;
  margin-bottom: 16px;
  font-size: var(--fs-sm, 15px);
}
.bnp-empty {
  background: #f6f7f9;
  border: 1px solid #e3e6ea;
  border-radius: 12px;
  padding: 34px 20px;
  text-align: center;
}
.bnp-empty p { margin: 0 0 14px; color: #4b5563; font-size: var(--fs-base, 16px); }
.bnp-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 9px;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-base, 16px);
  cursor: pointer;
}
.bnp-btn-primary:hover { background: #4f51e0; color: #fff; }
.bnp-card {
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 13px;
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(20, 24, 40, .04);
}
.bnp-card h2 {
  font-size: var(--fs-md, 17px);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bnp-card h2 .n {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #6366f1;
  color: #fff;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs, 14px);
  font-weight: 700;
}
.bn-hub-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}
.bn-hub-stat {
  flex: 1 1 140px;
  min-width: 140px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.bn-hub-stat-lab { font-size: var(--fs-sm, 15px); color: #64748b; }
.bn-hub-stat-val { font-size: var(--fs-xl, 20px); font-weight: 800; color: #4338ca; margin-top: 2px; }
.bn-hub-cta { margin-bottom: 14px; }
.bn-hub-actions {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin-bottom: 14px;
}
@media (min-width: 640px) {
  .bn-hub-actions { grid-template-columns: repeat(3, 1fr); }
}
.bn-hub-card { margin-bottom: 0; display: flex; flex-direction: column; min-height: 100%; }
.bn-hub-card-desc {
  margin: 0 0 12px;
  font-size: var(--fs-sm, 15px);
  color: #64748b;
  line-height: 1.5;
  flex: 1;
}
.bn-hub-card .bnp-btn-primary { width: 100%; box-sizing: border-box; }
.bn-hub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.bn-hub-links a {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: var(--fs-sm, 15px);
  font-weight: 700;
  text-decoration: none;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.bn-hub-links a:hover { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.bn-hub-recent-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.bn-hub-recent-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: var(--fs-sm, 15px);
}
.bn-hub-recent-list li:last-child { border-bottom: 0; }
.bn-hub-recent-list a { color: #2563eb; font-weight: 700; text-decoration: none; }
.bn-hub-recent-list small { display: block; color: #94a3b8; margin-top: 2px; }
.bn-hub-recent-date { color: #94a3b8; white-space: nowrap; }

