/* ══════════════════════════════════════════════════════════════════
   jhtw.css — 江湖趣闻 · 论坛模块样式
   风格：武侠暗金色调，与主站 cajxl.css 一致
   ══════════════════════════════════════════════════════════════════ */

/* ── 版块导航栏 ─────────────────────────────────────────── */
.jhtw-board-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0 14px;
    align-items: center;
}
.jhtw-board-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 3px;
    border: 1px solid rgba(180,140,60,0.28);
    background: rgba(20,12,4,0.65);
    color: #c8a060;
    font-size: 12px;
    font-family: inherit;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background .18s, border-color .18s, color .18s;
}
.jhtw-board-btn:hover {
    background: rgba(80,50,10,0.55);
    border-color: rgba(232,201,106,0.55);
    color: #e8c96a;
}
.jhtw-board-btn.active {
    background: rgba(100,65,10,0.65);
    border-color: rgba(232,201,106,0.7);
    color: #e8c96a;
    text-shadow: 0 0 10px rgba(232,201,106,0.4);
}
.jhtw-board-btn .jhtw-board-icon {
    font-size: 15px;
    line-height: 1;
}
.jhtw-board-lock {
    font-size: 10px;
    color: #8a6a30;
    margin-left: 2px;
}

/* ── 帖子顶栏：Tab + 发帖按钮 ──────────────────────────── */
.jhtw-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.jhtw-tabs {
    display: flex;
    gap: 0;
    border: 1px solid rgba(180,140,60,0.3);
    border-radius: 3px;
    overflow: hidden;
}
.jhtw-tab-btn {
    padding: 6px 18px;
    background: rgba(10,6,2,0.6);
    border: none;
    color: #a08050;
    font-family: inherit;
    font-size: 13px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background .15s, color .15s;
    position: relative;
}
.jhtw-tab-btn + .jhtw-tab-btn {
    border-left: 1px solid rgba(180,140,60,0.3);
}
.jhtw-tab-btn:hover { background: rgba(60,38,8,0.6); color: #e8c96a; }
.jhtw-tab-btn.active {
    background: rgba(100,65,10,0.65);
    color: #e8c96a;
    text-shadow: 0 0 10px rgba(232,201,106,0.4);
}
.jhtw-post-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    background: rgba(100,65,10,0.5);
    border: 1px solid rgba(200,160,50,0.55);
    border-radius: 3px;
    color: #e8c96a;
    font-family: inherit;
    font-size: 13px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background .18s, box-shadow .18s;
}
.jhtw-post-btn:hover {
    background: rgba(130,85,15,0.65);
    box-shadow: 0 0 16px rgba(200,160,50,0.3);
}

/* ── 帖子列表卡片 ───────────────────────────────────────── */
.jhtw-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.jhtw-card {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(12,7,2,0.72);
    border: 1px solid rgba(160,120,40,0.22);
    border-radius: 4px;
    cursor: pointer;
    transition: border-color .18s, background .18s, box-shadow .18s;
    position: relative;
    overflow: hidden;
}
.jhtw-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, transparent, rgba(200,160,50,0.15), transparent);
    transition: background .2s;
}
.jhtw-card:hover {
    border-color: rgba(232,201,106,0.45);
    background: rgba(22,14,4,0.8);
    box-shadow: 0 2px 20px rgba(160,110,0,0.12);
}
.jhtw-card:hover::before {
    background: linear-gradient(to bottom, transparent, rgba(232,201,106,0.5), transparent);
}
/* 精华徽标 */
.jhtw-card.is-essence {
    border-color: rgba(200,160,50,0.45);
}
.jhtw-card.is-essence::before {
    background: linear-gradient(to bottom, transparent, rgba(232,201,106,0.6), transparent);
}

/* 缩略图区 */
.jhtw-card-thumb {
    flex-shrink: 0;
    width: 90px;
    height: 68px;
    border-radius: 3px;
    overflow: hidden;
    background: rgba(0,0,0,0.4);
    position: relative;
}
.jhtw-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.jhtw-card-thumb .jhtw-video-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
    font-size: 22px;
    color: rgba(232,201,106,0.85);
}
.jhtw-card-no-thumb {
    display: none;
}

