/* 媒体卡片：套图左上角只显示图片数，视频封面中央只显示播放按钮。 */
:is(a,div,span):has(> img + .xh-chip){position:relative}
.xh-chip{position:absolute;left:8px;top:8px;z-index:2;display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:5px;font-size:11px;font-weight:600;line-height:1.5;color:#fff;background:rgba(14,16,20,.72);pointer-events:none;font-variant-numeric:tabular-nums}
.xh-chip-v{left:50%;top:50%;width:46px;height:46px;padding:0;border-radius:50%;justify-content:center;background:rgba(14,16,20,.76);transform:translate(-50%,-50%);box-shadow:0 5px 18px rgba(0,0,0,.3);backdrop-filter:blur(2px)}
.xh-chip-v svg{display:block;flex:0 0 auto;margin-left:3px}
.xh-chip-g{background:rgba(14,16,20,.82)}

/* 视频 / 套图标题很长，榜单列、双栏布局里的格子必须允许收缩，否则撑出横向滚动条 */
.rank-lists>*,.layout>*,.container>*{min-width:0}
.rank-item a{min-width:0;overflow:hidden;text-overflow:ellipsis}
@media(max-width:600px){.footer-copyright{white-space:normal}}
.home8-layout>*,.home8-story-item>*{min-width:0}
.home6-layout>*,.home7-layout>*,.home6-featured-item>*,.home7-featured-item>*,.home7-topic-grid>*{min-width:0}

/* 页尾自动续读 */
.xh-feed{max-width:1200px;margin:0 auto;padding:0 16px}
.xh-next-item{margin-top:38px;border-top:1px solid var(--border);padding-top:18px}
.xh-next-head{display:flex;align-items:center;gap:10px;font-size:13px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--accent);margin-bottom:6px}
.xh-next-head::before{content:"";width:18px;height:2px;background:var(--accent)}
.xh-feed .container{margin-top:0}
.xh-feed-sentinel{min-height:1px;text-align:center;color:var(--text-light);font-size:13px}
.xh-feed-sentinel.on{padding:26px 0}

/* XS Pro mobile header is repeated here because kernel.css loads after every
   page-specific stylesheet, many of which still re-declare the header. */
@media (max-width:768px){
header{display:grid;grid-template-columns:minmax(0,1fr) auto;flex-direction:initial;align-items:center;justify-content:stretch;gap:.65rem .75rem;padding:.65rem .75rem;}
.site-title{grid-column:1;grid-row:1;width:auto;min-width:0;max-width:100%;text-align:left;font-size:1.2rem;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
header>nav{grid-column:1/-1;grid-row:2;width:100%;display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-start;gap:.85rem;overflow-x:auto;overflow-y:hidden;padding:.1rem 0 .15rem;scrollbar-width:none;-webkit-overflow-scrolling:touch;}
header>nav::-webkit-scrollbar{display:none;}
header>nav a{flex:0 0 auto;margin:0;white-space:nowrap;font-size:.82rem;}
header>nav .header-menu-list{flex-wrap:nowrap;gap:.85rem;width:max-content;min-width:100%;}
.theme-toggle{grid-column:2;grid-row:1;align-self:center;margin:0;padding:.38rem .7rem;font-size:.8rem;line-height:1.2;white-space:nowrap;}
}

/* Keep flex inputs and the author profile inside a 320px viewport. */
.home3-search-input,.home4-search-input,.main-search-input{min-width:0;}
@media (max-width:480px){
.home3-search-btn,.home4-search-btn{padding-left:.85rem;padding-right:.85rem;}
.main-search-btn{padding-left:14px;padding-right:14px;}
.author-info{min-width:0;width:100%;}
}
