.board-page .sub-page-main {
  min-width: 0;
}

.board-list-section,
.board-view {
  width: 100%;
  word-break: keep-all;
}

.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.board-total {
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0;
}

.board-total strong {
  color: var(--ink);
  font-weight: 850;
}

.board-search {
  display: grid;
  grid-template-columns: 120px minmax(220px, 360px) 98px;
  min-height: 44px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--gray-100);
}

.board-search select,
.board-search input,
.board-search button {
  min-width: 0;
  border: 0;
  font: inherit;
  letter-spacing: 0;
}

.board-search select {
  padding: 0 18px;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
  font-weight: 750;
}

.board-search input {
  padding: 0 16px;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
}

.board-search input::placeholder {
  color: var(--gray-500);
}

.board-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--white);
  background: #000;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.board-search button i {
  font-size: 14px;
}

.board-table-wrap {
  overflow-x: auto;
}

.board-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  table-layout: fixed;
  border-top: 1px solid #111;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
}

.board-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.board-table th,
.board-table td {
  height: 58px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-300);
  text-align: center;
  vertical-align: middle;
}

.board-table thead th {
  background: var(--gray-100);
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.board-table tbody td {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.board-col-number {
  width: 90px;
}

.board-col-title {
  width: auto;
}

.board-col-writer {
  width: 140px;
}

.board-col-date {
  width: 150px;
}

.board-table td.board-title-cell {
  text-align: left;
}

.board-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.board-title-cell a {
  display: inline-block;
  max-width: 100%;
  color: var(--ink);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-title-cell a:hover,
.board-title-cell a:focus {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.board-notice-badge,
.board-title-notice,
.board-view-notice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 999px;
  color: var(--white);
  background: var(--navy);
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
}

.board-notice-badge {
  min-width: 46px;
  height: 26px;
  padding: 0 12px;
  font-size: 13px;
}

.board-title-notice {
  height: 22px;
  padding: 0 9px;
  font-size: 12px;
}

.board-view-notice {
  height: 30px;
  padding: 0 13px;
  margin-bottom: 12px;
  font-size: 13px;
}

.board-table tr.is-notice {
  background: rgba(41, 41, 79, 0.04);
}

.board-empty {
  color: var(--gray-600);
  font-weight: 650;
  text-align: center;
}

.board-empty-box {
  padding: 48px 16px;
  border-top: 1px solid #111;
  border-bottom: 1px solid var(--gray-300);
}

.board-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 34px;
}

.board-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  border: 1px solid var(--gray-300);
  color: var(--ink);
  background: var(--white);
  font-size: 14px;
  font-weight: 750;
  line-height: 1;
  gap: 3px;
}

.board-pagination a:hover,
.board-pagination a:focus,
.board-pagination a.is-active {
  color: var(--white);
  background: var(--navy);
  border-color: var(--navy);
}

.board-pagination .page-control i {
  font-size: 12px;
}

.board-pagination .page-jump i + i {
  margin-left: -5px;
}

.sermon-board-table {
  min-width: 810px;
}

.sermon-board-table th,
.sermon-board-table td {
  height: 92px;
  padding: 10px 14px;
}

.sermon-board-table thead th {
  height: 52px;
}

.sermon-col-video {
  width: 170px;
}

.sermon-col-title {
  width: auto;
}

.sermon-col-scripture {
  width: 190px;
}

.sermon-col-writer {
  width: 96px;
}

.sermon-col-date {
  width: 104px;
}

.sermon-video-cell {
  padding: 8px 12px;
}

.sermon-table-thumb {
  position: relative;
  display: block;
  width: 146px;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  overflow: hidden;
  background: var(--gray-100);
}

.sermon-table-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sermon-table-thumb .sermon-play {
  width: 42px;
  height: 30px;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.sermon-table-thumb .sermon-play i {
  font-size: 12px;
}

.sermon-title-cell a {
  font-size: 15px;
  font-weight: 800;
}

.sermon-info-cell {
  color: var(--gray-700);
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sermon-board-table tbody .sermon-writer-cell,
.sermon-board-table tbody .sermon-date-cell {
  font-size: 13px;
}

.sermon-board-table tbody .sermon-date-cell {
  line-height: 1.28;
}

.sermon-date-cell time {
  display: inline-block;
  font-weight: 750;
}

.sermon-date-cell span {
  white-space: nowrap;
}

.sermon-board-list {
  border-top: 2px solid var(--gray-400);
}

.sermon-board-list li {
  border-bottom: 1px solid var(--gray-300);
}

.sermon-board-item {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  align-items: center;
  gap: 34px;
  min-height: 148px;
  padding: 10px 0 11px;
  color: var(--ink);
}

.sermon-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--gray-100);
}

.sermon-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sermon-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 40px;
  transform: translate(-50%, -50%);
  border-radius: 12px;
  color: var(--white);
  background: #e62117;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

.sermon-play i {
  margin-left: 3px;
  font-size: 16px;
}

.sermon-summary {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.sermon-line {
  display: grid;
  grid-template-columns: 14px auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
}

.sermon-line i {
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 11px solid #111;
}

.sermon-line b {
  color: var(--gray-700);
  font-weight: 750;
  white-space: nowrap;
}

.sermon-line span,
.sermon-line time,
.sermon-line strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sermon-title-line {
  color: var(--ink);
  font-size: 18px;
}

.sermon-title-line strong {
  color: var(--ink);
  font-weight: 850;
}

.sermon-board-item:hover .sermon-title-line strong,
.sermon-board-item:focus .sermon-title-line strong {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.board-view {
  border-top: 1px solid #111;
}

.board-view-head {
  padding: 24px 18px 18px;
  border-bottom: 1px solid var(--gray-200);
}

.board-view-head h3 {
  color: var(--ink);
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 850;
  line-height: 1.35;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.board-view-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 26px;
  margin-top: 18px;
}

.board-view-meta div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
}

.board-view-meta dt {
  color: var(--ink);
  font-weight: 800;
}

.sermon-view-detail {
  display: grid;
  gap: 9px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--gray-200);
}

.sermon-view-detail div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  color: var(--gray-700);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.sermon-view-detail dt {
  color: var(--ink);
  font-weight: 850;
}

.sermon-view-detail dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

.board-view-media {
  padding: 30px 18px 0;
}

.board-view-media iframe,
.board-view-media img,
.board-view-media video {
  display: block;
  width: 100%;
  border: 0;
  background: var(--gray-100);
}

.board-view-media iframe {
  aspect-ratio: 16 / 9;
  height: auto;
}

.board-view-media img {
  max-height: 620px;
  object-fit: contain;
}

.board-view-media video {
  aspect-ratio: 16 / 9;
  height: auto;
}

.board-view-body {
  min-height: 190px;
  padding: 34px 18px;
  border-bottom: 1px solid var(--gray-200);
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.85;
  letter-spacing: 0;
  word-break: normal;
  overflow-wrap: anywhere;
}

.board-view-body p + p {
  margin-top: 12px;
}

.board-view-body p {
  max-width: 100%;
}

.board-view-body iframe {
  display: block;
  width: min(100%, 640px);
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}

.board-view-body img {
  max-width: 100%;
  height: auto;
}

.board-view-actions {
  display: flex;
  justify-content: flex-end;
  padding: 38px 0 46px;
}

.board-list-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  min-height: 46px;
  border: 1px solid #111;
  border-radius: 999px;
  color: #111;
  background: var(--white);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0;
}

