/* 소울 에그 익명 게시판 & 모달 스타일 */

.bbs-section {
    display: flex;
    flex-direction: column;
    gap: 32px;
    scroll-margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid #E2DACA;
}

.bbs-rule-box {
    background: #1D1B16;
    color: #F8F5EE;
    border-radius: 20px;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bbs-rule-title {
    font-weight: 700;
    font-size: 17px;
    color: #F2B33D;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bbs-rule-desc {
    margin: 0;
    font-size: 14px;
    color: #CFC7B6;
    line-height: 1.6;
}

.bbs-status-card {
    background: #26241E;
    border: 1px solid #3A362E;
    border-radius: 14px;
    padding: 16px 20px;
    margin-top: 8px;
}

.bbs-status-card.not-logged-in p {
    margin: 0 0 6px;
    font-size: 14px;
}

.bbs-subtext {
    color: #A39C8C;
    font-size: 13px !important;
}

.bbs-login-btn {
    margin-top: 10px;
    background: #F2B33D;
    color: #1D1B16;
    border: none;
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.bbs-login-btn:hover {
    transform: scale(1.02);
}

.bbs-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.user-id-badge {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    color: #CFC7B6;
}

.points-pill {
    background: #F2B33D;
    color: #1D1B16;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.cooldown-info {
    margin: 0;
    font-size: 13.5px;
    font-weight: 600;
    color: #9FD3C7;
}

.rule-hint {
    margin: 4px 0 0;
    font-size: 12px;
    color: #A39C8C;
}

/* 필터 및 글쓰기 바 */
.bbs-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
}

.bbs-category-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bbs-category-btn {
    background: #FFFDF8;
    border: 1.5px solid #E2DACA;
    color: #5C574C;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bbs-category-btn:hover {
    border-color: #1D1B16;
    color: #1D1B16;
}

.bbs-category-btn.active {
    background: #1D1B16;
    color: #F8F5EE;
    border-color: #1D1B16;
}

.bbs-write-trigger-btn {
    background: #1D1B16;
    color: #F8F5EE;
    border: none;
    padding: 10px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(29, 27, 22, 0.12);
    transition: background 0.2s ease;
}

.bbs-write-trigger-btn:hover {
    background: #8C5A00;
}

/* 게시물 카드 그리드 */
.bbs-posts-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
}

.bbs-post-card {
    background: #FFFDF8;
    border: 1px solid #E2DACA;
    border-radius: 18px;
    padding: 22px 26px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.bbs-post-card:hover {
    box-shadow: 0 8px 24px rgba(29, 27, 22, 0.06);
    transform: translateY(-2px);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    flex-wrap: wrap;
}

.category-tag {
    background: #F8F5EE;
    border: 1px solid #D8CFC0;
    color: #5C574C;
    padding: 2px 10px;
    border-radius: 6px;
    font-weight: 600;
}

.anon-author {
    font-weight: 700;
    color: #1D1B16;
}

.post-time {
    color: #A39C8C;
    margin-left: auto;
    font-family: 'IBM Plex Mono', monospace;
}

.post-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1D1B16;
    line-height: 1.4;
}

.post-content {
    margin: 0;
    font-size: 14.5px;
    color: #3A362E;
    line-height: 1.6;
}

.post-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

.like-btn {
    background: #F8F5EE;
    border: 1px solid #E2DACA;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    color: #5C574C;
    cursor: pointer;
    transition: all 0.15s ease;
}

.like-btn:hover {
    border-color: #E63946;
    color: #E63946;
}

.like-btn.liked {
    background: #FFE8E8;
    border-color: #E63946;
    color: #E63946;
    font-weight: 700;
}

/* 빈 목록 상태 */
.bbs-empty {
    text-align: center;
    padding: 48px 24px;
    background: #FFFDF8;
    border: 1px dashed #D8CFC0;
    border-radius: 18px;
}

