/* 홈 텍스트 목록형 게시판 — preview-home-textlist 양식 */

#rd-home.rd-home-boards {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 16px 80px;
  background: #fff;
  min-height: 60vh;
}

#rd-home.rd-home-boards .rd-datebar {
  border-bottom: 1px solid #D9D3C6;
  margin-bottom: 18px;
}
#rd-home.rd-home-boards .rd-datebar-inner {
  max-width: none;
  margin: 0;
  padding: 4px 0 14px;
  font-size: 12px;
}

#rd-home.rd-home-boards.is-search-mode > :not(#site-search-page) {
  display: none !important;
}
#rd-home.rd-home-boards.is-search-mode > #site-search-page {
  display: block;
}

.htb-panel { display: none; }
.htb-panel.is-active { display: block; }

.htb-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.htb-panel-head h1 {
  margin: 0;
  font-family: var(--font-serif, "Noto Serif KR", serif);
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #16181D;
}
.htb-panel-head .more {
  font-size: 13px;
  color: #5A5F69;
  white-space: nowrap;
  text-decoration: none;
}
.htb-panel-head .more:hover { color: #B23A0B; }
.htb-panel-desc {
  margin: 0 0 16px;
  font-size: 14px;
  color: #5A5F69;
}

.htb-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
}
.htb-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 100%;
  padding-bottom: 2px;
}
.htb-filters::-webkit-scrollbar { display: none; }
.htb-filters .filter-label {
  font-size: 12px;
  font-weight: 700;
  color: #5A5F69;
  margin-right: 2px;
  flex: 0 0 auto;
}
.htb-filter-chip {
  border: 1px solid #D9D3C6;
  border-radius: 999px;
  background: #fff;
  color: #33363D;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 11px;
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
}
.htb-filter-chip:hover { border-color: #5A5F69; color: #16181D; }
.htb-filter-chip.is-active {
  background: #B23A0B;
  border-color: #B23A0B;
  color: #fff;
}
.htb-filter-chip--home {
  font-weight: 700;
  color: #16181D;
  border-color: #B8B2A6;
}
.htb-meta {
  width: 100%;
  font-size: 12px;
  color: #5A5F69;
}

.htb-board {
  --board-cols: 52px minmax(0, 1fr) 72px 64px 72px 56px;
  background: #fff;
  border: 1px solid #D9D3C6;
  border-radius: 10px;
  overflow: hidden;
}
.htb-board .htb-list {
  border: 0;
  border-radius: 0;
  background: transparent;
}
.htb-board .htb-head,
.htb-board .htb-row {
  display: grid;
  grid-template-columns: var(--board-cols);
  gap: 8px 10px;
  align-items: center;
  padding: 11px 14px;
}
.htb-board .htb-head {
  background: #F4F4F5;
  border-bottom: 1px solid #D9D3C6;
  font-size: 12px;
  font-weight: 700;
  color: #5A5F69;
  letter-spacing: -0.02em;
}
.htb-board .htb-head span { text-align: center; }
.htb-board .htb-head .col-title { text-align: center; }
.htb-board .htb-row {
  font-size: 14px;
  border-bottom: 1px solid #D9D3C6;
  color: inherit;
  text-decoration: none;
}
.htb-board .htb-row:last-child { border-bottom: 0; }
.htb-board .htb-row:hover { background: #F7F7F8; }
.htb-board .col-num,
.htb-board .col-cat,
.htb-board .col-date,
.htb-board .col-views,
.htb-board .col-likes {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: #5A5F69;
  white-space: nowrap;
}
.htb-board .col-title {
  min-width: 0;
  font-weight: 600;
  color: #16181D;
  text-align: left;
}
.htb-board .htb-row--today {
  background: #FFF8F3;
}
.htb-board .htb-today-tag {
  font-style: normal;
  font-weight: 700;
  font-size: 11px;
  color: #B23A0B;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(178, 58, 11, 0.1);
  vertical-align: middle;
}
.htb-board .col-views,
.htb-board .col-likes {
  font-weight: 500;
  color: #33363D;
}
.htb-cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #B23A0B;
  background: rgba(178, 58, 11, 0.08);
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: -0.02em;
}

.htb-sort-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.htb-sort-btn:hover { color: #B23A0B; }
.htb-sort-btn.is-active { color: #B23A0B; }
.htb-sort-btn .sort-ind {
  font-size: 10px;
  opacity: 0.45;
  font-weight: 700;
}
.htb-sort-btn.is-active .sort-ind { opacity: 1; }

.htb-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
  margin: 18px 0 8px;
  padding: 0;
}
.htb-pager[hidden] { display: none; }
.htb-pager button {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #D9D3C6;
  border-radius: 8px;
  background: #fff;
  color: #16181D;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.htb-pager button:hover { border-color: #5A5F69; color: #B23A0B; }
.htb-pager button.is-active {
  background: #B23A0B;
  border-color: #B23A0B;
  color: #fff;
}

.htb-empty {
  display: block;
  text-align: center;
  color: #5A5F69;
  padding: 28px 14px;
}

/* 모바일: 제목 · 분류만 — 가로 스크롤 없이 본문 목록이 바로 이어짐 */
@media (max-width: 899px) {
  #rd-home.rd-home-boards {
    padding: 10px 12px 64px;
  }
  #rd-home.rd-home-boards .rd-datebar {
    margin-bottom: 12px;
  }
  .htb-panel-head {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #D9D3C6;
  }
  .htb-panel-head h1 {
    font-size: 22px;
  }
  .htb-panel-desc {
    display: none;
  }
  .htb-toolbar {
    margin: 0 0 8px;
    gap: 8px;
  }
  .htb-meta {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .htb-board {
    --board-cols: minmax(0, 1fr) auto;
    overflow: visible;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .htb-board .htb-head,
  .htb-board .htb-row {
    min-width: 0;
    width: 100%;
    grid-template-columns: var(--board-cols);
    gap: 8px 10px;
    padding: 12px 2px;
    font-size: 14px;
    align-items: start;
  }
  .htb-board .htb-head {
    font-size: 12px;
    padding: 8px 2px;
  }
  .htb-board .htb-head .col-title,
  .htb-board .htb-head .col-cat {
    text-align: left;
  }
  /* 번호 · 날짜 · 조회수 · 추천 숨김 */
  .htb-board .col-num,
  .htb-board .col-date,
  .htb-board .col-views,
  .htb-board .col-likes {
    display: none !important;
  }
  .htb-board .col-title {
    font-size: 15px;
    line-height: 1.4;
    font-weight: 600;
  }
  .htb-board .col-cat {
    text-align: right;
    padding-top: 2px;
  }
  .htb-board .col-cat .htb-cat {
    white-space: nowrap;
  }
  .htb-board .htb-today-tag {
    display: inline-block;
    margin-left: 6px;
  }
}