.board-list-button:hover,
.board-list-button:focus {
  color: var(--white);
  background: var(--navy);
  border-color: var(--navy);
}

.board-post-nav {
  border-top: 1px solid var(--gray-200);
}

.board-post-nav a {
  display: grid;
  grid-template-columns: 72px 44px minmax(0, 1fr);
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid var(--gray-200);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
}

.board-post-nav a.is-disabled {
  color: var(--gray-500);
  pointer-events: none;
}

.board-post-nav span {
  padding-left: 18px;
  font-weight: 650;
}

.board-post-nav i {
  color: var(--ink);
  font-size: 12px;
  text-align: center;
}

.board-post-nav strong {
  min-width: 0;
  padding: 0 18px;
  border-left: 1px solid var(--gray-200);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-file-list {
  margin-top: 28px;
  padding: 20px 22px;
  border: 1px solid var(--gray-300);
  background: var(--gray-100);
}

.board-file-list > strong {
  display: block;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.35;
}

.board-file-list ul {
  display: grid;
  gap: 8px;
}

.board-file-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.board-file-list a:hover,
.board-file-list a:focus {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.gallery-board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 46px 24px;
}

.gallery-card {
  min-width: 0;
}

.gallery-card-link {
  display: block;
  color: var(--ink);
}

.gallery-card-image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 8px;
  background: var(--gray-100);
}

.gallery-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.gallery-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.gallery-card-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  color: var(--white);
  background: var(--navy);
  font-size: 28px;
}