/* 卡片内容区 */
.jhtw-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.jhtw-card-title-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}
.jhtw-badge {
    display: inline-block;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 2px;
    letter-spacing: 1px;
    flex-shrink: 0;
    margin-top: 1px;
}
.jhtw-badge-essence {
    color: #ffd060;
    border: 1px solid rgba(255,200,60,0.55);
    background: rgba(120,80,0,0.4);
}
.jhtw-badge-board {
    color: #90c0a0;
    border: 1px solid rgba(100,180,120,0.35);
    background: rgba(0,60,20,0.35);
}
.jhtw-badge-video {
    color: #80c0ff;
    border: 1px solid rgba(80,160,255,0.35);
    background: rgba(0,20,60,0.35);
}
.jhtw-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #f0e6cc;
    letter-spacing: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.jhtw-card-excerpt {
    font-size: 12px;
    color: #8a7a50;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.5px;
}
.jhtw-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: #6a5a38;
    flex-wrap: wrap;
}
.jhtw-card-meta .jhtw-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(180,140,60,0.3);
    vertical-align: middle;
    margin-right: 3px;
}
.jhtw-card-meta .jhtw-author { color: #9a8a55; }
.jhtw-meta-item { display: inline-flex; align-items: center; gap: 3px; }
.jhtw-meta-item svg { opacity: 0.7; }

/* 空状态 */
.jhtw-empty {
    text-align: center;
    padding: 60px 0;
    color: #6a5a3a;
    font-size: 13px;
    letter-spacing: 2px;
}

/* 加载更多 */
.jhtw-loadmore {
    text-align: center;
    padding: 16px 0;
}
.jhtw-loadmore-btn {
    padding: 8px 28px;
    background: rgba(40,26,6,0.7);
    border: 1px solid rgba(180,140,60,0.3);
    border-radius: 3px;
    color: #c8a060;
    font-family: inherit;
    font-size: 13px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background .18s, border-color .18s;
}
.jhtw-loadmore-btn:hover {
    background: rgba(80,52,12,0.7);
    border-color: rgba(220,180,70,0.5);
}
.jhtw-spin {
    display: inline-block;
    animation: jhtw-spin-anim 1.2s linear infinite;
    font-size: 18px;
    color: #c8a060;
}
@keyframes jhtw-spin-anim { to { transform: rotate(360deg); } }

/* 哨兵（移动端无限滚动） */
#jhtw-sentinel { height: 1px; }

/* ── 帖子详情模态框 ─────────────────────────────────────── */
#jhtw-detail-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.78);
    z-index: 9990;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
}
.jhtw-detail-wrap {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 12px 40px;
}
.jhtw-detail-box {
    width: 100%;
    max-width: 720px;
    background: linear-gradient(160deg, rgba(20,12,3,0.97), rgba(14,8,2,0.97));
    border: 1px solid rgba(200,160,50,0.4);
    border-radius: 6px;
    box-shadow: 0 0 60px rgba(160,110,0,0.2);
    overflow: hidden;
}
/* 详情头部 */
.jhtw-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(180,140,60,0.15);
}
.jhtw-detail-close {
    background: none;
    border: none;
    color: #8a7a50;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color .15s;
}
.jhtw-detail-close:hover { color: #e8c96a; }
.jhtw-detail-board-tag {
    font-size: 11px;
    color: #90c0a0;
    border: 1px solid rgba(100,180,120,0.4);
    border-radius: 2px;
    padding: 2px 8px;
    letter-spacing: 1px;
}
/* 详情正文 */
.jhtw-detail-content {
    padding: 20px 22px;
}
.jhtw-detail-title {
    font-size: 18px;
    font-weight: 700;
    color: #f0e6cc;
    letter-spacing: 2px;
    line-height: 1.5;
    margin-bottom: 12px;
}
.jhtw-detail-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #6a5a38;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.jhtw-detail-meta .jhtw-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(180,140,60,0.4);
}
.jhtw-detail-meta .jhtw-author { color: #c8a060; font-size: 13px; }
/* 帖子正文文字 */
.jhtw-detail-text {
    font-size: 14px;
    color: #d4c49a;
    line-height: 1.85;
    letter-spacing: 0.5px;
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 16px;
}
/* 帖子图片区 */
.jhtw-detail-imgs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.jhtw-detail-imgs img {
    width: calc(33.33% - 6px);
    min-width: 80px;
    max-width: 200px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid rgba(180,140,60,0.2);
    cursor: zoom-in;
    transition: border-color .15s;
}
.jhtw-detail-imgs img:hover { border-color: rgba(232,201,106,0.5); }
/* 帖子视频区 */
.jhtw-detail-video {
    margin-bottom: 16px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(180,140,60,0.2);
    background: #000;
}
.jhtw-detail-video video {
    width: 100%;
    max-height: 400px;
    display: block;
}
/* 帖子互动栏 */
.jhtw-detail-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0 6px;
    border-top: 1px solid rgba(180,140,60,0.12);
    flex-wrap: wrap;
}
.jhtw-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    background: rgba(20,12,4,0.5);
    border: 1px solid rgba(160,120,40,0.25);
    border-radius: 20px;
    color: #9a8a55;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all .15s;
    user-select: none;
}
.jhtw-action-btn:hover {
    background: rgba(60,40,8,0.6);
    border-color: rgba(200,160,50,0.5);
    color: #e8c96a;
}
.jhtw-action-btn.liked {
    color: #ff6080;
    border-color: rgba(255,80,100,0.5);
}
@keyframes jhtw-like-beat {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.4); }
    60%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}
