/* ========================
   로드비 피드 스킨 v2
   좌: 이미지 고정 / 우: 댓글 타임라인
======================== */

/* 블베 업데이트: 글쓰기 버튼 이동, 새로고침, 서치창 추가 */

.form-input,
input[type="text"],
input[type="pass"],
input[type="file"],
input[type="url"],
textarea {
    box-sizing: border-box;
    padding: 5px;
    font-size: 0.9em;
}

.board-notice-box {
    background: rgb(from var(--card-bg-color, #f8f8f8) r g b / 80%);
    border: 1px solid var(--card-border-color);
    border-radius: var(--card-border-radius);
    padding: 12px 22px;
    margin-bottom: 16px;
    font-size: 0.88em;
    color: var(--content-font-color);
    line-height: 1.7;
    margin: 0 auto 16px;  
    min-width: 300px;     
    width: fit-content;   
}


#roadb_feed .ui-search-box {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,.82);
    border: 1px solid var(--card-border-color);
    border-radius: var(--btn-primary-radius);
    overflow: hidden;
    transition: box-shadow .2s, border-color .2s;
    gap: 5px;
}

#roadb_feed .ui-search-box form:focus-within {
    border-color: var(--card-border-color);
    box-shadow: 0 2px 10px var(--card-border-color);
}

#roadb_feed .ui-search-box select {
    border: none;
    border-right: 1px solid var(--card-border-color);
    font-size: 12px;
    background: transparent;
    color: var(--accent-color);
    height: 100%;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

#roadb_feed .ui-search-box input[type="text"] {
    height: 25px;
    padding: 8px 12px;
    margin-right: 5px;
    border: none;
    background: transparent;
    font-size: 0.9em;
    min-width: 160px;
    outline: none;
    color: var(--accent-color);
    border-radius: var(--btn-primary-radius);
}

#roadb_feed {
    align-items: center;
    max-width: 98%;
    margin: 0 auto;
    padding: 16px 0 40px;
    
    font-size: 14px;
    color: var(--content-font-color);
}

/* 상단 바 */
.rf-topbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 25px;
    margin-bottom: 10px;
}

.rf-topbar-center {
    display: flex;
    align-items: center;
    gap: 3px;
}

.rf-topbar-center.ui.sch {
    height: 25px;
    width: 40px;
    background: var(--color-2);
    gap:5px;
}

.rf-topbar-center.ui.sch:hover {
    background: var(--color-b);
    color: var(--gray-600);
}

.rf-topbar input#stx {
    flex: 1;
    max-width: 100%;
    width: 100%;
}


@media (max-width: 768px) {
    /* 블베 업데이트: 상단바 모바일 반응형 추가 */
    #roadb_feed .rf-topbar { 
        display: flex;          /* 플렉스 명시 */
        flex-direction: row;    /* 모바일에서도 가로 정렬 유지 */
        flex-wrap: nowrap;      /* 아래로 떨어지는 것 방지 */
        gap: 8px !important;    
        width: 100%;
        padding: 0 10px;
        justify-content: center; /* 전체 요소를 화면 정중앙으로 배치 */
    }

    #roadb_feed .rf-topbar-center {
        flex-shrink: 0;         /* 좁아져도 이 영역은 형태를 유지 */
    }

    #roadb_feed .searc-sub-box {
        /* [해결책] 공간을 다 차지하지 않고 하얀 검색창 크기만큼만 딱 줄여서 gap이 먹히게 만듭니다 */
        display: block;         
        width: max-content;     
        flex-shrink: 0;
    }

    /* 검색창 내부 요소들이 부모 크기에 맞춰 유연하게 줄어들도록 설정 */
    #roadb_feed .ui-search-box {
        width: max-content;     /* 오른쪽 끝으로 안 늘어나고 알맹이 크기 유지 */
    }
    
    #roadb_feed .ui-search-box input[type="text"] {
        min-width: 0;           
        width: 100%;
    }
}



/* 카테고리 */
/* 레이아웃 */
.rf-layout {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 20px;
    align-items: start;
    max-width: 1130px; 
    margin: 0 auto;
}

.rf-layout.no-sidebar {
    grid-template-columns: 1fr;
    max-width: 1050px;
}

.rf-main {
    min-width: 0;
    max-width: 1050px; /* 피드 원래 폭 유지 */
}

