/* 2026 리뉴얼. 원본 시안: snbpt.mycafe24.com/gumsi/assets/css/notices.css (2026-11-23, C13) */
.page-notices {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.page-notices .sub-main { flex: 1; }

.notice-count { margin-bottom: 12px; }
.notice-count strong { color: var(--color-heading); }

.notice-board {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  border-top: 2px solid var(--color-heading);
}

.notice-board th {
  background: var(--color-surface-emphasis);
  color: var(--color-heading);
}

.notice-board th:nth-child(-n+2) { width: 4.5em; }
.notice-board th:last-child { width: 8em; }

.notice-board :is(th, td) {
  padding: 14px 8px;
  border-bottom: 1px solid var(--color-surface-selected);
  text-align: center;
  overflow-wrap: anywhere;
}

.notice-board .notice-board-title { text-align: left; }
.notice-board-date { font-size: var(--note-text-size); }
.notice-board tbody tr:is(:hover, :focus-within) { background: var(--color-surface-emphasis); }

.notice-board-title a {
  display: block;
  padding-block: 6px;
  color: var(--color-heading);
  font-weight: 700;
}

.notice-article-heading {
  display: block;
  height: auto;
  padding: 18px clamp(12px, 2vw, 24px);
  border-top: 2px solid var(--color-heading);
  border-bottom: 1px solid var(--color-surface-selected);
  background: var(--color-surface-emphasis);
}

.page-home.page-notices main .notice-article-heading h2 {
  margin: 0;
  font-size: var(--section-title-size);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.page-notices .notice-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin: 12px 0 0;
  color: var(--color-text-muted);
  font-size: var(--note-text-size);
}

.notice-meta > div { display: flex; gap: 8px; }
.notice-meta dt { font-weight: 700; }
.notice-meta dd,
.notice-neighbors :is(dl, dd) { margin: 0; }

.notice-article-body {
  padding: clamp(24px, 4vw, 40px) clamp(12px, 2vw, 24px);
  border-bottom: 1px solid var(--color-surface-selected);
  font-size: var(--body-text-size);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.notice-article-body p + p { margin-top: 16px; }

.notice-related {
  color: var(--color-heading);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.notice-neighbors {
  position: static;
  display: block;
  margin-top: 24px;
  padding: 0;
  border-top: 1px solid var(--color-surface-selected);
  background: transparent;
  box-shadow: none;
  font: inherit;
}

.page-notices .notice-neighbors dl {
  display: block;
  color: inherit;
  font: inherit;
}

.notice-neighbors dl > div {
  display: grid;
  grid-template-columns: 5em minmax(0, 1fr);
  border-bottom: 1px solid var(--color-surface-selected);
}

.notice-neighbors dt,
.notice-neighbors dd { padding: 12px 8px; overflow-wrap: anywhere; }
.notice-neighbors dt { background: var(--color-surface-subtle); font-weight: 700; text-align: center; }
.notice-neighbors a { color: var(--color-heading); text-decoration: underline; }

.notice-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

.notice-actions .primary { background: var(--color-primary); }
.page-home .notice-actions .primary:is(:hover, :focus-visible) { background: var(--color-primary-hover); }

@media (max-width: 700px) {
  .notice-board,
  .notice-board tbody { display: block; }

  .notice-board thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .notice-board tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    padding: 12px;
    border-bottom: 1px solid var(--color-surface-selected);
  }

  .notice-board tbody tr[hidden] { display: none; }

  .notice-board td {
    padding: 0;
    border: 0;
    color: var(--color-text-muted);
    font-size: var(--note-text-size);
    text-align: left;
  }

  .notice-board .notice-board-title {
    order: -1;
    flex: 0 0 100%;
    min-width: 0;
    font-size: var(--body-text-size);
  }

  .notice-board-title a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }
}

/* 에디터(나모)로 쓴 본문의 인라인 글꼴·크기·줄간격·자간을 리뉴얼 본문 기준으로 통일 (C12, 2026-11-20).
   굵게·색·배경·밑줄·정렬은 유지. 크기가 본문 크기를 따르므로 큰글씨 보기에서 함께 커진다 */
.notice-article-body :where(*) {
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  letter-spacing: inherit !important;
}
.notice-article-body :where(p, li, div) { text-indent: 0 !important; }
/* 에디터 글은 줄마다 <p> + 빈 줄 <p><br></p> 로 문단을 나누므로 시안식 문단 간격을 빼야 빈 줄이 두 배가 되지 않는다 */
.notice-article-body.is-editor p + p { margin-top: 0; }
/* 본문 안 링크 : 전역 a 초기화로 일반 글자처럼 보이던 것 → 시안 본문 링크(.notice-related)와 같은 모양 */
.notice-article-body a:not(.notice-related) {
  color: var(--color-heading);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* ------------------------------------------------------------
   2026 리뉴얼(로컬 추가, C6): 관리시스템 공지 데이터 연동분.
   시안에 없는 검색줄·상단 고정 표식·첨부파일·빈 목록과, 편집기 본문(이미지·표)이 넘치지 않게 하는 규칙.
   ------------------------------------------------------------ */
.page-sub .notice-search.provider-search {
  display: grid;
  grid-template-columns: minmax(9em, 0.6fr) minmax(0, 2fr) auto;
  align-items: end;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px 24px;
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}
.page-sub .notice-search label { font-size: var(--note-text-size); }
.page-sub .notice-search :is(input, select) { height: 48px; font-size: var(--note-text-size); }
.page-sub .notice-search .provider-search-actions { align-items: center; }
.page-sub .notice-search .provider-reset {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--color-text);
  text-decoration: none;
}
.notice-count .notice-page-of { margin-left: 6px; color: var(--color-text-muted); font-size: var(--note-text-size); }
.notice-pin {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--color-primary);
  color: var(--color-surface);
  font-size: var(--note-text-size);
  font-weight: 700;
  line-height: 1.5;
}
.notice-board tr.is-pinned { background: var(--color-surface-emphasis); }
.notice-board .notice-clip { margin-left: 6px; vertical-align: -3px; opacity: .7; }
.notice-board .notice-board-empty td { padding: 40px 8px; color: var(--color-text-muted); text-align: center; }

.notice-article-body { overflow-wrap: anywhere; }
.notice-article-body :is(img, video, iframe) { max-width: 100%; height: auto; }
.notice-article-body table { display: block; max-width: 100%; overflow-x: auto; }

.notice-files {
  margin-top: 24px;
  padding: 16px 20px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface-subtle);
}
.page-home.page-notices main .notice-files h3 { margin: 0 0 8px; font-size: var(--note-text-size); }
.notice-files h3 span { color: var(--color-heading); }
.notice-files ul { margin: 0; padding: 0; list-style: none; }
.notice-files li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 4px 0; }
.notice-files a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--color-heading);
  text-decoration: underline;
  overflow-wrap: anywhere;
}
.notice-files .notice-file-size,
.notice-files .notice-file-desc { color: var(--color-text-muted); font-size: var(--note-text-size); }

@media (max-width: 700px) {
  .page-sub .notice-search.provider-search { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 12px; }
  .page-sub .notice-search .provider-search-actions { justify-content: flex-end; }
  .notice-board .notice-board-empty td { flex: 1 1 100%; text-align: center; }
}