.empty-icon { font-size: 40px; margin: 0 0 8px; }
.empty-title { font-size: 17px; font-weight: 700; margin: 0 0 6px; }
.empty-sub { font-size: 13.5px; color: #7C7567; margin: 0 0 18px; }
.bbs-action-btn {
    background: #1D1B16;
    color: #F8F5EE;
    border: none;
    padding: 10px 24px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

/* 모달 공통 스타일 */
.soulegg-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(29, 27, 22, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 16px;
    box-sizing: border-box;
}

.soulegg-modal-box {
    background: #FFFDF8;
    border: 1px solid #E2DACA;
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    padding: 32px;
    box-shadow: 0 20px 48px rgba(0,0,0,0.25);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #5C574C;
    cursor: pointer;
}

.modal-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 800;
    color: #1D1B16;
}

.modal-sub {
    margin: 0 0 20px;
    font-size: 13px;
    color: #7C7567;
}

/* 탭 전환 */
.modal-tabs {
    display: flex;
    border-bottom: 2px solid #E2DACA;
    margin-bottom: 20px;
}

.modal-tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 700;
    color: #7C7567;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.modal-tab-btn.active {
    color: #1D1B16;
    border-bottom-color: #1D1B16;
}

/* 폼 컨트롤 */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.form-group label {
    font-size: 12.5px;
    font-weight: 700;
    color: #3A362E;
}

.form-control {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1.5px solid #D8CFC0;
    border-radius: 10px;
    font-size: 14px;
    background: #FFF;
    outline: none;
    font-family: inherit;
}

.form-control:focus {
    border-color: #1D1B16;
}

.form-submit-btn {
    width: 100%;
    background: #1D1B16;
    color: #F8F5EE;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s ease;
}

.form-submit-btn:hover {
    background: #8C5A00;
}

.google-auth-btn {
    width: 100%;
    background: #FFF;
    border: 1.5px solid #D8CFC0;
    padding: 12px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    color: #1D1B16;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    transition: all 0.2s ease;
}

.google-auth-btn:hover {
    background: #F8F5EE;
    border-color: #1D1B16;
}

.modal-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #A39C8C;
    font-size: 12px;
    margin: 16px 0 6px;
}

.modal-divider::before, .modal-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #E2DACA;
}

.modal-divider:not(:empty)::before { margin-right: .5em; }
.modal-divider:not(:empty)::after { margin-left: .5em; }

.bonus-callout {
    background: #FBF4E4;
    border: 1px solid #F2B33D;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12px;
    color: #8C5A00;
    font-weight: 600;
    margin-bottom: 14px;
}

/* ===================== v1.1 커뮤니티 확장 ===================== */

