/* 首页分栏：一行露出 3 张竖版海报，横向滚动 */

.m-home-rail {
  margin-top: 0.36rem;
  max-width: 100%;
  overflow: hidden;
}

.m-home-rail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.16rem;
  min-width: 0;
  margin-bottom: 0.16rem;
  padding: 0 0.24rem;
}

.m-home-rail__title {
  display: flex;
  align-items: center;
  gap: 0.08rem;
  min-width: 0;
  margin: 0;
  color: #fff;
  font-size: 0.32rem;
  font-weight: 700;
  line-height: 1.2;
}

.m-home-rail__title svg {
  width: 0.36rem;
  height: 0.36rem;
  flex: none;
  fill: none;
  stroke: #ff2d6a;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.m-home-rail__name-btn,
.m-home-rail__more,
.m-home-rail__hit {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.m-home-rail__name-btn {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.m-home-rail__more {
  flex: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.24rem;
  line-height: 1;
  white-space: nowrap;
}

.m-home-rail__empty {
  margin: 0;
  padding: 0.12rem 0.24rem 0.2rem;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.24rem;
}

.m-home-rail__grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.16rem;
  margin: 0;
  padding: 0 0.24rem 0.04rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  list-style: none;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.m-home-rail__grid::-webkit-scrollbar {
  display: none;
}

.m-home-genre__title {
  padding: 0.2rem 0.24rem 0.16rem;
  color: #fff;
  font-size: 0.32rem;
  font-weight: 700;
  line-height: 1.2;
}

.m-home-genre__empty {
  margin: 0.4rem 0.24rem;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.26rem;
}

.m-home-genre__more {
  height: 1px;
}

.m-home-rail__card {
  flex: 0 0 calc((100% - 0.16rem * 3 - 0.28rem) / 3);
  width: calc((100% - 0.16rem * 3 - 0.28rem) / 3);
  min-width: 0;
  max-width: none;
  scroll-snap-align: start;
}

.m-home-rail__hit {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.1rem;
  width: 100%;
  min-width: 0;
  text-align: left;
}

.m-home-rail__poster {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 0.12rem;
  background: #161616;
}

.m-home-rail__poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.m-home-rail__heatbar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.04rem;
  padding: 0.36rem 0.1rem 0.08rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  color: #fff;
  font-size: 0.2rem;
  line-height: 1;
}

.m-home-rail__heatbar svg {
  width: 0.16rem;
  height: 0.16rem;
  flex: none;
}

.m-home-rail__heatbar span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m-home-rail__rank {
  position: absolute;
  top: 0.04rem;
  left: 0.04rem;
  z-index: 1;
  min-width: 0.28rem;
  height: 0.28rem;
  padding: 0 0.04rem;
  border-radius: 0.06rem;
  background: #ff2d6a;
  color: #fff;
  font-size: 0.18rem;
  font-style: normal;
  font-weight: 700;
  line-height: 0.28rem;
  text-align: center;
}

.m-home-rail__rank[data-rank='2'] {
  background: #ff7a1a;
}

.m-home-rail__rank[data-rank='3'] {
  background: #e2b000;
  color: #1a1a1a;
}

.m-home-rail__name {
  display: -webkit-box;
  min-height: calc(0.26rem * 1.3 * 2);
  overflow: hidden;
  color: #fff;
  font-size: 0.26rem;
  font-weight: 500;
  line-height: 1.3;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.m-home-rail__status {
  display: flex;
  align-items: center;
  gap: 0.04rem;
  min-width: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.18rem;
  line-height: 1.2;
}

.m-home-rail__ep,
.m-home-rail__heat {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m-home-rail__flame {
  width: 0.2rem;
  height: 0.2rem;
  flex: none;
  color: #ff2d6a;
}

.m-home-rail__bar {
  display: block;
  width: 100%;
  height: 0.04rem;
  margin-top: 0.06rem;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
}

.m-home-rail__bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #ff2d6a;
}

.m-home-rail__status:has(.m-home-rail__bar) {
  flex-wrap: wrap;
}

.m-home-rail__ep {
  flex: 1 1 auto;
}

.m-home-rail__bar {
  flex: 1 0 100%;
}

.m-home-rail__pill {
  position: absolute;
  top: 0.04rem;
  right: 0.04rem;
  z-index: 1;
  max-width: calc(100% - 0.08rem);
  overflow: hidden;
  padding: 0.02rem 0.06rem;
  border-radius: 99px;
  background: #ff2d6a;
  color: #fff;
  font-size: 0.16rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m-home-rail__pill[data-tone='done'] {
  background: #7a4dff;
}

/* 分类列表：三列网格，向下排，不走横向滚动条 */
.m-home-genre-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: row;
  gap: 0.2rem 0.12rem;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 0.24rem 0.4rem;
  box-sizing: border-box;
  list-style: none;
  overflow: visible;
}

.m-home-genre-grid > .m-home-rail__card {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  flex: none;
  scroll-snap-align: unset;
}
