/* 게시판 */

/* === 게시판 탭 === */
#board_tabs_wrap {
    display: flex;
    align-items: center;
    padding: 12px 16px 0;
    border-bottom: 1px solid var(--color-border);
}

#board_tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-width: 0;
    font-family: "Paperlogy";
    gap: 10px;
}

#board_tabs::-webkit-scrollbar { display: none; }

#board_tabs a {
    display: inline-block;
    padding: 8px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    flex-shrink: 0;
}

#board_tabs a.active {
    color: var(--color-text);
    font-weight: 700;
    border-bottom-color: var(--color-text);
}

#board_tabs_wrap .write_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    text-decoration: none;
    margin-left: 8px;
    margin-bottom: 4px;
}

#board_tabs_wrap .write_btn i {
    font-size: 18px;
    line-height: 1;
    width: 18px;
    height: 18px;
}

/* 글쓰기 FAB */
.fab_write {
    position: fixed;
    right: 20px;
    bottom: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    z-index: 100;
}

.fab_write i {
    font-size: 24px;
}

/* === 카테고리 === */
#board_category {
    padding: 0 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#board_category .category_buttons {
    display: flex;
    gap: 6px;
    padding: 8px 0;
    white-space: nowrap;
}

#board_category a {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: var(--color-bg-elevated);
    text-decoration: none;
    transition: all .2s;
}

#board_category a.active {
    background: var(--color-primary);
    color: #fff;
}

/* === 글 목록 테이블 === */
#board_list {
    padding: 0;
}

#board_list table {
    width: 100%;
    border-collapse: collapse;
    display: block;
}

#board_list thead {
    display: none;
}

#board_list tbody {
    display: block;
}
#board_list tbody td { vertical-align: middle; }

#board_list tbody tr {
    display: flex;
    flex-wrap: wrap;
    padding: 10px 16px;
    border-bottom: 1px solid var(--color-border);
    align-items: center;
    position: relative;
}

#board_list tbody tr.notice_row {
    background: var(--color-bg-card);
}

#board_list tbody tr.accent_row .td_subject a {
    color: var(--color-primary);
}

#board_list tbody tr.notice_row .td_comment {
    background-color: var(--color-bg-elevated);
}

#board_list tbody tr.notice_row .badge.notice {
    background-color: var(--color-bg-elevated);
    
}

#board_list td {
    font-size: 14px;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0;
}

/* 1줄: 제목 */
#board_list .td_subject {
    flex: 0 0 100%;
    min-width: 0;
    white-space: normal;
    margin-bottom: 4px;
    padding-right: 50px;
    box-sizing: border-box;
}

#board_list .td_subject a {
    color: var(--color-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    font-weight: 500;
}

/* 2줄: 메타 정보 */
#board_list .td_name {
    font-size: 12px;
    color: var(--color-text-secondary);
    margin-right: 8px;
}

#board_list .td_name a {
    color: inherit;
    text-decoration: none;
}

#board_list .td_vote {
    font-size: 11px;
    color: var(--color-text-secondary);
    margin-right: 8px;
}

#board_list .td_vote:empty {
    display: none;
}

#board_list .td_vote:not(:empty)::before {
    content: '추천 ';
}

#board_list .td_date {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-right: 8px;
}

#board_list .td_hit {
    font-size: 11px;
    color: var(--color-text-muted);
}

#board_list .td_hit::before {
    content: '조회 ';
}

/* 댓글 수: 오른쪽 */
#board_list .td_comment {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--color-text);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    background-color: var(--color-bg-card);
    padding: 5px;
    width: 44px;
    border-radius: 8px;
}

#board_list .td_comment:empty {
    display: none;
}

#board_list .td_comment:not(:empty)::after {
    content: '댓글';
    font-size: 10px;
    font-weight: 400;
    margin-top: 1px;
    color: var(--color-text-muted);
}

#board_list .td_comment.new_comment {
    color: var(--color-primary);
}

/* 배지 */
.badge {
    font-size: 10px;
    font-weight: 700;
    border-radius: 3px;
    margin-right: 4px;
    align-content: center;
    align-items: center;
    padding: 2px 4px;
}

.badge.notice {
    background: var(--color-bg-card);
    color: var(--color-text-secondary);
}

.badge.board_badge {
    background: none;
    padding: 0;
    color: var(--color-text-muted);
}

.badge.board_badge i {
    font-size: 13px;
}

.badge.secret i {
    font-size: 13px;
    vertical-align: middle;
    color: var(--color-text-muted);
}

