@charset "utf-8";

/* ============================================================
   BASE
============================================================ */
#bo_list {
    max-width: 640px;
    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);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88em;
    transition: all 0.2s;
}
#bo_cate a:hover,
#bo_cate #bo_cate_on {
    background: var(--primary-color);
    color: var(--btn-primary-text, #7a3f3a);
}


/* ============================================================
   WRITE AREA
============================================================ */
.memo-write-area {
    background: var(--card-bg-color);
    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);
    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); 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);
    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); opacity: 0.7; }
.memo-input:focus { border-bottom-color: var(--primary-color); }

/* 하단 바 */
.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);
    color: var(--form-text-color);
    font-size: 0.88em;
    cursor: pointer;
}
.memo-submit-btn {
    padding: 7px 20px;
    background: var(--primary-color);
    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 {
    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 {
    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-img-btn:hover,
.memo-secret-btn:hover  { background: var(--light-bg-color); }
.memo-img-btn:hover     { color: var(--primary-color); }
.memo-spoiler-btn:hover { color: var(--text-color, #333); background: rgba(0,0,0,0.06); }

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


/* ============================================================
   이미지 미리보기 (업로드 전 썸네일)
============================================================ */
.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);
    border-radius: 10px;
    color: var(--text-muted);
    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: var(--card-bg-color);
    border-radius: 20px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
}
.memo-item:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    transform: translateY(-1px);
}

/* 아바타 */
.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);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--text-muted);
    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: 1px;
}
.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); }
.memo-rank { font-size: 0.82em; font-weight: normal; }
.memo-category {
    display: inline-block;
    padding: 2px 8px;
    background: var(--primary-color);
    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); }

/* 수정/삭제 버튼 */
.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);
    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); color: var(--primary-color); }
.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);
    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);
    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); }

.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); color: var(--btn-primary-text, #7a3f3a); margin-left: auto; }
.memo-cancel-btn { background: var(--light-bg-color); color: var(--text-muted); }
.memo-save-btn:hover   { filter: brightness(0.95); }
.memo-cancel-btn:hover { background: var(--card-border-color); }


/* ============================================================
   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);
    font-size: 0.95em;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.2s;
}
.memo-like-btn:hover  { background: var(--light-bg-color); 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);
    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); }
.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); }

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


/* ============================================================
   REPLY AREA (댓글 목록)
============================================================ */
.memo-reply-area {
    margin-top: 5px;
    padding-top: 10px;
}
.memo-reply-loading {
    text-align: center;
    padding: 16px;
    color: var(--text-muted);
    font-size: 1.2em;
}
.memo-reply-empty,
.memo-reply-error {
    text-align: center;
    padding: 8px;
    color: var(--text-muted);
    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);
    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); 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);
    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);
    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); 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);
    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); opacity: 0.7; }
.memo-reply-input:focus { border-bottom-color: var(--primary-color); }

.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);
    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);
}
.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);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}
.memo-hashtag:hover { color: var(--accent-color); 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);
}

.memo-block-normal {
    min-height: 38px;
    outline: none;
    font-size: 0.97em;
    line-height: 1.7;
    color: var(--content-font-color);
    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);
    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; }
#memo-lightbox-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
#memo-lightbox-img-wrap {
    max-width: 90vw; max-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}
#memo-lightbox-img {
    max-width: 90vw; max-height: 88vh;
    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: 16px; }
#memo-lightbox-next  { right: 16px; }

#memo-lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%; transform: translateX(-50%);
    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;
}


