.sv h2 {
  font-family: "pretendard", sans-serif;
}

.sv p {
  font-family: "pretendard", sans-serif;
}

.notice .layout__basic {
  padding-top: 100px;
  padding-bottom: 100px;
}

.notice__content {
  margin-top: 100px;
}

.notice__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
}

.notice__total {
  color: #888;
  font-size: 14px;
}

/* 검색 */
.notice__search {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  /* 버튼 absolute 기준 */
}

/* 셀렉트 */
.notice__search select {
  min-width: 92px;
  height: 40px;
  padding: 0 36px 0 18px;
  /* 오른쪽 여백 확보 */
  border-radius: 20px;
  background: #f0f0f0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 19.28 12.09'%3E%3Cpolyline fill='none' stroke='%23666' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' points='1 1 9.64 11.09 18.28 1'/%3E%3C/svg%3E") no-repeat right 12px center / 12px auto;
  font-size: 14px;
  border: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

/* IE용 화살표 제거 */
.notice__search select::-ms-expand {
  display: none;
}


/* 검색 인풋 */
.notice__search input {
  width: 220px;
  height: 40px;
  padding: 0 40px 0 12px;
  /* 오른쪽 버튼 자리 확보 */
  border-radius: 20px;
  background: #f0f0f0;
  font-size: 14px;
  border: none;
  outline: none;
}

/* 검색 버튼 (인풋 안쪽 우측 배치) */
.notice__search .btn-search {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: none;
  background: #111;
  cursor: pointer;

  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21.81 21.81'%3E%3Ccircle fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' cx='8.19' cy='8.19' r='7.69'/%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' d='M14.46 15.46v.12a2.64 2.64 0 00.76 1.83l3.49 3.49a1.47 1.47 0 002 0l.14-.13a1.46 1.46 0 000-2L17.4 15.24a2.59 2.59 0 00-1.85-.77h-.12Z'/%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' d='M14.94 15l-1.32-1.32'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21.81 21.81'%3E%3Ccircle fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' cx='8.19' cy='8.19' r='7.69'/%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' d='M14.46 15.46v.12a2.64 2.64 0 00.76 1.83l3.49 3.49a1.47 1.47 0 002 0l.14-.13a1.46 1.46 0 000-2L17.4 15.24a2.59 2.59 0 00-1.85-.77h-.12Z'/%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' d='M14.94 15l-1.32-1.32'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* 표 */
.notice__table {
  border-top: 2px solid #111;
}

.notice__row {
  display: grid;
  grid-template-columns: 80px 1fr 160px 160px 120px;
  align-items: center;
}

.notice__row:not(.notice__row--head) {
  border-bottom: 1px solid #e6e6e6;
}

.notice__row--head {
  border-bottom: 1px solid #111;
}

.notice__row--head .col {
  padding: 14px 10px;
  color: #444;
  font-size: 14px;
}

.notice__row--empty .col-empty {
  text-align: center;
  padding: 40px 0;
  color: #666;
  font-size: 15px;
}

.notice__row .col {
  padding: 22px 10px;
  font-size: 16px;
  color: #222;
}

.col-no,
.col-writer,
.col-date,
.col-hit {
  text-align: center;
}

.col-subject {
  display: flex;
}

.col-subject a {
  color: #111;
  text-decoration: none;
  font-weight: 600;
}

.badge {
  display: block;
  margin-left: 8px;
  padding: 2px 6px;
  font-size: 10px;
  border-radius: 10px;
  border: 1px solid #ddd;
  color: #666;
}

.badge.new {
  border-color: #999;
  color: #999;
}

.notice_badge {
  font-weight: 900;
}

/* 바닥 */
.notice__foot {
  display: flex;
  flex-direction: column;
  /* 세로 정렬 */
  gap: 12px;
  margin-top: 24px;
}

/* 페이지네이션: 가운데 정렬 */
.paginate {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.paginate a,
.paginate span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  text-decoration: none;
  color: #999;
  transition: all 0.25s ease;
}

.paginate a {
  background: transparent;
  border: none;
}

/* 현재 페이지 */
.paginate .pg_current {
  background: #111;
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  cursor: default;
  border-radius: 50%;
}

/* hover 효과 */
.paginate a:hover:not(.pg_current) {
  color: #000;
  font-weight: 900;
  background: transparent;
}

/* 이전/다음 화살표 */
.paginate .pg_start,
.paginate .pg_prev,
.paginate .pg_next,
.paginate .pg_end {
  font-size: 0;
  position: relative;
}

.paginate .pg_start::before,
.paginate .pg_prev::before,
.paginate .pg_next::before,
.paginate .pg_end::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.paginate .pg_start::before {
  transform: rotate(225deg);
}

.paginate .pg_prev::before {
  transform: rotate(225deg);
}

.paginate .pg_next::before {
  transform: rotate(45deg);
}

.paginate .pg_end::before {
  transform: rotate(45deg);
}

/* 색감 정돈 */
.paginate .pg_start,
.paginate .pg_prev,
.paginate .pg_next,
.paginate .pg_end {
  color: #999;
}

.paginate .pg_start:hover,
.paginate .pg_prev:hover,
.paginate .pg_next:hover,
.paginate .pg_end:hover {
  color: #111;
}

/* 버튼 영역: 오른쪽 정렬 */
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn-line,
.btn-fill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  text-decoration: none;
}

.btn-line {
  border: 1px solid #ddd;
  color: #333;
  background: #fff;
}

.btn-fill {
  background: #111;
  color: #fff;
}

/* 반응형 */
@media (max-width: 1024px) {
  .notice__row {
    grid-template-columns: 60px 1fr 120px 120px 90px;
  }

  .notice__search input {
    width: 160px;
  }
}

@media (max-width: 640px) {
  .notice__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .notice__row {
    grid-template-columns: 1fr;
  }

  .notice__row--head {
    display: none;
  }

  .notice__row .col {
    padding: 14px 0;
  }

  .col-no,
  .col-writer,
  .col-date,
  .col-hit {
    text-align: left;
    color: #666;
    font-size: 13px;
  }

  .notice__row > .col {
    display: flex;
    gap: 8px;
  }

  .notice__row > .col.col-subject {
    order: 1;
    font-size: 16px;
  }

  .notice__row > .col.col-no {
    order: 0;
  }

  .notice__row > .col.col-writer,
  .notice__row > .col.col-date,
  .notice__row > .col.col-hit {
    order: 2;
  }
}

/* ===== View ===== */
.board__view {
  border-top: 2px solid #111;
}

.view__head {
  padding: 20px 0;
  border-bottom: 1px solid #e6e6e6;
}

.view__title {
  font-size: 24px;
  line-height: 1.4;
  margin: 0 0 10px;
}

.view__meta {
  display: flex;
  gap: 18px;
  color: #666;
  font-size: 14px;
}

.view__meta span {
  margin-right: 6px;
  color: #999;
}

.view__attach {
  padding: 18px 0;
  border-bottom: 1px solid #f0f0f0;
}

.view__attach h3 {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.view__attach ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.view__attach a {
  color: #333;
  text-decoration: none;
}

.view__attach a:hover {
  text-decoration: underline;
}

.view__content {
  padding: 28px 0;
  line-height: 1.8;
  color: #222;
  border-bottom: 2px solid #000;
}

.view__content img {
  max-width: 100%;
  height: auto;
}

.view__nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #e6e6e6;
}

.view__nav a,
.view__nav span {
  display: block;
  max-width: 48%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #444;
  font-size: 14px;
  text-decoration: none;
}

.view__nav .disabled {
  color: #bbb;
  cursor: default;
}

.view__nav span:first-child::before {
  content: "";
}

.view__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 18px;
}