.comment_count {
    display: flex;
    font-size: 11px;
    font-weight: 700;
    color: var(--color-primary);
    margin-left: 4px;
}

.comment_count::before {
    content: '[';
}

.comment_count::after {
    content: ']';
}

.file_icon {
    font-size: 14px;
    vertical-align: middle;
    color: var(--color-text-muted);
    margin-left: 2px;
}

.reply_icon {
    font-size: 14px;
    vertical-align: middle;
    color: var(--color-text-muted);
    margin-right: 2px;
}

.empty {
    text-align: center;
    padding: 40px 16px !important;
    color: var(--color-text-muted);
    font-size: 14px;
}

/* === 페이지네이션 === */
#board_paging {
    padding: 16px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    font-size: 13px;
    color: var(--color-text-secondary);
    text-decoration: none;
    border-radius: 6px;
}

.pagination a:hover {
    background: var(--color-bg-elevated);
}

.pagination .pg_current {
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
}

.pagination i {
    font-size: 18px;
}

/* === 검색 === */
#board_search {
    padding: 8px 16px 20px;
}

#board_search form {
    display: flex;
    gap: 6px;
}

#board_search select {
    flex: 0 0 auto;
    width: 80px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--color-border-strong);
    border-radius: 6px;
    font-size: 13px;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-appearance: none;
}

#board_search input[type="text"] {
    flex: 1;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--color-border-strong);
    border-radius: 6px;
    font-size: 14px;
    color: var(--color-text);
    background: var(--color-bg);
}

#board_search input:focus {
    border-color: var(--color-primary);
    outline: none;
}

#board_search button {
    flex: 0 0 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    background: var(--color-primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#board_search button i {
    font-size: 20px;
}

/* === 글 보기 === */
#view_header {
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--color-border);
}

#view_header h2 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-text);
    margin: 0 0 8px;
    word-break: break-word;
}

.view_meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--color-text-muted);
}

.meta_name {
    font-weight: 600;
    color: var(--color-text-secondary);
    text-decoration: none;
}

/* === 첨부파일 === */
#view_files {
    padding: 8px 16px;
    border-bottom: 1px solid var(--color-border);
}

.file_item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
    font-size: 13px;
    color: var(--color-link);
    text-decoration: none;
}

.file_item i {
    font-size: 16px;
}

.file_item small {
    color: var(--color-text-muted);
}

/* === 본문 === */
#view_content {
    padding: 16px;
    min-height: 120px;
}

.attached_image {
    margin-bottom: 12px;
}

.attached_image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.memo_content {
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text);
    word-break: break-word;
    overflow-wrap: break-word;
}

.memo_content img {
    max-width: 100%;
    height: auto;
}

.memo_content a {
    color: var(--color-link);
}

/* === 관련 링크 === */
#view_links {
    padding: 8px 16px;
    border-top: 1px solid var(--color-border);
}

#view_links a {
    display: block;
    font-size: 13px;
    color: var(--color-link);
    padding: 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* === 추천/비추 === */
#view_vote {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0 16px 16px 16px;
}

#view_vote button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border: 1px solid var(--color-border);
    border-radius: 24px;
    background: var(--color-bg-elevated);
    color: var(--color-text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all .15s;
}

#view_vote button i {
    font-size: 16px;
}

#view_vote button:active {
    transform: scale(0.95);
}

#view_vote #vote_btn.voted {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}

#view_vote #devote_btn.voted {
    background: #e53935;
    color: #fff;
    border-color: #e53935;
}

#view_vote button:disabled {
    opacity: 0.6;
    cursor: default;
}

/* === 글 하단 버튼 === */
#view_actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

#view_actions a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    color: var(--color-text-secondary);
    background: var(--color-bg-elevated);
}

#view_actions a i {
    font-size: 16px;
}

#view_actions .btn_list {
    margin-right: auto;
}

/* === 댓글 === */
#view_comments {
    padding: 16px;
}

#view_comments h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 12px;
}

.comment_total {
    color: var(--color-primary);
}

.comment_list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment_list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

.comment_list li:last-child {
    border-bottom: none;
}

.comment_header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment_name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
}

.comment_date {
    font-size: 11px;
    color: var(--color-text-muted);
}

.comment_body {
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text);
    word-break: break-word;
}

.comment_parent {
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 600;
}

.comment_reply_icon {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-right: 2px;
}

.comment_edited {
    color: var(--color-text-muted);
    font-size: 11px;
    margin-left: 2px;
}

