/* =============================================
   그누보드 게시판 스킨 스타일 (모던 디자인)
   ============================================= */

/* 기본 변수 설정 */
:root {
    --primary: #2ba6a6;
    --primary-hover: #2596af;
    --foreground: #1a1a1a;
    --muted-foreground: #6b7280;
    --bg-card: #ffffff;
    --bg-accent: #f3f4f6;
    --border: #e5e7eb;
    --transition: all 0.2s ease;
}

/* =============================================
   게시판 목록 (list.skin.php)
   ============================================= */

.board-container {
    margin: 1rem auto 5rem;
    padding: 1.5rem 0;
}

/* 상단 정보 */
.board-top-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

/* 로그인/로그아웃 영역 */
.board-login-area {
    display: flex;
    align-items: center;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: #fff;
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-login:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-login svg {
    width: 1.125rem;
    height: 1.125rem;
}

.login-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary);
}

.user-name {
    font-weight: 600;
    color: var(--foreground);
    font-size: 1.0625rem;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: #fff;
    color: var(--muted-foreground);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: var(--transition);
}

.btn-logout:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
}

.btn-logout svg {
    width: 1rem;
    height: 1rem;
}

.total-info {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9375rem;
    color: var(--muted-foreground);
}

.total-count strong {
    color: var(--primary);
    font-weight: 700;
}

.board-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-write {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--primary);
    color: #fff;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.btn-write:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-write svg {
    width: 1rem;
    height: 1rem;
}

/* 게시판 카드 */
.board-card {
    background: var(--bg-card);
    border: 1px solid #dbe7e7;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 헤더 */
.board-header {
    display: none;
    grid-template-columns: 7fr 2fr 2fr 1fr;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #f9fafa;
    border-bottom: 1px solid #dbe7e7;
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--muted-foreground);
}

@media (min-width: 768px) {
    .board-header {
        display: grid;
    }
}

.board-header.has-checkbox {
    grid-template-columns: 2rem 7fr 2fr 2fr 1fr;
}

.board-header .col-title { text-align: left; }
.board-header .col-date,
.board-header .col-hit { text-align: center; }

.col-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    flex-shrink: 0;
}

/* 게시물 아이템 */
.board-items {
    border-top: 1px solid var(--border);
}

.board-items > *:first-child {
    border-top: none;
}

.board-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}

.board-item:hover {
    background: #f0fafa;
}

@media (min-width: 768px) {
    .board-item {
        grid-template-columns: 7fr 2fr 2fr 1fr;
        gap: 1rem;
        align-items: center;
    }

    .board-item.has-checkbox {
        grid-template-columns: 2rem 7fr 2fr 2fr 1fr;
    }
}

.board-item.is-notice {
    background: rgba(43, 166, 166, 0.03);
}

.item-col {
    display: flex;
    align-items: center;
}

.col-title {
    width: 100%;
}

.title-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.notice-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.25rem;
}

.notice-badge svg {
    width: 0.75rem;
    height: 0.75rem;
}

.file-icon {
    width: 1rem;
    height: 1rem;
    color: var(--muted-foreground);
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .file-icon {
        display: none;
    }
}

.item-title {
    font-weight: 500;
    color: var(--foreground);
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.0625rem;
}

.item-title:hover {
    color: var(--primary);
}

.item-title.is-notice-title {
    color: var(--primary);
    font-weight: 600;
}

.new-badge {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    background: #ef4444;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 0.25rem;
    line-height: 1;
}

.comment-count {
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
}

.col-date,
.col-hit {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 1.0625rem;
    color: var(--muted-foreground);
}

@media (min-width: 768px) {
    .col-date,
    .col-hit {
        justify-content: center;
    }
}

.col-date svg,
.col-hit svg {
    width: 1rem;
    height: 1rem;
}

@media (min-width: 768px) {
    .col-date .mobile-icon {
        display: none;
    }
}

.col-action {
    display: none;
    justify-content: flex-end;
}

@media (min-width: 768px) {
    .col-action {
        display: flex;
    }
}

.col-action svg {
    width: 1rem;
    height: 1rem;
    color: var(--muted-foreground);
}

/* 빈 게시판 */
.empty-board {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: var(--muted-foreground);
}