/* 커뮤니티 현황 스트립 */
.bbs-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    font-family: 'IBM Plex Mono', 'IBM Plex Sans KR', ui-monospace, monospace;
    font-size: 12.5px;
    color: #5C574C;
}
.bbs-stats strong { color: #1D1B16; }

/* 컨트롤 바: 탭 + 검색 + 글쓰기 */
.bbs-controls-bar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.bbs-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.bbs-search {
    display: flex;
    gap: 6px;
    flex: 1 1 260px;
    max-width: 420px;
}
.bbs-search input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1.5px solid #D8CFC0;
    border-radius: 999px;
    font-size: 13.5px;
    background: #FFFDF8;
    font-family: inherit;
    outline: none;
}
.bbs-search input:focus { border-color: #1D1B16; }
.bbs-search button {
    background: #FFFDF8;
    border: 1.5px solid #D8CFC0;
    color: #1D1B16;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.bbs-search button:hover { border-color: #1D1B16; }
.bbs-result-hint {
    font-size: 12.5px;
    color: #7C7567;
    display: flex;
    align-items: center;
    gap: 10px;
}
.bbs-result-hint button {
    background: none;
    border: none;
    color: #8C5A00;
    text-decoration: underline;
    cursor: pointer;
    font-size: 12.5px;
}

/* 게시물 카드 확장 */
.mine-tag {
    background: #FBF4E4;
    border: 1px solid #F2B33D;
    color: #8C5A00;
    padding: 1px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11px;
}
.post-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}
.post-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #F8F5EE;
    border: 1px solid #E2DACA;
    color: #3A362E;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.post-chip.price { background: #FBF4E4; border-color: #F2B33D; color: #8C5A00; }
.post-chip.code { font-family: 'IBM Plex Mono', monospace; letter-spacing: 0.04em; }

.post-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
}
.post-footer .spacer { flex: 1; }
.comment-btn, .ghost-btn {
    background: #F8F5EE;
    border: 1px solid #E2DACA;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    color: #5C574C;
    cursor: pointer;
    transition: all 0.15s ease;
}
.comment-btn:hover { border-color: #1D1B16; color: #1D1B16; }
.comment-btn.open { background: #1D1B16; color: #F8F5EE; border-color: #1D1B16; }
.ghost-btn { background: transparent; border-color: transparent; color: #A39C8C; }
.ghost-btn:hover { color: #1D1B16; background: #F8F5EE; }
.ghost-btn.danger:hover { color: #E63946; background: #FFE8E8; }
.ghost-btn.confirming { color: #FFF; background: #E63946; border-color: #E63946; }

/* 댓글 패널 */
.comments-panel {
    border-top: 1px dashed #E2DACA;
    margin-top: 8px;
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.comments-panel[hidden] { display: none; }
.comment-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #F8F5EE;
    border-radius: 12px;
    padding: 10px 14px;
}
.comment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    flex-wrap: wrap;
}
.comment-author { font-weight: 700; color: #1D1B16; }
.author-tag {
    background: #1D1B16;
    color: #F2B33D;
    padding: 1px 7px;
    border-radius: 5px;
    font-size: 10.5px;
    font-weight: 800;
}
.comment-time { color: #A39C8C; font-family: 'IBM Plex Mono', monospace; margin-left: auto; }
.comment-text { margin: 0; font-size: 13.5px; color: #3A362E; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.comment-del {
    background: none; border: none; color: #A39C8C; cursor: pointer; font-size: 11.5px; padding: 0 4px;
}
.comment-del:hover { color: #E63946; }
.comment-form {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.comment-form textarea {
    flex: 1;
    resize: vertical;
    min-height: 44px;
    padding: 10px 12px;
    border: 1.5px solid #D8CFC0;
    border-radius: 10px;
    font-size: 13.5px;
    font-family: inherit;
    background: #FFF;
    outline: none;
}
.comment-form textarea:focus { border-color: #1D1B16; }
.comment-form button {
    background: #1D1B16;
    color: #F8F5EE;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.comment-form button:disabled { opacity: 0.6; cursor: default; }
.comments-empty, .comments-login {
    font-size: 13px;
    color: #7C7567;
    margin: 0;
}
.comments-login button {
    background: none; border: none; color: #8C5A00; text-decoration: underline; cursor: pointer; font-size: 13px; padding: 0;
}

/* 더 보기 */
.bbs-load-more { display: flex; justify-content: center; margin-top: 8px; }
.bbs-load-more[hidden] { display: none; }
.bbs-action-btn.secondary { background: #FFFDF8; color: #1D1B16; border: 1.5px solid #1D1B16; }
.bbs-action-btn:disabled { opacity: 0.6; cursor: default; }
.post-content { white-space: pre-wrap; word-break: break-word; }

/* 글쓰기 모달: 추가 정보 */
.write-extra {
    border: 1px dashed #D8CFC0;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    background: #FBFAF6;
}
.write-extra-title { font-size: 12.5px; font-weight: 700; color: #3A362E; margin: 0 0 10px; }
.write-extra-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.write-extra-grid .form-group { margin-bottom: 0; }
.write-extra-grid .full { grid-column: 1 / -1; }
.write-extra[hidden], .form-group[hidden] { display: none; }
@media (max-width: 480px) { .write-extra-grid { grid-template-columns: 1fr; } }

.form-error {
    background: #FFE8E8;
    border: 1px solid #E63946;
    color: #B3202C;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 12px;
}
.form-error[hidden] { display: none; }
.form-hint { font-size: 12px; color: #7C7567; margin: 2px 0 0; }
.google-auth-btn:disabled { opacity: 0.55; cursor: default; }
.google-auth-btn:disabled:hover { background: #FFF; border-color: #D8CFC0; }
#google-signin-container { display: flex; justify-content: center; margin: 4px 0 0; }
.google-auth-btn { margin-top: 4px; }
#google-signin-container:empty { display: none; }

/* 토스트 */
.soulegg-toast-wrap {
    position: fixed;
    left: 50%;
    bottom: 84px;
    transform: translateX(-50%);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
    width: min(92vw, 520px);
}
.soulegg-toast {
    background: #1D1B16;
    color: #F8F5EE;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-left: 4px solid #F2B33D;
    animation: toast-in 0.25s ease;
    pointer-events: auto;
    white-space: pre-line;
    max-width: 100%;
}
.soulegg-toast.error { border-left-color: #E63946; }
.soulegg-toast.success { border-left-color: #4CC38A; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 플로팅 바 모바일 축소 */
@media (max-width: 560px) {
    #soulegg-floating-bar { right: 10px; bottom: 10px; padding: 6px 10px; gap: 6px; }
    #soulegg-floating-bar a { display: none; }
}

/* ===================== 07 무인 계란 가맹 비교 섹션 ===================== */
.fr-table-wrap { overflow-x: auto; border: 1px solid #E2DACA; border-radius: 18px; background: #FFFDF8; }
.fr-table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 13.5px; }
.fr-table th, .fr-table td { padding: 12px 14px; border-bottom: 1px solid #E2DACA; text-align: left; vertical-align: top; }
.fr-table thead th { background: #1D1B16; color: #F8F5EE; font-size: 12.5px; letter-spacing: 0.04em; }
.fr-table tbody th { background: #FBF4E4; color: #8C5A00; font-weight: 700; white-space: nowrap; width: 120px; }
.fr-table tbody tr:last-child th, .fr-table tbody tr:last-child td { border-bottom: 0; }
.fr-table small { display: block; color: #A39C8C; font-family: 'IBM Plex Mono', monospace; font-size: 11px; margin-top: 3px; }
.fr-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.fr-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 20px; border-radius: 999px; font-weight: 700; font-size: 14px; text-decoration: none; background: #1D1B16; color: #F8F5EE !important; border: 1.5px solid #1D1B16; }
.fr-btn:hover { background: #8C5A00; border-color: #8C5A00; }
.fr-btn.outline { background: transparent; color: #1D1B16 !important; }
.fr-btn.outline:hover { background: #1D1B16; color: #F8F5EE !important; }
.fr-note { font-size: 12.5px; color: #7C7567; margin: 0; }
.mission-card { background: #1D1B16; color: #F8F5EE; border-radius: 24px; padding: 28px 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 20px; }
.mission-card h4 { margin: 0 0 6px; font-family: 'IBM Plex Mono', 'IBM Plex Sans KR', ui-monospace, monospace; font-size: 12px; letter-spacing: 0.08em; color: #F2B33D; text-transform: uppercase; }
.mission-card p { margin: 0; font-size: 15px; line-height: 1.6; color: #CFC7B6; }
.mission-card p strong { color: #F8F5EE; }
.bbs-guide-list { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; color: #CFC7B6; line-height: 1.7; }
.bbs-guide-list strong { color: #F8F5EE; }
.bbs-guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 14px; margin-top: 4px; }
.bbs-guide-grid > div { background: #26241E; border: 1px solid #3A362E; border-radius: 14px; padding: 14px 16px; }
.bbs-guide-grid h4 { margin: 0 0 6px; font-size: 14px; color: #F2B33D; }

/* ===================== 06 계란 시세판 ===================== */
.price-board { display: flex; flex-direction: column; gap: 14px; }
.price-summary { display: flex; gap: 10px 22px; flex-wrap: wrap; font-size: 14px; color: #5C574C; }
.price-summary strong { color: #1D1B16; font-size: 18px; }
.price-table tbody th { width: 140px; white-space: normal; }
.price-latest-title { margin: 6px 0 0; font-size: 12.5px; font-weight: 700; color: #8C5A00; letter-spacing: 0.04em; }
.price-latest { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.price-latest li { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.price-when { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; color: #A39C8C; margin-left: 4px; }

/* ===================== 공유 / 관리자 ===================== */
.shared-banner { font-size: 12.5px; font-weight: 700; color: #8C5A00; margin-bottom: -6px; }
.bbs-post-card.highlight { border-color: #F2B33D; box-shadow: 0 0 0 3px rgba(242, 179, 61, 0.25); }
.admin-list { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; }
.admin-item { background: #F8F5EE; border: 1px solid #E2DACA; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.admin-item.hidden-post { background: #FFF4F4; border-color: #F3C4C8; }
.admin-title { font-size: 14.5px; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.srcname { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: #A39C8C; }
.tagline { padding: 1px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.tagline.hidden { background: #1D1B16; color: #F8F5EE; }
.tagline.warn { background: #FFE8E8; color: #B3202C; border: 1px solid #E63946; }