.reply_comment {
    border-left: 2px solid var(--color-border-strong);
    padding-left: 10px !important;
}

/* 댓글 입력 */
#comment_form {
    margin-top: 16px;
}

.comment_guest {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.comment_guest input {
    flex: 1;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--color-border-strong);
    border-radius: 6px;
    font-size: 13px;
    color: var(--color-text);
    background: var(--color-bg);
}

.comment_input {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.comment_box {
    flex: 1;
    border: 1px solid var(--color-border-strong);
    border-radius: 6px;
    background: var(--color-bg);
    overflow: hidden;
}
.comment_box:focus-within {
    border-color: var(--color-primary);
}

.comment_box textarea {
    width: 100%;
    min-height: 60px;
    padding: 10px;
    border: none;
    font-size: 14px;
    line-height: 1.4;
    color: var(--color-text);
    background: transparent;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
}

.comment_box_toolbar {
    display: flex;
    gap: 6px;
    padding: 6px 8px;
}

.comment_submit {
    flex: 0 0 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.comment_submit i { font-size: 20px; font-weight: 700; }

/* === 이전/다음 글 === */
#view_nav {
    border-top: 1px solid var(--color-border);
}

#view_nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    font-size: 13px;
    color: var(--color-text);
    text-decoration: none;
    overflow: hidden;
}

#view_nav a i {
    font-size: 18px;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

#view_nav a span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#view_nav a:active {
    background: var(--color-bg-elevated);
}

/* === 글쓰기 폼 === */
#write_header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
}

#write_header .back_btn {
    display: flex;
    align-items: center;
    color: var(--color-text);
    text-decoration: none;
}

#write_header h2 {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
}

#write_fields {
    padding: 12px 16px;
}

#write_fields .field_row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.board_chips {
    gap: 8px !important;
}

.board_chip {
    padding: 6px 16px;
    border-radius: 18px;
    border: 1px solid var(--color-border-strong);
    background: var(--color-bg);
    color: var(--color-text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
}

.board_chip.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

#write_fields input[type="text"],
#write_fields input[type="password"] {
    flex: 1;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--color-border-strong);
    border-radius: 8px;
    font-size: 14px;
    color: var(--color-text);
    background: var(--color-bg);
}

#write_fields input:focus {
    border-color: var(--color-primary);
    outline: none;
}

/* === 에디터 === */
#editor_wrap {
    position: relative;
}

#editor_toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border-strong);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    position: relative;
}

#editor_toolbar > button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 6px;
    background: none;
    color: var(--color-text-secondary);
    font-size: 15px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

#editor_toolbar > button:active {
    background: var(--color-border);
}

#editor_toolbar > button i {
    font-size: 20px;
}

.toolbar_sep {
    width: 1px;
    height: 20px;
    background: var(--color-border);
    margin: 0 4px;
}

.editor_area {
    min-height: 240px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid var(--color-border-strong);
    border-top: none;
    border-radius: 0 0 8px 8px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    word-break: break-word;
}

.editor_area b, .editor_area strong { font-weight: bold; }
.editor_area i, .editor_area em { font-style: italic; }
.editor_area u { text-decoration: underline; }

.memo_content b, .memo_content strong { font-weight: bold; }
.memo_content i, .memo_content em { font-style: italic; }
.memo_content u { text-decoration: underline; }

.memo_content ul, .memo_content ol { padding-left: 20px; margin: 8px 0; }
.memo_content li { list-style: disc; }

.editor_area:empty::before {
    content: attr(data-placeholder);
    color: var(--color-text-muted);
    pointer-events: none;
}

.editor_area img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 4px 0;
}

.editor_area ul {
    padding-left: 20px;
    margin: 4px 0;
    list-style: disc;
}

#upload_status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--color-text-muted);
}

.upload_spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-border-strong);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin .6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* 이모지 피커 */
#emoji_picker {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border-strong);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    z-index: 50;
    margin-top: -1px;
}

/* 글쓰기 GIF 피커 (editor_wrap 내, toolbar 아래) */
#write_sticker_picker {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border-strong);
    border-top: none;
    overflow: hidden;
}

.emoji_grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
}

.emoji_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    border: none;
    border-radius: 6px;
    background: none;
    cursor: pointer;
    padding: 4px;
}

.emoji_btn:active {
    background: var(--color-border);
}

.emoji_btn img {
    width: 24px;
    height: 24px;
}

#write_actions {
    display: flex;
    gap: 8px;
    padding: 0 16px 20px;
}

#write_actions .btn_submit {
    flex: 1;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: var(--color-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

#write_actions .btn_submit:disabled {
    opacity: .5;
}