.empty-board svg {
    width: 4rem;
    height: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* 페이징 */
.board-pagination {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.board-pagination a,
.board-pagination strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    margin: 0 0.25rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    color: var(--foreground);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: var(--transition);
}

.board-pagination a:hover {
    background: var(--bg-accent);
    border-color: var(--primary);
    color: var(--primary);
}

.board-pagination strong {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 700;
}

/* 검색 */
.board-search {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-accent);
    border-radius: 0.75rem;
}

.search-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .search-wrapper {
        flex-direction: row;
        align-items: center;
    }
}

.search-select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    background: #fff;
    min-width: 150px;
}

.search-input-group {
    display: flex;
    flex: 1;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.search-button:hover {
    background: var(--primary-hover);
}

.search-button svg {
    width: 1rem;
    height: 1rem;
}

/* =============================================
   글보기 (view.skin.php) — bov-* 통합 디자인
   ============================================= */

#bo_v.bov-wrap,
article#bo_v {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.07);
    overflow: hidden;
    margin: 4rem 0 6rem;
}

/* 헤더 */
.bov-header {
    padding: 32px 32px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.bov-category {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 9999px;
    margin-bottom: 12px;
}

.bov-title {
    font-size: 2.475rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.4;
    margin: 0 0 20px;
    word-break: break-all;
}

/* 메타 정보 */
.bov-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.bov-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bov-avatar img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.bov-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 1.0625rem;
}

.bov-stats {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bov-stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9375rem;
    color: #718096;
    text-decoration: none;
}

.bov-stat-item svg { flex-shrink: 0; opacity: 0.7; }
a.bov-comment-link:hover { color: var(--primary); }

/* 액션 버튼들 */
.bov-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.bov-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    white-space: nowrap;
}

.bov-btn-outline {
    background: #fff;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.bov-btn-outline:hover {
    background: #f7fafc;
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}

.bov-more-wrap {
    position: relative;
}

/* 더보기 메뉴 */
.more_opt {
    display: none;
    position: absolute;
    top: 45px;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 999;
    list-style: none;
    padding: 4px 0;
    min-width: 110px;
}

.bov-more-menu li a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    font-size: 13px;
    color: #4a5568;
    text-decoration: none;
}

.bov-more-menu li a:hover { color: var(--primary); background: #f7fafc; }
.bov-delete-link:hover { color: #e53e3e !important; }

/* 본문 섹션 */
.bov-content-section {
    padding: 28px 32px;
}

.bov-share {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

#bo_v_img { margin-bottom: 20px; }
#bo_v_img img { max-width: 100%; height: auto; border-radius: 8px; }

.bov-content {
    font-size: 1.1625rem;
    line-height: 1.8;
    color: #2d3748;
    min-height: 150px;
    word-break: break-all;
}

.bov-content img { max-width: 100%; height: auto; border-radius: 6px; }
.bov-content a { color: var(--primary); text-decoration: underline; }

.bov-signature {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px dashed #e2e8f0;
    font-size: 13px;
    color: #a0aec0;
}

/* 추천/비추천 */
.bov-reactions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #f1f5f9;
}

.bov-reaction-wrap { position: relative; }

.bov-reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 2px solid;
    transition: all 0.2s;
}

.bov-good {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(43, 166, 166, 0.05);
}

.bov-good:hover { background: var(--primary); color: #fff; text-decoration: none; }

.bov-nogood {
    color: #718096;
    border-color: #cbd5e0;
    background: #f7fafc;
}

.bov-nogood:hover { background: #718096; color: #fff; text-decoration: none; border-color: #718096; }

.bov-good-disabled, .bov-nogood-disabled {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: 9999px;
    font-size: 14px;
    color: #a0aec0;
    border: 2px solid #e2e8f0;
    background: #f7fafc;
}

.bov-reaction-msg {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a202c;
    color: #fff;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

/* 첨부파일 / 링크 */
.bov-attachments, .bov-links {
    padding: 20px 32px;
    border-top: 1px solid #f1f5f9;
}

.bov-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #4a5568;
    margin: 0 0 14px;
}

.bov-section-title svg { color: var(--primary); }

.bov-file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bov-file-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.2s;
}

.bov-file-item:hover { border-color: var(--primary); }
.bov-file-item svg { flex-shrink: 0; color: var(--primary); margin-top: 2px; }
.bov-file-info { display: flex; flex-direction: column; gap: 3px; }

.bov-file-name {
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bov-file-name:hover { color: var(--primary); }
.bov-file-size { font-size: 12px; color: #a0aec0; font-weight: 400; }
.bov-file-meta { font-size: 12px; color: #a0aec0; }

/* 이전/다음글 */
.bov-nav {
    margin: 0;
    border-top: 1px solid #f1f5f9;
}

.bov-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 32px;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    transition: background 0.2s;
}

.bov-nav-item:hover { background: #f8fafc; text-decoration: none; }

.bov-nav-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9358rem;
    color: #a0aec0;
    font-weight: 600;
    white-space: nowrap;
    min-width: 48px;
}

.bov-nav-subject {
    flex: 1;
    font-size: 1.0625rem;
    color: #2d3748;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bov-nav-date {
    font-size: 12px;
    color: #a0aec0;
    white-space: nowrap;
}

/* =============================================
   댓글 (view_comment.php) 기본 스타일
   ============================================= */

#bo_vc {
    margin-top: 2rem;
}

#bo_vc .nb {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
}

#bo_vc_list {
    margin-bottom: 1.5rem;
}

#bo_vc_list .no_vc {
    padding: 2rem;
    text-align: center;
    color: var(--muted-foreground);
    background: var(--bg-accent);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
}

