.content-wrap {
  max-width: 52rem;
}

.content-back {
  margin: 0 0 0.75rem;
}

.content-back a {
  text-decoration: none;
  font-weight: 700;
  font-size: var(--fs-sm);
}

.content-meta {
  margin: 0 0 1rem;
  color: var(--color-muted);
  font-size: var(--fs-sm);
}

.content-article-title {
  margin: 0 0 0.5rem;
  font-size: var(--fs-xl);
  color: var(--color-primary-dark);
  word-break: break-word;
}

.content-body {
  line-height: 1.75;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.content-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  overflow: hidden;
}

.content-list li + li {
  border-top: 1px solid var(--color-border);
}

.content-list a {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.95rem 1rem;
  text-decoration: none;
  color: inherit;
}

.content-list a:hover,
.content-list a:focus-visible {
  background: var(--color-bg);
}

.content-list a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.content-list a:hover .content-list-title,
.content-list a:focus-visible .content-list-title {
  color: var(--color-primary);
}

.content-list-title {
  flex: 1 1 12rem;
  min-width: 0;
  font-weight: 700;
  color: var(--color-primary-dark);
  word-break: break-word;
}

.content-list-date {
  flex: 0 0 auto;
  color: var(--color-muted);
  font-size: var(--fs-sm);
  white-space: nowrap;
}

/* ---- 공개 게시판 white 계열 ------------------------------------------------
   The public boards read on white: the canvas, and the list itself is a plain
   ruled run instead of a rounded card floating on the tinted page. Structure is
   carried by hairlines only. Scoped to the public board body classes, so the
   admin screens and every other user of .content-list keep their own surface. */
body.page-board,
body.page-notices,
body.page-notice-detail {
  background: var(--color-surface);
}

