/**
 * topic-mobile.css — 帖子详情页移动端适配（所有皮肤共享）
 * 对齐参考站 facai/topic.php 布局与字号策略
 */

/* ===== 帖子页白底（覆盖皮肤 theme 色与装饰背景，对齐雷锋站） ===== */
body:has(.bbs-topic-page) {
    background: #fff !important;
    background-image: none !important;
}
.bbs-topic-page.divcontainer,
.bbs-topic-page .divheader,
.bbs-topic-page .divbody,
.bbs-topic-page .divfooter {
    background-color: #fff;
}

/* ===== iOS / WebKit 防自动放大 ===== */
html, body, .divbody, #de-content {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* ===== 帖子页 body 字号阶梯（参考站 topic 内联样式） ===== */
.bbs-topic-page {
    font-family: "\5FAE\8F6F\96C5\9ED1", verdana, Tahoma, arial, sans-serif;
    font-size: 13px;
    font-size: 1.2rem;
}

@media (max-width: 360px) {
    .bbs-topic-page {
        font-size: 12px;
    }
}

@media (min-width: 360px) and (max-width: 399px) {
    .bbs-topic-page {
        font-size: 14px;
    }
}

@media (min-width: 400px) and (max-width: 768px) {
    .bbs-topic-page {
        font-size: 16px;
    }
}

@media (min-width: 769px) and (max-width: 999px) {
    .bbs-topic-page {
        font-size: 18px;
    }
}

/* ===== .divbody rem 三档缩放（补齐 leifeng shell 缺失） ===== */
.bbs-topic-page .divheader,
.bbs-topic-page .divbody,
.bbs-topic-page .divfooter {
    font-size: 1.30rem;
}

@media (min-width: 477px) and (max-width: 767px) {
    .bbs-topic-page .divheader,
    .bbs-topic-page .divbody,
    .bbs-topic-page .divfooter {
        font-size: 1.05rem;
    }
}

@media (max-width: 476px) {
    .bbs-topic-page .divheader,
    .bbs-topic-page .divbody,
    .bbs-topic-page .divfooter {
        font-size: 0.85rem;
    }
}

/* ===== 正文区 #de-content ===== */
.bbs-topic-page #de-content.content {
    padding: 0 10px;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.bbs-topic-page #de-content img {
    max-width: 100%;
    height: auto;
}

/* ===== 标题区 .hxx1 阶梯（参考站逻辑） ===== */
.bbs-topic-page .hxx1 {
    font-size: 16px;
}

@media screen and (max-width: 1030px) {
    .bbs-topic-page .hxx1 {
        font-size: 18px;
    }
}

@media screen and (min-width: 300px) and (max-width: 320px) {
    .bbs-topic-page .hxx1 {
        font-size: 13px;
    }
}

@media screen and (min-width: 321px) and (max-width: 360px) {
    .bbs-topic-page .hxx1 {
        font-size: 14px;
    }
}

@media screen and (min-width: 361px) and (max-width: 480px) {
    .bbs-topic-page .hxx1 {
        font-size: 16px;
    }
}

/* ===== Android 极小屏额外缩小 ===== */
@media (max-width: 319px) {
    .bbs-topic-page .divheader,
    .bbs-topic-page .divbody,
    .bbs-topic-page .divfooter {
        font-size: 0.75rem;
    }
    .bbs-topic-page .fb-head {
        font-size: 13px;
    }
    .bbs-topic-page .no3 {
        font-size: 11px;
    }
}

/* ===== 正文基准 + 发贴机 legacy <font size>（size=4 = 1em） ===== */
@media (min-width: 411px) and (max-width: 768px) {
    .bbs-topic-page #de-content.content {
        font-size: 14px;
    }
}

@media (max-width: 410px) {
    .bbs-topic-page #de-content.content {
        font-size: 12px;
        line-height: 1.28;
        padding-left: 4px;
        padding-right: 4px;
        letter-spacing: -0.02em;
    }
}

@media (max-width: 768px) {
    .bbs-topic-page #de-content font[size="1"],
    .bbs-topic-page #de-content font[size='1'],
    .bbs-topic-page #de-sellcontent font[size="1"],
    .bbs-topic-page #de-sellcontent font[size='1'] {
        font-size: 0.71em !important;
    }

    .bbs-topic-page #de-content font[size="2"],
    .bbs-topic-page #de-content font[size='2'],
    .bbs-topic-page #de-sellcontent font[size="2"],
    .bbs-topic-page #de-sellcontent font[size='2'] {
        font-size: 0.79em !important;
    }

    .bbs-topic-page #de-content font[size="3"],
    .bbs-topic-page #de-content font[size='3'],
    .bbs-topic-page #de-sellcontent font[size="3"],
    .bbs-topic-page #de-sellcontent font[size='3'] {
        font-size: 0.86em !important;
    }

    .bbs-topic-page #de-content font[size="4"],
    .bbs-topic-page #de-content font[size='4'],
    .bbs-topic-page #de-sellcontent font[size="4"],
    .bbs-topic-page #de-sellcontent font[size='4'] {
        font-size: 1em !important;
    }

    .bbs-topic-page #de-content font[size="5"],
    .bbs-topic-page #de-content font[size='5'],
    .bbs-topic-page #de-sellcontent font[size="5"],
    .bbs-topic-page #de-sellcontent font[size='5'] {
        font-size: 1.14em !important;
    }

    .bbs-topic-page #de-content font[size="6"],
    .bbs-topic-page #de-content font[size='6'],
    .bbs-topic-page #de-sellcontent font[size="6"],
    .bbs-topic-page #de-sellcontent font[size='6'] {
        font-size: 1.29em !important;
    }

    .bbs-topic-page #de-content font[size="7"],
    .bbs-topic-page #de-content font[size='7'],
    .bbs-topic-page #de-sellcontent font[size="7"],
    .bbs-topic-page #de-sellcontent font[size='7'] {
        font-size: 1.43em !important;
    }
}

