/* 기사 사진은 지정된 가로 폭에 맞추고 높이는 원본이 결정한다. */
.n9 :is(.tn, .ph):has(> img) {
    align-self: start;
    height: auto;
}
.n9 :is(.tn, .ph) > img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto;
}
.pd .it.hp > .th {
    align-self: start !important;
    height: auto !important;
}
.pd .it.hp > .th img {
    height: auto !important;
    aspect-ratio: auto;
}

/* PC용 두 테마의 사진 카드. 로고와 광고에는 적용하지 않는다. */
#dxp :is(.en-ph, .en-a-ph, .ep-hcard-ph, .ep-epi-ph, .ep-epc-ph,
         .ep-deep-ph, .ep-big-ph, .ep-a-ph, .ep-cover-fig > a,
         .ep-dcard > a, .ep-side > a:first-child, .ep-kt-lead > a:first-child,
         .ep-kt-side li > a:first-child, .en-pic > a) {
    display: block;
    align-self: start;
    height: auto !important;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
}
#dxp :is(.en-ph, .en-a-ph, .en-pic, .en-kc-row, .en-a-fig,
         .ep-cover-fig, .ep-hcard-ph, .ep-epi-ph, .ep-epc-ph, .ep-deep-ph,
         .ep-dcard, .ep-big-ph, .ep-side, .ep-kt-lead, .ep-kt-side,
         .ep-a-ph, .ep-a-fig) img {
    display: block;
    height: auto !important;
    min-height: 0;
    max-height: none !important;
    aspect-ratio: auto;
    object-fit: contain;
    align-self: start;
}
#dxp :is(.ep-dcard > a, .ep-kt-side li > a, .ep-kt-lead > a,
         .ep-side > a, .ep-big-ph) > img {
    margin: 0;
    inset: auto;
}
#dxp .ep-cover-fig { align-self: start; }
#dxp :is(.en-ph, .en-a-ph, .en-pic > a, .en-a-fig, .ep-cover-fig > a,
         .ep-hcard-ph, .ep-epi-ph, .ep-epc-ph, .ep-deep-ph, .ep-dcard > a,
         .ep-big-ph, .ep-side > a, .ep-kt-lead > a, .ep-kt-side li > a,
         .ep-a-ph, .ep-a-fig) > img {
    width: 100%;
}
#dxp :is(.en-top-s, .en-edu, .en-kc, .en-pics, .en-pics-g, .en-pic,
         .ep-hero, .ep-eg, .ep-epi, .ep-deep, .ep-deep-top,
         .ep-epc, .ep-vmf, .ep-vmf-top, .ep-big, .ep-kt, .ep-kt-top,
         .ep-kt-side li, .ep-cover-fig) {
    height: auto !important;
    min-height: 0;
}
#dxp .en-pics-g {
    display: grid;
    grid-template: none;
    gap: 12px;
}
#dxp .en-photo-row {
    display: flex;
    align-items: start;
    gap: 12px;
}
#dxp .en-photo-row .en-pic {
    flex: var(--photo-ratio, 1) 1 0;
    min-width: 0;
    width: auto;
}
#dxp :is(.ep-cover-fig, .ep-kt-lead) > a:first-child {
    flex: none !important;
    width: 100%;
}
#dxp .ep-hcard-ph { flex: 0 0 160px; width: 160px; }
#dxp .ep-epi-ph { flex: 0 0 240px; width: 240px; }
#dxp .ep-epc-ph { flex: 0 0 80px; width: 80px; }
#dxp .ep-dcard > a:first-child { flex: 0 0 150px; width: 150px; }
#dxp .ep-kt-side li > a:first-child { flex: 0 0 96px; width: 96px; }
#dxp .ep-a-next-grid .ep-a-ph { flex: 0 0 120px; width: 120px; }

/* 0764-06(츄 오퍼스 1 · 12-06 20:5x): DOTNEWS 「Music & Celebrity」 묶음 높이가 510px 로 묶여 있어
   원본 비율로 커진 첫 사진 기사가 아래 줄(en-kc-row)을 덮던 것 → 높이는 내용이 정해요.
   같은 줄 작은 사진은 둥근 타원(50%)으로 모서리가 잘렸음 → 모서리만 살짝 둥글게(자르지 않음). */
#dxp .en-kc-g { height: auto !important; min-height: 0; }
#dxp .en-kc-row img { border-radius: 6px !important; }