.gallery-notice-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 1;
}

.gallery-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 26px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
}

.gallery-card-title-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-card-date {
  display: block;
  margin-top: 20px;
  color: var(--gray-700);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
}

.gallery-card-link:hover .gallery-card-overlay,
.gallery-card-link:focus .gallery-card-overlay {
  opacity: 1;
}

.gallery-card-link:hover .gallery-card-image img,
.gallery-card-link:focus .gallery-card-image img {
  transform: scale(1.04);
}

.gallery-card-link:hover .gallery-card-title,
.gallery-card-link:focus .gallery-card-title,
.gallery-card-link:hover .gallery-card-date,
.gallery-card-link:focus .gallery-card-date {
  color: var(--blue);
}

@media (max-width: 900px) {
  .board-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .board-search {
    width: 100%;
    grid-template-columns: 110px minmax(0, 1fr) 92px;
  }

  .sermon-board-table {
    min-width: 710px;
  }

  .sermon-col-video {
    width: 150px;
  }

  .sermon-col-scripture {
    width: 170px;
  }

  .sermon-col-writer,
  .sermon-col-date {
    width: 96px;
  }

  .sermon-table-thumb {
    width: 126px;
  }

  .board-view-actions {
    padding: 30px 0 38px;
  }

  .sermon-board-item {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 24px;
  }

  .gallery-board-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 38px 20px;
  }
}

@media (max-width: 640px) {
  .board-toolbar {
    gap: 16px;
    margin-bottom: 20px;
  }

  .board-search {
    grid-template-columns: 1fr;
    border-radius: 0;
    background: transparent;
    gap: 8px;
  }

  .board-search select,
  .board-search input,
  .board-search button {
    min-height: 42px;
    border-radius: 0;
  }

  .board-search select,
  .board-search input {
    border: 1px solid var(--gray-300);
    background: var(--white);
  }

  .board-search button {
    width: 100%;
  }

  .board-table {
    min-width: 620px;
    font-size: 14px;
  }

  .board-table th,
  .board-table td {
    height: 52px;
    padding: 12px 10px;
  }

  .board-notice-badge {
    min-width: 42px;
    height: 24px;
    padding: 0 10px;
    font-size: 12px;
  }

  .board-pagination {
    gap: 4px;
    margin-top: 26px;
  }

  .board-pagination a {
    min-width: 34px;
    height: 34px;
    font-size: 13px;
  }

  .sermon-board-item {
    grid-template-columns: 1fr;
    gap: 13px;
    min-height: 0;
    padding: 14px 0;
  }

  .sermon-summary {
    gap: 8px;
  }

  .sermon-line {
    grid-template-columns: 14px auto minmax(0, 1fr);
    gap: 8px;
    font-size: 14px;
  }

  .sermon-line i {
    border-top-width: 8px;
    border-bottom-width: 8px;
    border-left-width: 11px;
  }

  .sermon-title-line {
    font-size: 17px;
  }

  .board-col-number {
    width: 70px;
  }

  .board-col-writer {
    width: 110px;
  }

  .board-col-date {
    width: 124px;
  }

  .board-view-head {
    padding: 20px 0 16px;
  }

  .board-view-head h3 {
    font-size: 21px;
    line-height: 1.38;
  }

  .board-view-meta {
    gap: 10px 18px;
  }

  .board-view-body {
    min-height: 160px;
    padding: 28px 0;
    font-size: 15px;
    word-break: break-all;
  }

  .sermon-view-detail {
    margin-top: 18px;
  }

  .sermon-view-detail div {
    grid-template-columns: 54px minmax(0, 1fr);
    font-size: 14px;
  }

  .board-view-media {
    padding: 24px 0 0;
  }

  .board-view-body p {
    word-break: break-all;
  }

  .board-file-list {
    padding: 18px 16px;
  }

  .board-view-actions {
    justify-content: stretch;
    padding: 28px 0 34px;
  }

  .board-list-button {
    width: 100%;
  }

  .board-post-nav a {
    grid-template-columns: 58px 34px minmax(0, 1fr);
    font-size: 14px;
  }

  .board-post-nav span {
    padding-left: 0;
  }

  .board-post-nav strong {
    padding: 0 10px;
  }

  .gallery-board-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .gallery-card-title {
    margin-top: 18px;
    font-size: 16px;
  }

  .gallery-card-date {
    margin-top: 12px;
    font-size: 14px;
  }

  .gallery-card-plus {
    width: 54px;
    height: 54px;
    font-size: 24px;
  }
}
