/* ====================================================
   환영/공지 팝업 (Phase 6, 2026-05-18)
   기존 모달 패턴 (구버전 modal-overlay)을 시안 디자인 토큰에 맞춰 재구성.
   localStorage 키: mmm_announce_hide_<VERSION>
   ==================================================== */

.announce-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 9999;
  animation: announceFadeIn 0.2s ease-out;
}

@keyframes announceFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.announce-modal {
  background: var(--panel);
  color: var(--text);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  max-width: 480px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  padding: 28px 24px 20px;
  position: relative;
  animation: announceScaleIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes announceScaleIn {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.announce-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.announce-close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.announce-modal h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
  padding-right: 36px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.announce-section {
  margin-bottom: 18px;
}

.announce-section h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.announce-section ul,
.announce-section ol {
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-2);
}

.announce-section li {
  margin-bottom: 4px;
}

.announce-section strong {
  color: var(--spice);
  font-weight: 700;
}

/* Markdown 본문 스타일 (2026-05-19 markdown 지원) */
.announce-section .md-body {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-2);
}
.announce-section .md-body h1,
.announce-section .md-body h2,
.announce-section .md-body h3,
.announce-section .md-body h4 {
  font-size: 14px; font-weight: 700; color: var(--text);
  margin: 14px 0 6px 0;
}
.announce-section .md-body h1:first-child,
.announce-section .md-body h2:first-child,
.announce-section .md-body h3:first-child { margin-top: 0; }
.announce-section .md-body h1 { font-size: 16px; }
.announce-section .md-body h2 { font-size: 15px; }
.announce-section .md-body p { margin: 6px 0; }
.announce-section .md-body ul,
.announce-section .md-body ol { padding-left: 20px; margin: 6px 0; }
.announce-section .md-body li { margin-bottom: 4px; }
.announce-section .md-body strong { color: var(--spice); font-weight: 700; }
.announce-section .md-body em { font-style: italic; }
.announce-section .md-body code {
  background: rgba(197,23,30,0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Berkeley Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--spice);
}
.announce-section .md-body pre {
  background: var(--surface);
  padding: 10px 12px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 8px 0;
}
.announce-section .md-body pre code {
  background: transparent; padding: 0; color: var(--text);
}
.announce-section .md-body blockquote {
  border-left: 3px solid var(--spice);
  padding: 4px 12px;
  margin: 8px 0;
  color: var(--text-3);
  background: rgba(197,23,30,0.04);
}
.announce-section .md-body a {
  color: var(--spice); text-decoration: underline;
}
.announce-section .md-body a:hover { opacity: 0.8; }
.announce-section .md-body hr {
  border: none; border-top: 1px solid var(--border); margin: 12px 0;
}
.announce-section .md-body img { max-width: 100%; border-radius: 6px; margin: 6px 0; }

.announce-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.announce-hide-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-3);
  cursor: pointer;
  user-select: none;
}

.announce-hide-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--spice);
  cursor: pointer;
}

.announce-confirm {
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: var(--r-md);
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(197,23,30,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}

.announce-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(197,23,30,0.4);
}

.announce-confirm:active {
  transform: translateY(0);
}

/* 모바일 */
@media (max-width: 480px) {
  .announce-modal {
    padding: 24px 18px 18px;
    max-height: 90vh;
  }
  .announce-modal h2 { font-size: 17px; }
  .announce-section h3 { font-size: 13px; }
  .announce-section ul,
  .announce-section ol { font-size: 12px; }
  .announce-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .announce-confirm {
    width: 100%;
  }
}