/* 사이드바 */
.rf-sidebar {
    position: sticky;
    top: 20px;
}
.rf-sidebar-box {
    background: var(--card-bg-color);
    border: 1px solid var(--card-border-color);
    border-radius: var(--card-border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    padding: 6px 0;
}
.rf-sidebar-title {
    padding: 12px 14px 10px;
    font-size: 0.82em;
    color: rgb(from var(--content-font-color) r g b / 0.5);
    font-weight: 600;
    margin: 0;
    border-bottom: 1px solid var(--card-border-color);
}
.rf-sidebar-title i { margin-right: 4px; }

.rf-sidebar-cate-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.rf-sidebar-cate-item {
    transition: all 0.15s;
}
.rf-sidebar-cate-item a {
    display: flex;
    justify-content: space-between; /* ✅ 이름과 숫자 양쪽 정렬 */
    align-items: center;
    padding: 8px 14px 8px 11px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.88em;
}

.rf-cate-count {
    font-size: 0.78em;
    color: rgb(from var(--content-font-color) r g b / 0.4);
    background: var(--container-bg-color);
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.rf-sidebar-cate-item:hover {
    background: rgb(from var(--primary-color) r g b / 5%);
}
.rf-sidebar-cate-item.active {
    background: rgb(from var(--primary-color) r g b / 8%);
}
.rf-sidebar-cate-item.active a {
    font-weight: 600;
    color: var(--primary-color);
}


/* 모바일 pill 카테고리 */
.rf-cate-mobile {
    display: none;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0 0 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.rf-cate-mobile::-webkit-scrollbar { display: none; }

.rf-pill {
    display: inline-block;
    padding: 5px 14px;
    border: 1px solid var(--card-border-color);
    border-radius: 20px;
    margin-right: 6px;
    font-size: 0.85em;
    text-decoration: none;
    color: rgb(from var(--content-font-color) r g b / 0.5);
    background: var(--card-bg-color);
    transition: all 0.15s;
}
.rf-pill:hover { border-color: var(--primary-color); color: var(--primary-color); }
.rf-pill.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    font-weight: 600;
}

/* 사이드바 모바일 반응형 */
@media (max-width: 768px) {
    .rf-layout {
        grid-template-columns: 1fr;
    }
    .rf-sidebar { display: none; }
    .rf-cate-mobile { display: flex; justify-content: center;}
}

/* 블베 업데이트: 안 쓰는 버튼 스타일 삭제 */

/* 피드 */
.rf-feed { 
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px 0px; 
    margin: 0 10px; /* 블베 업데이트 */
}

/* 블베 업데이트 : 카드 */
.rf-card {
    background: var(--card-bg-color);
    border-radius: var(--btn-primary-radius); 
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border: 0px solid var(--container-border-color);
    overflow: hidden;
}

.rf-card-inner {
    display: flex !important;
    flex-direction: row !important;
    min-height: auto;
    
}

/* ========================
   왼쪽: 이미지
======================== */
.rf-left {
    width: 42% !important;
    flex-shrink: 0 !important;
    background: var(--container-bg-color);
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    border-right: 1px solid var(--card-border-color);
    
}
.rf-img-wrap {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start; /* 블베 업데이트 */
    justify-content: center;
    background: transparent;
    transition: max-height 0.45s ease;
}
.rf-img {
    width: 100%; 
    height: auto; /* 블베 업데이트 */
    object-position: top center; /* 블베 업데이트 */
    object-fit: contain;
    display: block;
    cursor: zoom-in;
    transition: filter 0.25s;
}

.rf-img-blur { filter: blur(18px) brightness(0.4); cursor: default; }
.rf-no-img {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 3em;
}
/* 접기/민감 커버 */
.rf-img-cover {
    position: absolute; inset: 0; z-index: 5;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 10px; color: #fff; text-align: center;
    background: rgba(20,20,40,0.75); padding: 20px;
}
.rf-img-cover i { font-size: 2em; opacity: 0.75; }
.rf-img-cover p { margin: 0; font-size: 0.9em; }
.rf-sens-cover {background: #96bdc0a1;}
.rf-secret-cover { background: rgba(30,30,50,0.85); }
.rf-cover-btn {
    padding: 6px 18px; border-radius: 16px;
    border: 1.5px solid rgba(255,255,255,0.55);
    background: transparent; color: #fff;
    cursor: pointer; font-size: 0.83em; transition: background 0.15s;
}
.rf-cover-btn:hover { background: rgba(255,255,255,0.15); }

/* 카드 푸터: 좋아요/댓글 버튼 */
.rf-left-actions,
.rf-card-footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2px;
    padding: 5px 10px;
    border-top: 1px solid var(--card-border-color);
    background: var(--container-bg-color, #f5f5ee);
}

.rf-like-btn,
.rf-cmt-icon-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 0.9em;
    cursor: pointer;
    border-radius: 16px;
    transition: all 0.15s;
}

.rf-like-btn:hover  { color: var(--accent-color); background: rgb(from var(--accent-color) r g b / 7%); }
.rf-like-btn.liked  { color: var(--accent-color); }
.rf-cmt-icon-btn:hover { color: var(--primary-color); background: rgb(from var(--primary-color) r g b / 8%); }

.rf-like-btn.like-pop {
    animation: rfLikePop 0.3s ease;
}

@keyframes rfLikePop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}




/* 본문 이미지 세로 제한 및 페이드 아웃 */
.rf-img-wrap.is-long-folded {
    position: relative;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);  /* ← 추가 */
}

.rf-img-wrap.is-long-expanded {
    overflow: hidden;  /* none → hidden 으로 변경 */
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);  /* ← 추가 */
}

/* 600px 지점에서 하단을 자연스럽게 가리는 그라데이션 */
.rf-img-wrap.is-long-folded::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
    pointer-events: none;
}

/* 다크모드 환경이라면 아래 배경색을 타임라인 카드 배경색과 맞춰주세요 */
/* .rf-img-wrap.is-long-folded::after { background: linear-gradient(to bottom, rgba(34,34,34,0) 0%, rgba(34,34,34,1) 100%); } */

/* 이미지 더보기 (OPEN/CLOSE) 버튼 */
.btn-rf-img-more {
    display: block;
    width: calc(100% - 20px);
    margin: 8px auto 0 auto;
    padding: 2px 6px;
    background: rgb(from var(--primary-color) r g b / 50%);
    border: 1px solid var(--card-border-color);
    border-radius: var(--btn-primary-radius);
    color: var(--content-font-color);
    font-size: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.btn-rf-img-more:hover {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
}

/* 펼쳐진 상태 스타일 공정 */
.rf-img-wrap.is-long-expanded {
    max-height: none !important;
}
.rf-img-wrap.is-long-expanded::after {
    display: none;
}






/* ========================
   오른쪽: 댓글 타임라인
======================== */
.rf-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;   /* 가로 스크롤 차단 */
    overflow-y: visible;  /* 세로는 자연스럽게 */
}