.jhtw-action-btn.like-beat { animation: jhtw-like-beat 0.4s ease; }

/* ── 评论区 ──────────────────────────────────────────────── */
.jhtw-comments-wrap {
    border-top: 1px solid rgba(180,140,60,0.15);
    padding: 18px 22px 22px;
}
.jhtw-comments-title {
    font-size: 13px;
    font-weight: 700;
    color: #e8c96a;
    letter-spacing: 2px;
    margin-bottom: 14px;
}
/* 发评论输入框 */
.jhtw-comment-form {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    align-items: flex-start;
}
.jhtw-comment-form .jhtw-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(180,140,60,0.35);
    flex-shrink: 0;
}
.jhtw-comment-input-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.jhtw-comment-ta {
    width: 100%;
    min-height: 60px;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(180,140,60,0.25);
    border-radius: 3px;
    color: #f0e6cc;
    font-size: 13px;
    font-family: inherit;
    padding: 8px 10px;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
    transition: border-color .18s;
    letter-spacing: 0.5px;
}
.jhtw-comment-ta:focus { border-color: rgba(232,201,106,0.6); }
.jhtw-comment-ta::placeholder { color: #5a4a28; }
.jhtw-comment-submit {
    align-self: flex-end;
    padding: 5px 18px;
    background: rgba(100,65,10,0.5);
    border: 1px solid rgba(200,160,50,0.5);
    border-radius: 2px;
    color: #e8c96a;
    font-size: 12px;
    font-family: inherit;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background .15s;
}
.jhtw-comment-submit:hover { background: rgba(140,90,15,0.65); }
.jhtw-comment-login-tip {
    font-size: 12px;
    color: #7a6a40;
    padding: 10px 0;
    letter-spacing: 1px;
    cursor: pointer;
}
.jhtw-comment-login-tip:hover { color: #c8a060; }
/* 评论卡片 */
.jhtw-comment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.jhtw-comment-item {
    display: flex;
    gap: 10px;
}
.jhtw-comment-item .jhtw-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(180,140,60,0.3);
    flex-shrink: 0;
    margin-top: 1px;
}
.jhtw-comment-body {
    flex: 1;
    min-width: 0;
}
.jhtw-comment-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.jhtw-comment-nick {
    font-size: 12px;
    color: #c8a060;
    font-weight: 600;
}
.jhtw-comment-time {
    font-size: 11px;
    color: #5a4a28;
}
.jhtw-comment-text {
    font-size: 13px;
    color: #c4b47a;
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: break-word;
}
.jhtw-comment-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}
.jhtw-comment-act {
    background: none;
    border: none;
    color: #5a4a28;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    transition: color .15s;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0;
}
.jhtw-comment-act:hover { color: #c8a060; }
.jhtw-comment-act.liked { color: #ff6080; }
/* 回复区 */
.jhtw-reply-area {
    display: none;
    margin-top: 8px;
}
.jhtw-reply-ta {
    width: 100%;
    min-height: 48px;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(180,140,60,0.2);
    border-radius: 2px;
    color: #f0e6cc;
    font-size: 12px;
    font-family: inherit;
    padding: 6px 8px;
    resize: none;
    outline: none;
    box-sizing: border-box;
    transition: border-color .18s;
}
.jhtw-reply-ta:focus { border-color: rgba(232,201,106,0.5); }
.jhtw-reply-ta::placeholder { color: #4a3a20; }
.jhtw-reply-send {
    margin-top: 5px;
    padding: 4px 14px;
    background: rgba(80,50,8,0.5);
    border: 1px solid rgba(180,140,60,0.35);
    border-radius: 2px;
    color: #e8c96a;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 1px;
}
/* 子评论 */
.jhtw-replies-wrap {
    margin-top: 8px;
    padding: 8px 10px;
    background: rgba(0,0,0,0.25);
    border-left: 2px solid rgba(180,140,60,0.2);
    border-radius: 0 3px 3px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.jhtw-replies-wrap .jhtw-comment-text { font-size: 12px; }
.jhtw-load-more-replies {
    font-size: 11px;
    color: #7a6a40;
    cursor: pointer;
    letter-spacing: 1px;
    padding: 2px 0;
}
.jhtw-load-more-replies:hover { color: #c8a060; }
.jhtw-comment-load-more {
    text-align: center;
    padding: 10px 0 4px;
    font-size: 12px;
    color: #7a6a40;
    cursor: pointer;
    letter-spacing: 1px;
}
.jhtw-comment-load-more:hover { color: #c8a060; }

/* ── 发帖抽屉 ─────────────────────────────────────────────── */
#jhtw-post-sheet-mask {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 8100;
}
#jhtw-post-sheet {
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 8101;
    background: linear-gradient(170deg, rgba(18,10,2,0.98), rgba(10,6,1,0.98));
    border-top: 1px solid rgba(200,160,50,0.4);
    border-radius: 12px 12px 0 0;
    max-height: 88vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(100%);
    transition: transform .32s cubic-bezier(.4,0,.2,1);
    font-family: 'Noto Serif SC', 'Microsoft JhengHei', serif;
    color: #f0e6cc;
}
.jhtw-sheet-drag {
    text-align: center;
    padding: 10px 0 4px;
    cursor: pointer;
}
.jhtw-sheet-drag-bar {
    display: inline-block;
    width: 36px;
    height: 4px;
    background: rgba(200,160,60,0.35);
    border-radius: 2px;
}
.jhtw-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 18px 14px;
    border-bottom: 1px solid rgba(180,140,60,0.15);
}
.jhtw-sheet-title {
    font-size: 16px;
    font-weight: 700;
    color: #e8c96a;
    letter-spacing: 4px;
}
.jhtw-sheet-close {
    background: none;
    border: none;
    color: #8a7a50;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}
.jhtw-sheet-body {
    padding: 16px 18px 40px;
}
/* 表单控件 */
.jhtw-field {
    margin-bottom: 12px;
}
.jhtw-field-label {
    display: block;
    font-size: 12px;
    color: #c8a060;
    margin-bottom: 5px;
    letter-spacing: 1px;
}
.jhtw-field-ctrl {
    width: 100%;
    box-sizing: border-box;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(180,140,60,0.25);
    border-radius: 2px;
    color: #f0e6cc;
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color .18s;
}
.jhtw-field-ctrl:focus { border-color: rgba(232,201,106,0.6); }
select.jhtw-field-ctrl option { background: #1a0e04; }
textarea.jhtw-field-ctrl {
    min-height: 100px;
    resize: vertical;
}
/* 上传区 */
.jhtw-upload-area {
    border: 1px dashed rgba(180,140,60,0.35);
    border-radius: 2px;
    padding: 14px;
    text-align: center;
    color: #7a6a40;
    font-size: 12px;
    cursor: pointer;
    position: relative;
    transition: border-color .18s, background .18s;
}
.jhtw-upload-area:hover {
    border-color: rgba(200,160,60,0.6);
    background: rgba(60,40,5,0.3);
}
.jhtw-upload-area input[type=file] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.jhtw-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.jhtw-preview-item {
    position: relative;
    width: 64px;
    height: 64px;
    border: 1px solid rgba(180,140,60,0.3);
    border-radius: 2px;
    overflow: hidden;
}
.jhtw-preview-item img,
.jhtw-preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.jhtw-preview-del {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0,0,0,0.7);
    color: #e8c96a;
    border: none;
    cursor: pointer;
    font-size: 10px;
    border-radius: 2px;
    padding: 1px 3px;
    line-height: 1.4;
}
/* 提交按钮 */
.jhtw-submit-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: rgba(140,100,30,0.35);
    border: 1px solid rgba(200,160,60,0.5);
    border-radius: 2px;
    color: #e8c96a;
    font-size: 15px;
    font-family: inherit;
    letter-spacing: 4px;
    cursor: pointer;
    transition: background .2s;
    margin-top: 4px;
}
.jhtw-submit-btn:hover { background: rgba(160,115,35,0.5); }
.jhtw-form-err { color: #f08060; font-size: 12px; text-align: center; min-height: 18px; margin-bottom: 6px; }
.jhtw-form-ok  { color: #5adf90; font-size: 12px; text-align: center; min-height: 18px; margin-bottom: 6px; }

/* ── 响应式 ──────────────────────────────────────────────── */
@media (max-width: 640px) {
    .jhtw-card-thumb {
        width: 70px;
        height: 54px;
    }
    .jhtw-detail-imgs img {
        width: calc(50% - 4px);
        max-width: none;
    }
    .jhtw-tab-btn {
        padding: 6px 12px;
        font-size: 12px;
        letter-spacing: 1px;
    }
    .jhtw-detail-box { border-radius: 0; border-left: none; border-right: none; }
    .jhtw-detail-wrap { padding: 0; }
    #jhtw-detail-overlay { padding: 0; }
}
@media (max-width: 400px) {
    .jhtw-card-thumb { display: none; }
    .jhtw-card-no-thumb { display: block; }
}

/* ── Emoji 表情选择器 ─────────────────────────────────────── */
.jhtw-emoji-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}
.jhtw-emoji-btn {
    background: none;
    border: 1px solid rgba(180,140,60,0.3);
    border-radius: 3px;
    color: #c8a060;
    font-size: 12px;
    line-height: 1;
    padding: 7px;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, border-color .15s;
    flex-shrink: 0;
}
.jhtw-emoji-btn:hover { background: rgba(180,140,60,0.15); border-color: rgba(200,160,60,0.6); }
/* 回复行内的 emoji 按钮更紧凑 */
.jhtw-reply-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
}
.jhtw-reply-bar .jhtw-emoji-btn {
    font-size: 13px;
    padding: 6px;
    margin-top:5px;
}
/* 浮动 emoji 面板 */
#jhtw-emoji-panel {
    position: fixed;
    z-index: 29000;
    background: linear-gradient(160deg,rgba(22,12,4,0.98),rgba(14,8,2,0.98));
    border: 1px solid rgba(200,160,50,0.5);
    border-radius: 4px;
    padding: 0;
    box-shadow: 0 8px 30px rgba(0,0,0,0.7);
    display: none;   /* 初始隐藏；用 style.display='flex' 显示 */
    max-width: 560px;
    max-height: 300px;
    overflow: hidden;
    flex-direction: column;
}
/* Tab 导航 */
#jhtw-emoji-panel .ep-tabs {
    display: flex;
    border-bottom: 1px solid rgba(180,140,60,0.25);
    flex-shrink: 0;
}
#jhtw-emoji-panel .ep-tab {
    flex: 1;
    background: none;
    border: none;
    color: #7a6a40;
    font-size: 11px;
    font-family: inherit;
    padding: 6px 4px;
    cursor: pointer;
    letter-spacing: 0.5px;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}
