#hd_pop:empty {
    display: none;
}

/* 팝업 레이어 — bbs/newwin.inc.php */
#hd_pop {
    pointer-events: none;
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 1000;
    margin-inline: auto;
    height: 0;
    max-width: 1200px;
}

.hd_pops {
    pointer-events: auto;
    position: absolute;
    overflow: hidden;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    top: var(--hd-pop-top, 0);
    left: var(--hd-pop-left, 0);
    max-width: calc(100vw - 1rem);
}

.hd_pops_con {
    background: #fff;
    padding: 0;
    width: var(--hd-pop-width, auto);
    height: var(--hd-pop-height, auto);
    max-width: min(var(--hd-pop-width, 100vw), calc(100vw - 1rem));
    max-height: min(var(--hd-pop-height, 80vh), calc(100vh - 4rem));
}

.hd_pops_con img {
    max-width: 100%;
}

.hd_pops_footer {
    display: flex;
    align-items: stretch;
    border-top: 1px solid #e5e7eb;
    background: #111827;
    font-size: var(--text-ui-sm);
    color: #fff;
}

.hd_pops_footer button {
    border: 0;
    color: #fff;
}

.hd_pops_footer .hd_pops_reject {
    flex: 1;
    padding: 0.625rem 0.75rem;
    text-align: left;
}

.hd_pops_footer .hd_pops_reject:hover {
    background: #1f2937;
}

.hd_pops_footer .hd_pops_close {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 0.25rem;
    background: #374151;
    padding: 0.625rem 1rem;
}

.hd_pops_footer .hd_pops_close:hover {
    background: #4b5563;
}
