/* 成语模式 & 卡片平台图标 */
.posts-item.style-post-idiom,
.posts-item.style-sites-idiom {
    flex-direction: row;
    align-items: stretch;
    padding: 0 !important;
    overflow: hidden;
    border-radius: 16px;
    min-height: 0;
    background: var(--main-bg-color);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: relative;
}
.posts-item.style-post-idiom {
    aspect-ratio: 4 / 1;
}
.posts-item.style-sites-idiom {
    aspect-ratio: 5 / 1;
}
.posts-item.style-post-idiom:hover,
.posts-item.style-sites-idiom:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}
.posts-item.style-post-idiom .item-header,
.posts-item.style-sites-idiom .item-header {
    flex: 0 0 auto;
    width: auto;
    height: 100%;
    aspect-ratio: 2 / 1;
    max-width: none;
    margin: 0 !important;
    position: relative;
    overflow: hidden;
    align-self: stretch;
}
.posts-item.style-post-idiom .idiom-cover,
.posts-item.style-sites-idiom .idiom-cover {
    position: absolute;
    top: -20px;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(100% + 20px);
    min-height: calc(100% + 20px);
    overflow: hidden;
    border-radius: 0;
    container-type: size;
}
.posts-item.style-post-idiom .idiom-cover {
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.22) 0%,
            transparent 42%,
            rgba(0, 0, 0, 0.08) 100%
        ),
        linear-gradient(90deg, var(--idiom-bg, #10b981), color-mix(in srgb, var(--idiom-bg, #10b981) 82%, #000 18%));
}
.posts-item.style-sites-idiom .idiom-cover {
    background-color: #0a0a0a;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}
.posts-item.style-post-idiom .idiom-chars {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: clamp(32px, 6.5vw, 60px);
    font-weight: 800;
    letter-spacing: 0.35em;
    color: rgba(255, 255, 255, 0.36);
    white-space: nowrap;
    user-select: none;
    pointer-events: none;
    z-index: 1;
    margin: 0;
    padding: 0;
    line-height: 1;
}
.posts-item.style-post-idiom .idiom-chars-left,
.posts-item.style-post-idiom .idiom-chars-right {
    flex: 0 1 auto;
    min-width: 0;
}
.posts-item.style-post-idiom .idiom-chars-left {
    text-align: right;
}
.posts-item.style-post-idiom .idiom-chars-right {
    text-align: left;
}
.posts-item.style-post-idiom .idiom-chars-gap {
    flex: 0 0 40cqh;
    width: 40cqh;
    max-width: 45%;
    height: 1px;
}
.posts-item.style-sites-idiom .idiom-chars {
    display: none;
}
/* 图标/图片：网址 25%，文章略大 */
.posts-item.style-post-idiom .idiom-icon--app,
.posts-item.style-post-idiom .idiom-icon--photo,
.posts-item.style-sites-idiom .idiom-icon--app,
.posts-item.style-sites-idiom .idiom-icon--photo {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: block;
    width: auto;
    padding: 0;
    margin: 0;
    text-decoration: none;
    transform: translate(-50%, -50%);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.posts-item.style-post-idiom .idiom-icon--app,
.posts-item.style-post-idiom .idiom-icon--photo {
    height: 32%;
}
.posts-item.style-sites-idiom .idiom-icon--app,
.posts-item.style-sites-idiom .idiom-icon--photo {
    height: 25%;
}
/* 方形 LOGO：轻拟物 + 方形圆角，外圈为原 1/4（约 2px） */
.posts-item.style-post-idiom .idiom-icon--app,
.posts-item.style-sites-idiom .idiom-icon--app {
    aspect-ratio: 1;
    border-radius: 18%;
    background: linear-gradient(145deg, #ffffff, #eef1f5);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.38),
        4px 4px 12px rgba(0, 0, 0, 0.12),
        -3px -3px 10px rgba(255, 255, 255, 0.82),
        inset 0 1px 1px rgba(255, 255, 255, 0.95);
}
.posts-item.style-post-idiom:hover .idiom-icon--app,
.posts-item.style-sites-idiom:hover .idiom-icon--app {
    transform: translate(-50%, -50%) scale(1.04);
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.44),
        6px 6px 16px rgba(0, 0, 0, 0.14),
        -4px -4px 12px rgba(255, 255, 255, 0.88),
        inset 0 1px 1px rgba(255, 255, 255, 1);
}
.posts-item.style-post-idiom .idiom-icon--app img,
.posts-item.style-sites-idiom .idiom-icon--app img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14%;
    display: block;
}

/* 封面图：方形裁剪 + 圆角，外圈 2px */
.posts-item.style-post-idiom .idiom-icon--photo,
.posts-item.style-sites-idiom .idiom-icon--photo {
    aspect-ratio: 1;
    line-height: 0;
    background: transparent;
    border-radius: 18%;
    overflow: hidden;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.38),
        4px 4px 12px rgba(0, 0, 0, 0.12);
}
.posts-item.style-post-idiom:hover .idiom-icon--photo,
.posts-item.style-sites-idiom:hover .idiom-icon--photo {
    transform: translate(-50%, -50%) scale(1.03);
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.44),
        6px 8px 18px rgba(0, 0, 0, 0.14);
}
.posts-item.style-post-idiom .idiom-icon--photo .idiom-icon-img,
.posts-item.style-sites-idiom .idiom-icon--photo .idiom-icon-img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 14%;
    object-fit: cover;
    object-position: center center;
    vertical-align: top;
}
.posts-item.style-post-idiom.capsule-cover-right,
.posts-item.style-sites-idiom.capsule-cover-right {
    flex-direction: row-reverse;
}
.posts-item.style-post-idiom.capsule-cover-right .item-body,
.posts-item.style-sites-idiom.capsule-cover-right .item-body {
    text-align: right;
    align-items: flex-end;
}
.posts-item.style-post-idiom .item-body,
.posts-item.style-sites-idiom .item-body {
    flex: 1;
    padding: 10px 14px 8px;
    position: relative;
    justify-content: flex-start;
    overflow: hidden;
}
.posts-item.style-post-idiom.capsule-cover-right .idiom-cat,
.posts-item.style-post-idiom.capsule-cover-right .item-title,
.posts-item.style-post-idiom.capsule-cover-right .idiom-summary,
.posts-item.style-post-idiom.capsule-cover-right .idiom-foot,
.posts-item.style-sites-idiom.capsule-cover-right .idiom-cat,
.posts-item.style-sites-idiom.capsule-cover-right .item-title,
.posts-item.style-sites-idiom.capsule-cover-right .idiom-summary,
.posts-item.style-sites-idiom.capsule-cover-right .idiom-foot {
    text-align: right;
    width: 100%;
}
.posts-item.style-post-idiom .idiom-cat,
.posts-item.style-sites-idiom .idiom-cat {
    margin-bottom: 2px;
    font-weight: 600;
    line-height: 1.2;
}
.posts-item.style-post-idiom .idiom-cat a {
    text-decoration: none;
    font-size: 10px !important;
}
.posts-item.style-sites-idiom .idiom-cat a {
    text-decoration: none;
    font-size: 12px;
}
.posts-item.style-post-idiom .item-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin: 2px 0 4px;
    min-height: auto;
}
.posts-item.style-sites-idiom .item-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    margin: 2px 0 4px;
    min-height: auto;
}
.posts-item.style-post-idiom .item-title a,
.posts-item.style-sites-idiom .item-title a,
.posts-item.style-sites-idiom .item-title b {
    color: var(--main-color);
}
.posts-item.style-post-idiom .idiom-summary,
.posts-item.style-sites-idiom .idiom-summary {
    line-height: 1.4;
    margin-bottom: 4px;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.posts-item.style-post-idiom .idiom-foot,
.posts-item.style-sites-idiom .idiom-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    color: var(--muted-color);
}
.posts-item.style-post-idiom.capsule-cover-right .idiom-foot,
.posts-item.style-sites-idiom.capsule-cover-right .idiom-foot {
    flex-direction: row-reverse;
}
.posts-item.style-post-idiom .idiom-tags,
.posts-item.style-sites-idiom .idiom-tags {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.posts-item.style-post-idiom .idiom-date,
.posts-item.style-sites-idiom .idiom-date {
    flex-shrink: 0;
    opacity: 0.75;
}

/* 骨架屏 */
.null-post-idiom,
.null-sites-idiom {
    flex-direction: row;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}
.null-post-idiom {
    aspect-ratio: 4 / 1;
}
.null-sites-idiom {
    aspect-ratio: 5 / 1;
}
.null-post-idiom .p-header,
.null-sites-idiom .p-header {
    flex: 0 0 auto;
    width: auto;
    height: 100%;
    aspect-ratio: 2 / 1;
    max-width: none;
    margin: 0;
    position: relative;
}
.null-post-idiom .--image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    border-radius: 0;
    background: linear-gradient(90deg, var(--muted-bg-a-color), var(--muted-bg-color));
}
.null-sites-idiom .--image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    border-radius: 0;
    background: #0a0a0a url('../images/idiom-cover-bg.webp') center center / cover no-repeat;
}
.null-post-idiom .p-meta,
.null-sites-idiom .p-meta {
    flex: 1;
    padding: 10px 14px;
}

