/* All selectors are scoped to the managed gallery and its dialog. */
.mew-cat-card { position:relative; width:100%; }
.mew-card-cover { position:relative; overflow:hidden; }
.photolink .mew-card-cover img { width:100%; }
.photolink .mew-card-photo-count,.photolink .mew-card-status { position:absolute; padding:6px 9px; font-size:11px; line-height:1.4; border-radius:20px; background:#fffaf2ef; color:#6b4b37; }
.photolink .mew-card-photo-count { bottom:12px; right:12px; }
.photolink .mew-card-status { top:12px; left:12px; max-width:calc(100% - 24px); }
.photolink .mew-card-status[data-completed="true"],.mew-detail-status[data-completed="true"] { background:#e6ebdd; color:#576347; }
.mew-card-caption { padding:15px 16px; }
.mew-card-caption strong { display:block; font-size:16px; font-weight:600; overflow-wrap:anywhere; }
.photolink .mew-card-caption span { padding:8px 0 0; font-size:12px; }
.mew-gallery-empty { grid-column:1/-1; text-align:center; border:1px dashed #ccb49b; border-radius:22px; padding:36px 22px; }
.mew-gallery-empty h3 { font-weight:500; margin:0; }
.mew-gallery-empty p { font-size:14px; }
#catDetail.mew-gallery-dialog { width:min(960px,94vw); max-height:90vh; max-height:90dvh; padding:0; overflow:auto; border:0; border-radius:24px; color:#503f35; background:#fffaf2; }
.mew-gallery-dialog::backdrop { background:#30241cb0; }
.mew-gallery-dialog [hidden] { display:none!important; }
.mew-detail-grid { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); align-items:start; }
.mew-close { position:absolute; right:12px; top:12px; z-index:5; border:1px solid #dfceba; border-radius:50%; width:38px; height:38px; display:grid; place-items:center; padding:0; line-height:1; font-size:26px; color:#503f35; background:#fffaf2f5; }
.mew-photo-panel { min-width:0; padding:24px 18px; background:#f2e7d9; border-radius:24px 0 0 24px; }
.mew-photo-stage { position:relative; display:flex; align-items:center; justify-content:center; width:100%; height:400px; min-height:260px; touch-action:pan-y; }
.mew-photo-stage .mew-detail-image { display:block; max-width:100%; width:100%; height:100%; min-height:0; object-fit:contain; border-radius:12px; }
.mew-image-error { padding:30px; font-size:14px; text-align:center; }
.mew-photo-arrow { position:absolute; top:50%; transform:translateY(-50%); width:38px; height:44px; border:1px solid #d8c4ad; border-radius:22px; background:#fffaf2ee; color:#6b4b37; font:30px/1 Arial,sans-serif; box-shadow:0 2px 8px #503f351a; }
.mew-photo-previous { left:4px; }.mew-photo-next { right:4px; }
.mew-photo-counter { margin:10px 0; text-align:center; font-size:12px; line-height:1.5; color:#796250; }
.mew-thumbnails { display:flex; overflow-x:auto; gap:8px; padding:4px 2px 8px; scrollbar-width:thin; }
.mew-thumbnail { flex:0 0 62px; width:62px; height:62px; padding:2px; border:2px solid transparent; border-radius:11px; background:#fffaf2; }
.mew-thumbnail[aria-pressed="true"] { border-color:#af5c3d; }
.mew-thumbnail img { display:block; width:100%; height:100%; border-radius:6px; object-fit:cover; }
.mew-detail-content { min-width:0; padding:48px 28px 26px; }
.mew-detail-content h2 { font-size:26px; line-height:1.45; margin:14px 0 12px; overflow-wrap:anywhere; letter-spacing:-1px; }
.mew-detail-status { display:inline-block; padding:7px 10px; border-radius:18px; color:#875534; background:#efddc8; font-size:12px; line-height:1.5; }
.mew-cat-info { margin:17px 0; font-size:14px; }
.mew-cat-info>div { display:grid; grid-template-columns:68px minmax(0,1fr); gap:10px; padding:11px 0; border-bottom:1px solid #e7dbcc; line-height:1.65; }
.mew-cat-info dt { color:#9c7159; font-size:12px; }.mew-cat-info dd { margin:0; overflow-wrap:anywhere; }
.mew-detail-content .mew-description { white-space:pre-wrap; overflow-wrap:anywhere; font-size:14px; }
.mew-detail-content .mew-inquiry,.mew-copy-status { font-size:12px; line-height:1.8; }
.mew-detail-content .mew-detail-contacts { display:flex; flex-direction:column; gap:10px; margin-top:20px; }
.mew-detail-contacts .button { display:flex; align-items:center; justify-content:center; gap:9px; width:100%; padding:13px 16px; text-align:center; font-size:13px; line-height:1.5; }
.mew-detail-contacts .mew-contact-icon { display:block; width:26px; height:26px; flex-shrink:0; border-radius:6px; }
.mew-detail-contacts .button span { min-width:0; overflow-wrap:anywhere; }
.mew-detail-contacts .mew-kakao { color:#503f35; background:#f6df86; }
.mew-gallery-dialog button:focus-visible,.mew-cat-card:focus-visible { outline:3px solid #b66545; outline-offset:3px; }
@media(max-width:720px) {
 .mew-detail-grid { grid-template-columns:1fr; }
 .mew-photo-panel { padding:45px 14px 14px; border-radius:24px 24px 0 0; }
 .mew-photo-stage { height:min(52vh,400px); min-height:250px; }
 .mew-detail-content { padding:24px 22px; }
 .mew-detail-content h2 { font-size:24px; }
 .mew-card-caption { padding:12px; }
 .mew-card-caption strong { font-size:14px; }
 .photolink .mew-card-caption span { font-size:11px; }
 .photolink .mew-card-status,.photolink .mew-card-photo-count { font-size:10px; padding:5px 8px; }
 .mew-thumbnail { flex-basis:54px; width:54px; height:54px; }
}
