@charset "UTF-8";
/* ==========================================================================
   MJJZZ UI 细节优化层（浅色 / 深色通用）
   - 只做"视觉润色"，不改变任何模板结构与交互
   - 颜色优先走 mjjzz-tokens.css 的 --mjj-* 设计变量，深色自动跟随
   - 选择器用 .friend-side-card 前缀提高特异性，压过 mjjzz-ui.css 的 !important
   ========================================================================== */

/* ---------- 友情链接（桌面右栏） ---------- */
.friend-side-card {
    border: 1px solid var(--mjj-border, #e9edf5) !important;
    border-radius: 16px !important;
    background: var(--mjj-surface, #fff) !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04) !important;
    margin-bottom: 14px !important;
    overflow: hidden;
}

.friend-side-card .card-header {
    padding: 13px 14px !important;
    background: transparent !important;
    border-bottom: 1px solid var(--mjj-border, #eef0f3) !important;
}

.friend-side-card .card-header .fl-side-title {
    display: inline-flex;
    align-items: center;
    gap: 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--mjj-text-strong, #111827) !important;
    letter-spacing: -.01em;
}

/* 老主题在 .card-header 下方用 ::after 画了一条 45px 的 1px 黑线（top:2.85rem），
   在右栏卡片里像一条掉错位置的杂线；这里统一去掉，保留 1px 分隔边框更干净 */
.jan-index-aside .card > .card-header::after,
.friend-side-card > .card-header::after,
.fl-home-card > .card-header::after {
    content: none !important;
    display: none !important;
}

.friend-side-card .card-header .fl-side-title svg {
    color: var(--mjj-brand, #1f4977) !important;
    width: 16px;
    height: 16px;
}

.friend-side-card .card-header .fl-side-more {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px 7px;
    border-radius: 7px;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--mjj-text-muted, #667085) !important;
    text-decoration: none !important;
    transition: background .15s ease, color .15s ease;
}

.friend-side-card .card-header .fl-side-more:hover {
    background: var(--mjj-surface-3, #f3f6fb) !important;
    color: var(--mjj-brand, #1f4977) !important;
}

.friend-side-card .card-body {
    padding: 8px 7px 9px !important;
}

.friend-side-card .friend-side-list {
    grid-template-columns: 1fr 1fr !important;
    gap: 2px 6px !important;
}

/* 条目：去掉整块灰底，改成干净的透明行 + hover 高亮 */
.friend-side-card .friend-side-tag {
    padding: 7px 7px !important;
    border: 1px solid transparent !important;
    border-radius: 9px !important;
    background: transparent !important;
    color: var(--mjj-text, #3b4759) !important;
    font-size: 12.5px !important;
    font-weight: 500;
    line-height: 1.35;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.friend-side-card .friend-side-tag:hover {
    background: rgba(18, 148, 215, .07) !important;
    color: var(--mjj-brand, #1f4977) !important;
    border-color: rgba(18, 148, 215, .16) !important;
}

.friend-side-card .friend-side-tag img {
    width: 18px !important;
    height: 18px !important;
    border-radius: 5px !important;
    background: var(--mjj-surface-2, #f8fafc);
    box-shadow: 0 0 0 1px rgba(16, 24, 40, .07);
    object-fit: contain;
}

.friend-side-card .friend-side-tag__letter {
    width: 18px !important;
    height: 18px !important;
    border-radius: 5px !important;
    background: var(--mjj-surface-3, #eef2f6) !important;
    color: var(--mjj-text-muted, #475467) !important;
    font-size: 10px !important;
    box-shadow: 0 0 0 1px rgba(16, 24, 40, .06);
}

/* 底部「申请友链」：从整宽描边条改成带底色的轻量按钮 */
.friend-side-card .friend-side-apply {
    width: calc(100% - 14px) !important;
    height: 36px !important;
    margin: 8px 7px 0 !important;
    padding: 0 12px !important;
    border: 1px solid var(--mjj-border, #e6ebf2) !important;
    border-radius: 10px !important;
    background: var(--mjj-surface-2, #f8fafc) !important;
    color: #0d6f9f !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    justify-content: center !important;
    gap: 6px;
    box-shadow: none !important;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.friend-side-card .friend-side-apply:hover {
    background: var(--mjj-surface, #fff) !important;
    border-color: #0d6f9f !important;
    color: #0b5e88 !important;
    box-shadow: 0 2px 10px rgba(31, 73, 119, .10) !important;
}

.friend-side-card .friend-side-apply i {
    font-style: normal;
    font-size: 13px;
    transition: transform .15s ease;
}

.friend-side-card .friend-side-apply:hover i {
    transform: translateX(2px);
}

/* 深色下再收一道（生成层同样会命中这些选择器，这里保证最终值一致） */
html[data-theme="dark"] .friend-side-card .card-header .fl-side-more:hover {
    background: var(--mjj-surface-3, #1d222a) !important;
}

html[data-theme="dark"] .friend-side-card .friend-side-tag {
    border-color: transparent !important;
    background: transparent !important;
    color: var(--mjj-text, #d7dde6) !important;
}

html[data-theme="dark"] .friend-side-card .friend-side-tag:hover {
    background: rgba(58, 160, 224, .13) !important;
    border-color: rgba(58, 160, 224, .24) !important;
    color: var(--mjj-brand, #3aa0e0) !important;
}

html[data-theme="dark"] .friend-side-card .friend-side-tag img {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .10);
    background: var(--mjj-surface-2, #1b2027);
}

html[data-theme="dark"] .friend-side-card .friend-side-apply {
    background: var(--mjj-surface-2, #1b2027) !important;
    border-color: var(--mjj-border, #2b333f) !important;
    color: var(--mjj-brand, #3aa0e0) !important;
}

html[data-theme="dark"] .friend-side-card .friend-side-apply:hover {
    background: var(--mjj-surface-3, #1d222a) !important;
    border-color: var(--mjj-brand, #3aa0e0) !important;
    box-shadow: none !important;
}

/* ---------- 友情链接（移动端卡片）与桌面保持同一套视觉 ---------- */
.fl-home-card {
    border-radius: 16px !important;
    border-color: var(--mjj-border, #e4e7ec) !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04) !important;
    background: var(--mjj-surface, #fff) !important;
}

.fl-home-card .card-header {
    padding: 13px 15px !important;
    background: transparent !important;
    border-bottom: 1px solid var(--mjj-border, #eef0f3) !important;
}

.fl-home-card .fl-home-chip {
    padding: 8px 7px !important;
    border-radius: 9px !important;
    color: var(--mjj-text, #344054) !important;
    font-size: 12.5px !important;
}

.fl-home-card .fl-home-chip:hover {
    background: var(--mjj-surface-3, #f4f6f8) !important;
    color: var(--mjj-brand, #1f4977) !important;
}

.fl-home-card .fl-home-chip img {
    width: 18px !important;
    height: 18px !important;
    border-radius: 5px !important;
    box-shadow: 0 0 0 1px rgba(16, 24, 40, .07);
}

.fl-home-card .fl-home-chip__letter {
    width: 18px !important;
    height: 18px !important;
    border-radius: 5px !important;
}

/* 移动端底部两个按钮：统一高度/圆角，次按钮改成和桌面「申请友链」同一套轻量实心样式 */
.fl-home-card .card-body .btn {
    height: 34px !important;
    border-radius: 10px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    letter-spacing: 0;
}

.fl-home-card .card-body .btn-outline-primary {
    border: 1px solid var(--mjj-border, #e6ebf2) !important;
    background: var(--mjj-surface-2, #f8fafc) !important;
    color: #0d6f9f !important;
}

.fl-home-card .card-body .btn-outline-primary:hover {
    border-color: #0d6f9f !important;
    background: var(--mjj-surface-3, #f3f6fb) !important;
    color: #0b5e88 !important;
}

html[data-theme="dark"] .fl-home-card .card-body .btn-outline-primary {
    border-color: var(--mjj-border, #2b333f) !important;
    background: var(--mjj-surface-2, #1b2027) !important;
    color: var(--mjj-brand, #3aa0e0) !important;
}

html[data-theme="dark"] .fl-home-card .card-body .btn-outline-primary:hover {
    border-color: var(--mjj-brand, #3aa0e0) !important;
    background: var(--mjj-surface-3, #1d222a) !important;
}

/* ---------- 侧栏主按钮（发新帖等）对比度 ----------
   品牌色改青蓝（--mjj-brand #1294d7）后，铺成按钮底色时白字对比只有 3.4（浅）/2.3（深），
   这里沿用站点移动端「查看全部」已经在用的深青蓝 #0f7fb8，白字对比 ≈4.6；深色再压深一档 → ≈5.2 */
.jan-index-aside > .btn.btn-primary,
.jan-index-aside .btn.btn-primary,
.thread-aside-sticky > .btn.btn-primary,
.thread-aside-sticky .btn.btn-primary {
    background-color: #0f7fb8 !important;
    background-image: none !important;
    border-color: #0f7fb8 !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(15, 127, 184, .22) !important;
}

.jan-index-aside > .btn.btn-primary:hover,
.jan-index-aside .btn.btn-primary:hover,
.thread-aside-sticky > .btn.btn-primary:hover,
.thread-aside-sticky .btn.btn-primary:hover {
    background-color: #0c6fa2 !important;
    border-color: #0c6fa2 !important;
}

html[data-theme="dark"] .jan-index-aside > .btn.btn-primary,
html[data-theme="dark"] .jan-index-aside .btn.btn-primary,
html[data-theme="dark"] .thread-aside-sticky > .btn.btn-primary,
html[data-theme="dark"] .thread-aside-sticky .btn.btn-primary {
    background-color: #1d6fb8 !important;
    border-color: #1d6fb8 !important;
    color: #fff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .35) !important;
}

html[data-theme="dark"] .jan-index-aside > .btn.btn-primary:hover,
html[data-theme="dark"] .jan-index-aside .btn.btn-primary:hover,
html[data-theme="dark"] .thread-aside-sticky > .btn.btn-primary:hover,
html[data-theme="dark"] .thread-aside-sticky .btn.btn-primary:hover {
    background-color: #2580cc !important;
    border-color: #2580cc !important;
}

/* ---------- 发帖页：移除底部「添加附件」按钮 ----------
   view/htm/post.htm:144-172 用 `html body .attachlist_parent > a.small.text-start`
   （含 .addattach / #addattach）以 inline-flex!important 把入口顶了回来。
   这里用带 id 与属性选择器的更高权重再压回去；只隐藏入口，
   不影响 post_file_list_html 渲染的附件列表（fieldset/ul.attachlist）。 */
html body .attachlist_parent > a.small.text-start[href],
html body .attachlist_parent > a.small.text-start[href] .addattach,
html body label#addattach.addattach {
    display: none !important;
}
/* ---------- 正文表情（[em_N] → img.mjj-face-img） ----------
   plugin/jan/css/bootstrap-bbs-v2.css 的 `.message img{max-width:100%;height:auto!important;
   border:1px solid #dee2e6;margin-bottom:.5rem}` (0,1,1) 压过了 plugin/Ty_face/face/face.css
   里 .mjj-face-img 的 border:0 / margin:0，导致表情外面套一圈灰框、下方多出 7px、
   基线也下沉。这里只针对正文里的表情恢复「无框、随字号、贴合基线」的样子。 */
html body .message img.mjj-face-img,
html body .message picture > img.mjj-face-img {
    width: 1.5em !important;
    height: 1.5em !important;
    max-width: 1.5em !important;
    max-height: 1.5em !important;
    padding: 0 !important;
    margin: 0 1px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    vertical-align: -0.32em !important;
    object-fit: contain;
}

/* 引用块里的表情跟着引用文字字号走 */
html body blockquote .mjj-face-img,
html body .quote .mjj-face-img,
html body .message-quote .mjj-face-img {
    width: 1.4em !important;
    height: 1.4em !important;
}

/* 深色下不要出现浅色描边/白底 */
html[data-theme="dark"] .message img.mjj-face-img,
html[data-theme="dark"] .message picture > img.mjj-face-img {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    mix-blend-mode: normal;
}
/* ---------- 深色下「置顶」金色角标 ----------
   首页 thread list 的内联 <style> 给 .mjj-thread-top-badge 设了
   background:#ffd400!important + .mjj-top-char{color:#3a2c00!important}。
   dark.css 把低亮度的 #3a2c00 当成"深灰正文"提亮成了 #f0f0f0，
   结果浅字压在亮黄底上（对比度 1.26）。这里按"亮底配深字"还原。 */
html[data-theme="dark"] .mjj-thread-top-badge .mjj-top-char,
html[data-theme="dark"] .mjj-thread-top-badge i,
html[data-theme="dark"] .mjj-thread-top-badge svg {
    color: #3a2c00 !important;
    fill: #3a2c00 !important;
}
/* ---------- 附件下载面板：改成正正方方的直角样式 ----------
   plugin/mjj_downs 在正文里内联了一段 <style>，把面板做成 16px 圆角 + 9/10px 圆角图标块，
   显得偏「卡片化」。这里只改几何（圆角 / 阴影），颜色与深色适配不动，
   让面板看起来是一个规整的方块：直角、平面、1px 描边。 */
html body .fxz-attach-panel,
html body .fxz-attach-panel .fxz-attach-panel__head,
html body .fxz-attach-panel .fxz-attach-panel__icon,
html body .fxz-attach-panel .fxz-attach-item,
html body .fxz-attach-panel .fxz-attach-item__icon,
html body .fxz-attach-panel .fxz-attach-state,
html body .fxz-attach-panel .fxz-attach-item__arrow,
html body .fxz-attach-panel .fxz-credit-icon {
    border-radius: 0 !important;
}

html body .fxz-attach-panel {
    box-shadow: none !important;
}

/* 头部与列表在同一块里，分隔线拉满，别留圆角缺口 */
html body .fxz-attach-panel .fxz-attach-panel__head {
    border-radius: 0 !important;
}

/* 直角之后鼠标悬停也别再出圆角高亮 */
html body .fxz-attach-panel .fxz-attach-item:hover,
html body .fxz-attach-panel .fxz-attach-item:focus-visible {
    border-radius: 0 !important;
}

/* 附件详情弹窗跟随同一套直角语言 */
html body .fxz-attach-modal .modal-content,
html body .fxz-attach-modal .modal-content .fxz-attach-modal__icon,
html body .fxz-attach-modal .modal-content .btn {
    border-radius: 0 !important;
}
/* 附件详情弹窗（#fxz_attach_detail_modal）内部也要方方正正：
   弹窗根节点没有 .fxz-attach-modal 类，用 id 指定，压过插件内联样式 */
html body #fxz_attach_detail_modal .modal-content,
html body #fxz_attach_detail_modal .modal-content .fxz-modal-close,
html body #fxz_attach_detail_modal .modal-content .fxz-modal-file,
html body #fxz_attach_detail_modal .modal-content .fxz-modal-file__icon,
html body #fxz_attach_detail_modal .modal-content .fxz-modal-cell,
html body #fxz_attach_detail_modal .modal-content .fxz-modal-price,
html body #fxz_attach_detail_modal .modal-content .fxz-modal-note,
html body #fxz_attach_detail_modal .modal-content .fxz-modal-error,
html body #fxz_attach_detail_modal .modal-content .fxz-modal-btn,
html body #fxz_attach_detail_modal .modal-content .btn {
    border-radius: 0 !important;
}

html body #fxz_attach_detail_modal .modal-content .fxz-modal-btn:focus-visible,
html body #fxz_attach_detail_modal .modal-content .fxz-modal-btn:hover,
html body #fxz_attach_detail_modal .modal-content .fxz-modal-close:hover {
    border-radius: 0 !important;
}
/* ============================================================
   评论区：UID 从「头像下方」移到「用户名后面」，做成方框小标签
   节点搬移在 plugin/jan/js/uid-chip.js 里做，这里只管样式。
   注意 mjjzz-ui.css 里有三条更高权重的规则要压：
     .card-postlist .postlist .post-user-uid{font-size:10px!important;color:#b6bfcc!important}
     .card-postlist .postlist .post-user-uid{display:none}
     html[data-theme="dark"] .card-postlist .postlist .post-user-uid{color:#909eb1!important}
   ============================================================ */
html body .card-postlist .postlist .post-user-uid.post-user-uid--inline,
html body .postlist .post-user-uid.post-user-uid--inline {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: 18px;
    padding: 0 6px;
    margin: 0 !important;
    border: 1px solid #d8e0ea !important;
    border-radius: 0 !important;
    background-color: #eef2f8 !important;
    color: #5b6b80 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    letter-spacing: .2px !important;
    white-space: nowrap;
    vertical-align: middle;
    text-align: center;
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
}

html[data-theme="dark"] body .card-postlist .postlist .post-user-uid.post-user-uid--inline,
html[data-theme="dark"] body .postlist .post-user-uid.post-user-uid--inline {
    border-color: #2b333f !important;
    background-color: #1b2027 !important;
    color: #9aa6b6 !important;
    font-size: 11px !important;
}

/* 首行标签组：用户名 / 大会员 / UID / 等级徽章 之间统一 6px
   原来靠各自的 margin + 文本节点里的空白撑开，实测 5 / 16 / 8 px 三档不均。
   改成 flex + gap 之后间距只由 gap 决定，模板里的换行空白不再参与排版。
   注意：只作用于评论列表的 .media-body 首行，不碰导航/主题列表里的 .username。 */
html body .card-postlist .postlist .media-body > .d-flex:first-of-type > div:first-child,
html body .card-postlist .postlist .media-body > .d-flex > div:first-child:has(.username) {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    row-gap: 2px;
}

html body .card-postlist .postlist .media-body > .d-flex:first-of-type > div:first-child > *,
html body .card-postlist .postlist .media-body > .d-flex > div:first-child:has(.username) > * {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 大会员角标是 .tt-vip-name--post-list::after 伪元素，处在 .username 内部，
   flex 的 gap 管不到它，单独给 6px。 */
html body .card-postlist .postlist .media-body > .d-flex:first-of-type > div:first-child > .username .tt-vip-name.tt-vip-name--post-list::after,
html body .card-postlist .postlist .media-body > .d-flex > div:first-child:has(.username) > .username .tt-vip-name.tt-vip-name--post-list::after {
    margin-left: 6px !important;
}

/* 个性签名紧贴用户名下方单独一行（不要被 UID 标签挤在同一行） */
html body .card-postlist .postlist .media-body .comment-signature-inline {
    display: block !important;
    flex: 0 0 100%;
    margin-top: 2px !important;
}
/* ── 个人中心左栏卡片与右栏顶部对齐 ───────────────────────────────
   bootstrap-bbs-v2.css 里 #my_aside .card 用了 position:sticky; top:76px，
   页面没滚动时 sticky 会把卡片往下顶 11px（main 的上留白是 65px），
   于是左栏卡片整体比右栏低一截。这里的 top 取和 main padding-top 一致的值，
   静止时不产生位移，滚动时才吸附在导航栏下方。 */
html body #my_aside > .card {
    top: 65px !important;
}

/* ── 个人中心左栏：新版 bootstrap-bbs-v2.css 的两条写死浅色规则 ─────────────
   #my_aside .list-group{background-color:#fff} 会在深色下留出白底与白缝，
   #my_aside .card-body > span:not(.vip-avatar-wrap){color:#1f2937} 让用户名
   在深色卡片上几乎看不见（对比度 118）。 */
html[data-theme="dark"] #my_aside .list-group {
    background-color: transparent !important;
}

html[data-theme="dark"] #my_aside .card-body > span:not(.vip-avatar-wrap) {
    color: var(--mjj-text) !important;
}

/* 积分页「余额」里的 ¥ 符号深色下偏暗（rgb(190,18,60) on rgb(27,32,39)，对比度 2.61） */
html[data-theme="dark"] .ttc-token.is-rmb {
    color: #ff8296 !important;
}