.vc_item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.vc_item:last-child {
    border-bottom: none;
}

.vc_info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.vc_name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--foreground);
}

.vc_date {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
}

.vc_content {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--foreground);
    padding-left: 0.25rem;
}

/* 댓글 쓰기 */
#bo_vc_w {
    background: var(--bg-accent);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

#bo_vc_w h3,
#bo_vc_w .vc_w_tit {
    font-size: 1rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 1rem;
}

#bo_vc_w textarea,
#bo_vc_w input[type="text"],
#bo_vc_w input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    background: #fff;
    box-sizing: border-box;
    transition: var(--transition);
    resize: vertical;
}

#bo_vc_w textarea:focus,
#bo_vc_w input[type="text"]:focus,
#bo_vc_w input[type="password"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(43, 166, 166, 0.1);
}

#bo_vc_w textarea {
    min-height: 100px;
}

#bo_vc_w .btn_submit,
#bo_vc_w input[type="submit"],
#bo_vc_w button[type="submit"] {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.75rem;
}

#bo_vc_w .btn_submit:hover,
#bo_vc_w input[type="submit"]:hover,
#bo_vc_w button[type="submit"]:hover {
    background: var(--primary-hover);
}

#bo_vc_w .vc_secret {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* =============================================
   글쓰기 (write.skin.php)
   ============================================= */

.board-write-container {
    margin: 0 auto;
    padding: 2rem 1rem;
}

.write-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 2rem;
}

.write-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.write-row {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .write-row {
        flex-direction: row;
        align-items: flex-start;
        gap: 1rem;
    }
}

.write-row-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem 1.5rem;
    margin-bottom: 1rem;
}

@media (max-width: 767px) {
    .write-row-group {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.write-row-half {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.write-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 600;
    color: var(--foreground);
    font-size: 0.9375rem;
    padding-top: 0.5rem;
    flex-shrink: 0;
    min-width: 110px;
    width: 110px;
}

.write-label svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    color: var(--muted-foreground);
}

@media (max-width: 767px) {
    .write-label {
        min-width: auto;
        width: auto;
        padding-top: 0;
    }
}

.required {
    color: #ef4444;
}

.write-field {
    flex: 1;
    min-width: 0;
}

.write-input,
.write-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    transition: var(--transition);
    box-sizing: border-box;
    background: #fafafa;
    color: var(--foreground);
}

.write-input:focus,
.write-select:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(43, 166, 166, 0.1);
}

.write-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.write-option-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.write-option-item input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
}

.write-subject-wrapper {
    position: relative;
}

.btn-autosave {
    margin-top: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-accent);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-autosave:hover {
    background: var(--bg-card);
    border-color: var(--primary);
}

.btn-autosave svg {
    width: 1rem;
    height: 1rem;
}

.char-count-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.char-count-info svg {
    width: 1rem;
    height: 1rem;
}

