body { font-family: 'Noto Sans KR', sans-serif; }
/* CSS isolation for user content */
.db-user-content { display: block; font-family: 'Noto Sans KR', sans-serif; font-size: 16px; line-height: 1.6; color: #333; }
.db-user-content h1 { font-size: 2em; font-weight: bold; margin: 0.67em 0; }
.db-user-content h2 { font-size: 1.5em; font-weight: bold; margin: 0.83em 0; }
.db-user-content h3 { font-size: 1.17em; font-weight: bold; margin: 1em 0; }
.db-user-content h4 { font-size: 1em; font-weight: bold; margin: 1.33em 0; }
.db-user-content p { margin: 1em 0; }
.db-user-content ul, .db-user-content ol { margin: 1em 0; padding-left: 2em; }
.db-user-content ul { list-style: disc; }
.db-user-content ol { list-style: decimal; }
.db-user-content li { margin: 0.5em 0; }
.db-user-content img { max-width: 100%; height: auto; }
.db-user-content .note-float-left { float: left; margin: 0 1em 1em 0; }
.db-user-content .note-float-right { float: right; margin: 0 0 1em 1em; }
.db-user-content a { color: #0066cc; text-decoration: underline; }
.db-user-content table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.db-user-content td, .db-user-content th { border: 1px solid #ddd; padding: 8px; text-align: left; }
.db-user-content th { background: #f5f5f5; font-weight: bold; }
.db-user-content blockquote { border-left: 4px solid #ddd; margin: 1em 0; padding: 0.5em 1em; color: #666; }
.db-user-content pre { background: #f5f5f5; padding: 1em; border-radius: 4px; overflow-x: auto; }
.db-user-content code { background: #f0f0f0; padding: 2px 6px; border-radius: 3px; font-size: 0.9em; }
.db-user-content hr { border: none; border-top: 1px solid #ddd; margin: 2em 0; }

/* ========================================================================
   게시판 폼 — 원자 구조 (제목/내용 요소 분리, 관리자 커스텀 자유)
   .bf-field[data-field="..."] 셀렉터로 개별 디자인 가능. 기본값은 아래.
   ======================================================================== */
.bf-form { width: 100%; }
.bf-form > * + * { margin-top: 16px; }
.bf-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) {
    .bf-row.bf-row-2 { grid-template-columns: 1fr 1fr; }
    .bf-row.bf-row-3 { grid-template-columns: 1fr 1fr 1fr; }
    .bf-row.bf-row-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
}
.bf-field { display: flex; flex-direction: column; min-width: 0; }
.bf-label {
    font-size: 14px; font-weight: 500; color: #374151;
    margin-bottom: 4px; display: flex; align-items: center; gap: 8px;
}
.bf-field.bf-required > .bf-label > span:first-child::after,
.bf-field.bf-required > .bf-label > label:first-child::after {
    content: " *"; color: #ef4444; font-weight: bold; margin-left: 2px;
}
.bf-label > .bf-secret-toggle,
.bf-label > [data-aux] { margin-left: auto; }
.bf-help { font-size: 11px; color: #9ca3af; margin-top: 4px; }
.bf-input { width: 100%; }
.bf-input input[type="text"],
.bf-input input[type="email"],
.bf-input input[type="tel"],
.bf-input input[type="number"],
.bf-input input[type="password"],
.bf-input input[type="url"],
.bf-input input[type="date"],
.bf-input select,
.bf-input textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 0;
    font-size: 14px; background: #fff; color: #111827; box-sizing: border-box;
}
.bf-input input[type="file"] { width: auto; max-width: 100%; font-size: 13px; padding: 0; border: 0; background: transparent; }
.bf-input textarea { resize: vertical; min-height: 100px; }
.bf-input input:focus, .bf-input select:focus, .bf-input textarea:focus {
    outline: none; border-color: #1e293b; box-shadow: 0 0 0 3px rgba(30, 41, 59, .12);
}
.bf-input input[readonly], .bf-input select[disabled] {
    background: #f9fafb; color: #6b7280; cursor: not-allowed; border-color: #e5e7eb;
}
.bf-input .bf-options { display: flex; flex-wrap: wrap; gap: 16px; }
.bf-input .bf-options label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; color: #374151; }
.bf-form input[type="checkbox"],
.bf-form input[type="radio"] {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    width: 18px; height: 18px; border: 1.5px solid #6b7280; background: #fff;
    cursor: pointer; position: relative; flex-shrink: 0; vertical-align: middle; margin: 0;
    transition: border-color .15s ease;
}
.bf-form input[type="checkbox"] { border-radius: 4px; }
.bf-form input[type="radio"]    { border-radius: 50%; }
.bf-form input[type="checkbox"]:checked,
.bf-form input[type="radio"]:checked { background: #fff; border-color: #111827; }
.bf-form input[type="checkbox"]:checked::after {
    content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
    border-right: 2px solid #111827; border-bottom: 2px solid #111827; transform: rotate(45deg);
}
.bf-form input[type="radio"]:checked::after {
    content: ''; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px;
    border-radius: 50%; background: #111827; transform: translate(-50%, -50%);
}
.bf-form input[type="checkbox"]:focus,
.bf-form input[type="radio"]:focus { outline: none; box-shadow: 0 0 0 3px rgba(17, 24, 39, .12); }
.bf-actions { display: flex; gap: 8px; margin-top: 24px; }
.bf-actions .bf-submit {
    padding: 11px 28px; background: #1e293b; color: #fff; border: 0; border-radius: 0;
    font-weight: 600; font-size: 14px; cursor: pointer; transition: background .15s ease;
}
.bf-actions .bf-submit:hover { background: #0f172a; }
.bf-actions .bf-cancel {
    padding: 11px 24px; background: #fff; color: #374151; border: 1px solid #d1d5db; border-radius: 0;
    font-weight: 500; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center;
}
.bf-actions .bf-cancel:hover { background: #f8fafc; }
.bf-secret-toggle { font-weight: normal; font-size: 13px; color: #6b7280; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.bf-field[data-field="agree_privacy"] .bf-label { display: none; }
.bf-field[data-field="agree_privacy"] .bf-input { display: flex; align-items: center; gap: 8px; }

/* 게시판 보기(view) — 원자 구조 */
.bv-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: #6b7280; }
.bv-field { display: inline-flex; align-items: center; gap: 4px; }
.bv-label { font-size: 13px; color: #9ca3af; }
.bv-value { color: inherit; }
.bv-meta > .bv-field > .bv-label { display: none; }
.bv-customfields {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px;
    padding: 16px 24px; background: #f9fafb; border-bottom: 1px solid #f3f4f6; font-size: 14px;
}
.bv-customfields .bv-field { display: flex; align-items: flex-start; }
.bv-customfields .bv-label { font-weight: 500; color: #4b5563; margin-right: 8px; min-width: 80px; flex-shrink: 0; }
.bv-customfields .bv-value { color: #1f2937; }
.bv-customfields .bv-value a { color: #2563eb; text-decoration: underline; }
@media (max-width: 640px) { .bv-customfields { grid-template-columns: 1fr; } }