/* 상단 헤더 */
.rf-num {
    font-size: 0.88em;
    color: var(--accent-color); /* 블베 업데이트: 넘버 글씨색 변경 */
    font-weight: 700;
}

.rf-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.73em;
    font-weight: 600;
}

.rf-badge-cat    { background: rgb(from var(--primary-color) r g b / 12%); color: var(--primary-color); }
.rf-badge-secret { background: #eee;    color: var(--text-muted); }
.rf-badge-sens   { background: rgb(from var(--accent-color, #f59e0b) r g b / 15%); color: var(--accent-color, #f59e0b); }


/* 수정/삭제 드롭다운 */
.rf-head-edit { position: relative; }
.rf-edit-dot {
    width: 26px; height: 26px; background: none; border: none;
    color: var(--text-muted); cursor: pointer; font-size: 0.95em; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; transition: background 0.12s;
}
.rf-edit-dot:hover { background: var(--form-bg-color); color: var(--text-muted); }
.rf-edit-menu {
    position: absolute; right: 0; top: 30px; z-index: 100;
    background: var(--card-bg-color); border: 1px solid var(--card-border-color); border-radius: 8px;
    box-shadow: 0 4px 16px rgb(from var(--content-font-color) r g b / 8%); min-width: 100px; overflow: hidden;
}
.rf-edit-menu a, .rf-edit-menu button {
    display: flex; align-items: center; gap: 7px;
    padding: 8px 14px; font-size: 0.83em; color: var(--text-muted);
    text-decoration: none; background: none; border: none;
    width: 100%; text-align: left; cursor: pointer; transition: background 0.12s;
}
.rf-edit-menu a:hover { background: rgb(from var(--primary-color) r g b / 5%); }
.rf-edit-menu button:hover { background: rgb(from var(--error-color, #e44) r g b / 6%); color: var(--error-color, #e44); }

/* 본문 */
.rf-post-body {
    padding: 5px 14px 7px;
    /* border-bottom: 1px solid var(--card-border-color); */
    flex-shrink: 0;
}
.rf-post-text { font-size: 0.9em; line-height: 1.65; color: var(--content-font-color); padding: 0 5px 5px 5px ;} /* 블베 업데이트 */

/* 댓글 목록 (스크롤) */
.rf-cmts-list {
    flex: 0;
    overflow-y: visible;
    padding: 1px 0;
    /* 스크롤바 스타일 */
    scrollbar-width: thin;
    scrollbar-color: var(--card-border-color) transparent;
}
.rf-cmts-list::-webkit-scrollbar { width: 4px; }
.rf-cmts-list::-webkit-scrollbar-track { background: transparent; }
.rf-cmts-list::-webkit-scrollbar-thumb { background: var(--card-border-color); border-radius: 2px; }

/* 더보기 버튼 */
.rf-more-btn {
    width: 100%; padding: 7px;
    border: none; background: none;
    color: var(--primary-color); font-size: 0.8em; font-weight: 600;
    cursor: pointer; display: flex; align-items: center;
    justify-content: center; gap: 5px; transition: background 0.12s;
}
.rf-more-btn:hover { background: rgb(from var(--primary-color) r g b / 6%); }
.rf-cmt-more { display: none; }

/* 개별 댓글 */
.rf-cmt {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    padding: 7px 12px;
    transition: background 0.1s;
}

/* 블베 업데이트: 💡 수많은 댓글 중 '가장 첫 번째 댓글'에만 위쪽 테두리를 줍니다 */
.rf-cmts-list .rf-cmt:first-child {
    border-top: 1px solid var(--card-border-color);
    padding-top: 10px; /* 본문과의 간격을 위해 첫 댓글만 위쪽 패딩을 넓힙니다 */
}

.rf-cmt:hover {
    background: rgb(from var(--primary-color) r g b / 8%); /* 블베 업데이트: 호버시 배경색 수정 */
}

.rf-cmt-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    max-width: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--form-bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2em;
}

.rf-cmt-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rf-cmt-body {
    flex: 1;
    min-width: 0;
}

.rf-cmt-head {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 3px;
}

.rf-cmt-name     { font-size: 0.95em; font-weight: 700; color: var(--content-font-color); }
.rf-cmt-rank     { font-size: 0.75em; font-weight: 700; }

/* 블베 업데이트: 버튼+날짜 박스 */
.rf-cmt-meta-group {
    display: flex;
    align-items: center;
    gap: 5px;  
    margin-left: auto;  
}

/* 버튼들을 담은 내부 주머니 */
.rf-cmt-action-buttons {
    display: flex;
    align-items: center;
    gap: 6px;           /* 수정 버튼과 삭제 버튼 사이의 간격 */
}

.rf-cmt-date     { font-size: 0.75em; color: var(--text-muted); }

/* 블베 업데이트: 수정, 삭제 버튼 */
.rf-cmt-edit-btn, .rf-cmt-del-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.7em;
    padding: 0 2px;
    transition: color 0.12s;
    margin-left: auto;
}

.rf-cmt-edit-btn:hover {
    color: rgb(from var(--accent-color) r g b / 100%) !important;
    transform: scale(1.1);
}

.rf-cmt-del-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.8em;
    padding: 0 2px;
    transition: color 0.12s;
}

.rf-cmt-del-btn:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

.rf-inline-btn-submit {
    background:var(--primary-color);
    color:#fff; border:none; padding:4px 10px; font-size:0.8em; border-radius:4px; cursor:pointer;
}

.rf-inline-btn-cancel {
    background: var(--light-bg-color);
    color:rgb(from var(--accent-color) r g b / 100%); border:none; padding:4px 10px; font-size:0.8em; border-radius:4px; cursor:pointer;
}

.rf-inline-btn-submit:hover {
    opacity: 0.9;
}

.rf-inline-btn-cancel:hover {
    background: var(--card-border-color) !important;
}

/* 블베 업데이트: 수정, 삭제 버튼 끝 */

.rf-cmt-text {
    font-size: 0.95em;
    line-height: 1.6;
    color: var(--content-font-color);
}

.rf-cmt-img-wrap {
    margin-top: 5px;
}

.rf-cmt-img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 6px;
    cursor: zoom-in;
    border: 1px solid var(--card-border-color);
    object-fit: contain;
    display: block;
}

.rf-cmt-option-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 2px;
}

.rf-cmt-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2px;
}

.rf-cmt-opt-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 0.85em;
    text-decoration: none;
    transition: all 0.15s;
}