body.page-board .content-list,
body.page-notices .content-list,
body.page-notice-detail .content-list {
  border: 0;
  border-top: 2px solid var(--color-primary-dark);
  border-bottom: 1px solid var(--color-rule, #e4e9ee);
  border-radius: 0;
  background: transparent;
}

body.page-board .content-list li + li,
body.page-notices .content-list li + li,
body.page-notice-detail .content-list li + li {
  border-top: 1px solid var(--color-rule, #e4e9ee);
}

body.page-board .content-list a:hover,
body.page-board .content-list a:focus-visible,
body.page-notices .content-list a:hover,
body.page-notices .content-list a:focus-visible,
body.page-notice-detail .content-list a:hover,
body.page-notice-detail .content-list a:focus-visible {
  background: var(--color-soft, #f5f7f9);
}

/* 작성자 | 날짜 — only the 대행 신청 boards (BoardCatalog dense_list) use this,
   so they read as one family with 구매/배송. Every other board keeps its normal
   작성자 · 날짜 line. */
.content-list-meta .meta-sep {
  margin: 0 0.15rem;
  color: var(--color-rule-strong, #c9d4e0);
}

/* 날짜는 한 자리에서만 보인다 — PC 는 전체, 좁은 화면은 MM-DD.
   모든 게시판이 같은 메타 줄을 쓰므로 규칙도 게시판 구분 없이 적용한다. */
.content-list-meta .meta-date-full,
.content-list-meta .meta-date-short {
  font-variant-numeric: tabular-nums;
}

.content-list-meta .meta-date-short {
  display: none;
}

/* 목록 번호. PC 는 제목 앞 열, 모바일은 메타 줄 첫 값 — 같은 숫자를 두 자리에
   두고 폭에 맞는 쪽만 보인다. */
.board-list-dense .list-no {
  flex: 0 0 3.5rem;
  color: var(--color-muted);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
  text-align: right;
  padding-right: var(--space-3);
}

.board-list-dense .content-list-meta .meta-no {
  display: none;
  font-variant-numeric: tabular-nums;
}

/* ---- Dense mobile list (≤767px) -------------------------------------------
   A Korean board title cannot share a row with its metadata on a phone, so
   below 768px each entry becomes a title line over a muted meta line, split by
   hairlines instead of being boxed. Desktop keeps the bordered two-column list.

   This also removes a real defect: the previous rule only flipped
   `flex-direction: column`, which turned `.content-list-title`'s `flex-basis:
   12rem` into a 192px row *height* — every row rendered ~256px tall with the
   meta pushed to the bottom by `justify-content: space-between`. */
@media (max-width: 767px) {
  .content-list {
    border: 0;
    border-top: 1px solid var(--color-rule, #e4e9ee);
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }

  .content-list li {
    border-bottom: 1px solid var(--color-rule, #e4e9ee);
  }

  .content-list li + li {
    border-top: 0;
  }

  .content-list a {
    display: block;
    gap: 0;
    padding: 0.8rem 0.15rem;
  }

  .content-list a:hover,
  .content-list a:focus-visible {
    background: var(--color-soft, #f5f7f9);
  }

  /* Title owns the row: one line, truncated rather than wrapped. */
  .content-list-title {
    display: block;
    flex: none;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
  }

  .content-list-title .badge {
    padding: 0.05rem 0.4rem;
    font-size: 0.6875rem;
    vertical-align: 1px;
  }

  /* Secondary line — muted, aligned digits so dates form a column.
     Selector carries the `a` so it outranks `.board-list .content-list-meta`
     (boards.css) and `.order-list .content-list-meta` (shop.css), both of which
     load after this file. */
  .content-list a .content-list-meta,
  .content-list a .content-list-date {
    display: block;
    flex: none;
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--color-muted);
    font-variant-numeric: tabular-nums;
    white-space: normal;
  }

  /* 좁은 화면에서는 초 단위를 빼고 번호 | 작성자 (댓글수) | MM-DD 로 둔다. */
  .content-list-meta .meta-date-full {
    display: none;
  }

  .content-list-meta .meta-date-short {
    display: inline;
  }

  /* 좁은 화면에서는 제목이 한 줄을 다 쓰므로 번호는 메타 줄로 내려간다. */
  .board-list-dense .list-no {
    display: none;
  }

  .board-list-dense .content-list-meta .meta-no {
    display: inline;
  }
}

.home-notice-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-notice-list li + li {
  border-top: 1px solid var(--color-border);
}

.home-notice-list a {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding: 0.7rem 0;
  text-decoration: none;
  color: inherit;
}

.home-notice-list a:hover .n-title,
.home-notice-list a:focus-visible .n-title {
  color: var(--color-primary);
}

.home-notice-list .n-title {
  font-weight: 700;
  color: var(--color-primary-dark);
}

.home-notice-list .n-date {
  color: var(--color-muted);
  font-size: var(--fs-sm);
}

.home-guide-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.home-guide-card a:hover h3 {
  color: var(--color-accent-dark);
}

.guide-static {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.guide-figure {
  margin: 0;
  max-width: 100%;
  overflow-x: auto;
}

.guide-figure img {
  display: block;
  max-width: 100%;
  height: auto;
}

.guide-customs-nav {
  margin: 0.75rem 0 1rem;
}

.guide-customs-category-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

@media (min-width: 768px) {
  .guide-customs-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .guide-customs-category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.guide-customs-category {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  height: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm, 4px);
  text-align: center;
  text-decoration: none;
  color: var(--color-text, inherit);
  background: var(--color-surface, #fff);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}

.guide-customs-category:hover,
.guide-customs-category:focus-visible {
  border-color: var(--color-primary);
  color: var(--color-primary);
  outline: none;
}

.guide-customs-category:focus-visible {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 35%, transparent);
}

.guide-customs-category.is-active {
  border-color: var(--color-primary);
  background: var(--color-bg);
  color: var(--color-primary);
  box-shadow: inset 0 0 0 1px var(--color-primary);
}

.guide-customs-detail {
  margin-top: 0.75rem;
}

.guide-customs-detail .guide-figure img {
  width: 100%;
  height: auto;
}

.notice-info {
  border-color: var(--color-border);
  background: var(--color-bg);
}


/* Admin-managed 안내 content. The bundled static figures already have their own
   rules; these keep an uploaded image inside the column and give the optional
   body the same measure as the rest of the guide. */
.guide-managed-body {
  max-width: var(--measure-prose);
  margin: 0 0 var(--space-5);
  line-height: var(--lh-body);
  word-break: keep-all;
}
