/* ============================================================
   게시판(공지사항 + 자유게시판 통합) + 회원 공개 프로필 · 포인트 거래
   ------------------------------------------------------------
   · 데스크톱 기준. 모바일 규칙은 responsive.css 한 곳에만 둔다.
   · 색·모서리·그림자는 사이트 공통 토큰(variables.css)을 따른다.
   ============================================================ */

.gg-board { padding-bottom: 24px; }
.bd-page { width: 1060px; max-width: 100%; margin: 18px auto 0; padding: 0 0 18px; }

/* ---------- 머리말 ---------- */
.bd-hero {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--card-border); border-radius: 22px;
  padding: 18px 22px; margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(96, 143, 214, .10), 0 1px 3px rgba(96, 143, 214, .06);
}
.bd-hero-ico {
  width: 52px; height: 52px; flex: none; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #eaf3ff, #dbe9ff); font-size: 26px;
}
.bd-hero-tx { min-width: 0; flex: 1 1 auto; }
.bd-title { margin: 0 0 3px; font-size: 22px; font-weight: 900; color: var(--tx); }
.bd-sub { margin: 0; font-size: 12.5px; font-weight: 700; color: var(--tx-sub); }

/* ---------- 통합 게시판: 공지 칸 · 자유게시판 칸 ---------- */
.bd-sec + .bd-sec { margin-top: 16px; }
.bd-sec-h {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.bd-sec-t {
  display: flex; align-items: center; gap: 9px; min-width: 0;
  margin: 0; font-size: 17px; font-weight: 900; color: var(--tx);
}
.bd-sec-ico {
  width: 30px; height: 30px; flex: none; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #eaf3ff, #dbe9ff); font-size: 16px;
}
.bd-sec-r { display: flex; align-items: center; gap: 12px; flex: none; }
/* 공지 칸은 최대 3줄뿐이라 아래 여백을 조금 줄인다 */
.bd-sec-notice { padding-bottom: 16px; }
/* 자유게시판 칸: 분류 칩과 검색창을 한 줄에 나란히 */
.bd-sec-free .bd-listtop { align-items: flex-start; }
.bd-sec-free .bd-cats { margin-bottom: 0; flex: 1 1 auto; }

/* ---------- 카드 ---------- */
.bd-card {
  background: #fff; border: 1px solid var(--card-border); border-radius: 22px;
  padding: 18px 22px 22px;
  box-shadow: 0 8px 24px rgba(96, 143, 214, .10), 0 1px 3px rgba(96, 143, 214, .06);
}

/* ---------- 목록 위 줄 (개수 · 검색) ---------- */
.bd-listtop { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.bd-count { font-size: 12.5px; font-weight: 800; color: var(--tx-sub); }
.bd-count b { color: var(--tx); font-weight: 900; }
.bd-search { display: flex; gap: 6px; }
.bd-search-in {
  width: 220px; height: 36px; border-radius: 11px; padding: 0 13px;
  border: 1px solid var(--card-border); background: #f7fafd;
  font-family: inherit; font-size: 12.5px; color: var(--tx);
}
.bd-search-in:focus { outline: none; border-color: var(--blue); background: #fff; }
.bd-search-btn {
  height: 36px; padding: 0 16px; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--card-border); background: #fff; color: var(--tx);
  font-family: inherit; font-size: 12.5px; font-weight: 800;
}
.bd-search-btn:hover { background: #f2f8ff; }

/* ---------- 분류 칩 ---------- */
.bd-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.bd-cat {
  padding: 6px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--card-border); background: #fff;
  font-family: inherit; font-size: 12px; font-weight: 800; color: var(--tx-sub);
  transition: all .18s ease;
}
.bd-cat:hover { background: #f2f8ff; color: var(--tx); }
.bd-cat.is-on { background: linear-gradient(180deg, #3b86fa, #1d6bfa); border-color: transparent; color: #fff; }

/* ---------- 목록 ---------- */
.bd-table { border-top: 2px solid #dfe9f7; }
.bd-row {
  display: grid; grid-template-columns: 62px 76px minmax(0, 1fr) 142px 62px 56px 56px;
  gap: 8px; align-items: center;
  padding: 12px 6px; border-bottom: 1px solid #edf3fa;
  font-size: 13px; color: var(--tx);
}
.bd-row-head {
  padding: 10px 6px; background: #f7fafd;
  font-size: 11.5px; font-weight: 800; color: var(--tx-sub); text-align: center;
}
.bd-row-head span:nth-child(3) { text-align: left; padding-left: 4px; }
.bd-row:not(.bd-row-head):hover { background: #f7fbff; }
/* 공지 영역(상단 공지 3개)은 고정 여부와 상관없이 전부 같은 베이지색 (2026-08-18) */
.bd-row.is-pinned, .bd-row.is-featured-notice { background: #fffdf3; }
.bd-row.is-pinned:hover, .bd-row.is-featured-notice:hover { background: #fff9e6; }
.bd-no, .bd-date, .bd-view { text-align: center; font-size: 12px; font-weight: 700; color: var(--tx-sub); }
.bd-no.bd-pin { font-size: 13px; }
/* 작성자 — 아바타 + 닉네임 (아바타는 사이트 공통 판정 결과를 그대로 쓴다) */
.bd-author { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; }
.bd-author-av { flex: none; }
/* 목록 칭호 표시 — 위치 이동 없이 글자 줄 상자 자체를 이미지 중앙에 맞춘다 */
.bd-author .bd-author-tslot + .bd-author-btn { line-height: 1; }

/* PC 표에서는 모바일용 묶음을 풀어 7개 열에 각각 배치한다. */
.bd-row-meta { display: contents; }
.bd-row .bd-author { grid-column: 4; grid-row: 1; }
.bd-row .bd-date { grid-column: 5; grid-row: 1; }
.bd-row .bd-like-n { grid-column: 6; grid-row: 1; }
.bd-row .bd-view { grid-column: 7; grid-row: 1; }

/* 분류 배지 — 색은 게시판별로 다르지 않게 한 가지 계열로 통일한다 */
.bd-badge {
  display: inline-block; justify-self: center; max-width: 100%;
  padding: 3px 10px; border-radius: 999px;
  background: #eef3fb; color: #5a6b88;
  font-size: 11px; font-weight: 800; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.bd-badge.bd-cat-필독 { background: rgba(224, 49, 49, .10); color: #e03131; }
.bd-badge.bd-cat-점검 { background: rgba(245, 166, 35, .15); color: #cf8a11; }
.bd-badge.bd-cat-업데이트 { background: rgba(37, 110, 235, .12); color: var(--blue); }
.bd-badge.bd-cat-이벤트 { background: rgba(76, 175, 80, .15); color: #37a63c; }

/* 제목 */
.bd-t { display: flex; align-items: center; gap: 6px; min-width: 0; padding-left: 4px; }
.bd-t-link {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--tx); font-weight: 800; text-decoration: none;
}
.bd-t-link:hover { color: var(--blue); text-decoration: underline; }
.bd-t-cnt { flex: none; font-size: 11.5px; font-weight: 900; color: #f0803c; }

/* 작성자 (누르면 공개 프로필) */
.bd-author-btn {
  max-width: 100%; padding: 0; border: none; background: none; cursor: pointer;
  font-family: inherit; font-size: 12.5px; font-weight: 800; color: var(--tx);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bd-author-btn:hover { color: var(--blue); text-decoration: underline; }

.bd-empty { margin: 34px 0; text-align: center; font-size: 13px; font-weight: 700; color: var(--tx-sub); }
.bd-empty-sm { margin: 18px 0; font-size: 12.5px; }

/* ---------- 페이지 이동 ---------- */
.bd-pager { display: flex; justify-content: center; gap: 6px; margin-top: 18px; }
.bd-pg {
  min-width: 34px; height: 34px; padding: 0 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--card-border); background: #fff;
  font-family: inherit; font-size: 12.5px; font-weight: 800; color: var(--tx-sub);
}
.bd-pg:hover:not(:disabled) { background: #f2f8ff; color: var(--tx); }
.bd-pg.is-on { background: linear-gradient(180deg, #3b86fa, #1d6bfa); border-color: transparent; color: #fff; }
.bd-pg:disabled { opacity: .4; cursor: default; }

/* ---------- 상세 ---------- */
.bd-dt-head { padding-bottom: 14px; border-bottom: 2px solid #dfe9f7; }
.bd-dt-head .bd-badge { justify-self: start; }
/* 분류 뱃지(왼쪽) + 목록으로 버튼(오른쪽) 한 줄 */
.bd-dt-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bd-dt-top .bd-btn { flex: 0 0 auto; }

/* 이전글 · 다음글 · 목록으로 — 글 위아래 같은 모양으로 붙는다 */
.bd-dt-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bd-dt-nav .bd-btn { flex: 0 0 auto; }
/* 이전·다음 글이 없을 때 — 눌리지 않게 흐리게 (자리는 그대로 둬서 버튼이 덜컹거리지 않는다) */
.bd-dt-nav .is-off { opacity: .38; cursor: default; pointer-events: none; }
.bd-dt-title {
  margin: 8px 0 10px; font-size: 20px; font-weight: 900; color: var(--tx);
  line-height: 1.4; word-break: break-all;
}
.bd-dt-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  font-size: 12px; font-weight: 700; color: var(--tx-sub);
}
.bd-dt-meta b { color: var(--tx); font-weight: 800; }
.bd-dt-pin { color: #cf8a11; font-weight: 800; }
.bd-dt-body {
  min-height: 160px; padding: 20px 2px 26px;
  font-size: 14px; font-weight: 600; color: var(--tx); line-height: 1.85;
  white-space: pre-wrap;          /* 서식 없는 옛 글의 줄바꿈을 그대로 살린다 */
  word-break: break-word;
}
.bd-dt-btns {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 14px; border-top: 1px solid #edf3fa;
}
.bd-dt-right { display: flex; gap: 8px; flex-wrap: wrap; }

.bd-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 16px; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--card-border); background: #fff; color: var(--tx);
  font-family: inherit; font-size: 12.5px; font-weight: 800; text-decoration: none;
  transition: filter .18s ease;
}
.bd-btn:hover { filter: brightness(.98); }
.bd-btn-sm { height: 30px; padding: 0 13px; font-size: 12px; border-radius: 9px; }
.bd-btn-ghost { color: var(--tx-sub); }
.bd-btn-ghost:hover { color: var(--tx); background: #f2f8ff; }
.bd-btn-danger { color: #e03131; border-color: rgba(224, 49, 49, .3); }
.bd-btn-danger:hover { background: rgba(224, 49, 49, .07); }

/* ---------- 댓글 ---------- */
.bd-cmts { margin-top: 22px; padding-top: 18px; border-top: 2px solid #dfe9f7; }
.bd-cmts-h { font-size: 14px; font-weight: 900; color: var(--tx); margin-bottom: 12px; }
.bd-cmts-h b { color: var(--blue); }
.bd-cmt { padding: 13px 2px; border-bottom: 1px solid #edf3fa; }
.bd-cmt-head { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 6px; }
.bd-cmt-date { font-size: 11.5px; font-weight: 700; color: var(--tx-sub); }
.bd-cmt-act {
  padding: 0; border: none; background: none; cursor: pointer;
  font-family: inherit; font-size: 11.5px; font-weight: 800; color: var(--tx-sub);
}
.bd-cmt-act:hover { color: var(--blue); text-decoration: underline; }
.bd-cmt-act.is-danger:hover { color: #e03131; }
.bd-cmt-body {
  margin: 0; font-size: 13px; font-weight: 600; color: var(--tx); line-height: 1.75;
  white-space: pre-wrap; word-break: break-word;
}
/* ---------- 추천 ---------- */
.bd-like {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--card-border); background: #fff;
  font-family: inherit; font-size: 12px; font-weight: 800; color: var(--tx-sub);
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.bd-like:hover { background: #f2f8ff; color: var(--blue); border-color: #cfe0fb; }
.bd-like .bd-like-ico { font-size: 10px; line-height: 1; }
.bd-like.is-on { background: #eaf2ff; border-color: #bcd6fb; color: var(--blue); }
.bd-like.is-mine { opacity: .55; cursor: default; }
.bd-like.is-mine:hover { background: #fff; color: var(--tx-sub); border-color: var(--card-border); }
.bd-like:disabled { opacity: .6; cursor: default; }
/* 글 상세 — 본문 아래 가운데 */
.bd-dt-like { display: flex; justify-content: center; padding: 4px 0 18px; }
.bd-dt-like .bd-like { height: 40px; padding: 0 22px; font-size: 13.5px; font-weight: 900; }
.bd-dt-like .bd-like .bd-like-ico { font-size: 11px; }
/* 목록 추천 칸 */
.bd-like-n { text-align: center; font-size: 12.5px; font-weight: 800; color: var(--tx-sub); font-variant-numeric: tabular-nums; }
.bd-like-n.is-on { color: var(--blue); font-weight: 900; }

/* ---------- 대댓글(답글) ---------- */
/* 한 단계만 들여쓰고, 왼쪽에 연한 선을 그어 원 댓글과 묶여 보이게 한다 */
.bd-cmt.is-reply {
  margin-left: 26px; padding-left: 14px;
  border-left: 2px solid #e3edfa;
  background: #fbfdff;
}
.bd-cmt-arrow { flex: none; font-size: 13px; font-weight: 900; color: #a9bcd8; line-height: 1; }
/* @원 댓글 작성자 — 서버가 내려준 닉네임이라 사용자가 흉내 낼 수 없다 */
.bd-cmt-tag {
  display: inline-block; margin-right: 2px; padding: 1px 7px; border-radius: 999px;
  background: #eaf2ff; color: var(--blue); font-size: 12px; font-weight: 900;
  vertical-align: baseline;
}
.bd-cmt-reply:hover { color: var(--blue); }
.bd-cmt-reply-box { flex-wrap: wrap; }

.bd-cmt-edit { display: flex; align-items: flex-start; gap: 6px; margin-top: 9px; }
.bd-cmt-edit .bd-cmt-in { flex: 1; }
.bd-cmt-write { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; }
.bd-cmt-in {
  flex: 1; min-width: 0; border-radius: 12px; padding: 11px 13px; resize: vertical;
  border: 1px solid var(--card-border); background: #f7fafd;
  font-family: inherit; font-size: 13px; color: var(--tx); line-height: 1.6;
}
.bd-cmt-in:focus { outline: none; border-color: var(--blue); background: #fff; }
.bd-cmt-write .gg-btn { flex: none; height: 42px; }

/* ---------- 작성 · 수정 ---------- */
.bd-form { display: flex; flex-direction: column; gap: 8px; }
.bd-f-label { font-size: 12px; font-weight: 900; color: var(--tx); margin-top: 8px; }
.bd-f-sel, .bd-f-in, .bd-f-body {
  width: 100%; border-radius: 12px; padding: 0 14px;
  border: 1px solid var(--card-border); background: #f7fafd;
  font-family: inherit; font-size: 13.5px; color: var(--tx);
}
.bd-f-sel, .bd-f-in { height: 44px; }
.bd-f-sel { max-width: 200px; cursor: pointer; }
.bd-f-body { padding: 13px 14px; line-height: 1.8; resize: vertical; min-height: 260px; }
.bd-f-sel:focus, .bd-f-in:focus, .bd-f-body:focus { outline: none; border-color: var(--blue); background: #fff; }
.bd-f-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* ============================================================
   회원 공개 프로필 · 포인트 거래 모달
   ============================================================ */
.pm-back {
  position: fixed; inset: 0; z-index: 12500;         /* 모바일 하단 메뉴보다 위 */
  background: rgba(15, 35, 75, .45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: ggFadeIn .18s ease;
}
.pm-card {
  position: relative; width: 340px; max-width: 100%;
  max-height: calc(100vh - 40px); overflow-y: auto;
  background: #fff; border-radius: 20px; padding: 26px 24px 22px;
  box-shadow: 0 20px 50px rgba(20, 45, 90, .3);
  animation: ggRise .22s ease;
}
.pm-card-wide { width: 400px; }
.pm-x {
  position: absolute; top: 12px; right: 14px;
  width: 30px; height: 30px; border-radius: 9px; cursor: pointer;
  border: none; background: none; color: var(--tx-sub);
  font-family: inherit; font-size: 20px; font-weight: 800; line-height: 1;
}
.pm-x:hover { background: #f2f7fc; color: var(--tx); }
.pm-loading { margin: 30px 0; text-align: center; font-size: 13px; font-weight: 700; color: var(--tx-sub); }

.pm-top { display: flex; flex-direction: column; align-items: center; gap: 7px; margin-bottom: 18px; }
.pm-avatar { border-radius: 50%; background: #f2f7fc; object-fit: cover; }
.pm-nick { font-size: 17px; font-weight: 900; color: var(--tx); word-break: break-all; text-align: center; }
.pm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.pm-stat {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 11px 4px; border-radius: 13px; background: #f7fafd;
}
.pm-stat span { font-size: 11px; font-weight: 800; color: var(--tx-sub); }
.pm-stat b { font-size: 14px; font-weight: 900; color: var(--tx); }
.pm-note { margin: 0; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--tx-sub); }

/* ---------- 회원 정보 팝업 · 게임 기록 (2026-08-18) ----------
   판수가 있는 게임만 한 줄씩 — 팝업이 길어지지 않게 목록만 안에서 스크롤된다. */
.pm-games { margin-bottom: 16px; }
.pm-games-h { margin-bottom: 8px; font-size: 12.5px; font-weight: 900; color: var(--tx); }
.pm-games-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 208px; overflow-y: auto; overscroll-behavior: contain;
  padding-right: 2px;
}
.pm-game { padding: 9px 12px; border-radius: 13px; background: #f7fafd; }
.pm-game-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pm-game-top b { font-size: 12.5px; font-weight: 900; color: var(--tx); }
.pm-game-top span { font-size: 11.5px; font-weight: 800; color: var(--blue); flex-shrink: 0; }
.pm-game-stats { margin-top: 3px; font-size: 11px; font-weight: 700; color: var(--tx-sub); line-height: 1.6; word-break: keep-all; }
.pm-game-stats b { font-weight: 900; color: var(--tx); }
.pm-games-empty { margin: 0 0 2px; font-size: 12px; font-weight: 700; color: var(--tx-sub); text-align: center; }

/* ---------- 포인트 거래 ---------- */
.tf-title { margin: 0 0 5px; font-size: 18px; font-weight: 900; color: var(--tx); }
.tf-sub { margin: 0 0 16px; font-size: 12px; font-weight: 700; color: var(--tx-sub); line-height: 1.6; }
.tf-to { margin-bottom: 14px; }
.tf-label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 900; color: var(--tx); }
.tf-nickrow { display: flex; gap: 6px; }
.tf-in {
  flex: 1; min-width: 0; width: 100%; height: 42px; border-radius: 12px; padding: 0 13px;
  border: 1px solid var(--card-border); background: #f7fafd;
  font-family: inherit; font-size: 13.5px; color: var(--tx);
}
.tf-in:focus { outline: none; border-color: var(--blue); background: #fff; }
.tf-in:disabled { color: var(--tx-sub); }
.tf-found { margin: 7px 0 0; min-height: 16px; font-size: 11.5px; font-weight: 800; color: #e03131; }
.tf-found.is-ok { color: #2db14e; }

.tf-amtbox { position: relative; }
.tf-amt { padding-right: 40px; text-align: right; font-size: 16px; font-weight: 900; }
.tf-unit {
  position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  font-size: 12px; font-weight: 800; color: var(--tx-sub); pointer-events: none;
}

.tf-calc { margin-top: 14px; padding: 13px 15px; border-radius: 14px; background: #f7fafd; }
.tf-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; }
.tf-row span { font-size: 12px; font-weight: 800; color: var(--tx-sub); }
.tf-row b { font-size: 13.5px; font-weight: 900; color: var(--tx); font-variant-numeric: tabular-nums; }
.tf-row.is-total { margin-top: 5px; padding-top: 9px; border-top: 1px solid #e2eaf5; }
.tf-row.is-total span { color: var(--tx); }
.tf-row.is-total b { font-size: 16px; color: var(--blue); }
.tf-err { margin: 9px 0 0; min-height: 17px; font-size: 11.5px; font-weight: 800; color: #e03131; line-height: 1.5; }
.tf-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.tf-btns .bd-btn, .tf-btns .gg-btn { min-width: 84px; }

.tf-confirm-to { display: flex; flex-direction: column; align-items: center; gap: 7px; margin: 6px 0 14px; }
.tf-confirm-to b { font-size: 15px; font-weight: 900; color: var(--tx); word-break: break-all; text-align: center; }
.tf-warn { margin: 12px 0 0; text-align: center; font-size: 12px; font-weight: 800; color: #e03131; }

/* 댓글·본문 안의 자동 링크 */
.bd-link {
  color: #1d6bfa; font-weight: 800; text-decoration: underline;
  text-underline-offset: 2px; word-break: break-all;
}
.bd-link:hover { color: #0b4fd0; }

/* ============================================================
   글쓰기 서식 에디터 (굵게 · 글자 크기 · 정렬 · 링크)
   ============================================================ */
.bd-rte { border: 1px solid #dbe6f5; border-radius: 12px; overflow: hidden; background: #fff; }
.bd-rte-bar {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 8px 10px; background: #f6f9ff; border-bottom: 1px solid #e6eefb;
}
.bd-rte-btn {
  height: 30px; padding: 0 10px; border: 1px solid #dbe6f5; border-radius: 8px;
  background: #fff; color: #16305e; cursor: pointer;
  font-family: inherit; font-size: 12.5px; font-weight: 800; line-height: 1;
  transition: background .15s ease, border-color .15s ease;
}
.bd-rte-btn:hover { background: #eef4ff; border-color: #bcd6f6; }
.bd-rte-btn.is-on { background: #e3edff; border-color: #9ec6f6; color: #1d6bfa; }
.bd-rte-sep { width: 1px; height: 18px; background: #dbe6f5; margin: 0 4px; }

/* ---------- 글자 색 고르기 ---------- */
/* 색 이름을 글자로 늘어놓으면 툴바가 두 줄이 되므로 작은 네모(스와치)로 둔다 */
.bd-rte-colors { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.bd-rte-btn.bd-rte-color {
  width: 22px; height: 22px; min-width: 22px; padding: 0;
  border-radius: 6px; border: 1px solid #cbd8ec;
  background: var(--swatch, #16305e);
  box-shadow: inset 0 0 0 1.5px #fff;
}
.bd-rte-btn.bd-rte-color:hover { border-color: #7fb0ee; transform: translateY(-1px); }
/* 지금 커서 위치의 색은 테두리를 진하게 해서 알려준다 */
.bd-rte-btn.bd-rte-color.is-on {
  border-color: #16305e; box-shadow: inset 0 0 0 1.5px #fff, 0 0 0 2px #cfe0fb;
}
@media (max-width: 430px) {
  .bd-rte-btn.bd-rte-color { width: 20px; height: 20px; min-width: 20px; }
}

.bd-rte-edit {
  min-height: 260px; max-height: 60vh; overflow-y: auto;
  padding: 14px 16px; outline: none;
  /* 기본 두께를 600 으로 두면 브라우저가 "이미 굵은 글씨" 로 판단해서
     굵게 버튼이 반대로 동작한다 (Chrome 은 600 이상을 굵게로 본다) */
  font-size: 14px; font-weight: 500; line-height: 1.8; color: #16305e;
  word-break: break-word;
}
.bd-rte-edit.is-empty::before {
  content: attr(data-ph); color: #9ca5bd; font-weight: 700; pointer-events: none;
}
.bd-rte-edit img { max-width: 100%; height: auto; border-radius: 8px; }
.bd-rte-edit a { color: #1d6bfa; text-decoration: underline; }

/* 저장된 본문 보기 — 에디터와 같은 모양으로 보이게 */
.bd-dt-body img { max-width: 100%; height: auto; border-radius: 8px; display: block; margin: 12px 0; }
.bd-dt-body a { color: #1d6bfa; font-weight: 800; text-decoration: underline; word-break: break-all; }
.bd-dt-body ul, .bd-dt-body ol { padding-left: 22px; }
/* 서식 글은 HTML 이 줄바꿈을 담고 있어서 pre-wrap 을 끈다 (안 그러면 빈 줄이 두 배로 생긴다) */
.bd-dt-body.is-rich { white-space: normal; }

@media (max-width: 767px) {
  .bd-rte-bar { gap: 3px; padding: 7px 8px; }
  .bd-rte-btn { height: 28px; padding: 0 8px; font-size: 11.5px; }
  .bd-rte-edit { min-height: 200px; font-size: 13.5px; }
}

/* ============================================================
   글 오른쪽 아래 — 작성자의 «현재» 아바타 상자 (2026-08-24)
     · 뛰어다니는 막대바를 없애고 300×300 고정 상자로 교체
     · 아바타는 회원의 지금 상태(파산·장착·움직임)를 그대로 동기화해 그린다
     · aria-hidden 이라 화면 읽기 프로그램에는 읽히지 않는다
   ============================================================ */
.bd-ava-box {
  display: flex; justify-content: flex-end;
  padding: 6px 2px 12px;
}
.bd-ava-box .gg-avatar-box.bd-ava-img {
  /* 2026-08-24: 300 → 150px(50% 축소, board.js) · 모서리도 비율대로 24 → 12px.
     효과 확대 배율을 원형 마스크 자리와 같은 0.95 로 낮춰서
     배경(둥근 상자) 밖으로 아바타·머리/배경 효과가 잘리지 않는다. */
  border-radius: 12px; overflow: hidden;
  --fx-bg-scale: 0.95; --fx-head-scale: 0.95;
  background: linear-gradient(180deg, #f4f9ff 0%, #e8f2ff 100%);
  border: 1px solid #e3effb;
  box-shadow: 0 8px 22px rgba(43, 108, 212, .08);
}

/* ── 굵게 표시 (2026-08-24 수정) ──
   본문 기본 두께가 600 이라 <b>(700)와 거의 구분되지 않았다.
   서식 글은 편집칸과 같은 500 을 기본으로 쓰고, 굵게는 800 으로 확실히 진하게 한다. */
.bd-dt-body.is-rich { font-weight: 500; }
.bd-dt-body b, .bd-dt-body strong { font-weight: 800; }
