/* 게시물 상세의 구조화 본문에만 편집한 문단과 목록 서식을 적용한다. */
.article-body.bb-rich-body { white-space: normal; overflow-wrap: anywhere; }
.bb-rich-body .article-rich-content > :first-child { margin-top: 0; }
.bb-rich-body .article-rich-content > :last-child { margin-bottom: 0; }
.bb-rich-body p { margin: .65em 0; white-space: pre-wrap; }
.bb-rich-body h1, .bb-rich-body h2, .bb-rich-body h3 { margin: 1em 0 .45em; line-height: 1.3; }
.bb-rich-body ul, .bb-rich-body ol { padding-inline-start: 1.6em; margin: .6em 0; }
.bb-rich-body ul { list-style: disc; }
.bb-rich-body ol { list-style: decimal; }
.bb-rich-body blockquote { margin-inline: 0; padding-inline-start: 1em; border-inline-start: 3px solid #730027; }
.bb-rich-body pre { padding: .8em; overflow-x: auto; white-space: pre-wrap; background: #f5f3f4; }
.bb-rich-body img { display: block; max-width: 100%; height: auto; }
.bb-rich-body a { text-decoration: underline; }
.bb-rich-body .article-align-left { text-align: left; }
.bb-rich-body .article-align-center { text-align: center; }
.bb-rich-body .article-align-right { text-align: right; }
.bb-rich-body .article-align-justify { text-align: justify; }
.bb-rich-body .article-rich-image { margin: 1em 0; }
.bb-rich-body .article-rich-image figcaption { margin-top: .4em; }
.bb-rich-body .article-task-list { list-style: none; padding-inline-start: .2em; }
.bb-rich-body .article-task-item > p:first-of-type { display: inline; }

/* 글쓰기 대화상자의 스크롤 영역 밖에서 전송과 저장 상태를 알린다. */
.post-operation.file-progress {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 8px;
  margin: 0;
  padding: 8px 16px;
  background: #faf4f6;
  color: #57011e;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.post-operation [role=status] { grid-column-end: -1; }
.post-operation progress { grid-column: 1 / -1; width: 100%; height: 8px; accent-color: #730027; }
.post-spinner {
  display: inline-block;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: bb-post-spin .8s linear infinite;
}
@keyframes bb-post-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .post-spinner { animation: none; } }
.post-editor [type=submit] { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-inline-size: 9rem; }
.post-editor .post-field-error { margin: 2px 0 0; color: #a21e3f; font-size: 14px; line-height: 1.4; }
.post-operation[hidden], .post-operation [hidden], .post-editor [data-save-spinner][hidden],
.post-editor .post-field-error[hidden], .post-editor .form-error:empty { display: none; }
/* 본문은 한 줄 전체를 사용해 넓은 화면에서도 라벨 열만큼 비지 않게 한다. */
#dialog-body:has(> .post-editor) { padding: 8px clamp(8px, 1.5vw, 16px) 12px; }
.dialog-body .post-editor .post-body-field { grid-template-columns: minmax(0, 1fr); gap: 4px; margin-block: 8px; }
.post-editor > .field:first-child { margin-top: 0; }

/* 기사 문단 간격은 줄 간격과 분리하고 긴 제목·목록은 모바일에서도 자연스럽게 감싼다. */
.pr-article .article-rich-content {max-width:760px;margin-inline:auto;line-height:1.9;word-break:normal;overflow-wrap:anywhere}
.pr-article .article-rich-content > p {margin:0 0 1.25em}
.pr-article .article-rich-content h2 {font-size:clamp(22px,2.5vw,30px);line-height:1.5}
.pr-article .article-rich-content h3 {font-size:clamp(18px,2vw,24px);line-height:1.5}
.pr-article .article-rich-content li p {margin:.3em 0}
.pr-article .article-rich-content code {font-size:1em}
