/* 绿泡泡短剧 首页六列封面修复 / 2026-11-07
 * 修复原因：实际首页使用 .lv-small-posters / .lv-small-poster-item，
 * 旧样式误写成 .row / .card，导致卡片竖向堆叠。
 * 仅影响首页普通推荐区；不改 TOP10、短剧片库、播放器。
 */

/* 首页推荐区：一排六张，铺满 shell 宽度 */
html body main.shell > section.section > div.lv-small-posters {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  grid-auto-flow: row !important;
  gap: 24px 20px !important;
  align-items: start !important;
  justify-items: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

/* 外层子项，必须取消先前固定90px / 纵向堆叠规则 */
html body main.shell > section.section > div.lv-small-posters > div.lv-small-poster-item {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  float: none !important;
  clear: none !important;
  grid-column: auto !important;
  grid-row: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

/* 每张卡片占据自己的网格单元 */
html body main.shell > section.section > div.lv-small-posters > div.lv-small-poster-item > a.card {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  flex: none !important;
  transform: none !important;
  box-sizing: border-box !important;
}

/* 统一2:3竖版封面 */
html body main.shell > section.section > div.lv-small-posters > div.lv-small-poster-item .card .poster {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  aspect-ratio: 2 / 3 !important;
  overflow: hidden !important;
  border-radius: 11px !important;
  background: #13211b !important;
  box-sizing: border-box !important;
}

/* 不裁切封面内原有文字；少数非竖版资源可能会出现留白 */
html body main.shell > section.section > div.lv-small-posters > div.lv-small-poster-item .card .poster > img {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: contain !important;
  object-position: center !important;
}

/* 标题最多正常换行，不省略 */
html body main.shell > section.section > div.lv-small-posters > div.lv-small-poster-item .card .card-title {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  text-overflow: clip !important;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  margin-top: 8px !important;
}

/* 不显示黄豆原创、大神精选等封面下的来源 */
html body main.shell > section.section > div.lv-small-posters > div.lv-small-poster-item .card .card-meta {
  display: none !important;
}

/* 兼容部分首页仍使用旧 .row 容器的情况 */
html body main.shell > section.section > div.row {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 24px 20px !important;
  width: 100% !important;
}
html body main.shell > section.section > div.row > a.card {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  grid-column: auto !important;
}
html body main.shell > section.section > div.row .card-meta { display: none !important; }

/* 平板：4列 */
@media (min-width: 701px) and (max-width: 950px) {
  html body main.shell > section.section > div.lv-small-posters,
  html body main.shell > section.section > div.row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px 14px !important;
  }
}

/* 手机：3列 */
@media (max-width: 700px) {
  html body main.shell > section.section > div.lv-small-posters,
  html body main.shell > section.section > div.row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px 9px !important;
  }
  html body main.shell > section.section > div.lv-small-posters > div.lv-small-poster-item .card .card-title {
    font-size: 12px !important;
    line-height: 1.4 !important;
  }
}
