/* ============================================================
 *  动态微博插件 · 最终版样式表
 *  全部使用 --mn-* 主题变量，双主题自适应
 * ============================================================ */

/* ============================================================
 *  1. 通用页面容器
 * ============================================================ */

.tl-page {
    display: grid;
    gap: 16px;
    padding: 20px;
    box-sizing: border-box;
}
.tl-page > .tl-page-title:first-child {
    margin: 0 0 14px;
    padding: 0;
    line-height: 1.3;
    font-size: 22px;
    color: var(--mn-text, #1f2937);
}
.tl-page-sub {
    margin: 0;
    font-size: 13px;
    color: var(--mn-text-muted, #6b7280);
}

.tl-back {
    margin-bottom: 6px;
    font-size: 13px;
}
.tl-back a {
    color: var(--mn-text-muted, #6b7280);
    text-decoration: none;
}
.tl-back a:hover {
    color: var(--mn-primary, #0066cc);
}

/* ============================================================
 *  2. 首页动态流区块
 * ============================================================ */

.tl-home-section {
    padding: 20px;
    margin: 16px 0;
    border-radius: 12px;
    background: var(--mn-bg-card, #fff);
    border: 1px solid var(--mn-border, #e5e7eb);
    box-sizing: border-box;
}
.tl-home-section + .mn-section,
.tl-home-section + section {
    margin-top: 16px !important;
}
.tl-home-section > .mn-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 16px;
    padding: 0;
}
.tl-home-section > .mn-section-header h2 {
    margin: 0;
    padding: 0;
    line-height: 1.2;
    font-size: 17px;
    font-weight: 700;
}
.tl-home-section > .mn-section-header > *:first-child {
    margin-top: 0;
}

.tl-home-section .tl-publisher,
.tl-home-section .tl-login-tip {
    margin: 0 0 18px;
}
.tl-home-section .tl-publisher {
    padding: 14px 16px;
    border-radius: 12px;
}
.tl-home-section .tl-publisher-input {
    min-height: 56px;
    padding: 9px 12px;
    font-size: 13px;
}
.tl-home-section .tl-publisher-actions {
    margin-top: 8px;
}
.tl-home-section .tl-publisher-preview {
    margin-top: 8px;
}
.tl-home-section .tl-feed-wrapper {
    gap: 8px;
    margin: 0 0 4px;
}
.tl-home-section .tl-post {
    padding: 12px 14px;
    border-radius: 10px;
}
.tl-home-section .tl-post-head { margin-bottom: 8px; }
.tl-home-section .tl-content {
    margin-bottom: 4px;
    line-height: 1.6;
}
.tl-home-section .tl-images { margin-top: 6px; }
.tl-home-section .tl-topics { margin-top: 6px; }
.tl-home-section .tl-actions {
    margin-top: 8px;
    padding-top: 8px;
    gap: 18px;
}
.tl-home-section .tl-empty {
    padding: 40px 20px;
    margin: 0 0 8px;
    border-radius: 12px;
    background: var(--mn-border-light, #f9fafb);
    color: var(--mn-text-muted, #6b7280);
    font-size: 13px;
}
.tl-home-section .tl-loadmore {
    margin: 0;
    padding: 0;
}

/* ============================================================
 *  3. 发布器
 * ============================================================ */

.tl-publisher {
    padding: 16px;
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 12px;
    background: var(--mn-bg-card, #fff);
}
.tl-publisher-input {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 8px;
    background: var(--mn-bg-card, #fff);
    color: var(--mn-text, #1f2937);
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
}
.tl-publisher-input:focus {
    outline: none;
    border-color: var(--mn-primary, #0066cc);
    box-shadow: 0 0 0 3px var(--mn-primary-subtle, rgba(0, 102, 204, .12));
}

.tl-publisher-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}
.tl-publisher-actions > .tl-btn-primary {
    margin-left: auto;
    flex-shrink: 0;
}

.tl-publisher-tools {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tl-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--mn-text-muted, #6b7280);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s, color .15s;
    user-select: none;
    box-sizing: border-box;
}
.tl-tool-btn:hover {
    background: var(--mn-primary-subtle, rgba(0, 102, 204, .1));
    color: var(--mn-primary, #0066cc);
}
.tl-tool-btn:active {
    transform: scale(.94);
}
.tl-tool-btn > span { display: inline-block; line-height: 1; }
.tl-tool-btn input[type="file"] { display: none; }
.tl-tool-btn svg {
    display: block;
    pointer-events: none;
    color: currentColor;
}

/* emoji 面板 */
.tl-emoji-panel {
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 10px;
    background: var(--mn-bg-card, #fff);
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    max-width: 420px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
}
.tl-emoji-panel[hidden] { display: none; }
.tl-emoji-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background .12s;
}
.tl-emoji-item:hover {
    background: var(--mn-primary-subtle, rgba(0, 102, 204, .12));
}

/* 图片预览 */
.tl-publisher-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.tl-publisher-preview:empty { display: none; }
.tl-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--mn-border, #e5e7eb);
}
.tl-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tl-preview-del {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

/* ============================================================
 *  4. 动态卡片
 * ============================================================ */

.tl-feed-wrapper {
    display: grid;
    gap: 8px;
}
.tl-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--mn-text-muted, #6b7280);
    font-size: 13px;
}

.tl-post {
    padding: 12px 14px;
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 10px;
    background: var(--mn-bg-card, #fff);
}
.tl-post-detail {
    padding: 20px;
    border-radius: 12px;
}

.tl-post-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.tl-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--mn-border-light, #f3f4f6);
}
.tl-avatar-sm {
    width: 26px;
    height: 26px;
    font-size: 12px;
}
.tl-avatar-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tl-avatar-bg, #6b7280);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    user-select: none;
    text-transform: uppercase;
}

.tl-meta {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}
.tl-username {
    font-size: 13px;
    font-weight: 600;
    color: var(--mn-text, #1f2937);
    line-height: 1;
}
.tl-time {
    font-size: 11px;
    color: var(--mn-text-muted, #6b7280);
    line-height: 1;
}

/* trust 插件徽章抑制拉伸 */
.tl-post-head .tr-badge,
.tl-meta .tr-badge {
    flex: 0 0 auto;
    align-self: flex-start;
    margin-left: 0;
    width: auto;
    max-width: fit-content;
}

.tl-more {
    border: 0;
    background: transparent;
    color: var(--mn-text-muted, #6b7280);
    font-size: 16px;
    cursor: pointer;
    padding: 0 6px;
}
.tl-more:hover { color: var(--mn-danger, #ef4444); }

.tl-content {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--mn-text, #1f2937);
    word-break: break-word;
    white-space: pre-wrap;
    margin-bottom: 4px;
}
.tl-more-text {
    border: 0;
    padding: 4px 0;
    background: transparent;
    color: var(--mn-primary, #0066cc);
    font-size: 13px;
    cursor: pointer;
}

/* ============================================================
 *  5. 图文布局（左图右文 + 图片完整显示）
 * ============================================================ */

.tl-post-body {
    display: block;
    margin-bottom: 4px;
}
.tl-post-body.has-media {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.tl-post-media {
    flex: 0 0 auto;
    width: 160px;
    max-width: 160px;
}
.tl-post-text {
    flex: 1 1 auto;
    min-width: 0;
    /* overflow: hidden; */ /* 取消这行，防止长文本被意外裁剪 */
}

/* 单图：160×160 contain */
.tl-post-media .tl-images-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 160px;
}
.tl-post-media .tl-images-1 .tl-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 160px;
    border-radius: 8px;
    background: var(--mn-border-light, #f3f4f6);
    overflow: hidden;
    box-sizing: border-box;
}
.tl-post-media .tl-images-1 .tl-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* 多图：160 宽网格 */
.tl-post-media .tl-images-2,
.tl-post-media .tl-images-3,
.tl-post-media .tl-images-4,
.tl-post-media .tl-images-5,
.tl-post-media .tl-images-6,
.tl-post-media .tl-images-7,
.tl-post-media .tl-images-8,
.tl-post-media .tl-images-9 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    width: 160px;
    max-width: 160px;
}
.tl-post-media .tl-images-2 { grid-template-columns: repeat(2, 1fr); }
.tl-post-media .tl-images-4 { grid-template-columns: repeat(2, 1fr); }

.tl-post-media .tl-images .tl-image {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    width: 100%;
    height: auto;
    border-radius: 6px;
    background: var(--mn-border-light, #f3f4f6);
    overflow: hidden;
    box-sizing: border-box;
}
.tl-post-media .tl-images .tl-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* 详情页/话题页：九宫格原样 */
.tl-page .tl-images {
    display: grid;
    gap: 4px;
    margin-top: 10px;
    max-width: 420px;
}
.tl-page .tl-images-1 { grid-template-columns: 1fr; max-width: 320px; }
.tl-page .tl-images-2 { grid-template-columns: repeat(2, 1fr); }
.tl-page .tl-images-3 { grid-template-columns: repeat(3, 1fr); }
.tl-page .tl-images-4 { grid-template-columns: repeat(2, 1fr); }
.tl-page .tl-images-5,
.tl-page .tl-images-6,
.tl-page .tl-images-7,
.tl-page .tl-images-8,
.tl-page .tl-images-9 { grid-template-columns: repeat(3, 1fr); }

.tl-page .tl-images .tl-image {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 6px;
    background: var(--mn-border-light, #f3f4f6);
}
.tl-page .tl-images-1 .tl-image { aspect-ratio: auto; min-height: 120px; }
.tl-page .tl-images .tl-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ============================================================
 *  6. 话题 / @提及 高亮
 * ============================================================ */

.tl-topic-link {
    color: var(--mn-primary, #0066cc);
    text-decoration: none;
    font-weight: 500;
}
.tl-topic-link:hover { text-decoration: underline; }

.tl-mention-link {
    color: var(--mn-primary, #0066cc);
    font-weight: 500;
}

.tl-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}
.tl-topic {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--mn-primary-subtle, rgba(0, 102, 204, .12));
    color: var(--mn-primary, #0066cc);
    font-size: 11px;
    text-decoration: none;
}
.tl-topic:hover {
    background: var(--mn-primary, #0066cc);
    color: #fff;
}

/* ============================================================
 *  7. 转发引用
 * ============================================================ */

.tl-repost-quote {
    padding: 10px 12px;
    margin: 10px 0;
    border-left: 3px solid var(--mn-primary, #0066cc);
    border-radius: 6px;
    background: var(--mn-border-light, #f9fafb);
}
.tl-repost-head {
    font-size: 12px;
    margin-bottom: 4px;
}
.tl-repost-body {
    font-size: 13px;
    color: var(--mn-text-muted, #6b7280);
    line-height: 1.6;
}

/* ============================================================
 *  8. 操作栏
 * ============================================================ */

.tl-actions {
    display: flex;
    gap: 18px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--mn-border-light, #f3f4f6);
}
.tl-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: var(--mn-text-muted, #6b7280);
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: color .15s;
}
.tl-action:hover { color: var(--mn-primary, #0066cc); }
.tl-action.is-active { color: var(--mn-danger, #ef4444); }
.tl-action.is-active .tl-icon { transform: scale(1.1); }
.tl-icon {
    font-size: 13px;
    line-height: 1;
}
.tl-count {
    font-variant-numeric: tabular-nums;
}

/* ============================================================
 *  9. 首页轮播
 * ============================================================ */

.tl-feed-wrapper[data-tl-carousel] > .tl-post {
    display: none;
}
.tl-feed-wrapper[data-tl-carousel] > .tl-post.is-active {
    display: block;
    animation: tlSlideUp .45s cubic-bezier(.2, .8, .2, 1);
}
@keyframes tlSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 圆点：强制单行不换行 */
.tl-carousel-dots {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 10px auto 0;
    padding: 0 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
    line-height: 1;
}
.tl-carousel-dot {
    display: block;
    flex: 0 0 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mn-border, #d1d5db);
    transition: background .2s ease, transform .2s ease;
    cursor: pointer;
    box-sizing: border-box;
    flex-shrink: 0;
}
.tl-carousel-dot.is-active {
    background: var(--mn-primary, #0066cc);
    transform: scale(1.4);
}
.tl-carousel-dot:hover {
    background: var(--mn-primary, #0066cc);
    opacity: .75;
}

/* ============================================================
 *  10. 按钮 / 提示
 * ============================================================ */

.tl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 16px;
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 8px;
    background: var(--mn-bg-card, #fff);
    color: var(--mn-text, #1f2937);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity .15s, background .15s;
    text-decoration: none;
}
.tl-btn:hover { opacity: .9; }
.tl-btn-primary {
    background: var(--mn-primary, #0066cc);
    border-color: var(--mn-primary, #0066cc);
    color: #fff;
}
.tl-btn-danger {
    background: var(--mn-danger, #ef4444);
    border-color: var(--mn-danger, #ef4444);
    color: #fff;
}

.tl-loadmore {
    text-align: center;
    padding: 12px 0;
}
.tl-login-tip {
    padding: 20px;
    text-align: center;
    color: var(--mn-text-muted, #6b7280);
    font-size: 13px;
    background: var(--mn-border-light, #f9fafb);
    border-radius: 12px;
}
.tl-login-tip a { color: var(--mn-primary, #0066cc); }

/* ============================================================
 *  11. 分页器
 * ============================================================ */

.tl-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--mn-border-light, #f3f4f6);
}
.tl-pager-btn,
.tl-pager-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 8px;
    background: var(--mn-bg-card, #fff);
    color: var(--mn-text, #374151);
    font-size: 13px;
    text-decoration: none;
    transition: all .15s;
    user-select: none;
    box-sizing: border-box;
}
.tl-pager-btn:hover,
.tl-pager-num:hover {
    border-color: var(--mn-primary, #0066cc);
    color: var(--mn-primary, #0066cc);
}
.tl-pager-num.is-active {
    background: var(--mn-primary, #0066cc);
    border-color: var(--mn-primary, #0066cc);
    color: #fff;
    font-weight: 600;
    cursor: default;
}
.tl-pager-btn.is-disabled {
    color: var(--mn-text-muted, #9ca3af);
    background: var(--mn-border-light, #f9fafb);
    cursor: not-allowed;
    opacity: .7;
}
.tl-pager-gap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 32px;
    color: var(--mn-text-muted, #9ca3af);
    font-size: 13px;
}

/* ============================================================
 *  12. 评论模态框
 * ============================================================ */

.tl-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .5);
    animation: tlModalFadeIn .18s ease;
}
@keyframes tlModalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.tl-modal-box {
    width: 100%;
    max-width: 540px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    background: var(--mn-bg-card, #fff);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
    overflow: hidden;
    animation: tlModalSlideIn .22s cubic-bezier(.2, .8, .2, 1);
}
@keyframes tlModalSlideIn {
    from { opacity: 0; transform: translateY(24px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.tl-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--mn-border-light, #f3f4f6);
    flex-shrink: 0;
}
.tl-modal-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--mn-text, #1f2937);
}
.tl-modal-close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--mn-text-muted, #6b7280);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.tl-modal-close:hover {
    background: var(--mn-border-light, #f3f4f6);
    color: var(--mn-text, #1f2937);
}

.tl-modal-body {
    flex: 1 1 auto;
    min-height: 160px;
    max-height: 56vh;
    overflow-y: auto;
    padding: 12px 18px;
    -webkit-overflow-scrolling: touch;
}
.tl-modal-loading,
.tl-modal-empty {
    padding: 30px 0;
    text-align: center;
    color: var(--mn-text-muted, #9ca3af);
    font-size: 13px;
}

.tl-modal-comment {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--mn-border-light, #f3f4f6);
}
.tl-modal-comment:last-child { border-bottom: 0; }
.tl-modal-comment-body { flex: 1; min-width: 0; }
.tl-modal-comment-meta {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 3px;
}
.tl-modal-comment-user {
    font-size: 13px;
    font-weight: 600;
    color: var(--mn-primary, #0066cc);
}
.tl-modal-comment-time {
    font-size: 11px;
    color: var(--mn-text-muted, #9ca3af);
}
.tl-modal-comment-reply {
    border: 0;
    background: transparent;
    color: var(--mn-text-muted, #9ca3af);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}
.tl-modal-comment-reply:hover { color: var(--mn-primary, #0066cc); }
.tl-modal-comment-del {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--mn-text-muted, #9ca3af);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}
.tl-modal-comment-del:hover { color: var(--mn-danger, #ef4444); }
.tl-modal-comment-text {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--mn-text, #374151);
    word-break: break-word;
    white-space: pre-wrap;
}

.tl-modal-foot {
    flex-shrink: 0;
    padding: 10px 14px;
    border-top: 1px solid var(--mn-border-light, #f3f4f6);
    background: var(--mn-bg-card, #fff);
}
.tl-modal-reply-tip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    margin-bottom: 8px;
    border-radius: 6px;
    background: var(--mn-primary-subtle, rgba(0, 102, 204, .08));
    color: var(--mn-primary, #0066cc);
    font-size: 12.5px;
}
.tl-modal-reply-tip b { font-weight: 600; }
.tl-modal-cancel-reply {
    margin-left: auto;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--mn-primary, #0066cc);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}
.tl-modal-cancel-reply:hover { background: rgba(0, 102, 204, .15); }

.tl-modal-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.tl-modal-input {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 14px;
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 999px;
    background: var(--mn-border-light, #f9fafb);
    color: var(--mn-text, #1f2937);
    font-size: 13.5px;
    box-sizing: border-box;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.tl-modal-input::placeholder { color: var(--mn-text-muted, #9ca3af); }
.tl-modal-input:focus {
    outline: none;
    background: var(--mn-bg-card, #fff);
    border-color: var(--mn-primary, #0066cc);
    box-shadow: 0 0 0 3px var(--mn-primary-subtle, rgba(0, 102, 204, .12));
}
.tl-modal-send {
    flex-shrink: 0;
    height: 38px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: var(--mn-primary, #0066cc);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity .15s;
}
.tl-modal-send:hover { opacity: .88; }
.tl-modal-send:disabled { opacity: .6; cursor: not-allowed; }

/* ============================================================
 *  13. 转发模态框
 * ============================================================ */

.tl-repost-box { max-width: 480px; }
.tl-repost-orig {
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: var(--mn-border-light, #f9fafb);
    border-left: 3px solid var(--mn-primary, #0066cc);
}
.tl-repost-orig-user {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mn-primary, #0066cc);
    margin-bottom: 4px;
}
.tl-repost-orig-content {
    font-size: 12.5px;
    color: var(--mn-text-muted, #6b7280);
    line-height: 1.55;
    word-break: break-word;
}
.tl-repost-textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 8px;
    background: var(--mn-bg-card, #fff);
    color: var(--mn-text, #1f2937);
    font-size: 13.5px;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
}
.tl-repost-textarea:focus {
    outline: none;
    border-color: var(--mn-primary, #0066cc);
    box-shadow: 0 0 0 3px var(--mn-primary-subtle, rgba(0, 102, 204, .12));
}
.tl-repost-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    width: 100%;
}
.tl-repost-actions .tl-btn {
    min-width: 80px;
    height: 36px;
    padding: 0 20px;
}

/* ============================================================
 *  14. 内联评论区（备用，默认不显示）
 *  如果 future 需要卡片下展开评论，删掉 $showInlineComments 逻辑即可启用
 * ============================================================ */

.tl-inline-comments {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--mn-border-light, #f3f4f6);
    display: grid;
    gap: 8px;
}
.tl-inline-list { display: grid; gap: 8px; }
.tl-inline-empty {
    padding: 10px 0;
    text-align: center;
    color: var(--mn-text-muted, #9ca3af);
    font-size: 12.5px;
}
.tl-icmt {
    display: flex;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
    line-height: 1.55;
}
.tl-icmt-avatar { flex: 0 0 auto; }
.tl-icmt-body { flex: 1 1 auto; min-width: 0; }
.tl-icmt-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 2px;
}
.tl-icmt-user {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mn-primary, #0066cc);
}
.tl-icmt-time {
    font-size: 11px;
    color: var(--mn-text-muted, #9ca3af);
}
.tl-icmt-reply {
    border: 0;
    background: transparent;
    color: var(--mn-text-muted, #9ca3af);
    font-size: 12px;
    padding: 0;
    cursor: pointer;
}
.tl-icmt-reply:hover { color: var(--mn-primary, #0066cc); }
.tl-icmt-del {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--mn-text-muted, #9ca3af);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}
.tl-icmt-del:hover { color: var(--mn-danger, #ef4444); }
.tl-icmt-text {
    font-size: 13px;
    color: var(--mn-text, #374151);
    word-break: break-word;
    white-space: pre-wrap;
}
.tl-inline-editor { margin-top: 4px; }
.tl-inline-reply-tip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    margin-bottom: 6px;
    border-radius: 6px;
    background: var(--mn-primary-subtle, rgba(0, 102, 204, .08));
    color: var(--mn-primary, #0066cc);
    font-size: 12.5px;
}
.tl-inline-cancel-reply {
    margin-left: auto;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--mn-primary, #0066cc);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}
.tl-inline-cancel-reply:hover { background: rgba(0, 102, 204, .15); }
.tl-inline-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.tl-inline-input {
    flex: 1;
    min-width: 0;
    height: 34px;
    padding: 0 14px;
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 999px;
    background: var(--mn-border-light, #f9fafb);
    color: var(--mn-text, #1f2937);
    font-size: 13px;
    box-sizing: border-box;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.tl-inline-input::placeholder { color: var(--mn-text-muted, #9ca3af); }
.tl-inline-input:focus {
    outline: none;
    background: var(--mn-bg-card, #fff);
    border-color: var(--mn-primary, #0066cc);
    box-shadow: 0 0 0 3px var(--mn-primary-subtle, rgba(0, 102, 204, .12));
}
.tl-inline-send {
    flex-shrink: 0;
    height: 34px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: var(--mn-primary, #0066cc);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: opacity .15s;
}
.tl-inline-send:hover { opacity: .88; }
.tl-inline-send:disabled { opacity: .6; cursor: not-allowed; }
.tl-inline-login-tip {
    padding: 8px 12px;
    text-align: center;
    color: var(--mn-text-muted, #9ca3af);
    font-size: 12.5px;
    background: var(--mn-border-light, #f9fafb);
    border-radius: 8px;
}
.tl-inline-login-tip a { color: var(--mn-primary, #0066cc); }

/* ============================================================
 *  15. 后台管理
 * ============================================================ */

.tl-flash {
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 10px;
    background: var(--mn-comp-alert-success-bg, rgba(22, 163, 74, .12));
    color: var(--mn-success, #16a34a);
    font-size: 13px;
    border: 1px solid var(--mn-success, #16a34a);
}
.tl-card {
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 12px;
    background: var(--mn-bg-card, #fff);
}
.tl-tab-panel { display: none; }
.tl-tab-panel.active { display: block; }

.tl-search {
    display: flex;
    gap: 8px;
}
.tl-search .tl-input {
    flex: 1;
    max-width: 400px;
}

.tl-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}
.tl-table th,
.tl-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--mn-border-light, #f3f4f6);
}
.tl-table th {
    background: var(--mn-border-light, #f9fafb);
    color: var(--mn-text, #1f2937);
    font-weight: 600;
}
.tl-table-empty {
    text-align: center;
    color: var(--mn-text-muted, #6b7280);
    padding: 30px 0;
}
.tl-table-content {
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tl-inline-form {
    display: inline-block;
    margin: 0;
}

.tl-input {
    width: 100%;
    max-width: 320px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 8px;
    background: var(--mn-bg-card, #fff);
    color: var(--mn-text, #1f2937);
    font-size: 13px;
    box-sizing: border-box;
}
.tl-input:focus {
    outline: none;
    border-color: var(--mn-primary, #0066cc);
    box-shadow: 0 0 0 3px var(--mn-primary-subtle, rgba(0, 102, 204, .12));
}
.tl-form-rows {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}
.tl-form-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
    align-items: center;
    font-size: 13px;
}
.tl-form-row > span { color: var(--mn-text, #1f2937); }
.tl-checkbox-row {
    grid-template-columns: 200px auto;
}
.tl-checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--mn-primary, #0066cc);
}
.tl-form-title {
    margin: 20px 0 12px;
    font-size: 14px;
    color: var(--mn-text, #1f2937);
    border-top: 1px solid var(--mn-border-light, #f3f4f6);
    padding-top: 16px;
}
.tl-form-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--mn-border-light, #f3f4f6);
}

/* ============================================================
 *  16. 移动端适配
 * ============================================================ */

@media (max-width: 640px) {
    /* 页面容器 */
    .tl-page { padding: 14px; }
    .tl-page > .tl-page-title:first-child { margin-bottom: 12px; }

    /* 首页区块 */
    .tl-home-section {
        padding: 14px;
        margin: 12px 0;
    }
    .tl-home-section > .mn-section-header { margin-bottom: 12px; }

    /* 卡片 */
    .tl-post { padding: 10px 12px; }
    .tl-post-detail { padding: 14px; }
    .tl-avatar { width: 30px; height: 30px; }
    .tl-content { font-size: 13px; }
    .tl-actions { gap: 14px; }

    /* 发布器 */
    .tl-tool-btn { width: 30px; height: 30px; font-size: 15px; }
    .tl-emoji-panel {
        grid-template-columns: repeat(8, 1fr);
        max-width: 100%;
        padding: 8px;
    }
    .tl-emoji-item { font-size: 18px; }

    /* 图片区：竖排 */
    .tl-post-body.has-media { display: block; }
    .tl-post-media {
        width: 100%;
        max-width: 100%;
        margin-bottom: 8px;
    }
    .tl-post-media .tl-images-1 { max-width: 100%; }
    .tl-post-media .tl-images-1 .tl-image {
        width: 100%;
        max-width: 180px;
        height: auto;
        aspect-ratio: 1;
    }
    .tl-post-media .tl-images-2,
    .tl-post-media .tl-images-3,
    .tl-post-media .tl-images-4,
    .tl-post-media .tl-images-5,
    .tl-post-media .tl-images-6,
    .tl-post-media .tl-images-7,
    .tl-post-media .tl-images-8,
    .tl-post-media .tl-images-9 {
        width: 100%;
        max-width: 220px;
    }
    .tl-page .tl-images { max-width: none; }

    /* 分页器：只显示上一页/下一页 */
    .tl-pager-num,
    .tl-pager-gap { display: none; }
    .tl-pager-btn {
        min-width: 68px;
        height: 34px;
    }

    /* 模态框：底部滑出 */
    .tl-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }
    .tl-modal-box {
        max-width: 100%;
        max-height: 88vh;
        border-radius: 14px 14px 0 0;
        animation: tlModalSlideUp .22s cubic-bezier(.2, .8, .2, 1);
    }
    @keyframes tlModalSlideUp {
        from { transform: translateY(100%); }
        to   { transform: translateY(0); }
    }
    .tl-modal-head { padding: 12px 14px; }
    .tl-modal-body { padding: 10px 14px; max-height: 60vh; }
    .tl-modal-foot { padding: 10px 12px; }

    /* 后台 */
    .tl-form-row,
    .tl-checkbox-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .tl-table-content { max-width: 180px; }

    /* 内联评论（备用） */
    .tl-icmt { font-size: 12.5px; }
    .tl-icmt-text { font-size: 12.5px; }
    .tl-inline-input { height: 32px; font-size: 12.5px; }
    .tl-inline-send { height: 32px; padding: 0 12px; font-size: 12.5px; }

    /* 轮播圆点 */
    .tl-carousel-dots {
        gap: 4px;
        margin-top: 8px;
    }
    .tl-carousel-dot {
        flex: 0 0 5px;
        width: 5px;
        height: 5px;
    }
}