.xhs-list-wrap {
    margin: 20px 0 30px;
}

/* 首页第4位插入的贴图整块，补齐与普通文章一致的分隔线节奏 */
.tietu-home-list {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e4e8eb;
}

/* 贴图页独立图标字体兜底，避免 PC 端按钮无图标 */
@font-face {
    font-family: "tietu-iconfont";
    src: url("fonts/iconfont.woff2") format("woff2"),
         url("fonts/iconfont.woff") format("woff"),
         url("fonts/iconfont.ttf") format("truetype");
    font-display: swap;
}

.xhs-list-intro {
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    color: #666;
}

.xhs-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.xhs-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform .2s ease, box-shadow .2s ease;
}

.xhs-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.xhs-cover {
    display: block;
    position: relative;
    padding-top: 140%;
    overflow: hidden;
    background: #f5f5f5;
}

.xhs-cover img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.xhs-body {
    padding: 8px 9px 10px;
}

.xhs-title {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    max-height: 2.8em;
    overflow: hidden;
}

.xhs-title a {
    color: #222;
}

.xhs-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #8f8f8f;
    font-size: 12px;
    margin-top: 6px;
    line-height: 1.2;
}

.xhs-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #f0f0f0;
}

.xhs-dot {
    color: #b8b8b8;
    margin: 0 1px;
}

.xhs-views {
    color: #8f8f8f;
}

.xhs-views .iconfont {
    margin-right: 3px;
    font-size: 12px;
    color: #999;
    vertical-align: -1px;
}

.tietu-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.tietu-modal.show {
    display: block;
}

.tietu-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.tietu-modal-dialog {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 88vw;
    height: 82vh;
    max-width: 1320px;
    max-height: 860px;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.tietu-modal-close {
    position: absolute;
    right: 10px;
    top: 8px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    font-size: 22px;
    cursor: pointer;
    z-index: 2;
}

.tietu-modal-main {
    display: grid;
    grid-template-columns: 48% 52%;
    height: 100%;
}

.tietu-modal-left {
    background: #f5f5f5;
    position: relative;
    overflow: hidden;
}

.tietu-modal-carousel {
    width: 100%;
    height: 100%;
    position: relative;
}

.tietu-modal-track {
    height: 100%;
    display: flex;
    transition: transform .3s ease;
}

.tietu-modal-slide {
    min-width: 100%;
    height: 100%;
    background: #f5f5f5;
}

.tietu-modal-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.tietu-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.tietu-modal-nav.prev {
    left: 10px;
}

.tietu-modal-nav.next {
    right: 10px;
}

.tietu-modal-nav.disabled {
    opacity: .35;
    cursor: not-allowed;
    pointer-events: none;
}

.tietu-modal-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 2;
}

.tietu-modal-dots button {
    width: 8px;
    height: 8px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
}

.tietu-modal-dots button.active {
    background: #fff;
}

.tietu-modal-right {
    padding: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tietu-modal-right h2 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
}

.tietu-modal-scroll {
    overflow: auto;
    padding-right: 2px;
    flex: 1;
}

.tietu-modal-content {
    color: #333;
    line-height: 1.9;
}

.tietu-modal-content h1,
.tietu-modal-content h2,
.tietu-modal-content h3,
.tietu-modal-content h4,
.tietu-modal-content h5,
.tietu-modal-content h6 {
    font-weight: 700;
}

/* 弹窗正文仅保留文字，不显示内嵌图片 */
.tietu-modal-content img {
    display: none !important;
}

.tietu-modal-comments {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #eee;
}

/* 弹窗内移除“发表评论”表单，仅保留评论内容展示 */
.tietu-modal-comments #divCommentPost {
    display: none;
}


.tietu-modal-actions {
    flex: 0 0 auto;
    margin-top: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tietu-cmt-entry {
    flex: 1;
    height: 34px;
    line-height: 34px;
    padding: 0 12px;
    border-radius: 18px;
    border: 0;
    outline: 0;
    box-shadow: none;
    background: #f4f4f4;
    color: #9a9a9a;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.tietu-cmt-entry:focus {
    border: 0;
    outline: 0;
    box-shadow: none;
}

.tietu-cmt-send {
    border-radius: 16px;
    background: #f4f4f4;
    padding: 6px 12px;
}

.tietu-cmt-send:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.tietu-actions-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tietu-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 0;
    background: transparent;
    color: #555;
    cursor: pointer;
    padding: 4px 6px;
}

.tietu-action .iconfont {
    font-size: 16px;
    color: #666;
}

