/* ==========================================================================
   社区帖子页样式
   取自 wool2006 项目的论坛模板（public/home/bbs/forum.css 的 tyt- 段），
   类名前缀 tyt 与来源保持一致，便于日后对照。
   只保留了本站在用的部分：标题盒 / 元信息 / 操作栏 / 楼层卡 / 回复卡。
   未移植（本站暂无对应数据或功能）：等级图、传世币打赏、楼中楼、表情面板、版主编辑。
   ========================================================================== */

/* ---------- 面包屑（胶囊条，和标题盒/内容框同一套蓝调） ---------- */
.crumb-forum {
    display: inline-flex; align-items: center; flex-wrap: wrap;
    font-size: 12px; padding: 4px 6px; margin: 0 0 14px;
    background: #F4F8FE; border: 1px solid #D4E5FE; border-radius: 999px;
}
.crumb-forum a { color: #4178B0; padding: 2px 10px; border-radius: 999px; text-decoration: none; transition: background .18s ease, color .18s ease; }
.crumb-forum a:hover { background: #FFF; color: #0B59B2; }
.crumb-forum .sep { color: #A9C3E3; }
.crumb-forum .cur { color: #6B7A8C; font-weight: 600; padding: 2px 10px; }

/* ---------- 标题区（站内通用的文章式标题：深色标题 + 左侧红条 + 灰色元信息） ---------- */
.tyt-top { padding: 2px 0 12px; text-align: left; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tyt-title {
    position: relative; margin: 0 0 8px; padding-left: 13px;
    font-size: 20px; font-weight: 600; letter-spacing: .3px; line-height: 1.5;
    color: var(--ink);
}
.tyt-title::before {
    content: ""; position: absolute; left: 0; top: .3em;
    width: 4px; height: 1.05em; border-radius: 2px; background: var(--brand);
}

/* ---------- 元信息行（左对齐 12px 灰，项之间用 · 分隔） ---------- */
.tyt-meta { color: #999; font-size: 12px; display: flex; justify-content: flex-start; gap: 8px; margin-top: 0; flex-wrap: wrap; }
.tyt-meta > span + span::before { content: "·"; color: #cfc8bb; margin-right: 8px; }
.tyt-author { font-size: 12px; color: #2965B1; }

/* ---------- 操作栏（只看楼主/收藏 + 迷你分页） ---------- */
.tyt-bar { display: flex; justify-content: space-between; align-items: center; gap: 4px; padding: 4px 0; margin-bottom: 2px; }
.tyt-bar-left { display: flex; align-items: center; gap: 6px; }

a.tyt-btn, .tyt-btn {
    color: #333; font-size: 13px;
    background: linear-gradient(#F6F6F6, #EBEBEB);
    border: 1px solid #D9D9D9; border-radius: 2px;
    height: 28px; padding: 0 6px; line-height: 26px;
    text-decoration: none; cursor: pointer; display: inline-block;
}
a.tyt-btn:hover, .tyt-btn:hover { color: #4178B0; border-color: #4178B0; text-decoration: none; }
.tyt-btn-on { color: #4178B0 !important; border-color: #4178B0 !important; }
label.tyt-btn { display: inline-flex; align-items: center; gap: 4px; }

.tyt-pager-mini { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.tyt-pager-mini a, .tyt-pager-mini span.page-num {
    width: 28px; height: 28px; line-height: 26px; text-align: center;
    font-size: 13px; color: #4178B0; background: #FFF;
    border: 1px solid #D9D9D9; border-radius: 2px;
    text-decoration: none; display: inline-block;
}
.tyt-pager-mini a:hover { background: #F0F7FF; border-color: #4178B0; text-decoration: none; }
.tyt-pager-mini span.page-num.active { color: #FFF; background: #4178B0; border-color: #4178B0; }

/* ---------- 主题与楼层包围框（4px 蓝色描边） ---------- */
#topic-body { border: 4px solid #D4E5FE; border-radius: 4px; padding: 12px 14px 24px; margin-bottom: 16px; }

/* ---------- 楼层卡（两栏：左用户栏 + 右正文） ---------- */
.tyt-floor { background: #F7EBD3; border-radius: 6px; padding: 16px 16px 16px 4px; margin-bottom: 16px; }
.tyt-floor-first { background: #FDF3E3; }
.tyt-floor-main { display: flex; gap: 16px; align-items: flex-start; }

/* 左侧用户栏 */
.tyt-side { width: 132px; flex: 0 0 132px; text-align: center; }
.tyt-avatar { width: 92px; height: 92px; margin: 8px auto 0; border: 1px solid #D8C9A6; overflow: hidden; }
.tyt-avatar img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tyt-avatar-none { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 32px; color: #C4B48C; }
.tyt-nick { font-size: 12px; font-weight: 700; color: #6d231a; word-break: break-all; line-height: 18px; }
/* 昵称下面的职业 · 等级（数据来自游戏角色存档） */
.tyt-level-name { font-size: 11px; color: #6d231a; margin-top: 4px; }
.tyt-info { font-size: 11px; color: #6d231a; margin-top: 3px; line-height: 15px; word-break: break-all; }
.tyt-badge { color: #FFF; background: #6d231a; border-radius: 2px; padding: 1px 5px; font-size: 10px; font-weight: 700; margin-left: 6px; vertical-align: 2px; }

/* 右侧内容区 */
.tyt-main { flex: 1; min-width: 0; }
.tyt-main-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; margin-bottom: 8px; flex-wrap: wrap; gap: 8px; }
.tyt-top-acts { display: inline-flex; align-items: center; gap: 14px; }
.tyt-body { font-size: 16px; color: #262626; line-height: 24px; letter-spacing: .5px; word-break: break-all; }
.tyt-body p { line-height: 1.8em; margin: 0 0 1.4em; }
.tyt-body p:last-child { margin-bottom: 0; }

/* 楼层标签与操作链接 */
.tyt-floor-tag { font-size: 12px; font-weight: 700; color: #4178B0; }
a.tyt-action { font-size: 12px; color: rgba(0, 0, 0, .65); text-decoration: none; cursor: pointer; }
a.tyt-action:hover { color: #4178B0; text-decoration: none; }
a.tyt-action.on { color: #4178B0; }

/* ---------- 楼中楼（挂在根楼层下方，扁平展示，回复谁看 @昵称） ---------- */
.tyt-subs { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #D9C9A8; }
.tyt-sub { background: rgba(255, 255, 255, .55); border-radius: 4px; padding: 8px 12px; margin-bottom: 6px; font-size: 14px; line-height: 1.75; color: #262626; }
.tyt-sub:last-child { margin-bottom: 0; }
.tyt-sub-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: #8A7A5E; }
.tyt-sub-av { width: 20px; height: 20px; border-radius: 3px; object-fit: cover; }
.tyt-sub-user { color: #6d231a; font-weight: 700; }
.tyt-sub-head .tyt-badge { margin-left: 0; vertical-align: 0; }
.tyt-sub-to { color: #8A7A5E; }
.tyt-sub-meta { color: #A2937A; }
.tyt-sub-content { margin-top: 4px; word-break: break-all; }
/* 显式 inline-block：全站 main.css 的 img{display:block} 会让表情独占一行 */
.tyt-sub-content img.bb-emote { display: inline-block; width: 24px; height: 24px; vertical-align: middle; }

/* 楼中楼就地回复框：和底部回复框同一套富文本编辑器 */
.tyt-sub-box { margin-top: 10px; padding: 10px 12px; background: #FFFDF8; border: 1px solid #E0D3B8; border-radius: 5px; }
.tyt-sub-box-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #6B6250; margin-bottom: 8px; }
.tyt-sub-box-head b { color: #6d231a; }
.tyt-sub-box-close { margin-left: auto; cursor: pointer; color: #8A7A5E; }
.tyt-sub-box-close:hover { color: #6d231a; }
.tyt-sub-box .tyt-editor { min-height: 80px; max-height: 260px; }
.tyt-sub-box-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.tyt-sub-box-foot .tyt-submit { padding: 6px 20px; }
.tyt-sub-box-msg { font-size: 12px; color: #C00; }

/* ---------- 回复卡（灰底卡 + 蓝底提交按钮） ---------- */
.tyt-reply { margin-top: 20px; }
.tyt-reply-card { background: #EEE; border-radius: 4px; padding: 15px; }
.tyt-reply-row { display: flex; align-items: flex-start; gap: 12px; }
.tyt-reply-main { flex: 1; min-width: 0; }

/* 工具栏 / 编辑器 / 色板 / 表情面板的样式统一放在 forum-editor.css（三个页面共用） */

.tyt-submit { color: #FFF; background: #4178B0; border: none; border-radius: 2px; padding: 8px 24px; font-size: 12px; cursor: pointer; }
.tyt-submit:hover { background: #0B59B2; }
.tyt-submit:disabled { opacity: .6; cursor: not-allowed; }
.tyt-reply-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.tyt-reply-msg { margin: 6px 0; font-size: 12px; color: #C00; min-height: 16px; }
.tyt-msgbox { border: 1px solid #D9D9D9; background: #FCFDFE; border-radius: 4px; padding: 10px 14px; font-size: 13px; color: #666; }

/* ---------- 手机端：用户栏收到正文上方 ---------- */
@media (max-width: 900px) {
    #topic-body { padding: 8px; border-width: 2px; }

    .tyt-bar { flex-wrap: wrap; gap: 8px; }
    .tyt-floor { padding: 10px; margin-bottom: 10px; }
    .tyt-floor-main { flex-direction: column; gap: 8px; }
    .tyt-side {
        width: 100%; flex: none; display: flex; flex-wrap: wrap;
        align-items: center; gap: 4px 8px; text-align: left;
    }
    .tyt-avatar { width: 44px; height: 44px; margin: 0; order: -1; }
    .tyt-nick, .tyt-info, .tyt-level-name { margin-top: 0; }
    .tyt-main { width: 100%; }
    .tyt-body { font-size: 16px; line-height: 1.8; }
}

/* ---------- 管理员编辑主题 ---------- */
/* 元信息里那行"最后由 XX 编辑于…"：颜色稍深一点，跟其它灰字区分开 */
.tyt-edited { color: #b06d1f; }

/* 编辑面板：跟回复卡同一套浅灰卡片（默认隐藏，JS 确认是论坛管理员后才显示） */
.tyt-edit { margin-top: 20px; padding: 15px; background: #EEE; border-radius: 4px; }
.tyt-edit-head { font-size: 15px; font-weight: 700; color: #333; margin-bottom: 10px; }
.tyt-edit-tip { font-size: 12px; font-weight: 400; color: #999; margin-left: 6px; }
.tyt-edit-title {
    width: 100%; height: 36px; padding: 0 10px; margin-bottom: 10px;
    border: 1px solid #ddd; border-radius: 3px; background: #FFF; box-sizing: border-box;
    font-size: 14px; font-family: inherit; color: #333;
}
.tyt-edit-title:focus { border-color: #c9a86a; outline: none; }
.tyt-edit-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; }