.rf-cmt-opt-btn:hover {
    color: var(--primary-color);
    background: rgb(from var(--primary-color) r g b / 10%);
}

.rf-cmt-opt-btn.active {
    color: var(--primary-color);
    background: rgb(from var(--primary-color) r g b / 12%);
}

/* 비밀 댓글 */
.rf-cmt-secret-msg {
    font-size: 0.85em;
    color: var(--text-muted);
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 접기 댓글 */
.rf-cmt-fold-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rf-cmt-fold-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border: 1px solid var(--card-border-color);
    border-radius: 12px;
    background: var(--form-bg-color);
    color: var(--text-muted);
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.15s;
    width: fit-content;
}

.rf-cmt-fold-btn:hover {
    background: rgb(from var(--primary-color) r g b / 10%);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.rf-cmt-fold-btn.open {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgb(from var(--primary-color) r g b / 8%);
}

.rf-cmt-fold-content {
    padding: 4px 0;
}


/* 해시태그 */
.rf-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 6px 14px 4px;
    border-top: 1px solid var(--card-border-color);
    flex-shrink: 0;
}

/* 블베 업데이트: 안쓰는 해시태그 스타일 삭제 */
.hashtag {
    font-size: 0.8em;
}

/* 블베 업데이트: 댓글 달기 버튼 */
.rf-cmt-open-btn {
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border: none;
    background: none;
    color: rgb(from var(--primary-color) r g b / 75%);
    font-size: 0.8em;
    cursor: pointer;
    border-radius: 16px;
    transition: all 0.15s;
}

.rf-cmt-open-btn:hover { color: var(--primary-color); background: rgb(from var(--primary-color) r g b / 8%); }

/* 댓글 입력창 */
.rf-cmt-write {
    border-top: 1px solid var(--card-border-color);
    padding: 8px 10px;
    flex-shrink: 0;
    margin-top: auto;
    background: var(--container-bg-color);
}


.rf-cmt-write-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    /*padding: 0 8px;*/
}

.rf-cmt-av {
    width: 30px;
    height: 30px;
    min-width: 30px;
    max-width: 30px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--form-bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1em;
}

.rf-cmt-av img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rf-cmt-input-wrap {
    flex: 1;
    min-width: 0;
}

/* 이미지 미리보기 */
.rf-cmt-img-preview-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 5px;
}

.rf-cmt-img-preview {
    max-height: 80px;
    max-width: 120px;
    border-radius: 6px;
    border: 1px solid var(--card-border-color);
    object-fit: contain;
    display: block;
}

.rf-cmt-img-remove {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.7em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 텍스트 입력창 */
.rf-cmt-ta {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid var(--card-border-color);
    border-radius: 14px;
    font-size: 0.90em;
    font-family: inherit;
    resize: none;
    box-sizing: border-box;
    line-height: 1.5;
    min-height: 80px;
    background: var(--card-bg-color);
    transition: border-color 0.15s;
}

.rf-cmt-ta:focus {
    outline: none;
    border-color: var(--primary-color);
}


.rf-cmt-img-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95em;
    transition: color 0.15s, background 0.15s;
}

.rf-cmt-img-btn:hover {
    color: var(--primary-color);
    background: rgb(from var(--primary-color) r g b / 10%);
}

.rf-cmt-post {
    padding: 7px 20px;
    background: var(--primary-color);
    color: var(--btn-primary-text, #7a3f3a);
    border: none;
    border-radius: var(--btn-primary-radius);
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.rf-cmt-post:hover {
    opacity: 0.75;
}

/* 빈 상태 */
.rf-empty {
    text-align: center; padding: 60px 20px; color: var(--text-muted);
    background: var(--card-bg-color); border-radius: 6px; border: 1px solid var(--card-border-color);
}
.rf-empty i { font-size: 3em; display: block; margin-bottom: 14px; }

/* 페이지네이션 */
.rf-pagination { margin-top: 24px; text-align: center; }

/* 라이트박스 */
#rf-lightbox { position: fixed; inset: 0; z-index: 9999; }
#rf-lb-bg { position: absolute; inset: 0; background: rgba(0,0,0,0.92); cursor: pointer; }
#rf-lb-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 50px 60px;
    box-sizing: border-box;
    pointer-events: none; /* 배경 클릭은 bg에서 처리 */
    
    -webkit-overflow-scrolling: touch; /* iOS 모멘텀 스크롤 */
    overflow-y: auto;
    touch-action: pan-y;              /* 세로 터치 스크롤 허용 */
}

#rf-lb-img {
    max-width: 92vw;
    max-height: 92vh;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgb(from var(--content-font-color) r g b / 35%);
    pointer-events: all; /* 이미지 클릭 활성화 */
    margin: auto;
    transition: max-height 0.3s ease, max-width 0.3s ease;
    cursor: default;
}

#rf-lb-img.rf-lb-zoomable {
    cursor: zoom-in;
}