/* 双保险：即使 iconfont.css 未生效，也强制显示这几个按钮图标 */
.tietu-action .iconfont::before {
    font-family: "tietu-iconfont" !important;
    font-style: normal;
    font-weight: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.tietu-like .iconfont::before {
    content: "\e60a" !important; /* 点赞 */
}

.tietu-fav .iconfont::before {
    content: "\e6a3" !important; /* 收藏 */
}

.tietu-share .iconfont::before {
    content: "\e6e9" !important; /* 分享 */
}

.tietu-action.copied .iconfont,
.tietu-action.copied {
    color: #16a34a;
}

.tietu-empty-cmt {
    color: #999;
}

.tietu-iframe-wrap {
    width: 100%;
}

.tietu-cmt-iframe {
    width: 100%;
    height: 520px;
    border: 0;
    background: #fff;
}

.xhs-detail-block {
    padding: 0;
    overflow: hidden;
}

.xhs-detail {
    display: flex;
    align-items: stretch;
    min-height: 520px;
}

.xhs-detail-media {
    flex: 0 0 48%;
    background: #f7f7f7;
}

.xhs-detail-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.xhs-detail-content {
    flex: 1;
    padding: 26px 28px;
}

.xhs-detail-content h1 {
    margin: 0 0 12px;
    font-size: 28px;
    line-height: 1.35;
}

.xhs-detail-meta {
    color: #888;
    margin-bottom: 18px;
}

.xhs-meta-mobile {
    display: none;
}

.xhs-detail-main {
    line-height: 1.9;
    color: #333;
}

.xhs-detail-main img {
    max-width: 100%;
    height: auto;
}

.xhs-detail-tags {
    margin-top: 18px;
}

.xhs-detail-tags a {
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff2f2;
    color: #f45a5a;
    font-size: 12px;
}

/* 详情页（PC）：左轮播右内容 */
.tietu-detail {
    display: grid;
    grid-template-columns: 48% 52%;
    gap: 0;
    height: clamp(620px, 82vh, 900px);
    min-height: 0;
}

.tietu-detail-left {
    background: #f5f5f5;
    position: relative;
    overflow: hidden;
    border-radius: 12px 0 0 12px;
    height: 100%;
}

.tietu-detail-right {
    background: #fff;
    padding: 16px 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 0 12px 12px 0;
    min-height: 0;
    height: 100%;
}

.tietu-detail-right h1 {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.35;
    font-weight: 700;
}

/* 详情页：恢复版心并居中显示 */
.tietu-page-content {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.tietu-page-content .xhs-detail-block {
    border-radius: 12px;
}

.tietu-detail-scroll {
    overflow: auto;
    padding-right: 2px;
    flex: 1;
    min-height: 0;
}

.tietu-detail-content {
    color: #333;
    line-height: 1.9;
}

.tietu-detail-comments {
    margin-top: 16px;
}

.tietu-detail-carousel {
    width: 100%;
    height: 100%;
    position: relative;
}

.tietu-detail-track {
    height: 100%;
    display: flex;
    transition: transform .3s ease;
}

.tietu-detail-slide {
    min-width: 100%;
    height: 100%;
    background: #f5f5f5;
}

.tietu-detail-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.tietu-detail-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.tietu-detail-nav.prev { left: 10px; }
.tietu-detail-nav.next { right: 10px; }

.tietu-detail-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 2;
}

.tietu-detail-dots button {
    width: 8px;
    height: 8px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
}

.tietu-detail-dots button.active { background: #fff; }

@media (max-width: 1024px) {
    .xhs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tietu-detail {
        display: block;
        min-height: 0;
    }
    .tietu-detail-left {
        display: none;
    }
    .tietu-detail-right {
        border-radius: 12px;
        padding: 18px 16px;
    }

    .xhs-meta-desktop {
        display: none;
    }

    .xhs-meta-mobile {
        display: block;
        margin-top: 10px;
        margin-bottom: 12px;
    }

    .xhs-mobile-carousel {
        display: block !important;
        margin-bottom: 10px;
    }

    .xhs-mobile-track {
        display: flex;
        gap: 0;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .xhs-mobile-slide {
        min-width: 100%;
        scroll-snap-align: start;
        background: #f5f5f5;
    }

    .xhs-mobile-slide img {
        display: block;
        width: 100%;
        height: min(72vh, 620px);
        min-height: 420px;
        object-fit: cover;
    }
}

.xhs-mobile-carousel {
    display: none;
}
