/*
 * 공지 본문 — 마크다운에서 그린 HTML 의 글 서식
 * 상세 화면 본문과 작성 · 수정 화면 미리보기가 같이 쓴다. 미리보기가 실제 화면과 똑같이 보이게 한 곳에 둔다.
 * 디자인 시스템 리셋(_base.css)이 제목 · 목록 · 문단 여백을 0 으로 만들어 두었으므로 여기서 다시 준다.
 */

.notice-content {
    font-size: var(--text-base);
    line-height: 1.8;
    color: var(--gray-700);
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.notice-content > :first-child { margin-top: 0; }
.notice-content > :last-child { margin-bottom: 0; }

.notice-content p,
.notice-content ul,
.notice-content ol,
.notice-content blockquote,
.notice-content table,
.notice-content pre { margin: 0 0 var(--space-4); }

.notice-content h1,
.notice-content h2,
.notice-content h3,
.notice-content h4 {
    margin: var(--space-8) 0 var(--space-3);
    color: var(--gray-900);
    font-weight: var(--font-bold);
    line-height: 1.4;
}
.notice-content h1 { font-size: var(--text-2xl); }
.notice-content h2 { font-size: var(--text-xl); }
.notice-content h3 { font-size: var(--text-lg); }
.notice-content h4 { font-size: var(--text-base); }

.notice-content ul,
.notice-content ol { padding-left: 1.4em; }
.notice-content ul { list-style: disc; }
.notice-content ol { list-style: decimal; }
.notice-content li + li { margin-top: var(--space-1); }
.notice-content li > ul,
.notice-content li > ol { margin: var(--space-1) 0 0; }

.notice-content a {
    color: var(--color-primary-700);
    text-decoration: underline;
    text-underline-offset: 3px;
    word-break: break-all;
}
.notice-content a:hover { color: var(--color-primary-800); }

.notice-content strong { color: var(--gray-900); font-weight: var(--font-bold); }

.notice-content blockquote {
    padding: var(--space-3) var(--space-4);
    border-left: 4px solid var(--color-primary-300);
    background: var(--color-primary-50);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--gray-700);
}
.notice-content blockquote > :last-child { margin-bottom: 0; }

.notice-content hr {
    margin: var(--space-8) 0;
    border: 0;
    border-top: 1px solid var(--gray-200);
}

.notice-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.notice-content code {
    padding: .1em .4em;
    border-radius: var(--radius-sm, 4px);
    background: var(--gray-100);
    font-size: .9em;
}
.notice-content pre {
    padding: var(--space-4);
    border-radius: var(--radius-md);
    background: var(--gray-100);
    overflow-x: auto;
}
.notice-content pre code { padding: 0; background: none; }

/* 표는 넓으면 표만 옆으로 밀린다 — 화면 전체가 가로로 밀리지 않게 */
.notice-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: var(--text-sm);
}
.notice-content th,
.notice-content td {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--gray-200);
    text-align: left;
}
.notice-content th { background: var(--gray-50); font-weight: var(--font-semibold); }

@media (max-width: 480px) {
    .notice-content { font-size: var(--text-sm); }
    .notice-content h1 { font-size: var(--text-xl); }
    .notice-content h2 { font-size: var(--text-lg); }
    .notice-content h3 { font-size: var(--text-base); }
}
