/* 首页性能优化：只对侧栏小工具做懒绘制，避免首页模块负 margin / 嵌套 home_row 被截断 */
@supports (content-visibility: auto) {
    body.home .home_row .widget-area .widget,
    body.blog .home_row .widget-area .widget {
        content-visibility: auto;
        contain-intrinsic-size: 1px 360px;
    }
}

.dahai-home-module-placeholder {
    min-height: 260px;
}

.dahai-home-module-placeholder > div {
    width: 100%;
}

.dahai-home-module-skeleton {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    margin: 0 0 16px;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(246, 248, 252, .92), rgba(236, 242, 250, .92), rgba(246, 248, 252, .92));
    color: #8a94a6;
    font-size: 14px;
}

.dahai-home-module-skeleton::before {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .65), transparent);
    animation: dahaiHomeSkeleton 1.35s ease-in-out infinite;
}

.dahai-home-module-skeleton span {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    border-radius: 50%;
    border: 2px solid rgba(47, 125, 246, .25);
    border-top-color: rgba(47, 125, 246, .85);
    animation: dahaiHomeSpin .8s linear infinite;
}

.dahai-home-module-skeleton strong {
    position: relative;
    z-index: 1;
    font-weight: 500;
}

.dahai-home-module-placeholder.is-error .dahai-home-module-skeleton {
    cursor: pointer;
    color: #f04438;
}

body.night .dahai-home-module-skeleton {
    background: linear-gradient(90deg, rgba(35, 39, 48, .92), rgba(44, 49, 60, .92), rgba(35, 39, 48, .92));
    color: rgba(255, 255, 255, .72);
}

@keyframes dahaiHomeSkeleton {
    100% { transform: translateX(100%); }
}

@keyframes dahaiHomeSpin {
    to { transform: rotate(360deg); }
}