/* ============================================================
   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; }
}
/* ============================================================
   ✅ 라공 8.5 & 고급 기능 이식 스타일
============================================================ */
/* 텍꾸 스마트 팝업 버튼 */
.memo-txtggu-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    background: #fff; border: 1px solid var(--primary-color, #1da1f2);
    color: var(--primary-color, #1da1f2); font-size: 12px; font-weight: bold;
    padding: 4px 10px; border-radius: 20px; cursor: pointer; transition: 0.2s;
    margin-right: 8px;
}
.memo-txtggu-btn:hover { background: var(--primary-color, #1da1f2); color: #fff; }

/* 보호글, 민감한 콘텐츠(NSFW) 토글 UI */
.memo-option-toggles { display: flex; gap: 10px; align-items: center; margin-right: auto; }
.opt-label { font-size: 0.85em; color: var(--text-muted); display: flex; align-items: center; gap: 4px; cursor: pointer; transition: 0.2s; }
.opt-label:hover { color: var(--primary-color); }
.opt-label input[type="checkbox"] { display: none; }
.opt-label.active { color: #e0245e; font-weight: bold; }
.opt-label.active.protected { color: #1da1f2; }

/* 보호글 입력창 */
.protected-input {
    display: none; border: 1px solid var(--primary-color); border-radius: 12px; padding: 4px 10px;
    font-size: 0.85em; width: 140px; outline: none; background: #fff;
}
.opt-label.protected.active + .protected-input { display: inline-block; }

/* 민감한 콘텐츠 (NSFW) 블러 레이어 */
.memo-nsfw-wrap { position: relative; overflow: hidden; border-radius: 12px; }
.memo-nsfw-blur {
    filter: blur(15px); pointer-events: none; user-select: none; opacity: 0.3; transition: 0.3s;
}
.memo-nsfw-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.05); display: flex; flex-direction: column;
    align-items: center; justify-content: center; z-index: 10; cursor: pointer; border-radius: 12px;
}
.memo-nsfw-overlay i { font-size: 2em; color: #e0245e; margin-bottom: 5px; }
.memo-nsfw-overlay span { font-size: 0.9em; font-weight: bold; color: #333; }
.memo-nsfw-wrap.revealed .memo-nsfw-blur { filter: none; opacity: 1; pointer-events: auto; user-select: auto; }
.memo-nsfw-wrap.revealed .memo-nsfw-overlay { display: none; }

/* 단축어 파서 (제목[내용]) 디자인 */
.memo-dict { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0; font-size: 0.95em; line-height: 1.5; }
.memo-dict-tit { background: var(--primary-color, #1da1f2); color: #fff; padding: 3px 10px; border-radius: 6px; font-weight: 800; font-size: 0.88em; flex-shrink: 0; }
.memo-dict-desc { color: var(--content-font-color, #333); word-break: break-word; padding-top: 2px; }

/* 마크다운 기본 렌더링 스타일 보정 */
.markdown-body p { margin: 0 0 0.5em 0; }
.markdown-body blockquote { border-left: 4px solid var(--primary-color); margin: 0; padding-left: 10px; color: var(--text-muted); background: rgba(0,0,0,0.03); padding: 10px; border-radius: 0 8px 8px 0; }

/* ============================================================
   ✅ 본문 인라인 이미지 & 텍꾸 플러그인 스타일
============================================================ */
/* 마크다운 렌더링 내 이미지 반응형 (글 중간에 예쁘게 삽입됨) */
.markdown-body img {
    max-width: 100%;
    border-radius: 12px;
    margin: 8px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: block;
}

/* 텍꾸 스마트 팝업 버튼 */
.memo-txtggu-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    background: #fff; border: 1px solid var(--primary-color, #1da1f2);
    color: var(--primary-color, #1da1f2); font-size: 12px; font-weight: bold;
    padding: 4px 10px; border-radius: 20px; cursor: pointer; transition: 0.2s;
    margin-right: 8px;
}
.memo-txtggu-btn:hover { background: var(--primary-color, #1da1f2); color: #fff; }

/* 보호글, NSFW 토글 UI */
.memo-option-toggles { display: flex; gap: 10px; align-items: center; margin-right: auto; }
.opt-label { font-size: 0.85em; color: var(--text-muted); display: flex; align-items: center; gap: 4px; cursor: pointer; transition: 0.2s; }
.opt-label:hover { color: var(--primary-color); }
.opt-label input[type="checkbox"] { display: none; }
.opt-label.active { color: #e0245e; font-weight: bold; }
.opt-label.active.protected { color: #1da1f2; }

/* 보호글 입력창 */
.protected-input {
    display: none; border: 1px solid var(--primary-color); border-radius: 12px; padding: 4px 10px;
    font-size: 0.85em; width: 140px; outline: none; background: #fff;
}
.opt-label.protected.active + .protected-input { display: inline-block; }

/* 민감한 콘텐츠 (NSFW) 블러 레이어 */
.memo-nsfw-wrap { position: relative; overflow: hidden; border-radius: 12px; }
.memo-nsfw-blur { filter: blur(15px); pointer-events: none; user-select: none; opacity: 0.3; transition: 0.3s; }
.memo-nsfw-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.05); display: flex; flex-direction: column;
    align-items: center; justify-content: center; z-index: 10; cursor: pointer; border-radius: 12px;
}
.memo-nsfw-overlay i { font-size: 2em; color: #e0245e; margin-bottom: 5px; }
.memo-nsfw-overlay span { font-size: 0.9em; font-weight: bold; color: #333; }
.memo-nsfw-wrap.revealed .memo-nsfw-blur { filter: none; opacity: 1; pointer-events: auto; user-select: auto; }
.memo-nsfw-wrap.revealed .memo-nsfw-overlay { display: none; }

