/* 공지사항 목록 공통 영역 */
.notice-section { padding: var(--tf-content-space) 0; }
.notice-heading { margin-bottom: 2.5rem; }
.notice-browser { display: flex; flex-direction: column; gap: 1.25rem; }
.notice-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.notice-total { margin: 0; font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
.notice-total strong { color: var(--color-primary-normal); font-weight: inherit; }
.notice-search { display: flex; height: 3.5rem; align-items: center; gap: .75rem; border: 1px solid var(--color-border-normal); border-radius: .75rem; padding: 0 1.25rem; }
.notice-search:focus-within { border-color: var(--palette-primary-60); box-shadow: 0 0 0 .1875rem rgba(37,110,244,.16); }
.notice-search input { min-width: 0; flex: 1; border: 0; padding: 0; outline: 0; font-size: 1rem; line-height: 1.5; }
.notice-search input::placeholder { color: var(--color-text-muted); }
.notice-search button { display: inline-grid; width: 1.5rem; height: 1.5rem; flex: 0 0 1.5rem; place-items: center; border: 0; padding: 0; background: transparent; }
.notice-search .tf-icon { width: 1.5rem; height: 1.5rem; }

/* 공지사항 표 */
.notice-table { overflow: hidden; border-top: 1px solid var(--color-text-normal); border-bottom: 1px solid var(--color-text-normal); }
.notice-table__header, .notice-table__row { display: grid; grid-template-columns: 7.1875rem 7.1875rem minmax(0,1fr) 6.25rem 8.125rem 6.875rem; column-gap: 1.25rem; align-items: center; }
.notice-table__header { min-height: 5.875rem; border-bottom: 1px solid var(--color-text-normal); font-size: 1.25rem; font-weight: 600; line-height: 1.5; letter-spacing: -.01em; text-align: center; }
.notice-table__row { min-height: 5.75rem; border-bottom: 1px solid var(--color-border-normal); color: var(--color-text-normal); }
.notice-table__row:last-child, .notice-table__row.is-page-last { border-bottom: 0; }
.notice-table__row--important-boundary { border-bottom-color: var(--color-text-normal); }
.notice-table__row > * { min-width: 0; }
.notice-table__number, .notice-table__category, .notice-table__views, .notice-table__date, .notice-table__attachment { display: flex; align-items: center; justify-content: center; padding: 1.25rem; font-size: 1rem; line-height: 1.5; }
.notice-table__title { overflow: hidden; padding: 2rem 2.5rem; font-size: 1.25rem; font-weight: 600; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.notice-table__views .tf-icon { display: none; }
.notice-table__row[hidden], .notice-table__empty[hidden] { display: none; }
.notice-table__row:hover .notice-table__title { color: var(--color-primary-normal); }
.notice-badge { display: inline-flex; min-height: 1.875rem; align-items: center; justify-content: center; border-radius: var(--tf-radius-pill); padding: .375rem .75rem; font-size: .75rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.notice-badge--important { color: var(--common-white); background: var(--color-status-danger); }
.notice-badge--category { color: var(--color-primary-normal); background: var(--palette-primary-95); }
.notice-table__attachment .tf-icon { width: 1.5rem; height: 1.5rem; }
.notice-table__empty { display: flex; min-height: 5.875rem; align-items: center; justify-content: center; margin: 0; padding: 2rem 2.5rem; font-size: var(--tf-text-emphasis, 1.25rem); line-height: 1.5; text-align: center; }

/* 형태는 공통 페이지네이션, 목록과의 간격만 지정 */
.notice-pagination { margin-top: 1.25rem; }

/* 공지사항 상세 */
.notice-detail-section { padding: var(--tf-content-space) 0; }
.notice-detail { display: flex; flex-direction: column; gap: 1.25rem; }
.notice-detail__header { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; border-bottom: 1px solid var(--color-border-normal); padding-bottom: 2.5rem; text-align: center; }
.notice-detail__header h1 { max-width: 100%; margin: 0; font-size: 2rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.notice-detail__header time { color: var(--color-text-muted); font-size: var(--tf-text-body-lg, 1.125rem); font-weight: 500; line-height: 1.5; }
.notice-detail__body { min-width: 0; padding: var(--tf-panel-space, 2.5rem); background: var(--color-background-alt); font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere; }
.notice-detail__body p { margin: 0; }
.notice-detail__body p + p { margin-top: .5rem; }
.notice-detail__body img, .notice-detail__body video, .notice-detail__body iframe { max-width: 100%; }
.notice-detail__body img, .notice-detail__body video { height: auto; }
.notice-detail__body:empty { display: none; }
.notice-detail__files { overflow: hidden; border: 1px solid var(--color-border-normal); border-radius: 1.25rem; padding: 0 var(--tf-panel-space, 2.5rem); }
.notice-file-row { display: flex; align-items: center; gap: 1.25rem; padding: 1.25rem 0; }
.notice-file-row + .notice-file-row { border-top: 1px solid var(--color-background-alt); }
.notice-file-row--empty { min-height: 5rem; color: var(--color-text-muted); font-size: var(--tf-text-body-lg, 1.125rem); line-height: 1.5; }
.notice-file-row__icon { display: inline-grid; width: 2.5rem; height: 2.5rem; flex: 0 0 2.5rem; place-items: center; border-radius: 50%; background: var(--color-background-alt); }
.notice-file-row__icon .tf-icon { width: 1.5rem; height: 1.5rem; }
.notice-file-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem 1.25rem; min-width: 0; flex: 1; }
.notice-file { display: flex; min-width: 0; min-height: 2.5rem; align-items: center; gap: 1.25rem; font-size: 1rem; font-weight: 500; }
.notice-file:nth-child(even) { border-left: 1px solid var(--color-text-disable); padding-left: 1.25rem; }
.notice-file__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-file__bullet { flex-shrink: 0; }
.notice-file__preview { flex-shrink: 0; }
.notice-file__preview[hidden] { display: none; }
.notice-viewer { display: flex; min-width: 0; align-items: center; gap: 1.25rem; }
.notice-viewer-label { font-size: 1rem; font-weight: 500; }
.notice-detail__navigation { display: grid; grid-template-columns: 13.125rem 1fr 13.125rem; align-items: center; border-top: 1px solid var(--color-border-normal); padding: var(--tf-panel-space, 2.5rem); }
.notice-detail__navigation > a, .notice-detail__navigation > span { display: flex; min-width: 0; min-height: 2.5rem; align-items: center; gap: .75rem; font-size: 1.125rem; font-weight: 600; }
.notice-detail__navigation .tf-icon { width: 2.5rem; height: 2.5rem; flex-basis: 2.5rem; -webkit-mask-size: 1.5rem; mask-size: 1.5rem; }
.notice-detail__mobile-label, .notice-detail__adjacent-title, .notice-detail__mobile-list { display: none; }
.notice-detail__list { justify-self: center; border-bottom: 1px solid var(--color-border-normal); }
.notice-detail__next { justify-self: end; justify-content: flex-end; text-align: right; }
.notice-detail__disabled { color: var(--color-text-muted); }
.notice-detail__missing { margin: 0; padding: 5rem 0; text-align: center; }

/* 소형 PC: 표의 제목 열만 남는 너비를 사용 */
@media (min-width: 1200px) and (max-width: 1919.98px) {
  .notice-table__header, .notice-table__row { grid-template-columns: 5rem 6.5625rem minmax(0, 1fr) 5.75rem 8.125rem 6.875rem; column-gap: 0; }
}

/* 태블릿: 줄바꿈 가능한 표와 세로 첨부파일 목록 */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .notice-heading > small { font-weight: 400; }
  .notice-table__header, .notice-table__row { grid-template-columns: 3.75rem 4.0625rem minmax(0, 1fr) 4.75rem 6.25rem 5.3125rem; column-gap: 0; }
  .notice-table__number, .notice-table__category, .notice-table__views, .notice-table__date, .notice-table__attachment { padding-inline: 0; }
  .notice-table__title { white-space: normal; overflow-wrap: anywhere; }
  .notice-detail__header h1 { font-size: 1.5rem; }
  .notice-detail__navigation { padding-inline: 0; }
}
@media (max-width: 1199.98px) {
  .notice-file-list { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .notice-file:nth-child(even) { border-left: 0; padding-left: 0; }
  .notice-file__preview, .notice-viewer-link { height: 2rem; font-size: .875rem; }
  .notice-file__preview .tf-icon, .notice-viewer-link .tf-icon { -webkit-mask-size: 1rem; mask-size: 1rem; }
}

/* 모바일: 같은 공지 행을 카드형 목록으로 재배치 */
@media (max-width: 767.98px) {
  .notice-section { padding-block: var(--number-40); }
  .notice-toolbar { flex-direction: column; align-items: stretch; gap: var(--number-20); }
  .notice-search { order: -1; }
  .notice-total { font-size: 1.125rem; line-height: 1.5; }
  .notice-table { border-color: var(--color-border-normal); }
  .notice-table__header, .notice-table__number, .notice-table__attachment { display: none; }
  .notice-table__row { grid-template-columns: max-content minmax(0, 1fr); grid-template-areas: "category category" "title title" "views date"; column-gap: .5rem; row-gap: .5rem; min-height: 0; padding: 1.25rem .25rem; }
  .notice-table__row--important-boundary { border-bottom-color: var(--color-border-normal); }
  .notice-table__category { grid-area: category; justify-content: flex-start; margin-bottom: .25rem; padding: 0; }
  .notice-table__title { grid-area: title; padding: 0; font-size: 1rem; line-height: 1.5; }
  .notice-table__views { grid-area: views; gap: .25rem; }
  .notice-table__views, .notice-table__date { justify-content: flex-start; padding: 0; color: var(--color-text-muted); font-size: .875rem; }
  .notice-table__views .tf-icon { display: inline-block; width: 1rem; height: 1rem; flex-basis: 1rem; color: var(--palette-neutral-20); }
  .notice-table__date { grid-area: date; gap: .5rem; }
  .notice-table__date::before { width: 1px; height: .75rem; background: var(--color-text-subtle); content: ""; }

  .notice-detail__header { gap: .75rem; padding-bottom: 1.25rem; }
  .notice-detail__header h1 { font-size: 1.25rem; font-weight: 600; line-height: 1.5; }
  .notice-detail__body p + p { margin-top: 0; }
  .notice-detail__files { border-inline: 0; border-radius: 0; padding-inline: 0; }
  .notice-file__bullet { display: none; }
  .notice-file__preview { width: 3rem; padding-inline: 0; }
  .notice-file__preview-label { display: none; }
  .notice-viewer { flex-direction: column; align-items: flex-start; gap: .375rem; }
  .notice-detail__navigation { grid-template-columns: minmax(0, 1fr); border: 0; padding: 0; }
  .notice-detail__navigation > a, .notice-detail__navigation > span { width: 100%; justify-self: stretch; justify-content: flex-start; padding-block: .5rem; font-size: 1rem; line-height: 1.5; text-align: left; }
  .notice-detail__navigation .tf-icon, .notice-detail__desktop-label, .notice-detail__navigation .notice-detail__list { display: none; }
  .notice-detail__mobile-label { display: inline; flex-shrink: 0; color: var(--color-text-normal); }
  .notice-detail__mobile-label::after { display: inline-block; width: 1px; height: 1.25rem; margin-left: .75rem; vertical-align: middle; background: var(--color-text-subtle); content: ""; }
  .notice-detail__adjacent-title { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .notice-detail__mobile-list { display: inline-flex; align-self: center; }
}