#write_actions .btn_cancel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    height: 44px;
    border-radius: 8px;
    background: var(--color-bg-elevated);
    color: var(--color-text-secondary);
    font-size: 14px;
    text-decoration: none;
}

/* 댓글 답글 표시 바 */
.comment_reply_bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: var(--color-bg-elevated);
    border-radius: 6px;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.comment_reply_bar .cancel_reply {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* 댓글 액션 버튼 */
.comment_actions {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.comment_actions button {
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    color: var(--color-text-muted);
    cursor: pointer;
}

.comment_actions button:hover {
    color: var(--color-text-secondary);
}

/* 삭제 확인 버튼 */
#view_actions .btn_delete {
    color: #e53935;
}

/* === 임베드 === */
.embed_youtube {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin: 8px 0;
    border-radius: 8px;
    overflow: hidden;
}

.embed_youtube iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.embed_card {
    margin: 8px 0;
    max-width: 100%;
    overflow: hidden;
}

.og_card {
    display: flex;
    gap: 12px;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-text);
    overflow: hidden;
}

.og_card:active {
    background: var(--color-bg-elevated);
}

.og_text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.og_title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.og_desc {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.og_domain {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.og_img {
    flex: 0 0 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
}

.og_img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* === AI 토글 === */
.ai_toggle {
    height: 28px;
    padding: 0 10px;
    background-color: var(--color-bg-card);
    border-radius: 14px;
    color: var(--color-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 600;
    transition: color .2s, border-color .2s, background .2s;
}
.ai_toggle i { font-size: 16px; }
.ai_toggle.active { background-color: var(--color-text); color: var(--color-bg); }

/* === 스티커 피커 === */
.comment_box_toolbar .sticker_toggle {
    flex: 0 0 28px;
    height: 28px;
    background-color: var(--color-bg-card);
    border-radius: 50%;
    color: var(--color-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.comment_box_toolbar .sticker_toggle i {
    font-size: 16px;
    font-weight: 700;
}

#sticker_picker {
    margin-top: 8px;
    border: 1px solid var(--color-border-strong);
    border-radius: 8px;
    background: var(--color-bg-elevated);
    overflow: hidden;
}

.gif_player_chips {
    display: flex;
    gap: 6px;
    padding: 8px 8px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
}

.gif_player_chips::-webkit-scrollbar {
    display: none;
}

.gif_player_chips button {
    flex-shrink: 0;
    padding: 4px 10px;
    border: 1px solid var(--color-border-strong);
    border-radius: 14px;
    background: var(--color-bg);
    color: var(--color-text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
}

.gif_player_chips button.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.sticker_search {
    display: flex;
    gap: 4px;
    padding: 8px;
    border-bottom: 1px solid var(--color-border);
}

.sticker_search input {
    flex: 1;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--color-border-strong);
    border-radius: 6px;
    font-size: 13px;
    color: var(--color-text);
    background: var(--color-bg);
}

.sticker_search input:focus {
    border-color: var(--color-primary);
    outline: none;
}

.sticker_search button {
    flex: 0 0 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: var(--color-primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sticker_search button i {
    font-size: 18px;
}

.sticker_grid {
    max-height: 320px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px;
}

.sticker_cols {
    display: flex;
    gap: 4px;
    align-items: flex-start;
}

.sticker_col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.sticker_item {
    display: block;
    border: none;
    border-radius: 6px;
    background: none;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    width: 100%;
    line-height: 0;
    font-size: 0;
}

.sticker_item:active {
    opacity: 0.7;
}

.sticker_item {
    opacity: 0;
    transition: opacity .3s;
}

.sticker_item.loaded {
    opacity: 1;
}

.sticker_item img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.sticker_loading {
    width: 100%;
    text-align: center;
    padding: 20px;
    font-size: 13px;
    color: var(--color-text-muted);
}

.sticker_powered {
    text-align: center;
    padding: 4px;
    font-size: 10px;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
}

/* 댓글 내 GIF */
.comment_gif {
    display: block;
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    margin: 4px 0;
}

/* 댓글 내 스티커 (레거시) */
.comment_sticker {
    display: block;
    max-width: 120px;
    max-height: 120px;
    margin: 4px 0;
}

/* 본문 내 GIF */
.memo_content .board_gif {
    display: block;
    max-width: 300px;
    border-radius: 8px;
    margin: 8px 0;
}

/* Twemoji in memo */
.memo_content .twemoji {
    vertical-align: middle;
}