#jhtw-emoji-panel .ep-tab:hover { color: #c8a060; }
#jhtw-emoji-panel .ep-tab.ep-tab-active {
    color: #e8c96a;
    border-bottom-color: #c8a060;
}
/* Pane 内容区 */
#jhtw-emoji-panel .ep-pane {
    padding: 6px 8px 8px;
    overflow-y: auto;
    flex: 1;
}
#jhtw-emoji-panel .ep-pane.ep-pane-hidden { display: none; }
/* Unicode emoji */
#jhtw-emoji-panel .ep-group-label {
    font-size: 10px;
    color: #7a6a3a;
    letter-spacing: 1px;
    margin: 6px 0 3px;
    padding-left: 2px;
}
#jhtw-emoji-panel .ep-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}
#jhtw-emoji-panel .ep-emoji {
    font-size: 18px;
    line-height: 1;
    padding: 4px;
    border-radius: 3px;
    cursor: pointer;
    transition: background .1s;
    -webkit-user-select: none;
    user-select: none;
}
#jhtw-emoji-panel .ep-emoji:hover { background: rgba(200,160,50,0.25); }
/* 经典表情 图片表情格 */
#jhtw-emoji-panel .ep-mhxy-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
}
#jhtw-emoji-panel .ep-mhxy-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 2px;
    border-radius: 3px;
    cursor: pointer;
    transition: background .1s;
    -webkit-user-select: none;
    user-select: none;
}
#jhtw-emoji-panel .ep-mhxy-item:hover { background: rgba(200,160,50,0.2); }
#jhtw-emoji-panel .ep-mhxy-item img {
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
#jhtw-emoji-panel .ep-mhxy-item span {
    font-size: 9px;
    color: #8a7a50;
    white-space: nowrap;
    overflow: hidden;
    max-width: 36px;
    text-overflow: ellipsis;
    display: none; /* 默认隐藏，图片加载失败时 js 显示 */
}
/* 评论正文内嵌表情图 */
.jhtw-emote {
    width: auto;
    height: auto;
    vertical-align: middle;
    object-fit: contain;
    display: inline-block;
    margin: 0 1px;
}
.jhtw-emote-err {
    font-size: 11px;
    color: #7a6a40;
    vertical-align: middle;
}