@media (max-width: 767.98px) {
    .posts-item.style-post-idiom {
        aspect-ratio: 4 / 1;
        min-height: 80px;
    }
    .posts-item.style-sites-idiom {
        aspect-ratio: 5 / 1;
        min-height: 72px;
    }
    .posts-item.style-post-idiom .item-header,
    .posts-item.style-sites-idiom .item-header {
        height: 100%;
        aspect-ratio: 2 / 1;
    }
    /* 文章封面四字：加大字号，左右各占半宽贴边 */
    .posts-item.style-post-idiom .idiom-chars {
        justify-content: stretch;
        width: 100%;
        padding: 0;
        font-size: clamp(22px, 28cqw, 50px);
        letter-spacing: 0.12em;
    }
    .posts-item.style-post-idiom .idiom-chars-left,
    .posts-item.style-post-idiom .idiom-chars-right {
        flex: 1 1 0;
        min-width: 0;
    }
    .posts-item.style-post-idiom .idiom-chars-left {
        text-align: left;
        padding-left: 6px;
    }
    .posts-item.style-post-idiom .idiom-chars-right {
        text-align: right;
        padding-right: 14px;
    }
    .posts-item.style-post-idiom .idiom-chars-gap {
        flex: 0 0 38cqh;
        width: 38cqh;
        max-width: 46%;
    }
    .posts-item.style-post-idiom .idiom-icon--app,
    .posts-item.style-post-idiom .idiom-icon--photo {
        height: 32%;
    }
    .posts-item.style-sites-idiom .idiom-icon--app,
    .posts-item.style-sites-idiom .idiom-icon--photo {
        height: 25%;
    }
    /* 文章正文：分类缩小、标题加大、各行留距防遮挡 */
    .posts-item.style-post-idiom .item-body {
        padding: 6px 10px 5px;
        gap: 0;
        min-height: 0;
        overflow: hidden;
    }
    .posts-item.style-post-idiom .idiom-cat {
        flex-shrink: 0;
        margin-bottom: 1px;
        line-height: 1.1;
    }
    .posts-item.style-post-idiom .idiom-cat a {
        font-size: 9px !important;
    }
    .posts-item.style-post-idiom .item-title {
        flex-shrink: 0;
        font-size: 15px;
        line-height: 1.22;
        margin: 0 0 2px;
    }
    .posts-item.style-post-idiom .idiom-summary {
        flex-shrink: 1;
        min-height: 0;
        font-size: 10px;
        line-height: 1.2;
        margin-bottom: 1px;
    }
    .posts-item.style-post-idiom .idiom-foot {
        flex-shrink: 0;
        font-size: 10px;
        line-height: 1.15;
        margin-top: auto;
    }
    .posts-item.style-sites-idiom .item-title {
        font-size: 12px;
    }
    .posts-item.style-sites-idiom .idiom-summary {
        font-size: 10px;
    }
}
