/* Shared image composer and independent popup cards. */
.media-editor{grid-column:1/-1;margin:20px 0;padding:20px;background:#f6f9fd;border:1px dashed #b8cbe4;border-radius:10px;min-width:0}
.media-editor-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.media-editor-head strong{color:#263449;font-size:15px}.media-editor-head small{color:#718299;margin-left:8px;font-weight:500}
.theme-blue .media-upload{display:inline-flex;position:relative;cursor:pointer;padding:10px 15px;margin:0!important;border-radius:6px;background:#2671df;color:#fff!important;font-size:13px;font-weight:700;overflow:hidden}
.media-upload input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}.media-upload:focus-within{outline:3px solid #8cbaff;outline-offset:3px}
.media-help{color:#60718a;font-size:12px;line-height:1.7;margin:12px 0}.media-error{min-height:0;margin:8px 0 0;color:#b52e43;font-size:13px}.media-error:empty{display:none}
.media-thumbnails{display:flex;gap:12px;flex-wrap:wrap}.media-thumbnails figure{margin:0;width:144px;border:1px solid #cedaeb;background:white;border-radius:6px;overflow:hidden}.media-thumbnails img{display:block;width:100%;height:134px;object-fit:contain;background:#edf2f8}.media-thumbnails figcaption{display:flex;align-items:center;justify-content:space-between;gap:4px;padding:7px}.media-thumbnails figcaption button{padding:5px;font-size:11px;border-radius:4px}.media-thumbnails figcaption span{font-size:11px;color:#738398}
.post-image-gallery{display:flex;flex-direction:column;gap:18px;width:100%;min-width:0;margin:22px 0}.post-image-gallery:empty{display:none}.post-image-gallery img{display:block;width:auto;max-width:100%;height:auto;align-self:center;object-fit:contain;border-radius:4px}
.media-missing{display:block;padding:20px;color:#8c4c53;background:#fff0f2;font-size:13px;border-radius:6px;line-height:1.6}
.public-post-list .promo-list-thumb{width:84px;height:96px;object-fit:cover;object-position:top;border:1px solid #d8e0eb;border-radius:5px;flex-shrink:0}.public-post-list .public-post-row>div{min-width:0;flex:1}.public-post-content{overflow-wrap:anywhere;line-height:1.85}.public-post-detail .post-image-gallery{padding:4px 0 18px}.public-post-detail .public-post-actions{gap:14px;flex-wrap:wrap}.public-post-detail .public-post-actions .community-primary{color:white!important}.community-compose:not([hidden]){scroll-margin-top:20px}
/* Native modal provides keyboard containment and makes the page behind it inert. */
.theme-blue #site-popup-dialog{box-sizing:border-box;width:min(1400px,calc(100vw - 40px));max-width:none;max-height:calc(100dvh - 40px);margin:auto;padding:0 6px 14px;border:0!important;background:transparent!important;box-shadow:none!important;overflow:auto;color:#fff;font-family:Arial,'Noto Sans KR',sans-serif}
#site-popup-dialog::backdrop{background:#101823b8;backdrop-filter:blur(3px)}
.popup-layer-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 2px 20px;position:sticky;top:0;z-index:3;background:#182333f5;border-radius:12px 12px 0 0;padding:18px 22px;margin-bottom:20px}.popup-layer-toolbar h2{color:#fff!important;font-size:19px;margin:5px 0 0;font-weight:750}.popup-kicker{letter-spacing:2px;font-size:10px;color:#a1c5f6}.popup-layer-toolbar>div:last-child{display:flex;flex-wrap:wrap;gap:8px}.theme-blue .popup-layer-toolbar button{background:#ffffff12;color:#fff;border:1px solid #68788e!important;border-radius:7px;padding:10px 14px;font-size:12px}
.popup-layer-error{color:#fff;background:#9d3345;padding:10px;border-radius:5px}.popup-layer-error:empty{display:none}
.popup-deck{display:flex;flex-wrap:wrap;align-items:stretch;justify-content:center;gap:22px;padding:0 4px 8px}
.site-popup-card{box-sizing:border-box;display:grid;grid-template-rows:64px clamp(160px,calc(100dvh - 430px),340px) minmax(0,1fr) auto;height:clamp(360px,calc(100dvh - 155px),620px);width:min(var(--popup-width),100%);flex:0 1 var(--popup-width);max-width:100%;border:1px solid #d6e0ee;border-radius:14px;background:#fff;color:#263347;box-shadow:0 16px 48px #0005;overflow:hidden}
.site-popup-card>header{box-sizing:border-box;min-width:0;min-height:0;display:flex;justify-content:space-between;align-items:center;gap:10px;background:#fff;padding:14px 16px;border-bottom:1px solid #e2e8f1}.site-popup-card h3{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:14px!important;line-height:1.5;margin:0!important;overflow-wrap:anywhere;color:#263347!important}.theme-blue .popup-x{background:transparent;border:0!important;padding:3px 8px;color:#526276;font-size:24px;flex-shrink:0}
.popup-card-content{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;background:#fff;scrollbar-width:thin;scrollbar-color:#8cadd7 #edf2f8}
.popup-media-frame{display:grid;min-width:0;min-height:0;overflow:hidden;background:#edf2f8}.site-popup-card .popup-media-frame .post-image-gallery{display:grid;place-items:center;width:100%;height:100%;min-height:0;margin:0;gap:0}.site-popup-card .popup-media-frame img{display:block;width:100%;height:100%;min-width:0;min-height:0;max-width:100%;max-height:100%;object-fit:contain;object-position:center;border-radius:0}.popup-copy{white-space:pre-wrap;overflow-wrap:anywhere;flex:0 0 auto;line-height:1.7;padding:16px 20px;color:#40516a;font-size:14px}.popup-cta{flex:0 0 auto;display:block;margin:auto 20px 16px;padding:13px;text-align:center;border-radius:7px;background:#2671df;color:white!important;text-decoration:none;font-size:14px;font-weight:700}.popup-text-emblem{display:grid;place-items:center;width:100%;height:100%;min-height:0;font-family:Georgia,serif;font-size:75px;font-style:italic;background:radial-gradient(circle at 75% 15%,#476b9b,#1f304c 70%);color:#dbeafe;letter-spacing:-4px}
.site-popup-card>.popup-card-footer{box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:stretch;gap:8px;margin:0;padding:12px;background:#f5f7fa;border-top:1px solid #e0e6ef}.theme-blue .site-popup-card>.popup-card-footer button{min-width:0;min-height:40px;line-height:1.4;white-space:nowrap;word-break:keep-all;background:#fff;border:1px solid #d2dce9!important;border-radius:6px;padding:10px 8px;color:#4b5c72;font-size:13px}.theme-blue .site-popup-card>.popup-card-footer button:last-child{padding-inline:18px}
.popup-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:8px 0 24px}.popup-summary>div{background:#fff;border:1px solid #d8e0eb;border-radius:10px;padding:20px 22px;display:flex;justify-content:space-between;align-items:center;gap:12px}.popup-summary span{color:#64748b;font-size:13px}.popup-summary strong{font-size:27px;font-variant-numeric:tabular-nums;color:#246bd1}
.popup-manager-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:24px}.popup-manager-card{min-width:0;background:#fff;border:1px solid #d8e0eb;border-radius:12px;overflow:hidden}.popup-manager-poster{position:relative;height:235px;background:radial-gradient(at 85% 20%,#426b9c,#23324a);color:white;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px}.popup-manager-poster.has-image{padding:0;background:#edf2f8}.popup-manager-poster>.post-image-gallery{display:grid;place-items:center;width:100%;height:100%;min-height:0;margin:0}.popup-manager-poster img{display:block;width:100%;height:100%;min-height:0;max-width:100%;max-height:100%;object-fit:contain;object-position:center;border-radius:0}.popup-poster-letter{font-size:80px;font-family:Georgia,serif;font-style:italic;line-height:1.1;color:#c4deff}.popup-manager-poster p{font-size:13px;line-height:1.6;max-width:250px;text-align:center;color:#dbe7f7;white-space:pre-wrap}.popup-state{position:absolute;left:14px;top:14px;background:#182436e8;color:#d8e5f5;border:1px solid #6a7c96;border-radius:20px;font-size:11px;padding:5px 10px}.popup-state.on{background:#2671df;color:#fff;border-color:#6aabff}
.popup-manager-info{padding:20px}.popup-manager-info>small{font-size:11px;color:#728298}.popup-manager-info h2{font-size:18px!important;line-height:1.5;margin:10px 0!important;overflow-wrap:anywhere}.popup-manager-info .hint{min-height:36px}.popup-manager-info .form-actions{gap:6px;flex-wrap:wrap}.popup-manager-info button,.popup-manager-info a.button{font-size:12px;padding:8px 12px}.popup-card-tools{display:flex;gap:8px;border-top:1px solid #e2e8f0;padding-top:14px;margin-top:16px}.popup-card-tools button:last-child{margin-left:auto;color:#ad3c4e!important}
.popup-empty{display:flex;align-items:center;flex-direction:column;text-align:center;padding:66px 24px;background:linear-gradient(150deg,#fff,#eaf2ff);border:1px solid #d1dff1;border-radius:14px;gap:16px}.popup-empty>span{letter-spacing:3px;font-size:11px;color:#2671df}.popup-empty h2{font-size:25px;margin:0}.popup-empty p{line-height:1.9;margin:0 0 6px;color:#65758b}.popup-empty small{font-size:12px;color:#78879b;margin-top:12px}.popup-options{display:flex;flex-direction:column;gap:18px}.popup-options .hint{margin:0}.popup-step{font-size:12px;font-weight:700;color:#2671df;background:#eaf2ff;border-radius:6px;padding:5px 9px}
@media(max-width:900px){.popup-summary{grid-template-columns:repeat(2,1fr)}.popup-layer-toolbar{align-items:flex-start}.popup-layer-toolbar>div:last-child{justify-content:flex-end}}
@media(max-width:600px){.theme-blue #site-popup-dialog{width:calc(100vw - 20px);max-height:calc(100dvh - 20px);padding:0 0 12px}.popup-layer-toolbar{padding:13px;gap:10px;margin-bottom:14px}.popup-layer-toolbar h2{font-size:16px}.popup-layer-toolbar button{font-size:11px!important;padding:8px!important}.popup-kicker{font-size:8px}.popup-deck{gap:16px}.site-popup-card{flex-basis:100%;width:100%;max-width:420px}.media-editor{padding:14px}.media-thumbnails figure{width:130px}.media-thumbnails img{height:112px}.popup-summary{gap:10px}.popup-summary>div{padding:16px}.popup-summary span{font-size:11px}.popup-summary strong{font-size:24px}.popup-manager-grid{grid-template-columns:1fr}.public-post-list .promo-list-thumb{width:56px;height:72px}.public-post-row{gap:10px}}
@media(prefers-reduced-motion:reduce){#site-popup-dialog *, .media-editor *{scroll-behavior:auto;animation:none;transition:none}}