#rf-lb-img.rf-lb-expanded {
    max-height: none;
    max-width: 100%;
    cursor: zoom-out;
    align-self: flex-start;
}

#rf-lb-close {
    position: absolute; top: 14px; right: 18px;
    background: rgba(255,255,255,0.12); border: none; color: #fff;
    width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
    font-size: 1.2em; display: flex; align-items: center; justify-content: center;
    pointer-events: all; transition: background 0.15s;
}
#rf-lb-close:hover { background: rgba(255,255,255,0.25); }

#rf-lb-prev, #rf-lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    transition: background 0.15s;
    z-index: 10;
}
#rf-lb-prev { left: 18px; }
#rf-lb-next { right: 18px; }
#rf-lb-prev:hover, #rf-lb-next:hover { background: rgba(255,255,255,0.25); }
#rf-lb-prev.rf-lb-hidden, #rf-lb-next.rf-lb-hidden { display: none; }


/* ==========================================================================
   블베 업데이트: 타래형 다중 업로드 & 인라인 수정 프레임워크 전용 추가 스타일
   ========================================================================== */

/* 인라인 수정 폼 영역 wrapper */
.reply-edit-form {
    margin-top: 10px;
    background: var(--form-bg-color, #f9f9f9);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--card-border-color);
}

/* 이미지 편집 및 드롭존 레이아웃 토글 링크 */
.reply-edit-upload-toggle,
.reply-write-upload-toggle {
    margin-bottom: 8px;
}
.reply-edit-upload-toggle a, 
.reply-write-upload-toggle a {
    font-size: 0.8em;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s;
}
.reply-edit-upload-toggle a:hover, 
.reply-write-upload-toggle a:hover {
    color: var(--primary-color);
}

/* 이미지 업로드/편집 주머니 */
.reply-edit-upload-area {
    background: var(--card-bg-color);
    padding: 10px;
    border: 1px dashed var(--card-border-color);
    border-radius: 8px;
    margin-bottom: 10px;
}

/* 드래그 앤 드롭 영역 */
.reply-edit-dropzone {
    padding: 20px 15px;
    text-align: center;
    background: var(--form-bg-color);
    border: 1px dashed var(--card-border-color);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85em;
    margin-bottom: 8px;
    transition: all 0.15s ease-in-out;
}
.reply-edit-dropzone:hover,
.reply-edit-dropzone.dragover {
    background: rgb(from var(--primary-color) r g b / 6%);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 기존 첨부파일 편집 수정 리스트 */
.reply-edit-existing-files {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.existing-file-item {
    position: relative;
    width: 54px;
    height: 54px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--card-border-color);
}
.existing-file-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.existing-file-item .file-del-check {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border-radius: 50%;
    font-size: 9px;
    cursor: pointer;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.existing-file-item .file-del-check:hover {
    background: var(--accent-color, #ff4d4f);
}

/* 새 이미지 업로드 프리뷰 그리드 박스 */
.reply-edit-image-grid {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.reply-edit-image-item.preview-box {
    position: relative;
    width: 50px;
    height: 50px;
    border: 1px solid var(--card-border-color);
    border-radius: 6px;
    overflow: hidden;
    background: var(--form-bg-color);
}
.reply-edit-image-item.preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.reply-edit-image-item.preview-box button {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 9px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.15s;
}
.reply-edit-image-item.preview-box button:hover {
    background: var(--accent-color, #ff4d4f);
}

/* 외부 주소 연동 인풋 그룹 */
.reply-edit-url-input {
    display: flex;
    gap: 5px;
    margin-bottom: 4px;
}
.reply-edit-url-input input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--card-border-color);
    border-radius: 14px;
    font-size: 0.85em;
    background: var(--card-bg-color);
    color: var(--content-font-color);
}
.reply-edit-url-input input:focus {
    outline: none;
    border-color: var(--primary-color);
}
.reply-edit-url-input button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--form-bg-color);
    color: var(--text-muted);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.reply-edit-url-input button:hover {
    color: var(--primary-color);
    background: rgb(from var(--primary-color) r g b / 10%);
}

/* 인라인 수정 모드 전용 텍스트 에어리어 */
.reply-edit-form-inner .reply-edit-textarea {
    width: 100%;
    margin-top: 8px;
    padding: 8px 12px;
    border: 1px solid var(--card-border-color);
    border-radius: 14px;
    font-size: 0.9em;
    font-family: inherit;
    line-height: 1.5;
    min-height: 70px;
    resize: none;
    box-sizing: border-box;
    background: var(--card-bg-color);
    color: var(--content-font-color);
    transition: border-color 0.15s;
}
.reply-edit-form-inner .reply-edit-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* 필터 설정 메타 옵션 바 */
.reply-edit-options {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    font-size: 0.8em;
    color: var(--text-muted);
}
.reply-edit-options label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* 수정 하단 저장/취소 컨트롤 버튼셋 */
.reply-edit-buttons {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
    margin-top: 8px;
}
.reply-edit-buttons button {
    padding: 5px 12px;
    border: none;
    border-radius: 14px;
    font-size: 0.8em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.12s;
}
.reply-edit-buttons .btn-reply-save {
    border: 1px solid; 
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
    transition: all 0.2s;
}
.reply-edit-buttons .btn-reply-save:hover {
    opacity: 0.7;
}
.reply-edit-buttons .btn-reply-cancel {
    border: 1px solid; 
    border-color: var(--primary-color);
    background: var(--form-bg-color);
    color: var(--text-muted);
    transition: all 0.2s;
}
.reply-edit-buttons .btn-reply-cancel:hover {
    background: var(--card-border-color) !important;
}

/* ==========================================================================
   출력 데이터뷰 다중 이미지 반응형 그리드 시스템 (반응형/가변 비율 가드 추가)
   ========================================================================== */
.reply-image-grid {
    display: grid;
    gap: 4px;
    margin: 6px 0 8px;
    width: 100%;
    max-width: 480px;
}

.reply-image-grid.grid-1 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 240px; /* grid-2 한 칸 사이즈 */
}

.reply-image-grid.grid-single {
    max-width: 240px;
}

.reply-image-grid.grid-2 { grid-template-columns: repeat(2, 1fr); }
.reply-image-grid.grid-3 { grid-template-columns: repeat(3, 1fr); }
.reply-image-grid.grid-4 { grid-template-columns: repeat(2, 1fr); }

.reply-image-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 6px;
    background: var(--form-bg-color);
    border: 1px solid var(--card-border-color);
}
.reply-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.2s ease-in-out;
}
.reply-image-item img:hover {
    transform: scale(1.02);
}

