/* 공지 팝업(이벤트·알림).
   홈 화면(index.html)과 관리자 팝업 편집 화면(편집기 본문·미리보기)이 이 파일을 함께 쓴다.
   → 편집기에서 보이는 모양이 방문자에게 보이는 모양과 같아야 하므로, 두 화면의 기본 스타일(style.css / admin.css)에
     기대지 않고 필요한 값을 여기서 모두 정한다. 선택자는 .notice 와 .popup-content 로만 시작한다. */

/* ---------- 팝업 틀 ---------- */
.notice{width:min(480px,92vw);max-height:90vh;padding:0;overflow:hidden;border:1px solid #b67ef4;border-radius:24px;background:#24123f;color:#fff;box-shadow:0 20px 100px #0008;font-family:'Noto Sans KR','Malgun Gothic','Apple SD Gothic Neo',sans-serif;text-align:left}
.notice{max-height:min(90dvh,860px)}
.notice.size-s{width:min(380px,92vw)}
.notice.size-l{width:min(640px,92vw)}
.notice[open]{display:flex;flex-direction:column;animation:notice-in .3s cubic-bezier(.2,.8,.3,1)}
.notice::backdrop{background:#0e0527cf;backdrop-filter:blur(9px)}
@keyframes notice-in{from{opacity:0;transform:translateY(14px) scale(.97)}}

/* 위쪽: 종류 뱃지 + 제목 */
.notice-head{flex:none;padding:22px 62px 18px 24px;border-bottom:1px solid #ffffff14;background:radial-gradient(circle at 88% -20%,#b071ff80,transparent 58%),linear-gradient(135deg,#3b1c7a,#24123f 72%)}
.notice-badge{display:inline-flex;align-items:center;gap:6px;padding:4px 11px 4px 9px;border-radius:999px;background:#77f9f0;color:#0e2a3a;font-size:11px;font-weight:900;line-height:1.4;letter-spacing:.6px}
.notice-badge::before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.7}
.notice-badge.type-event{background:#ffea00;color:#2a1650}
.notice-badge.type-update{background:#7dffb5;color:#0d3320}
.notice-title{display:block;margin:11px 0 0;color:#fff;font-size:21px;font-weight:900;line-height:1.38;letter-spacing:-.2px;overflow-wrap:anywhere}
.notice-x{position:absolute;top:14px;right:14px;z-index:2;display:grid;place-items:center;width:36px;height:36px;padding:0 0 3px;border:1px solid #ffffff55;border-radius:50%;background:#1b0c37b3;color:#fff;font:400 25px/1 Arial,sans-serif;cursor:pointer}
.notice-x:hover{border-color:#fff;background:#3a2070}

/* 가운데: 내용 (길면 이 부분만 스크롤) */
.notice-body{flex:1 1 auto;min-height:0;padding:20px 24px 22px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#6b4c96 transparent}

/* 여러 개일 때 넘겨 보기 */
.notice-pager{flex:none;display:flex;align-items:center;justify-content:center;gap:14px;padding:8px 16px;border-top:1px solid #ffffff14;background:#20103b;color:#cdb9e0;font-size:12px;font-weight:800;letter-spacing:1.5px}
.notice-pager[hidden]{display:none}
.notice-pager button{display:grid;place-items:center;width:30px;height:30px;padding:0 0 2px;border:1px solid #ffffff2e;border-radius:50%;background:none;color:#fff;font:400 18px/1 Arial,sans-serif;cursor:pointer}
.notice-pager button:hover{border-color:#ffffff80;background:#ffffff1a}

/* 아래쪽: 오늘 하루 보지 않기 / 닫기 */
.notice-foot{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px 12px 18px;border-top:1px solid #ffffff14;background:#1b0d33}
.notice-today{display:inline-flex;align-items:center;gap:8px;min-width:0;padding:6px 4px;border:0;border-radius:6px;background:none;color:#cdb9e0;font:inherit;font-size:13px;font-weight:500;line-height:1.4;text-align:left;cursor:pointer}
.notice-today::before{content:'';flex:none;width:15px;height:15px;border:1.5px solid #9a86bd;border-radius:4px}
.notice-today:hover{color:#fff}
.notice-today:hover::before{border-color:#ffea00}
.notice-close{flex:none;padding:9px 22px;border:1px solid #ffffff38;border-radius:10px;background:#ffffff14;color:#fff;font:inherit;font-size:13px;font-weight:800;line-height:1.4;cursor:pointer}
.notice-close:hover{background:#ffffff29}
.notice button:focus-visible{outline:3px solid #77f9f0;outline-offset:2px}

/* 이미지 배너: 제목 없이 이미지가 팝업을 꽉 채운다 */
.notice.is-banner .notice-head{display:none}
.notice.is-banner .notice-body{padding:0}

@media(max-width:480px){
.notice{border-radius:20px}
.notice-head{padding:20px 58px 16px 20px}
.notice-title{font-size:19px}
.notice-body{padding:18px 20px 20px}
.notice-foot{padding:10px 12px 10px 14px}
}
@media(prefers-reduced-motion:reduce){.notice[open]{animation:none}}

/* ---------- 내용 (관리자가 편집기로 쓴 글) ---------- */
.popup-content{color:#eae2f8;font-size:15px;font-weight:400;line-height:1.75;letter-spacing:0;overflow-wrap:anywhere;word-break:keep-all}
.popup-content::after{content:'';display:block;clear:both}
.popup-content>:first-child{margin-top:0}
.popup-content>:last-child{margin-bottom:0}
.popup-content p{margin:0 0 .75em}
.popup-content h1,.popup-content h2,.popup-content h3,.popup-content h4,.popup-content h5,.popup-content h6{display:block;margin:1.1em 0 .5em;color:#fff;font-family:inherit;font-style:normal;font-weight:900;line-height:1.38;letter-spacing:-.2px;text-shadow:none}
.popup-content h1{font-size:26px}
.popup-content h2{font-size:22px}
.popup-content h3{font-size:18px}
.popup-content h4{font-size:16px}
.popup-content h5{font-size:15px}
.popup-content h6{font-size:13px;color:#cdb9e0}
.popup-content a{color:#77f9f0;font-weight:inherit;text-decoration:underline;text-underline-offset:3px}
.popup-content a:hover{color:#fff}
.popup-content b,.popup-content strong{font-weight:800}
.popup-content small{color:#b7aaca;font-size:12px}
.popup-content mark{padding:0 3px;border-radius:3px;background:#ffea00;color:#261340}
.popup-content ul,.popup-content ol{margin:0 0 .75em;padding-left:1.5em}
.popup-content ul li,.popup-content ol li{margin:.2em 0;list-style-position:outside}
.popup-content li::marker{color:#c79bff}
.popup-content blockquote{margin:0 0 .75em;padding:12px 16px;border:0;border-left:3px solid #b67ef4;border-radius:0 10px 10px 0;background:#ffffff0d;color:#d9cdec}
.popup-content hr{height:0;margin:1.2em 0;border:0;border-top:1px solid #ffffff24}
.popup-content pre{margin:0 0 .75em;padding:12px 14px;overflow-x:auto;border-radius:10px;background:#150a2c;color:#d9cdec;font:13px/1.6 Consolas,'SF Mono',monospace;white-space:pre-wrap}
.popup-content code{font-family:Consolas,'SF Mono',monospace;font-size:.92em}
.popup-content img{max-width:100%;height:auto;border-radius:12px;vertical-align:middle}
.popup-content img[style*='float: left']{margin:4px 14px 8px 0}
.popup-content img[style*='float: right']{margin:4px 0 8px 14px}
.popup-content figure{margin:0 0 .75em}
.popup-content figcaption{margin-top:6px;color:#b7aaca;font-size:12px;text-align:center}
.popup-content table{width:100%;margin:0 0 .75em;border-collapse:collapse;font-size:14px}
/* 선택자를 겹쳐 쓴 것은 관리자 화면의 표 규칙(admin.css)보다 우선하게 하기 위해서다. */
.popup-content.popup-content th,.popup-content.popup-content td{padding:8px 10px;border:1px solid #ffffff2b;color:inherit;font-size:inherit;text-align:left;vertical-align:top;white-space:normal}
.popup-content.popup-content th{background:#ffffff12;color:#fff;font-weight:800}

/* 이미지 배너 모양의 내용: 이미지가 가로를 꽉 채우고 문단 사이 여백이 없다 */
.popup-content.is-banner p,.popup-content.is-banner figure{margin:0}
.popup-content.is-banner img{display:block;width:100%;border-radius:0}
