@import url('https://fonts.googleapis.com/css2?family=Black+Han+Sans&family=Do+Hyeon&family=Gaegu:wght@400;700&family=Gowun+Dodum&family=Jua&family=Nanum+Gothic:wght@400;700&family=Nanum+Myeongjo:wght@400;700&family=Nanum+Pen+Script&family=Noto+Sans+KR:wght@400;700&display=swap');
/* ============================================================
   board.css — 게시판(자유게시판·공지·감사공지) 포털 디자인
   목록 board/ · 글보기 board/view.php · 글쓰기 board/write.php
   common.css(핑크·퍼플, 라이트) 팔레트 사용. style.css 미로드 → 필요한
   공통(auth-*, nav-login 등)도 여기서 정의.
   ============================================================ */

/* ── 공통 버튼/폼/메시지 (style.css 대체) ── */
.auth-btn, a.auth-btn, button.auth-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 18px; border: none; border-radius: var(--radius-md); cursor: pointer;
    font-family: inherit; font-size: 14px; font-weight: 900; white-space: nowrap; text-decoration: none;
    background: linear-gradient(135deg, var(--pink), var(--pink-2)); color: #fff;
    box-shadow: 0 8px 20px rgba(199,155,42, 0.24);
}
.auth-btn:hover { filter: brightness(1.05); }
.auth-btn-ghost, a.auth-btn-ghost { background: #fff; color: #8a6508; border: 1px solid var(--line); box-shadow: none; }
.auth-btn-ghost:hover { border-color: var(--pink-2); color: #c9992e; filter: none; }
.nav-login, a.nav-login {
    display: inline-flex; align-items: center; gap: 5px; text-decoration: none;
    font-size: 13px; font-weight: 900; padding: 8px 15px; border-radius: 999px;
    background: linear-gradient(135deg, var(--pink), var(--pink-2)); color: #fff; white-space: nowrap;
    box-shadow: 0 8px 20px rgba(199,155,42, 0.2);
}
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field > span { font-size: 12px; font-weight: 900; color: var(--text-sub); }
.auth-field input, .auth-field textarea {
    width: 100%; padding: 11px 13px; font-size: 14px; font-weight: 600; font-family: inherit;
    border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; color: var(--text-main);
}
.auth-field input:focus, .auth-field textarea:focus { outline: none; border-color: var(--pink-2); box-shadow: 0 0 0 3px rgba(212,175,55,.14); }
.auth-msg { font-size: 13px; font-weight: 800; min-height: 1em; }
.auth-msg.err { color: #c08e18; }
.home-empty { text-align: center; padding: 44px 18px; font-size: 15px; font-weight: 900; color: #948a6e;
    background: rgba(255,255,255,.78); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* ── 목록 상단 ── */
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.board-h1 { font-size: 24px; font-weight: 950; color: #4a3c22; display: flex; align-items: center; gap: 8px; }
.board-total { font-size: 14px; font-weight: 900; color: #fff; background: linear-gradient(135deg, var(--pink), var(--pink-2)); padding: 2px 11px; border-radius: 999px; }
.board-write-btn { flex-shrink: 0; }
.board-intro { font-size: 13.5px; font-weight: 700; color: var(--text-sub); margin-bottom: 16px; line-height: 1.6;
    background: rgba(250,246,236,.7); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 14px; }
.board-intro strong { color: #c9992e; }

/* ── 목록 카드 ── */
.board-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.board-card { background: rgba(255,255,255,.82); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; transition: transform .12s, box-shadow .12s, border-color .12s; }
.board-card:hover { transform: translateY(-2px); box-shadow: 0 22px 50px rgba(160,125,45,.18); border-color: var(--pink-2); }
.board-card.is-thanks { background: linear-gradient(180deg, rgba(253,249,235,.9), rgba(255,255,255,.85)); }
.board-card-link { display: flex; gap: 14px; padding: 15px 17px; color: inherit; text-decoration: none; }
.board-card-thumb { flex-shrink: 0; width: 84px; height: 84px; border-radius: var(--radius-md); overflow: hidden; background: var(--bg-2); }
.board-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.board-card-main { flex: 1; min-width: 0; }
.board-card-titlerow { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.board-card-title { font-size: 16px; font-weight: 900; color: #2b2317; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.board-badge-new { font-size: 10px; font-weight: 900; color: #fff; background: var(--deep-pink); padding: 1px 7px; border-radius: 999px; letter-spacing: .04em; }
.board-cc { font-size: 12px; font-weight: 900; color: #fff; background: var(--pink-2); padding: 1px 8px; border-radius: 999px; }
.board-img-flag { font-size: 12px; }
.board-card-excerpt { font-size: 13px; font-weight: 600; color: var(--text-sub); margin-top: 5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.board-card-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 9px; font-size: 12px; font-weight: 700; color: var(--muted); }
.board-card-author { display: inline-flex; align-items: center; gap: 6px; font-weight: 900; color: #6d5a35; }
.board-avatar { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-style: normal; font-size: 11px; font-weight: 900; color: #fff; background: linear-gradient(135deg, var(--pink), var(--pink-2)); }
.board-avatar.is-member { background: linear-gradient(135deg, var(--gold), #e79a2b); }
.board-mdot { color: var(--line); }

/* ── 페이저 ── */
.board-pager { display: flex; justify-content: center; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.board-page { min-width: 34px; text-align: center; padding: 7px 10px; border-radius: var(--radius-md); border: 1px solid var(--line); background: #fff; color: var(--text-sub); font-weight: 900; font-size: 13px; text-decoration: none; }
.board-page.on { background: linear-gradient(135deg, var(--pink), var(--pink-2)); color: #fff; border-color: transparent; }

/* ── 글보기 ── */
.board-back { display: inline-block; margin-bottom: 14px; font-size: 13px; font-weight: 900; color: #c9992e; text-decoration: none; }
.board-post { background: rgba(255,255,255,.85); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 24px 22px; }
.board-post-thanks { background: linear-gradient(180deg, rgba(253,249,235,.92), rgba(255,255,255,.88)); }
.board-post-title { font-size: 24px; font-weight: 950; color: #2b2317; line-height: 1.3; }
.board-post-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--text-sub); }
.board-post-actions { margin-left: auto; display: inline-flex; gap: 10px; }
.board-edit { color: #c9992e; font-weight: 900; text-decoration: none; }
.board-del { border: none; background: none; color: var(--deep-pink); font-weight: 900; font-size: 13px; cursor: pointer; padding: 0; font-family: inherit; }
.board-post-body { font-size: 15.5px; line-height: 1.75; color: var(--text-main); word-break: break-word; }
.board-post-body img { max-width: 100%; height: auto; border-radius: var(--radius-md); margin: 8px 0; }
.board-post-images { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.board-post-img { display: block; max-width: 220px; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); }
.board-post-img img { width: 100%; display: block; }

/* ── 댓글 ── */
.board-comments { margin-top: 26px; }
.board-comments-h { font-size: 17px; font-weight: 950; color: #4a3c22; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.board-no-comment { color: var(--muted); font-weight: 700; font-size: 13.5px; padding: 14px 0; }
.board-comment-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.board-comment { background: rgba(255,255,255,.8); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 14px; }
.board-comment-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 12.5px; }
.board-comment-author { font-weight: 900; color: #6d5a35; }
.board-comment-time { color: var(--muted); font-weight: 700; }
.board-comment-del { margin-left: auto; }
.board-comment-body { font-size: 14px; font-weight: 500; color: var(--text-main); line-height: 1.6; word-break: break-word; }
.board-comment-form { display: flex; flex-direction: column; gap: 10px; }
.board-comment-form textarea { width: 100%; padding: 12px 14px; font-family: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; color: var(--text-main); resize: vertical; }
.board-comment-form textarea:focus { outline: none; border-color: var(--pink-2); box-shadow: 0 0 0 3px rgba(212,175,55,.14); }
.board-comment-form .auth-btn { align-self: flex-end; }
.board-login-hint { font-size: 13.5px; font-weight: 700; color: var(--text-sub); padding: 14px 0; }

/* ── 글쓰기 ── */
.board-write-page { width: min(780px, calc(100% - 32px)); }   /* .page(1180px) 대신 좁혀 중앙 정렬 */
.board-write-page .board-h1 { margin-bottom: 18px; }
.board-form { width: 100%; }
.board-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

/* 리치텍스트 에디터 */
.rte { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: #fff; }
.rte-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 8px 10px; background: rgba(250,246,236,.7); border-bottom: 1px solid var(--line); }
.rte-sel { padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--text-main); font-size: 12.5px; font-family: inherit; }
.rte-div { width: 1px; height: 20px; background: var(--line); margin: 0 3px; }
.rte-btn { min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--text-main); font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.rte-btn:hover { background: var(--bg-2); border-color: var(--pink-2); color: #c9992e; }
.rte-img-btn { font-weight: 900; color: #c9992e; }
.rte-color { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 7px; background: #fff; cursor: pointer; overflow: hidden; }
.rte-color span { font-size: 13px; font-weight: 900; color: #e8344e; pointer-events: none; }
.rte-hilite span { background: #fff27a; padding: 0 2px; border-radius: 2px; color: #2b2317; }
.rte-color input[type=color] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.rte-editor { min-height: 260px; padding: 16px 18px; font-size: 15px; line-height: 1.75; color: var(--text-main); outline: none; overflow-wrap: anywhere; }
.rte-editor:empty::before { content: attr(data-placeholder); color: var(--muted); font-weight: 500; }
.rte-editor img { max-width: 100%; height: auto; border-radius: var(--radius-md); margin: 6px 0; }

@media (max-width: 640px) {
    .board-h1 { font-size: 20px; }
    .board-post-title { font-size: 20px; }
    .board-card-thumb { width: 64px; height: 64px; }
    .board-post { padding: 18px 15px; }
}

/* ── 토스트 (board_write 이미지 업로드 알림 등) — style.css 미로드 대체 ── */
.toast {
    position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(12px);
    background: #4a3c22; color: #fff; padding: 11px 20px; border-radius: 999px;
    font-size: 13px; font-weight: 800; opacity: 0; pointer-events: none; z-index: 9999;
    box-shadow: 0 12px 30px rgba(90,75,40,.35); transition: opacity .22s, transform .22s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