/* 窄屏下 size 5+ 略收紧，避免撑成三行 */
@media (max-width: 410px) {
    .bbs-topic-page #de-content font[size="5"],
    .bbs-topic-page #de-content font[size='5'],
    .bbs-topic-page #de-sellcontent font[size="5"],
    .bbs-topic-page #de-sellcontent font[size='5'] {
        font-size: 1.08em !important;
    }

    .bbs-topic-page #de-content font[size="6"],
    .bbs-topic-page #de-content font[size='6'],
    .bbs-topic-page #de-sellcontent font[size="6"],
    .bbs-topic-page #de-sellcontent font[size='6'] {
        font-size: 1.16em !important;
    }

    .bbs-topic-page #de-content font[size="7"],
    .bbs-topic-page #de-content font[size='7'],
    .bbs-topic-page #de-sellcontent font[size="7"],
    .bbs-topic-page #de-sellcontent font[size='7'] {
        font-size: 1.24em !important;
    }
}

/* ===== 非雷锋分支作者行美化（图二风格） ===== */
.bbs-topic-page .topic-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 4px 0;
}

.bbs-topic-page .topic-author-pill {
    display: inline-block;
    background: linear-gradient(to right, #f50057, #ff6f61);
    color: #fff;
    font-weight: 700;
    border-radius: 3px;
    padding: 1px 7px;
    line-height: 1.45;
}

.bbs-topic-page .topic-author-name {
    color: #1f1f1f;
    background: #fff;
    border-radius: 3px;
    padding: 1px 6px;
    line-height: 1.45;
}

.bbs-topic-page .topic-hits-pill {
    display: inline-block;
    background: #e8f1ff;
    border: 1px solid #c9defc;
    border-radius: 3px;
    color: #2f3f56;
    padding: 1px 6px;
    line-height: 1.45;
}

.bbs-topic-page .topic-hits-value {
    color: #ff2d2d;
    font-weight: 700;
}

.bbs-topic-page .topic-action-btn {
    display: inline-block;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(to bottom, #1ba5ff, #0e7de8);
    border: 1px solid #0f6fd0;
    border-radius: 3px;
    padding: 1px 8px;
    line-height: 1.45;
    font-size: 12px;
}

.bbs-topic-page .topic-action-btn:hover {
    color: #fff;
    text-decoration: none;
}

/* ===== facai 打赏区（zhuomawang / guanjiaopo） ===== */
.bbs-topic-reward-facai {
    margin-top: 10px;
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.45;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.bbs-topic-reward-facai .facai-disclaimer {
    width: 95%;
    box-sizing: border-box;
    padding: 8px 10px;
    line-height: 1.45;
    border: 1px dashed #eda85f;
    background: #fff7dd;
    color: #000;
    margin: 0 auto 10px;
    font-weight: 700;
    font-size: 12px;
}

.bbs-topic-reward-facai .facai-sellcontent {
    width: 95%;
    margin: 0 auto 10px;
}

.bbs-topic-reward-facai .facai-pay-zone {
    width: 95%;
    box-sizing: border-box;
    margin: 0 auto;
    border: 2px solid #cc0000;
    padding: 8px 10px;
}

.bbs-topic-reward-facai .facai-pay-bar {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    text-align: center;
    gap: 10px;
    margin: 0 0 0;
    line-height: 1.5;
}

.bbs-topic-reward-facai .facai-pay-text {
    color: #3366cc;
    font-weight: 700;
    font-size: 13px;
}

.bbs-topic-reward-facai .facai-num {
    color: #e60012;
    font-weight: 700;
    font-size: 13px;
    margin: 0 2px;
}

.bbs-topic-reward-facai .facai-pay-btns {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.bbs-topic-reward-facai .facai-btn {
    display: inline-block;
    text-decoration: none !important;
    color: #fff !important;
    font-weight: 700;
    font-size: 12px;
    line-height: 1.4;
    min-height: 30px;
    padding: 4px 12px;
    border-radius: 5px;
    border: 1px solid transparent;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 2px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    box-sizing: border-box;
}

.bbs-topic-reward-facai .facai-btn-reward {
    background: linear-gradient(to bottom, #dd0000, #aa0000);
    border-color: #990000;
}

.bbs-topic-reward-facai .facai-btn-recharge {
    background: linear-gradient(to bottom, #3366cc, #003399);
    border-color: #002266;
}

.bbs-topic-reward-facai .facai-btn:hover {
    color: #fff !important;
    text-decoration: none !important;
    filter: brightness(1.05);
}

.bbs-topic-reward-facai .facai-steps {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    line-height: 1.45;
    border: 1px dashed #eda85f;
    background: #fff7dd;
    color: #000;
    margin: 10px 0 0;
    font-weight: 700;
    font-size: 12px;
}

.bbs-topic-reward-facai .facai-steps-inner {
    font-weight: 700;
    line-height: 1.5;
    font-size: 12px;
}

.bbs-topic-reward-facai .facai-step-label {
    color: #f00;
}

.bbs-topic-reward-facai .facai-step-body {
    color: #8c1aff;
    display: block;
}

.bbs-topic-reward-facai .facai-step-gap {
    height: 10px;
}

.bbs-topic-reward-facai .facai-pill {
    display: inline-block;
    text-decoration: none !important;
    border-radius: 50px;
    padding: 2px 8px;
    font-weight: 700;
    font-size: 11px;
    margin-left: 2px;
    margin-top: 4px;
}

.bbs-topic-reward-facai .facai-pill-reg {
    background-color: #ff0000;
    color: #ffff00 !important;
}

.bbs-topic-reward-facai .facai-pill-login {
    background-color: #0000ff;
    color: #ffffff !important;
}

@media (max-width: 480px) {
    .bbs-topic-reward-facai .facai-disclaimer {
        font-size: 11px;
        padding: 6px 8px;
    }
    .bbs-topic-reward-facai .facai-pay-text,
    .bbs-topic-reward-facai .facai-num {
        font-size: 12px;
    }
    .bbs-topic-reward-facai .facai-btn {
        font-size: 11px;
        padding: 4px 10px;
        min-height: 28px;
    }
    .bbs-topic-reward-facai .facai-steps,
    .bbs-topic-reward-facai .facai-steps-inner {
        font-size: 11px;
    }
    .bbs-topic-reward-facai .facai-pill {
        font-size: 10px;
        padding: 2px 7px;
    }
}

@media (max-width: 360px) {
    .bbs-topic-reward-facai .facai-disclaimer {
        font-size: 10px;
    }
    .bbs-topic-reward-facai .facai-pay-text,
    .bbs-topic-reward-facai .facai-num {
        font-size: 11px;
    }
    .bbs-topic-reward-facai .facai-btn {
        font-size: 11px;
        padding: 3px 8px;
        min-height: 26px;
    }
    .bbs-topic-reward-facai .facai-steps,
    .bbs-topic-reward-facai .facai-steps-inner {
        font-size: 10px;
    }
    .bbs-topic-reward-facai .facai-pill {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* ===== leifeng s7-box 打赏区移动端适配 ===== */
.bbs-topic-reward-lf {
    margin-top: 10px;
    margin-bottom: 8px;
}

.bbs-topic-reward-lf .s7-box {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.bbs-topic-reward-lf #lf-buy-steps.s7-steps {
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 560px) {
    .bbs-topic-reward-lf .s7-title {
        flex-wrap: wrap;
    }

    .bbs-topic-reward-lf .s7-wd {
        width: 100%;
        margin-bottom: 6px;
        white-space: normal;
        height: auto;
        line-height: 1.4;
    }

    .bbs-topic-reward-lf .s7-cc {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .bbs-topic-reward-lf .s7-cat.custom-gradient-btn {
        font-size: 10px;
        padding: 4px 6px;
        margin-right: 4px;
        margin-bottom: 4px;
    }

    .bbs-topic-reward-lf .s7-show {
        background: transparent;
        color: #3366cc;
        border-radius: 0;
        padding: 6px 4px;
        font-size: 14px;
        font-weight: 700;
    }

    .bbs-topic-reward-lf .s7-num-pill {
        color: #e60012;
        background: transparent;
        padding: 0 2px;
        border-radius: 0;
        font-size: 15px;
    }

    .bbs-topic-reward-lf .s7-pay {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .bbs-topic-reward-lf .s7-pay-btn {
        margin-right: 0;
        margin-bottom: 0;
        font-size: 15px !important;
        padding: 0;
    }

    .bbs-topic-reward-lf .s7-pay-btn a {
        line-height: 1.4;
        padding: 6px 14px;
        font-size: 15px;
    }

    .bbs-topic-reward-lf .s7-steps a {
        display: inline-block;
        margin-top: 4px;
        padding: 4px 12px !important;
    }
}

/* 底部站点横幅跟随各 skin 顶部主题色 */
.lf-topic-reward .lf-title td {
  background: var(--bbs-header-bg, #1783fc) !important;
  color: #fff !important;
}
.lf-topic-reward .lf-title td font {
  color: #fff !important;
}

