/* ── Board System CSS ── */

.board-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 24px 64px;
}

/* ── Board Header ── */
.board-header { margin-bottom: 20px; }
.board-title-row {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
    margin-bottom: 16px;
}
.board-header h1 { font-size: 22px; font-weight: 700; color: #1a1916; }
.board-desc { font-size: 14px; color: #78716c; margin-top: 4px; }

.btn-write {
    display: inline-flex; align-items: center; gap: 6px;
    background: #292524; color: #fff; border: none; padding: 9px 18px;
    border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer;
    text-decoration: none; white-space: nowrap; transition: background 0.15s;
}
.btn-write:hover { background: #44403c; }

.board-search { max-width: 360px; }
.board-search input {
    width: 100%; background: #fafaf9; border: 1px solid #e5e2dc; color: #1a1916;
    padding: 9px 14px; border-radius: 8px; font-size: 14px;
    font-family: 'Noto Sans KR', sans-serif; transition: all 0.2s;
}
.board-search input:focus { outline: none; border-color: #a8a29e; background: #fff; }
.board-search input::placeholder { color: #a8a29e; }

/* ── Post Table ── */
.post-table { border-top: 2px solid #292524; }
.post-table-head {
    display: flex; padding: 10px 16px; font-size: 12px; font-weight: 600;
    color: #78716c; text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 1px solid #e5e2dc; background: #f5f4f1;
}

.post-row {
    display: flex; padding: 12px 16px; border-bottom: 1px solid #eceae5;
    text-decoration: none; color: #1a1916; transition: background 0.1s;
    align-items: center; font-size: 14px;
}
.post-row:hover { background: #faf9f7; }
.post-row.notice { background: #fefce8; }
.post-row.notice:hover { background: #fef9c3; }

.col-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.col-author { width: 100px; text-align: center; color: #57534e; font-size: 13px; flex-shrink: 0; }
.col-date { width: 90px; text-align: center; color: #a8a29e; font-size: 13px; flex-shrink: 0; }
.col-view { width: 60px; text-align: center; color: #a8a29e; font-size: 13px; flex-shrink: 0; }

.badge-notice {
    display: inline-block; background: #dc2626; color: #fff; font-size: 11px;
    font-weight: 600; padding: 1px 6px; border-radius: 3px; margin-right: 6px; flex-shrink: 0;
}
.cmt-count { color: #2563eb; font-size: 12px; margin-left: 4px; font-weight: 600; }

.empty { text-align: center; padding: 48px 16px; color: #a8a29e; font-size: 14px; }
.empty-sm { text-align: center; padding: 24px; color: #a8a29e; font-size: 14px; }

/* ── Pagination ── */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; }
.pagination button {
    padding: 7px 14px; border: 1px solid #e5e2dc; border-radius: 6px;
    background: #fff; color: #57534e; cursor: pointer; font-size: 13px;
    font-family: 'Noto Sans KR', sans-serif; transition: all 0.15s;
}
.pagination button:hover { border-color: #a8a29e; color: #1a1916; }
.pagination button.active { background: #292524; color: #fff; border-color: #292524; }

/* ── Breadcrumb ── */
.breadcrumb {
    font-size: 13px; color: #a8a29e; margin-bottom: 20px;
    display: flex; gap: 4px; align-items: center;
}
.breadcrumb a { color: #57534e; text-decoration: none; }
.breadcrumb a:hover { color: #1a1916; }

/* ── Post View ── */
.post-view { background: #fff; border: 1px solid #e5e2dc; border-radius: 10px; overflow: hidden; }
.post-view-header { padding: 28px 28px 20px; border-bottom: 1px solid #eceae5; }
.post-view-header h1 { font-size: 22px; font-weight: 700; margin-bottom: 12px; line-height: 1.4; }
.post-meta { display: flex; gap: 16px; font-size: 13px; color: #78716c; flex-wrap: wrap; }
.post-meta .author { font-weight: 600; color: #1a1916; }

.post-content {
    padding: 28px; font-size: 15px; line-height: 1.8; color: #292524;
    word-break: break-word;
}
.post-content a { color: #2563eb; text-decoration: underline; }

.post-actions {
    padding: 16px 28px; border-top: 1px solid #eceae5;
    display: flex; gap: 8px; justify-content: flex-end;
}
.post-actions:empty { display: none; }

.btn-outline {
    background: #fff; color: #57534e; border: 1px solid #e5e2dc;
    padding: 7px 16px; border-radius: 6px; font-size: 13px; font-weight: 500;
    cursor: pointer; text-decoration: none; transition: all 0.15s;
}
.btn-outline:hover { border-color: #a8a29e; color: #1a1916; }
.btn-danger { border-color: #fca5a5; color: #dc2626; }
.btn-danger:hover { background: #fef2f2; border-color: #dc2626; }
.btn-danger-text { color: #dc2626 !important; }

/* ── Comments ── */
.comments-section { margin-top: 28px; }
.comments-section h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }

.comment-item {
    padding: 14px 0; border-bottom: 1px solid #f0eeeb;
}
.comment-head {
    display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
    font-size: 13px;
}
.comment-author { font-weight: 600; color: #1a1916; }
.comment-date { color: #a8a29e; }
.reply-btn {
    background: none; border: none; color: #78716c; font-size: 12px;
    cursor: pointer; padding: 2px 4px;
}
.reply-btn:hover { color: #1a1916; }
.comment-body { font-size: 14px; line-height: 1.6; color: #292524; }

.comment-form { margin-top: 16px; }
.comment-form textarea {
    width: 100%; background: #fafaf9; border: 1px solid #e5e2dc; color: #1a1916;
    padding: 12px 14px; border-radius: 8px; font-size: 14px; resize: vertical;
    font-family: 'Noto Sans KR', sans-serif; transition: border-color 0.2s;
}
.comment-form textarea:focus { outline: none; border-color: #a8a29e; background: #fff; }
.comment-form-actions { display: flex; justify-content: flex-end; margin-top: 8px; }

#replyIndicator {
    display: flex; align-items: center; justify-content: space-between;
    background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 6px;
    padding: 8px 12px; margin-bottom: 8px; font-size: 13px; color: #2563eb;
}
#replyIndicator button {
    background: none; border: none; color: #64748b; cursor: pointer; font-size: 16px;
}

.login-prompt-inline {
    text-align: center; padding: 20px; color: #a8a29e; font-size: 14px;
    border: 1px dashed #e5e2dc; border-radius: 8px; margin-top: 16px;
}

.back-to-list { margin-top: 24px; }
.back-to-list a { color: #57534e; text-decoration: none; font-size: 14px; }
.back-to-list a:hover { color: #1a1916; }

/* ── Write Form ── */
.write-form { max-width: 760px; }
.write-form h2 { font-size: 22px; font-weight: 700; margin-bottom: 24px; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; color: #1a1916; margin-bottom: 6px; }
.form-group input[type="text"],
.form-group textarea {
    width: 100%; background: #fff; border: 1px solid #e5e2dc; color: #1a1916;
    padding: 12px 14px; border-radius: 8px; font-size: 15px;
    font-family: 'Noto Sans KR', sans-serif; transition: all 0.2s;
}
.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none; border-color: #a8a29e;
    box-shadow: 0 0 0 3px rgba(168,162,158,0.1);
}
.form-group textarea { resize: vertical; line-height: 1.7; }
.form-hint { font-size: 12px; color: #a8a29e; margin-top: 4px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }
.checkbox-label input { width: 16px; height: 16px; cursor: pointer; }

.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 32px; }
.btn-lg { padding: 10px 28px; font-size: 15px; }

.msg { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.msg-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.msg-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

.btn-primary {
    background: #292524; color: #fff; border: none; padding: 8px 18px;
    border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer;
    font-family: 'Noto Sans KR', sans-serif; transition: background 0.15s;
}
.btn-primary:hover { background: #44403c; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Footer ── */
footer { border-top: 1px solid #e5e2dc; background: #fff; padding: 28px 0; margin-top: 48px; }
.footer-inner {
    max-width: 1080px; margin: 0 auto; padding: 0 32px;
    display: flex; justify-content: space-between; font-size: 12px; color: #a8a29e;
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .board-container { padding: 16px 12px 48px; }
    .board-title-row { flex-direction: column; gap: 12px; }
    .board-search { max-width: 100%; }
    .post-table-head { display: none; }
    .post-row {
        flex-wrap: wrap; gap: 4px; padding: 12px 12px;
    }
    .col-title { flex-basis: 100%; font-size: 14px; }
    .col-author, .col-date, .col-view { width: auto; font-size: 12px; text-align: left; }
    .post-view-header { padding: 20px 16px 16px; }
    .post-view-header h1 { font-size: 18px; }
    .post-content { padding: 20px 16px; font-size: 14px; }
    .post-actions { padding: 12px 16px; }
    .footer-inner { padding: 0 16px; flex-direction: column; gap: 4px; }
}
