/* synopsis-comments visual-fill r1 (2026-11-28). Loaded only on rolled-out hosts that use the
   reference layouts or the A/B direct player (users 22:02/22:03/22:13: posters not oversized, rows
   filled, no needless wrapping, layout and SEO/GEO untouched).
   Film lists end on whole rows: six per row on wide screens with posters no wider than 168px and the
   spare width shared evenly between them, four for 8-item lists; six (four) on tablets, three on phones.
   Nothing is hidden, removed or reordered; headings, links and structured data are untouched. */
html[data-portal-theme] body.front[class] main :is(.nn24-grid,.nnin-grid,.dd-grid,.jp-grid,.rn-grid,.rn-shelf,.db-channel-grid,.db-catalog,.dpab-related-grid):not(#vf-x){--cms-film-list-columns:repeat(6,minmax(0,168px))}
html[data-portal-theme] body.front[class]:not(:is(.nn24-home,.nnin-home,.dd-home,.jp-home,.rn-home,.db-home)) main :is(.nn24-grid,.nnin-grid,.dd-grid,.jp-grid,.rn-grid,.rn-shelf,.db-channel-grid,.db-catalog,.dpab-related-grid):not(#vf-x){justify-content:space-between}
html[data-portal-theme] body.front[class] main :is(.nn24-grid,.nnin-grid,.dd-grid,.jp-grid,.rn-grid,.rn-shelf,.db-channel-grid,.db-catalog,.dpab-related-grid):not(#vf-x):has(>:nth-child(8):last-child){--cms-film-list-columns:repeat(4,minmax(0,168px))}
@media(max-width:900px){
  html[data-portal-theme] body.front[class] main :is(.nn24-grid,.nnin-grid,.dd-grid,.jp-grid,.rn-grid,.rn-shelf,.db-channel-grid,.db-catalog,.dpab-related-grid):not(#vf-x){--cms-film-list-columns:repeat(6,minmax(0,1fr))}
  html[data-portal-theme] body.front[class] main :is(.nn24-grid,.nnin-grid,.dd-grid,.jp-grid,.rn-grid,.rn-shelf,.db-channel-grid,.db-catalog,.dpab-related-grid):not(#vf-x):has(>:nth-child(8):last-child){--cms-film-list-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:600px){
  html[data-portal-theme] body.front[class] main :is(.nn24-grid,.nnin-grid,.dd-grid,.jp-grid,.rn-grid,.rn-shelf,.db-channel-grid,.db-catalog,.dpab-related-grid):not(#vf-x),
  html[data-portal-theme] body.front[class] main :is(.nn24-grid,.nnin-grid,.dd-grid,.jp-grid,.rn-grid,.rn-shelf,.db-channel-grid,.db-catalog,.dpab-related-grid):not(#vf-x):has(>:nth-child(8):last-child){--cms-film-list-columns:repeat(3,minmax(0,1fr))}
}
/* Homepage shelves are centred flex rows of fixed 160px posters; an 8-item shelf takes two rows of four
   on wide screens instead of six plus a stranded two (narrow screens already use four or three). */
@media(min-width:1001px){
  html[data-portal-theme] body.front:is(.nn24-home,.nnin-home,.dd-home,.jp-home,.rn-home,.db-home) main :is(.nn24-grid,.nnin-grid,.dd-grid,.jp-grid,.rn-grid,.rn-shelf,.db-channel-grid,.ma-ranking):not([hidden]):not(#vf-x):has(>:nth-child(8):last-child){--home-poster-columns:4}
}
/* Portable direct-v2 families (haoju/iqiyi/keke/oletv-direct-v2), same intent: related lists (usually 18),
   actor works, search results and channel rows end on whole rows of six; oversized 300px actor posters and
   two-up phone posters shrink to the size the family's own homepage uses; card meta stays on one line. */
@media(min-width:901px){
  body.tpl-directplay-v2:is(.tpl-haoju-direct-v2,.tpl-iqiyi-direct-v2) :is(.player-related .related-grid,.actor-work-grid):not(#vf-x){grid-template-columns:repeat(6,minmax(0,176px))!important;justify-content:space-between}
  body.tpl-directplay-v2:is(.tpl-haoju-direct-v2,.tpl-iqiyi-direct-v2) .search-results.poster-row:not(#vf-x),
  body.tpl-directplay-v2.tpl-iqiyi-direct-v2.iqiyi-home .channel-section .poster-row:not(#vf-x),
  body.tpl-directplay-v2.tpl-iqiyi-direct-v2 .catalog-results-panel .movie-grid:not(#vf-x){grid-template-columns:repeat(6,minmax(0,1fr))!important}
  body.tpl-directplay-v2.tpl-haoju-direct-v2 .stream-error-recommend .stream-poster-rail:not(#vf-x){grid-template-columns:repeat(8,minmax(0,1fr))!important}
}
body.tpl-directplay-v2.tpl-iqiyi-direct-v2 .not-found-recommend .not-found-card-row:not(#vf-x){grid-template-columns:repeat(8,minmax(112px,132px))}
body.tpl-directplay-v2.tpl-keke-direct-v2 .keke-grid:not([data-moviecms-home-grid]):not(#vf-x){grid-template-columns:repeat(6,minmax(0,1fr))}
@media(max-width:600px){
  body.tpl-directplay-v2:is(.tpl-haoju-direct-v2,.tpl-iqiyi-direct-v2) .actor-work-grid:not(#vf-x),
  body.tpl-directplay-v2.tpl-haoju-direct-v2 .search-results.poster-row:not(#vf-x){grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.tpl-directplay-v2.tpl-keke-direct-v2 .keke-grid:not([data-moviecms-home-grid]):not(#vf-x){grid-template-columns:repeat(3,minmax(0,1fr))}
}
body.tpl-directplay-v2:is(.tpl-keke-direct-v2,.tpl-oletv-direct-v2) .keke-card>p:not(#vf-x){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* Reference layouts and the A/B direct player (users 21:42/21:49 "fields shown", 22:03 "no needless folding"):
   the viewpoint is an open paragraph (the template renders it open on rolled-out hosts) and every editorial
   note on the page is shown, as on the direct-v2 players; nothing is removed, the paging links stay. */
body.front:not(.tpl-directplay-v2) .ref-ai-viewpoint-open:not(#vf-x){margin:8px 0 12px;padding:9px 12px;border-left:3px solid rgba(128,128,128,.45);border-radius:6px;background:rgba(128,128,128,.08);font-size:14px;line-height:1.75}
body.front:not(.tpl-directplay-v2) .ref-ai-viewpoint-open>h3:not(#vf-x){display:inline;margin:0 8px 0 0;font-size:14px;line-height:inherit;font-weight:700}
body.front:not(.tpl-directplay-v2) .ref-ai-viewpoint-open>p:not(#vf-x){display:inline;margin:0;overflow-wrap:anywhere}
body.front:not(.tpl-directplay-v2) .ref-ai-notes>ul>li[hidden]:not(#vf-x){display:block!important}
body.front:not(.tpl-directplay-v2) .ref-ai-notes [data-comments-preview-toggle]:not(#vf-x){display:none!important}
@media(max-width:600px){body.front:not(.tpl-directplay-v2) .ref-ai-viewpoint-open:not(#vf-x){font-size:13px;padding:8px 10px}body.front:not(.tpl-directplay-v2) .ref-ai-viewpoint-open>h3:not(#vf-x){font-size:13px}}