.char-count-display {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    text-align: right;
}

/* 내용 textarea */
.write-field textarea#wr_content,
.write-content-wrapper textarea,
#wr_content {
    width: 100%;
    min-height: 250px;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    line-height: 1.7;
    background: #fafafa;
    color: var(--foreground);
    box-sizing: border-box;
    resize: vertical;
    transition: var(--transition);
    font-family: inherit;
}

.write-field textarea#wr_content:focus,
.write-content-wrapper textarea:focus,
#wr_content:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(43, 166, 166, 0.1);
}

.write-file-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.write-file {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: #fff;
    font-size: 0.875rem;
    width: 100%;
    box-sizing: border-box;
}

.write-file-delete {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.file-info-text {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: var(--muted-foreground);
}

.file-info-text svg {
    width: 0.8125rem;
    height: 0.8125rem;
    flex-shrink: 0;
}

/* =============================================
   자동등록방지 (CAPTCHA - kcaptcha)
   ============================================= */

/* fieldset 기본 초기화 */
fieldset#captcha.captcha {
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.625rem;
}

fieldset#captcha.captcha legend {
    display: none;
}

/* 캡차 이미지 */
#captcha_img {
    display: block;
    height: 52px;
    width: auto;
    border-radius: 0.375rem;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

/* 캡차 입력 박스 */
input#captcha_key.captcha_box {
    height: 52px;
    width: 160px;
    padding: 0 1rem;
    border: 2px solid var(--primary);
    border-radius: 0.5rem;
    font-size: 1.25rem;
    letter-spacing: 0.3em;
    background: #fff;
    color: var(--foreground);
    box-sizing: border-box;
    transition: var(--transition);
    flex-shrink: 0;
}

input#captcha_key.captcha_box:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(43, 166, 166, 0.15);
}

/* 숫자음성듣기 / 새로고침 버튼 */
button#captcha_mp3,
button#captcha_reload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    height: 40px;
    padding: 0 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    background: #fff;
    border: 2px solid var(--primary);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

button#captcha_mp3:hover,
button#captcha_reload:hover {
    background: var(--primary);
    color: #fff;
}

button#captcha_mp3 span,
button#captcha_reload span {
    display: none; /* 아이콘 span 숨김 */
}

/* 안내 문구 */
span#captcha_info {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    line-height: 1.5;
    width: 100%;
    display: block;
    margin-top: 0.125rem;
}

/* 모바일 */
@media (max-width: 640px) {
    fieldset#captcha.captcha {
        flex-direction: column;
        align-items: flex-start;
    }

    #captcha_img {
        height: auto;
        width: 100%;
        max-width: 180px;
    }

    input#captcha_key.captcha_box {
        width: 100%;
        max-width: 280px;
    }
}

/* =============================================
   버튼
   ============================================= */

.write-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-cancel,
.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-cancel {
    background: #fff;
    color: var(--foreground);
    border: 1px solid var(--border);
}

.btn-cancel:hover {
    background: var(--bg-accent);
}

.btn-submit {
    background: var(--primary);
    color: #fff;
}

.btn-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-cancel svg,
.btn-submit svg {
    width: 1.125rem;
    height: 1.125rem;
}

/* =============================================
   반응형
   ============================================= */

@media (max-width: 640px) {
    .board-container,
    .board-write-container {
        padding: 1rem;
    }

    .write-title {
        font-size: 1.5rem;
    }

    .write-form {
        padding: 1.5rem;
    }

    .board-top-info {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .board-login-area {
        order: -1;
        width: 100%;
        justify-content: center;
    }

    .login-user-info {
        font-size: 0.875rem;
    }

    .btn-login,
    .btn-logout {
        font-size: 0.8125rem;
        padding: 0.5rem 0.875rem;
    }

    .btn-login svg,
    .btn-logout svg {
        width: 1rem;
        height: 1rem;
    }

    /* 글보기 모바일 */
    .bov-header, .bov-content-section { padding: 20px 16px; }
    .bov-attachments, .bov-links { padding: 16px; }
    .bov-nav-item { padding: 12px 16px; }
    .bov-title { font-size: 1.375rem; }
    .bov-meta { flex-direction: column; align-items: flex-start; gap: 8px; }
}