/* ===== Write ===== */
.board__form {
  border-top: 2px solid #111;
  margin-top: 100px;
}

.board__form .form__row {
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}

.board__form label {
  display: block;
  font-size: 14px;
  color: #555;
  margin-bottom: 8px;
}

.board__form label b {
  color: #d33;
  font-weight: 600;
}

.board__form input[type="text"],
.board__form input[type="password"],
.board__form input[type="email"],
.board__form input[type="file"],
.board__form textarea {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
}

.board__form textarea {
  height: 220px;
  padding: 12px;
}

.form__grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.file {
  background-color: #f0f0f0;
}

/* 래퍼 */
.files {
  display: grid;
  gap: 10px;
}

/* 한 줄 */
.file__item {
  display: grid;
  grid-template-columns: 1fr;
  /* 모바일 기본: 세로쌓기 */
  gap: 8px;
}

/* 파일 입력 */
.file__item input[type="file"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
}

/* 기존 파일 표시 + 삭제 버튼 박스 */
.file__current {
  display: grid;
  grid-template-columns: 1fr auto;
  /* 파일명 왼쪽, 삭제 오른쪽 */
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #f0f0f0;
  background: #fafafa;
  border-radius: 8px;
}

/* 파일명: 말줄임 */
.fname {
  min-width: 0;
  font-size: 13px;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 삭제 pill 버튼 (커스텀 체크박스) */
.file__del {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #e5e5e5;
  background: #fff;
  color: #888;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}

/* 실제 체크박스 숨김 */
.file__del input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

/* hover */
.file__del:hover {
  border-color: #d0d0d0;
  color: #555;
}

/* 체크 시 강조 (삭제 의도 명확) */
.file__del input:checked + span {
  color: #fff;
  background: #e53935;
  border-color: #e53935;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-block;
}

.file__del input:checked + span::before {
  content: "× ";
  font-weight: 700;
}

.form__options {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  color: #444;
  font-size: 14px;
}

/* 라벨 정렬 */
.form__options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* 체크박스 기본 스타일 */
.form__options input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid #ccc;
  border-radius: 2px;
  /* 정사각형 */
  background-color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  padding: 0;
}

/* hover 시 테두리 강조 */
.form__options input[type="checkbox"]:hover {
  border-color: #888;
}

/* 체크 상태 */
.form__options input[type="checkbox"]:checked {
  background-color: #111;
  border-color: #111;
}

/* 체크 표시 (✓) */
.form__options input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 6px;
  width: 4px;
  height: 8px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

/* 텍스트 */
.form__options label span,
.form__options label {
  color: #444;
  font-size: 14px;
}

.form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

/* 모바일 */
@media (max-width:640px) {
  .view__title {
    font-size: 20px;
  }

  .form__grid2 {
    grid-template-columns: 1fr;
  }
}