/* 延迟屏外区块的布局和绘制，减少移动端首屏工作量；内容仍可被搜索引擎读取。 */
.home-deferred { content-visibility: auto; contain-intrinsic-size: 0 420px; }
/* 首页首屏优先展示更多内容：缩短模块间距，但保留轮播与排行的层级。 */
.home-page-shell > * + * { margin-top: 1rem !important; }
.home-page-shell .home-section-head { margin-bottom: .65rem !important; }
/* 分页小点：悬浮在轮播图底部居中（主流 Hero Banner 做法，不占独立空间） */
/* 统一由轮播窗口负责圆角裁剪，避免相邻 slide 的圆角在切换中露出页面底色。 */
/* 轮播使用固定视口，避免不同摘要长度或图片加载造成整块高度跳动。 */
.fw-swiper { position: relative; overflow: hidden; width:100%; height:230px; min-height:230px; border-radius: 1rem; background:var(--featured-bg); isolation:isolate; box-shadow:0 18px 42px rgba(15,63,116,.18); }
.fw-swiper .swiper-wrapper { height:100%; min-height:100%; will-change: transform; backface-visibility: hidden; }
.fw-swiper .swiper-slide { height:100%; min-height:100%; overflow:hidden; }
.fw-swiper .swiper-slide > a { display:block; height:100%; border-radius: 0 !important; }
.fw-hero-content { min-width:0; height:100%; min-height:230px; max-height:230px; box-sizing:border-box; overflow:hidden; display:grid; grid-template-columns:minmax(0,1.04fr) minmax(300px,.96fr); align-items:center; column-gap:1.5rem; padding:22px 2rem; }
/* 保留轮播完整信息，但用固定行轨道锁住每一层，查看按钮始终在底部。 */
.fw-hero-copy { min-width:0; height:100%; overflow:hidden; display:grid; grid-template-rows:38px 40px 24px 40px; row-gap:5px; align-content:center; }
.fw-hero-copy > div:first-child, .fw-hero-copy h3, .fw-hero-copy p, .fw-hero-copy > div.flex, .fw-hero-cta { margin:0 !important; min-height:0; }
.fw-hero-copy > div:first-child, .fw-hero-cta { justify-self:start; }
.fw-hero-copy h3 { width:100%; height:36px; min-height:36px; max-height:36px; overflow:hidden; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:1; line-height:36px; }
.fw-hero-copy p { width:100%; height:40px; min-height:40px; max-height:40px; overflow:hidden; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-height:20px; }
.fw-hero-copy > div.flex { min-width:0; white-space:nowrap; overflow:hidden; }
.fw-hero-cta { height:40px; min-height:40px; max-height:40px; }
.fw-hero-visual { position:relative; align-items:center; justify-content:center; min-width:0; height:100%; overflow:hidden; }
.fw-hero-visual::before { content:''; position:absolute; inset:8% 4%; border:1px solid rgba(186,230,253,.25); border-radius:1.75rem; background-image:linear-gradient(rgba(186,230,253,.12) 1px,transparent 1px),linear-gradient(90deg,rgba(186,230,253,.12) 1px,transparent 1px); background-size:22px 22px; transform:rotate(-4deg); opacity:.8; }
.fw-hero-visual::after { content:''; position:absolute; width:72%; aspect-ratio:1; border:1px solid rgba(125,211,252,.34); border-radius:1.5rem; transform:rotate(8deg); }
.fw-hero-icon-frame { position:relative; z-index:1; box-sizing:border-box; width:11.25rem; height:11.25rem; max-width:calc(100% - 1rem); max-height:calc(100% - 1rem); aspect-ratio:1; }
.fw-pagination.swiper-pagination {
    position: absolute; bottom: 0.7rem; left: 0; right: 0;
    display: flex; justify-content: center; gap: 0.4rem; z-index: 10;
}
.fw-pagination .swiper-pagination-bullet {
    width: 6px; height: 6px; border-radius: 9999px;
    background: rgba(255,255,255,0.55); opacity: 1;
    border: 1px solid rgba(255,255,255,0.35);
    transition: all 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.fw-pagination .swiper-pagination-bullet-active {
    width: 22px; background: #fff; border-color: #fff; opacity: 1;
}
.home-section-title { display:flex; align-items:center; gap:.6rem; }
.home-section-title::before { content:''; width:4px; height:1.1rem; border-radius:999px; background:linear-gradient(180deg,var(--primary),var(--nav-focus)); box-shadow:0 0 10px color-mix(in srgb,var(--primary) 28%,transparent); }
.featured-shell { border:1px solid color-mix(in srgb, var(--primary) 18%, var(--border)); background:linear-gradient(135deg,var(--primary-lighter),var(--bg-card) 72%); }
.featured-shell .featured-inner { background:var(--featured-bg); }
.software-icon { width:4rem; height:4rem; flex:none; padding:.45rem; border-radius:1rem; overflow:hidden; display:flex; align-items:center; justify-content:center; background:var(--accent); border:1px solid var(--border); }
.software-icon img { width:100%; height:100%; object-fit:contain; display:block; }
.latest-card { height:216px; min-height:216px; overflow:hidden; }
.latest-card-body { min-width:0; min-height:0; height:auto; flex:1 1 auto; overflow:visible; display:flex; flex-direction:column; }
.latest-card-summary { min-height:2.5rem; }
.latest-card-meta { margin-top:auto; min-height:2.25rem; box-sizing:border-box; padding-bottom:.25rem; line-height:1.35; }
.latest-section-shell { min-width:0; }
/* 热门排行统一使用横向滑动卡片，桌面端也不展开成网格。 */
.rank-scroll-wrap { position:relative; min-width:0; }
.rank-scroll {
    display:flex; gap:1rem; overflow-x:auto; overflow-y:hidden; padding:.15rem .05rem .65rem;
    scroll-snap-type:x mandatory; overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch; scrollbar-width:none; scroll-padding-inline:.05rem;
}
.rank-scroll::-webkit-scrollbar { display:none; }
.rank-row {
    flex:0 0 clamp(15.5rem, calc((100% - 3.75rem) / 4), 16rem); height:8rem; min-height:8rem; min-width:0;
    display:grid; grid-template-columns:1.65rem 3rem minmax(0,1fr); align-items:start;
    gap:.4rem .55rem; padding:.65rem .75rem .6rem; contain:layout paint;
    color:var(--text); background:var(--bg-card); border:1px solid var(--border);
    border-radius:1rem; box-shadow:0 1px 3px rgba(15,42,70,.04), 0 8px 22px rgba(15,42,70,.05);
    transform:translateZ(0); backface-visibility:hidden;
    scroll-snap-align:start; transition:box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.rank-row:hover { transform:translateY(-2px); border-color:color-mix(in srgb,var(--primary) 38%,var(--border)); box-shadow:0 16px 30px rgba(15,42,70,.12); }
.rank-row:focus-visible { outline:2px solid var(--primary); outline-offset:3px; }
.rank-number { width:1.65rem; height:1.65rem; border-radius:.5rem; display:flex; align-items:center; justify-content:center; font-size:.76rem; font-weight:750; line-height:1; }
.rank-row-icon { width:3rem; height:3rem; flex:0 0 3rem; grid-column:2; grid-row:1; padding:.3rem; border-radius:.75rem; overflow:hidden; display:flex; align-items:center; justify-content:center; background:var(--accent); border:1px solid var(--primary-light); }
.rank-row-icon img { width:100%; height:100%; object-fit:contain; display:block; }
.rank-row-main { grid-column:3; grid-row:1; min-width:0; display:flex; flex-direction:column; gap:.25rem; }
.rank-row-heading { min-width:0; }
.rank-row-title { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text); font-size:.875rem; font-weight:700; line-height:1.35; }
.rank-row-summary { min-width:0; min-height:2.7em; overflow:hidden; color:var(--text-muted); font-size:.72rem; line-height:1.35; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.rank-row-footer { grid-column:2 / -1; grid-row:2; min-width:0; margin-top:auto; display:flex; align-items:center; gap:.65rem; color:var(--text-muted2); font-size:.68rem; line-height:1.2; }
.rank-row-footer span { display:inline-flex; align-items:center; gap:.22rem; min-width:0; white-space:nowrap; }
.rank-row-category { margin-left:auto; flex:0 0 auto; max-width:8rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rank-row-arrow { display:none; }
.rank-list-empty { flex:1 1 100%; padding:2rem; text-align:center; color:var(--text-muted2); }
.hero-icon-fallback { width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:#bae6fd; }
.hero-icon-fallback-text { font-size:2.5rem; font-weight:800; line-height:1; letter-spacing:.02em; }
.hero-icon-fallback svg { width:42%; height:42%; }
@media (max-width: 767px) {
    /* 首页复用软件卡片组件，移动端与分类/搜索页保持同一高度。 */
    .latest-card { height:216px; min-height:216px; }
    .rank-row { flex-basis:clamp(15.5rem, calc(100vw - 88px), 16rem); height:8rem; min-height:8rem; }
    .rank-row-category { max-width:6.5rem; }
    .fw-swiper { height:200px; min-height:200px; }
    .fw-hero-content { height:100%; min-height:200px; max-height:200px; padding:16px; display:block; }
    /* 进入移动端单列布局后隐藏右侧视觉区，避免图片被挤到轮播底部并裁切。 */
    .fw-hero-visual { display:none !important; }
    .fw-hero-copy { grid-template-rows:28px 20px 20px 36px; row-gap:5px; }
    .fw-hero-copy h3 { height:28px; min-height:28px; max-height:28px; line-height:28px; font-size:1.35rem; }
    .fw-hero-copy p { height:20px; min-height:20px !important; max-height:20px; line-height:20px; -webkit-line-clamp:1; }
    .fw-hero-cta { height:36px; min-height:36px; max-height:36px; padding:8px 16px !important; }
}
@media (min-width: 640px) and (max-width: 900px) {
    .fw-hero-content { grid-template-columns:minmax(0,1fr) minmax(220px,.78fr); column-gap:1rem; padding:18px 1.25rem; }
    .fw-hero-icon-frame { width:10rem; height:10rem; }
}
@media (max-width: 640px) { .home-filter-row { align-items:flex-start; } .home-filter-label { padding-top:.45rem; } .featured-shell .featured-inner { border-radius:1rem; } }
@media (max-width: 359px) { .latest-card { height:224px; min-height:224px; } }
