@charset "utf-8";

/* ============================================================
   BASE
============================================================ */
#bo_list {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px 12px;
}


/* ============================================================
   SEARCH
============================================================ */
#bo_sch {
    display: flex;
    justify-content: flex-end;
    border: 0;
    padding: 0;
    margin: 0 0 16px;
}
#bo_sch form { width: 50%; }


/* ============================================================
   CATEGORY
============================================================ */
#bo_cate { margin: 0 0 16px; }

/* 접근성: 제목 숨김 */
#bo_cate h2 {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
#bo_cate ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0; margin: 0;
}
#bo_cate li { display: inline-block; }
#bo_cate a {
    display: block;
    padding: 5px 14px;
    border-radius: 20px;
    background: var(--light-bg-color, rgba(255,255,255,0.25));
    color: var(--text-muted, #888888);
    text-decoration: none;
    font-size: 0.88em;
    transition: all 0.2s;
}
#bo_cate a:hover,
#bo_cate #bo_cate_on {
    background: var(--primary-color, #7ba7c9);
    color: var(--btn-primary-text, #7a3f3a);
}


/* ============================================================
   WRITE AREA
============================================================ */
.memo-write-area {
    background: rgba(255,255,255,0.92);

    border-radius: 20px;
    padding: 12px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}
.memo-write-inner {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.memo-write-body { flex: 1; }

/* 글쓰기 아바타 */
.memo-write-avatar {
    width: 46px; height: 46px;
    border-radius: 30px;
    overflow: hidden;
    background: var(--light-bg-color, rgba(255,255,255,0.25));
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.memo-write-avatar img { width: 100%; height: 100%; object-fit: cover; }
.memo-write-avatar .fa-user-circle { font-size: 36px; color: var(--text-muted, #888888); line-height: 1; }

/* 텍스트 입력 */
.memo-input {
    width: 100%;
    min-height: 100px;
    padding: 10px 12px;
    border: 1px solid var(--input-border-color, #eee);
    border-radius: 12px;
    background: #ffffff85;
    color: var(--content-font-color, #333333);
    font-size: 1em;
    line-height: 1.6;
    resize: none;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
}
.memo-input::placeholder { color: var(--text-muted, #888888); opacity: 0.7; }
.memo-input:focus { border-bottom-color: var(--primary-color, #7ba7c9); }

/* 하단 바 */
.memo-write-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}
.memo-select {
    padding: 6px 12px;
    border: 1px solid var(--input-border-color, #ddd);
    border-radius: 20px;
    background: var(--form-bg-color, rgba(255,255,255,0.9));
    color: var(--form-text-color, #333333);
    font-size: 0.88em;
    cursor: pointer;
}
.memo-submit-btn {
    padding: 7px 20px;
    background: var(--accent-color, #7ba7c9);
    color: var(--btn-primary-text, #7a3f3a);
    border: none;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.memo-submit-btn:hover { filter: brightness(0.95); transform: translateY(-1px); }


/* ============================================================
   TOOLBAR (이미지 · 스포일러 · 비밀글)
============================================================ */
.memo-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: auto;
}

/* 공통 아이콘 버튼 */
.memo-img-btn,
.memo-secret-btn,
.memo-spoiler-btn,
.memo-url-img-btn,
.memo-reply-spoiler-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted, #888);
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
}
.memo-img-btn,
.memo-secret-btn,
.memo-url-img-btn,
.memo-reply-spoiler-btn {
    width: 30px; height: 30px;
}
.memo-img-btn    { font-size: 1em; }
.memo-secret-btn { font-size: 0.95em; }
.memo-spoiler-btn { font-size: 1.1em; padding: 4px 6px; line-height: 1; }
.memo-url-img-btn { font-size: 0.95em; }
.memo-reply-spoiler-btn { font-size: 1em; }

/* 브라우저 기본 button 스타일 제거 - 카드 배경색에 녹아들도록 */
.memo-url-img-btn,
.memo-reply-spoiler-btn {
    -webkit-appearance: none;
    appearance: none;
    background-color: transparent;
    box-shadow: none;
    outline: none;
    border: none;
}

.memo-img-btn:hover,
.memo-secret-btn:hover,
.memo-spoiler-btn:hover,
.memo-url-img-btn:hover,
.memo-reply-spoiler-btn:hover {
    background: transparent;
    color: var(--accent-color);
}

.memo-secret-btn.active .memo-secret-icon,
.memo-secret-btn .fa-lock { color: var(--primary-color, #7ba7c9); }


/* ============================================================
   이미지 미리보기 (업로드 전 썸네일)
============================================================ */
.memo-img-preview-area {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 0;
}
.memo-img-preview-item {
    position: relative;
    width: 80px; height: 80px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--card-border-color, #eee);
}
.memo-img-preview-item img { width: 100%; height: 100%; object-fit: cover; }

.memo-img-remove-btn {
    position: absolute;
    top: 3px; right: 3px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    font-size: 0.7em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.memo-img-remove-btn:hover { background: rgba(200,0,0,0.8); }

/* 댓글용 미리보기 (크기만 축소) */
.memo-reply-img-preview-area {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0;
}
.memo-reply-img-preview-area .memo-img-preview-item { width: 60px; height: 60px; }


/* ============================================================
   이미지 그리드 (본문 표시)
============================================================ */
.memo-img-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
    width: 100%;
}
.memo-img-thumb {
    object-fit: cover;
    cursor: pointer;
    border-radius: 8px;
    border: 1px solid var(--card-border-color, #eee);
    transition: opacity 0.15s;
    display: block;
}
.memo-img-thumb:hover { opacity: 0.88; }

/* 장수별 레이아웃 */
.memo-img-grid.count-1 .memo-img-thumb  { width: 100%; height: auto; object-fit: unset; border-radius: 12px; }
.memo-img-grid.count-2 .memo-img-thumb  { width: calc(50% - 3px); height: 170px; }
.memo-img-grid.count-3 .memo-img-thumb:first-child     { width: 100%; height: 190px; }
.memo-img-grid.count-3 .memo-img-thumb:not(:first-child){ width: calc(50% - 3px); height: 120px; }
.memo-img-grid.count-4 .memo-img-thumb  { width: calc(50% - 3px); height: 140px; }


/* ============================================================
   비밀글
============================================================ */
.memo-secret-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    background: rgba(100,100,200,0.1);
    color: #6060cc;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
}
.memo-item.memo-secret { border-left: 3px solid rgba(100,100,200,0.35); }
.memo-secret-placeholder {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 16px;
    background: var(--light-bg-color, rgba(255,255,255,0.25));
    border-radius: 10px;
    color: var(--text-muted, #888888);
    font-size: 0.9em;
    margin: 4px 0;
}


/* ============================================================
   LIST
============================================================ */
.memo-list-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


/* ============================================================
   ITEM
============================================================ */
.memo-item {
    display: flex;
    gap: 12px;

    /* 뒤 배경이 너무 선명하게 비치지 않도록 조금 더 불투명하게 */
    background: rgba(255, 255, 255, 0.92);

    border-radius: 20px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);

    /* transform transition 제거 */
    transition: box-shadow 0.2s;

    position: relative;
}

.memo-item:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);

    /* 기존 translateY(-1px) 제거 */
    transform: none;
}

/* 아바타 */
.memo-avatar {
    width: 38px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.memo-avatar > img,
.memo-avatar > .fa-user-circle {
    width: 38px; height: 38px;
    border: 1px solid var(--input-border-color, #ececec);
    border-radius: 50px;
    object-fit: cover;
    background: var(--light-bg-color, rgba(255,255,255,0.25));
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--text-muted, #888888);
    line-height: 1;
}

/* 본문 */
.memo-body { flex: 1; min-width: 0; }

.memo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}
.memo-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    flex: 1;
}
.memo-name { font-weight: 700; font-size: 1.03em; color: var(--content-font-color, #333333); }
.memo-rank { font-size: 0.82em; font-weight: normal; }
.memo-category {
    display: inline-block;
    padding: 2px 8px;
    background: var(--primary-color, #7ba7c9);
    color: var(--btn-primary-text, #7a3f3a);
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
}
.memo-date { font-size: 0.78em; color: var(--text-muted, #888888); }

/* 수정/삭제 버튼 */
.memo-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    position: absolute;
    top: 10px; right: 16px;
}
.memo-edit-btn,
.memo-delete-btn {
    width: 26px; height: 26px;
    border: none;
    background: none;
    color: var(--text-muted, #888888);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.82em;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2.5px;
    transition: all 0.2s;
}
.memo-edit-btn:hover   { background: var(--light-bg-color, rgba(255,255,255,0.25)); color: var(--primary-color, #7ba7c9); }
.memo-delete-btn:hover { background: rgba(220,50,50,0.08); color: var(--danger-color, #dc3232); }

/* 본문 텍스트 */
.memo-content {
    font-size: 0.98em;
    line-height: 1.6;
    color: var(--content-font-color, #333333);
    white-space: normal;
    word-break: break-word;
}


/* ============================================================
   EDIT AREA (글 수정 폼)
============================================================ */
.memo-edit-area { margin-top: 8px; }

.memo-edit-textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    border: 1px solid var(--input-border-color, #eee);
    background: #ffffff85;
    color: var(--content-font-color, #333333);
    font-size: 0.95em;
    line-height: 1.6;
    resize: none;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
}
.memo-edit-textarea:focus { border-bottom-color: var(--primary-color, #7ba7c9); }

.memo-edit-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* 공통: 저장/취소 */
.memo-save-btn,
.memo-cancel-btn {
    padding: 6px 16px;
    border: none;
    border-radius: 20px;
    font-size: 0.88em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.memo-save-btn   { background: var(--primary-color, #7ba7c9); color: var(--btn-primary-text, #7a3f3a); margin-left: auto; }
.memo-cancel-btn { background: var(--light-bg-color, rgba(255,255,255,0.25)); color: var(--text-muted, #888888); }
.memo-save-btn:hover   { filter: brightness(0.95); }
.memo-cancel-btn:hover { background: var(--card-border-color, rgba(255,255,255,0.4)); }


/* ============================================================
   ACTION BAR (좋아요 · 댓글)
============================================================ */
.memo-reply-section { margin-top: 8px; margin-bottom: 2px; }

.memo-action-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 좋아요 */
.memo-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 3px;
    border: none;
    background: none;
    color: var(--text-muted, #888888);
    font-size: 0.95em;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.2s;
}
.memo-like-btn:hover  { background: var(--light-bg-color, rgba(255,255,255,0.25)); color: #e0245e; }
.memo-like-btn.liked  { color: #e0245e; }
.memo-like-btn.like-pop { transform: scale(1.3); }
.memo-like-btn .memo-like-count { font-weight: 700; }

/* 좋아요한 사람 */
.memo-liked-by {
    font-size: 0.78em;
    color: var(--text-muted, #888888);
    margin-top: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}
.memo-liked-by i      { color: #e0245e; font-size: 0.85em; }
.memo-liked-by strong { color: var(--content-font-color, #333333); }
.memo-liked-by:hover  { text-decoration: underline; }

/* 좋아요 목록 모달 */
.memo-liker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--card-border-color, #eee);
    font-size: 0.9em;
}
.memo-liker-item:last-child { border-bottom: none; }
.memo-liker-item img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.memo-liker-item i   { font-size: 32px; color: var(--text-muted, #888888); }

/* 댓글 토글 */
.memo-reply-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 3px;
    border: none;
    background: none;
    color: var(--text-muted, #888888);
    font-size: 0.95em;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.2s;
}
.memo-reply-toggle:hover { background: var(--light-bg-color, rgba(255,255,255,0.25)); color: var(--primary-color, #7ba7c9); }
.memo-reply-toggle .memo-reply-count { font-weight: 700; color: var(--primary-color, #7ba7c9); }


/* ============================================================
   REPLY AREA (댓글 목록)
============================================================ */
.memo-reply-area {
    margin-top: 5px;
    padding-top: 10px;
}
.memo-reply-loading {
    text-align: center;
    padding: 16px;
    color: var(--text-muted, #888888);
    font-size: 1.2em;
}
.memo-reply-empty,
.memo-reply-error {
    text-align: center;
    padding: 8px;
    color: var(--text-muted, #888888);
    font-size: 0.88em;
}
.memo-reply-error { color: var(--danger-color, #dc3232); }

/* 댓글 아이템 */
.memo-reply-item {
    display: flex;
    gap: 10px;
    padding: 5px 0;
    position: relative;
}
.memo-reply-item:last-child { border-bottom: none; }
.memo-reply-item .memo-actions { top: 4px; right: 0; }

/* 댓글 아바타 */
.memo-reply-avatar {
    width: 32px; height: 32px;
    border-radius: 120px;
    overflow: hidden;
    background: var(--light-bg-color, rgba(255,255,255,0.25));
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.memo-reply-avatar img          { width: 100%; height: 100%; object-fit: cover; }
.memo-reply-avatar .fa-user-circle { font-size: 28px; color: var(--text-muted, #888888); line-height: 1; }

.memo-reply-body { flex: 1; min-width: 0; }

.memo-reply-content {
    font-size: 0.98em;
    line-height: 1.6;
    color: var(--content-font-color, #333333);
    word-break: break-word;
    margin-top: 4px;
}


/* ============================================================
   REPLY WRITE (댓글 쓰기 폼)
============================================================ */
.memo-reply-write {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 8px;
    padding-top: 5px;
}
.memo-reply-write-body { flex: 1; }

/* 댓글 아바타 (쓰기) */
.memo-reply-write-avatar {
    width: 30px; height: 30px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--light-bg-color, rgba(255,255,255,0.25));
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.memo-reply-write-avatar img          { width: 100%; height: 100%; object-fit: cover; }
.memo-reply-write-avatar .fa-user-circle { font-size: 28px; color: var(--text-muted, #888888); line-height: 1; }

.memo-reply-input {
    width: 100%;
    min-height: 64px;
    padding: 4px 8px;
    border: 1px solid var(--input-border-color, #eee);
    background: #ffffff73;
    color: var(--content-font-color, #333333);
    font-size: 0.97em;
    line-height: 1.7;
    resize: none;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
}
.memo-reply-input::placeholder { color: var(--text-muted, #888888); opacity: 0.7; }
.memo-reply-input:focus { border-bottom-color: var(--primary-color, #7ba7c9); }

.memo-reply-write-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}
.memo-reply-submit-btn {
    padding: 5px 16px;
    background: var(--primary-color, #7ba7c9);
    color: var(--btn-primary-text, #7a3f3a);
    border: none;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto;
}
.memo-reply-submit-btn:hover { filter: brightness(0.95); }


/* ============================================================
   EMPTY STATE
============================================================ */
.memo-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted, #888888);
}
.memo-empty i { font-size: 3em; display: block; margin-bottom: 16px; opacity: 0.3; }
.memo-empty p { font-size: 1em; margin: 6px 0; }
.memo-empty-hint { font-size: 0.9em; opacity: 0.7; }


/* ============================================================
   PAGINATION
============================================================ */
.bo-pagination { margin-top: 24px; text-align: center; }


/* ============================================================
   HASHTAG
============================================================ */
.memo-hashtag {
    color: var(--primary-color, #7ba7c9);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}
.memo-hashtag:hover { color: var(--accent-color, #7ba7c9); text-decoration: underline; }

/* 해시태그 필터 배너 */
.memo-tag-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    margin-bottom: 12px;
    background: rgba(91,141,238,0.1);
    border: 1px solid rgba(91,141,238,0.3);
    border-radius: 10px;
    font-size: 0.9em;
}
.memo-tag-banner-text { flex: 1; color: #5b8dee; font-weight: 600; }
.memo-tag-clear {
    background: none;
    border: 1px solid rgba(91,141,238,0.4);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 0.85em;
    color: #5b8dee;
    cursor: pointer;
    transition: background 0.15s;
}
.memo-tag-clear:hover { background: rgba(91,141,238,0.15); }


/* ============================================================
   SPOILER
============================================================ */
.memo-spoiler-wrap { margin-top: 8px; }

.memo-spoiler-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 5px 12px;
    background: rgba(120,120,180,0.1);
    border: 1px dashed rgba(120,120,180,0.4);
    border-radius: 6px;
    color: #888;
    font-size: 0.85em;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.memo-spoiler-toggle:hover { background: rgba(120,120,180,0.18); color: #555; }

.memo-spoiler-content {
    margin-top: 8px;
    padding: 10px 14px;
    background: rgba(120,120,180,0.06);
    border-left: 3px solid rgba(120,120,180,0.3);
    border-radius: 0 6px 6px 0;
    font-size: 0.95em;
}


/* ============================================================
   BLOCK EDITOR
============================================================ */
.memo-block-editor {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 14px ;
    min-height: 120px;
    border: 1px solid var(--input-border-color, #eee);
    border-radius: 16px;
    background-color : #ffffff82
}

.memo-block-editor:focus-within {
    border-color: var(--primary-color, #7ba7c9);
}

.memo-block-normal {
    min-height: 38px;
    outline: none;
    font-size: 0.97em;
    line-height: 1.7;
    color: var(--content-font-color, #333333);
    white-space: pre-wrap;
    word-break: break-word;
}
.memo-block-normal:empty::before {
    content: attr(data-placeholder);
    color: var(--text-muted, #bbb);
    pointer-events: none;
}

/* 스포일러 블록 */
.memo-block-spoiler {
    border: 1px dashed var(--card-border-color, #ddd);
    border-radius: 8px;
    overflow: hidden;
}
.memo-block-spoiler-header {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    background: var(--light-bg-color, rgba(0,0,0,0.03));
}
.memo-block-spoiler-toggle {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: var(--text-muted, #888);
    font-size: 0.82em;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    text-align: left;
    transition: color 0.15s;
}
.memo-block-spoiler-toggle:hover { color: var(--text-color, #555); }
.memo-block-spoiler-remove {
    background: none;
    border: none;
    color: var(--text-muted, #ccc);
    font-size: 0.8em;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s;
}
.memo-block-spoiler-remove:hover { color: var(--danger-color, #e55); }
.memo-block-spoiler-body {
    min-height: 36px;
    padding: 8px 12px;
    outline: none;
    font-size: 0.95em;
    line-height: 1.7;
    color: var(--content-font-color, #333333);
    white-space: pre-wrap;
    word-break: break-word;
    border-top: 1px dashed var(--card-border-color, #ddd);
}
.memo-block-spoiler-body:empty::before {
    content: attr(data-placeholder);
    color: var(--text-muted, #bbb);
    pointer-events: none;
}


/* ============================================================
   LIGHTBOX
============================================================ */

/* 전체 모달 자체는 화면 전체를 덮음 */
#memo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

/* 검은 배경도 화면 전체 */
#memo-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.88);
    cursor: pointer;
}

/*
 * 실제 이미지/버튼이 배치되는 영역만
 * 상단 헤더 120px 제외
 */
#memo-lightbox-wrap {
    position: absolute;

    top: 120px;
    right: 0;
    bottom: 20px;
    left: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 12px;

    pointer-events: none;
}

/* 이미지 + 좌우 화살표 */
#memo-lightbox-img-wrap {
    position: relative;

    width: fit-content;
    height: fit-content;

    max-width: 90vw;
    max-height: calc(100dvh - 190px);

    display: flex;
    align-items: center;
    justify-content: center;

    pointer-events: all;
}

/* 실제 이미지 */
#memo-lightbox-img {
    max-width: 90vw;
    max-height: calc(100dvh - 190px);

    width: auto;
    height: auto;

    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    display: block;
}

/* 라이트박스 공통 버튼 */
#memo-lightbox-close,
#memo-lightbox-prev,
#memo-lightbox-next {
    position: absolute;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    transition: background 0.15s;
}
#memo-lightbox-close:hover,
#memo-lightbox-prev:hover,
#memo-lightbox-next:hover { background: rgba(255,255,255,0.3); }

#memo-lightbox-close { top: 16px; right: 20px; width: 40px; height: 40px; font-size: 1.4em; }
#memo-lightbox-prev,
#memo-lightbox-next  { top: 50%; transform: translateY(-50%); width: 44px; height: 44px; font-size: 1.2em; }
#memo-lightbox-prev  { left: 10px; }
#memo-lightbox-next  { right: 10px; }

#memo-lightbox-counter {
    position: static;

    color: rgba(255,255,255,0.7);
    font-size: 0.9em;

    pointer-events: none;

    background: rgba(0,0,0,0.4);
    padding: 3px 12px;
    border-radius: 20px;

    line-height: 1.2;
}


/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 768px) {
    #bo_list  { padding: 12px 8px; }
    #bo_sch   { justify-content: stretch; }
    #bo_sch form { width: 100%; }
    .memo-item       { padding: 14px; }
    .memo-write-area { padding: 14px; }
    .memo-img-grid.count-2 .memo-img-thumb              { height: 130px; }
    .memo-img-grid.count-3 .memo-img-thumb:first-child  { height: 150px; }
    .memo-img-grid.count-3 .memo-img-thumb:not(:first-child) { height: 100px; }
    .memo-img-grid.count-4 .memo-img-thumb              { height: 110px; }
}
/* ============================================================
   외부 이미지 URL 입력 행
   ============================================================ */
.memo-url-img-row {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin-top: 6px;
    padding: 6px 8px;
    background: var(--bg-sub, #f5f5f5);
    border-radius: 8px;
    border: 1px solid var(--border-color, #e0e0e0);
    box-sizing: border-box;
    flex-wrap: nowrap;
}
.memo-url-img-text {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-size: 13px;
    color: var(--text-color, #333);
    outline: none;
    padding: 2px 4px;
}
.memo-url-img-text::placeholder {
    color: var(--text-muted, #aaa);
    font-size: 12px;
}
.memo-url-img-add-btn {
    flex-shrink: 0;
    padding: 3px 10px;
    border-radius: 6px;
    border: none;
    background: var(--primary-color, #1d9bf0);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.memo-url-img-add-btn:hover {
    opacity: 0.85;
}
.memo-url-img-cancel-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-muted, #aaa);
    cursor: pointer;
    font-size: 14px;
    padding: 2px 4px;
    line-height: 1;
}
.memo-url-img-cancel-btn:hover {
    color: var(--text-color, #555);
}

/* 작은 이미지일 때만 화살표를 사진 바깥으로 */
#memo-lightbox-img-wrap.small-image #memo-lightbox-prev {
    left: -52px;
}

#memo-lightbox-img-wrap.small-image #memo-lightbox-next {
    right: -52px;
}

/* 이미지 좌우 화살표만 어두운 배경으로 */
#memo-lightbox-prev,
#memo-lightbox-next {
    background: rgba(0, 0, 0, 0.45);
    z-index: 5;

    /* 기본 상태에서는 숨김 */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        background 0.15s,
        opacity 0.18s,
        visibility 0.18s;
}

/* 이미지 영역에 호버하면 화살표 표시 */
#memo-lightbox-img-wrap:hover #memo-lightbox-prev,
#memo-lightbox-img-wrap:hover #memo-lightbox-next {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#memo-lightbox-prev:hover,
#memo-lightbox-next:hover {
    background: rgba(0, 0, 0, 0.65);
}

#memo-lightbox-prev:hover,
#memo-lightbox-next:hover {
    background: rgba(0, 0, 0, 0.65);
}

@media (hover: none) {
    #memo-lightbox-prev,
    #memo-lightbox-next {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}