/* ==========================================================================
   블베 업데이트: 타래형 다중 업로드 & 인라인 수정 프레임워크 전용 추가 스타일 종료
========================================================================== */


/* ========================
   글쓰기 (write.skin.php용)
======================== */
#roadb_write {
    max-width: 900px; margin: 0 auto;
    padding: 20px 16px; 
}
.rb-write-title { font-size: 1.2em; font-weight: 700; margin-bottom: 20px; color: var(--content-font-color); }
.rb-write-layout { display: flex; gap: 20px; align-items: flex-start; }
.rb-write-left  { width: 280px; flex-shrink: 0; display: flex; flex-direction: column; gap: 14px; }
.rb-write-right { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.rb-write-section { background: var(--card-bg-color); border: 1px solid var(--card-border-color); border-radius: 10px; padding: 14px; }
.rb-write-label {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.82em; font-weight: 700; color: var(--text-muted); margin-bottom: 10px;
}
.rb-img-upload-area {
    position: relative; aspect-ratio: 3/4;
    border: 2px dashed var(--card-border-color); border-radius: 8px;
    overflow: hidden; background: var(--container-bg-color);
    cursor: pointer; transition: border-color 0.15s, background 0.15s;
    display: block;
}
.rb-img-upload-area:hover, .rb-img-upload-area.drag-over { border-color: var(--primary-color); background: rgb(from var(--primary-color) r g b / 5%); }
.rb-img-placeholder {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 8px; color: var(--text-muted); text-align: center; padding: 16px;
}
.rb-img-placeholder i { font-size: 2em; }
.rb-img-placeholder p { font-size: 0.82em; margin: 0; }
.rb-img-placeholder small { font-size: 0.72em; }
.rb-img-preview { width: 100%; height: 100%; object-fit: contain; display: block; }
.rb-img-remove-btn {
    position: absolute; top: 7px; right: 7px;
    width: 26px; height: 26px; background: rgba(0,0,0,0.55); color: #fff;
    border: none; border-radius: 50%; cursor: pointer; font-size: 0.8em;
    display: flex; align-items: center; justify-content: center; transition: background 0.15s;
}
.rb-img-remove-btn:hover { background: var(--error-color, #e44); }
.rb-img-upload-progress { margin-top: 8px; text-align: center; }
.rb-progress-bar { height: 3px; background: var(--primary-color); border-radius: 2px; transition: width 0.2s; margin-bottom: 4px; }
#rb-progress-text { font-size: 0.75em; color: var(--text-muted); }
.rb-options { display: flex; flex-direction: column; gap: 7px; }
.rb-option-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 11px; border-radius: 8px; border: 1.5px solid var(--card-border-color);
    background: var(--card-bg-color); cursor: pointer; transition: all 0.15s;
}
.rb-option-item:hover { border-color: var(--primary-color); background: rgb(from var(--primary-color) r g b / 4%); }
.rb-option-item input[type=checkbox] { display: none; }
.rb-option-item:has(input:checked) { border-color: var(--primary-color); background: rgb(from var(--primary-color) r g b / 6%); }
.rb-option-icon {
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    border-radius: 7px; background: var(--form-bg-color); color: var(--text-muted); font-size: 0.9em; flex-shrink: 0;
}
.rb-option-item:has(input:checked) .rb-option-icon { background: rgb(from var(--primary-color) r g b / 12%); color: var(--primary-color); }
.rb-option-text strong { display: block; font-size: 0.85em; color: var(--content-font-color); }
.rb-option-text small { font-size: 0.72em; color: var(--text-muted); }
.rb-tags-input {
    width: 100%; padding: 7px 11px; border: 1px solid var(--card-border-color); border-radius: 7px;
    font-size: 0.85em; font-family: inherit; box-sizing: border-box; transition: border-color 0.15s;
}
.rb-tags-input:focus { outline: none; border-color: var(--primary-color); }
.rb-tags-preview { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.rb-tag-chip { padding: 2px 9px; background: rgb(from var(--primary-color) r g b / 10%); color: var(--primary-color); border-radius: 10px; font-size: 0.78em; font-weight: 600; }
.rb-editor-section { flex: 1; }
.rb-write-footer { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.rb-btn {
    display: inline-flex; align-items: center; gap: 5px; padding: 7px 16px;
    border-radius: 8px; font-size: 0.85em; font-weight: 600;
    text-decoration: none; cursor: pointer; border: 1px solid var(--card-border-color);
    background: var(--card-bg-color); color: var(--text-muted); transition: all 0.15s;
}
.rb-btn-cancel:hover { opacity: 0.8; background: var(--form-bg-color); }
.rb-btn-submit {
    background: var(--primary-color);
    color: var(--btn-primary-text, #7a3f3a);
    border-color: var(--primary-color);
    padding: 7px 22px;
    font-weight: 600;
    transition: all 0.2s;
}
.rb-btn-submit:hover { background: var(--btn-accent-bg);color: var(--btn-accent-text); }
.rb-btn-submit:disabled {
    background: var(--primary-color);
    color: var(--btn-primary-text, #7a3f3a);
    border-color: var(--primary-color);
    cursor: not-allowed;
}


/* ========================
   외부 이미지 링크 섹션
======================== */
.rb-ext-url-section { margin-top: 8px; }
.rb-ext-url-btn {
    width: 100%; padding: 7px 12px;
    background: none; border: 1.5px dashed var(--card-border-color);
    border-radius: 8px; color: var(--primary-color);
    font-size: 0.82em; font-weight: 600;
    cursor: pointer; display: flex;
    align-items: center; justify-content: center; gap: 6px;
    transition: all 0.15s;
}
.rb-ext-url-btn:hover { background: rgb(from var(--primary-color) r g b / 6%); border-color: var(--primary-color); }
.rb-ext-url-row {
    display: flex; gap: 5px; align-items: center; margin-top: 7px; overflow: hidden;
}
.rb-ext-url-input {
    flex: 1; padding: 7px 10px;
    min-width: 0;
    border: 1px solid var(--card-border-color); border-radius: 7px;
    font-size: 0.82em; font-family: inherit;
    box-sizing: border-box; transition: border-color 0.15s;
}
.rb-ext-url-input:focus { outline: none; border-color: var(--primary-color); }
.rb-ext-url-apply, .rb-ext-url-clear {
    width: 30px; height: 30px; border-radius: 50%;
    border: none; cursor: pointer; font-size: 0.85em;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: opacity 0.15s;
}
.rb-ext-url-apply { background: var(--primary-color); color: #fff; }
.rb-ext-url-apply:hover { opacity: 0.85; }
.rb-ext-url-clear { background: #f0f0f0; color: var(--text-muted); }
.rb-ext-url-clear:hover { background: rgb(from var(--error-color, #e44) r g b / 10%); color: var(--error-color, #e44); }

/* ========================
   유튜브 미리보기 (글쓰기)
======================== */
.rb-yt-input {
    width: 100%; padding: 8px 12px;
    border: 1px solid var(--card-border-color); border-radius: 8px;
    font-size: 0.85em; font-family: inherit;
    box-sizing: border-box; transition: border-color 0.15s;
}
.rb-yt-input:focus { outline: none; border-color: #ff3333; }
.rb-yt-preview-wrap { margin-top: 10px; }
.rb-yt-iframe-wrap {
    position: relative; width: 100%; padding-top: 56.25%;
    border-radius: 8px; overflow: hidden; background: #000;
}
.rb-yt-iframe-wrap iframe {
    position: absolute; inset: 0; width: 100%; height: 100%;
    border: none;
}

/* ========================
   유튜브 임베드 (목록)
======================== */
.rf-yt-wrap {
    background: #000 !important;
    min-height: 200px;
}
.rf-yt-embed {
    position: absolute !important;
    inset: 0; width: 100% !important; height: 100% !important;
    border: none;
}

/* ========================
   미디어 없을 때: 글만 전체 너비
======================== */
.rf-card-inner.rf-no-media {
    flex-direction: column !important;
}
.rf-card-inner.rf-no-media .rf-right {
    max-height: none !important;
    border-left: none;
}


/* ========================
   글 작성자 정보
======================== */
.rf-author {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 4px;
}
.rf-author-avatar {
    width: 24px !important; height: 24px !important;
    min-width: 24px !important; max-width: 24px !important; max-height: 24px !important;
    border-radius: 50%; overflow: hidden; background: var(--form-bg-color);
    display: flex !important; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 0.9em; flex-shrink: 0;
}
.rf-author-avatar img {
    width: 24px !important; height: 24px !important;
    min-width: 24px !important; max-width: 24px !important;
    object-fit: cover; display: block !important;
}
.rf-author-info {
    display: flex; flex-direction: column; gap: 1px;
}
.rf-author-name {
    font-size: 0.83em; font-weight: 700; color: var(--content-font-color);
    display: flex; align-items: center; gap: 5px;
}
.rf-author-rank { font-size: 0.75em; font-weight: 700; }
.rf-author-date { font-size: 0.72em; color: var(--text-muted); }

/* ========================
   카드 전체 너비 헤더
======================== */
.rf-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 14px;
    border-bottom: 1px solid var(--card-border-color);
    flex-shrink: 0;
    min-height: 36px;
    background: var(--card-border-color);
}
.rf-card-head-left {
    display: flex; align-items: center; gap: 8px;
}
.rf-card-head-right {
    display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.rf-card-head .rf-author-date {
    font-size: 0.78em; color: var(--text-muted);
}

/* ========================
   공지 카드 스타일
======================== */
.rf-card-notice {
    border-color: rgb(from var(--primary-color) r g b / 40%);
    box-shadow: 0 0 0 1px rgb(from var(--primary-color) r g b / 20%),
                0 2px 12px rgb(from var(--primary-color) r g b / 10%);
}
.rf-card-notice .rf-card-head {
    background: rgb(from var(--primary-color) r g b / 8%);
    border-bottom-color: rgb(from var(--primary-color) r g b / 20%);
}
.rf-badge-notice {
    background: var(--primary-color);
    color: #fff;
    font-size: 0.72em;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ========================
   본문 위 작성자 정보
======================== */
.rf-post-author {
    display: flex; 
    align-items: center; gap: 8px;
    padding: 10px 14px 2px;
    position: relative;
}
.rf-post-author-avatar {
    width: 45px !important;
    height: 45px !important;
    border-radius: 50%;
    overflow: hidden;
    background: var(--form-bg-color);
    border: 1px solid var(--card-border-color);
    flex-shrink: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);

}
.rf-post-author-avatar img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 50%;
    display: block !important;
}
.rf-post-author-info {
    display: flex; flex-direction: column; gap: 1px;
    flex: 1;
}
.rf-post-author .rf-author-name {
    font-size: 1em; 
    font-weight: 700;
    color: var(--content-font-color);
    display: flex;
    align-items: center; 
    gap: 5px;
}
.rf-post-author .rf-author-date {
    font-size: 0.79em; color: var(--text-muted);
    position: absolute;
    right: 14px;
    top: 12px;
}


/* ========================
   댓글 로그인 안내
======================== */
.rf-cmt-login-msg {
    padding: 10px 14px;
    text-align: center;
}
.rf-cmt-login-msg a {
    font-size: 0.82em; color: var(--primary-color);
    display: inline-flex; align-items: center; gap: 6px;
}
.rf-cmt-login-msg a:hover { text-decoration: underline; }

/* ========================
   비회원 이름/비번 입력
======================== */
.rb-nonmember-fields {
    padding: 12px 0 4px;
}
.rb-nonmember-row {
    display: flex; gap: 10px; flex-wrap: wrap;
}
.rb-nonmember-field {
    display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 140px;
}
.rb-nonmember-field label {
    font-size: 0.78em; color: var(--text-muted); font-weight: 600;
}
.rb-nonmember-field input {
    padding: 6px 10px; border: 1px solid var(--card-border-color); border-radius: 6px;
    font-size: 0.88em; outline: none;
}
.rb-nonmember-field input:focus { border-color: var(--primary-color); }

/* ========================
   댓글창 비회원 이름/비번
======================== */
.rf-cmt-nonmember {
    display: flex; 
    gap: 6px; 
    padding: 2px 0 6px 40px;
    justify-content: flex-start;
}
.rf-cmt-nm-input {
    flex: none; 
    width: 120px;
    padding: 5px 9px;
    border: 1px solid var(--card-border-color);
    border-radius: 6px;
    font-size: 0.8em; 
    outline: none;
    min-width: 0;
}
.rf-cmt-nm-input:focus { border-color: var(--primary-color); }

/* ========================
   비밀글 잠금 (전체)
======================== */

/* ========================
   비밀글 전체 오버레이
======================== */
.rf-secret-overlay {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: var(--container-bg-color);
    gap: 6px; z-index: 10;
    border-radius: inherit;
}
.rf-secret-overlay i    { font-size: 2em; color: var(--primary-color); }
.rf-secret-overlay p    { font-size: 0.95em; font-weight: 700; color: var(--text-muted); margin: 0; }
.rf-secret-overlay small { font-size: 0.78em; color: var(--text-muted); }

.rf-card-inner { position: relative; }

/* ========================
   이미지 비율 레이아웃
======================== */

/* 세로형(portrait): 기존과 동일 - 이미지 왼쪽, 댓글 오른쪽 */
.rf-card-inner.rf-portrait {
    align-items: stretch;
    flex-direction: row !important;
}
.rf-card-inner.rf-portrait .rf-left {
    width: 42%;
    min-width: 42%;
}
.rf-card-inner.rf-portrait .rf-right {
    flex: 1;
}

/* 가로형(landscape): 이미지 위, 댓글 아래 */
.rf-card-inner.rf-landscape {
    flex-direction: column !important;
    min-height: unset !important;
}
.rf-card-inner.rf-landscape .rf-left {
    width: 100% !important;
    min-width: unset !important;
    border-right: none !important;
    border-bottom: 1px solid var(--card-border-color);
    max-height: 480px;
}
.rf-card-inner.rf-landscape .rf-img-wrap {
    min-height: 320px;
    max-height: 480px;
}
.rf-card-inner.rf-landscape .rf-img {
    max-height: 480px;
    object-fit: contain;
}
.rf-card-inner.rf-landscape .rf-left-actions {
    flex-direction: row !important;
    justify-content: flex-start;
    border-top: 1px solid var(--card-border-color);
    border-right: none !important;
}
.rf-card-inner.rf-landscape .rf-right {
    max-height: none !important;
    width: 100% !important;
}

/* 미디어 없을 때 */
.rf-card-inner.rf-no-media {
    flex-direction: column !important;
}
.rf-card-inner.rf-no-media .rf-right {
    max-height: none !important;
    border-left: none;
}



/* 모바일 반응형 통합 */
@media (max-width: 768px) {
    /* portrait 레이아웃 모바일 처리 */
    .rf-card-inner.rf-portrait {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .rf-card-inner.rf-portrait .rf-left {
        width: 100% !important;
        min-width: unset !important;
        border-right: none !important;
        border-bottom: 1px solid var(--card-border-color);
    }
    .rf-card-inner.rf-portrait .rf-right {
        width: 100% !important;
        max-height: none !important;
        flex: 1 !important;
        display: flex !important;
    }
    .rf-post-body {
        display: block !important;
        visibility: visible !important;
    }

    /* 공통 */
    .rf-card-inner { flex-direction: column; }
    .rf-left { width: 100%; border-right: none; border-bottom: 1px solid var(--card-border-color); }
    .rf-img-wrap { min-height: 240px; }
    .rf-right { max-height: none; }

    /* 글쓰기 */
    .rb-write-layout { flex-direction: column; }
    .rb-write-left { width: 100%; }
    .rb-img-upload-area { aspect-ratio: 16/10; }
}