html {
  font-size: 62.5%;
}

@media (min-width: 1000px) {
  #mods.cn-mods {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 680px) {
  #mods.cn-mods {
    margin-top: -20px;
  }
}

/* 顶部 Hero 底部缝/闪烁处理：让 Hero 底部渐隐，和下方 body 辉光连续。 */
.cn-hero {
  -webkit-mask-image: linear-gradient(
    180deg,
    #000 calc(100% - 30px),
    transparent
  );
  mask-image: linear-gradient(
    180deg,
    #000 calc(100% - 30px),
    transparent
  );
}

.cn-hero .cn-slide__bg img {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
}

.cn-theme-video {
  --m: var(--m-video);
}

.cn-theme-novel {
  --m: var(--m-novel);
}

.cn-theme-comic {
  --m: var(--m-comic);
}

.cn-theme-audio {
  --m: var(--m-audio);
}

.cn-theme-ai {
  --m: var(--m-ai);
}

.cn-mod--novel {
  --c: var(--m-novel);
}

.cn-mod--video {
  --c: var(--m-video);
}

.cn-mod--comic {
  --c: var(--m-comic);
}

.cn-mod--audio {
  --c: var(--m-audio);
}

/* AI 创作 / APP 下载这两个跳板的图标跟其它频道一样用 logo 红，不跟 --m-ai 走：
   --m-ai 在暗色/noir 下是薄荷绿(#7BE0C6，AI 频道自己的品牌色)，摆在这一排红图标里会跳出来。
   AI 频道内部(ai-product.css、home.css 的 .ai-cine__k 等)仍用 --m-ai，别顺手一起改。
   取 --m-video 而不是 --crimson：前者在明暗两套主题里都是 logo 红 #FF3B5C，
   后者只在 tokens.dark / noir 里有定义，浅色主题下会取不到值。 */
.cn-mod--ai,
.cn-mod--app {
  --c: var(--m-video);
}

/* 片架标题：副标题换行到大标题下方，并与“查看全部”同处第二行。 */
.cn-rail__head {
  flex-wrap: wrap;
  column-gap: 14px;
}

#rails .cn-rail__head {
  row-gap: 9px;
}

.cn-rail__head h2 {
  flex: 0 0 100%;
  margin: 0;
}

/* AI 创作成果卡：渐变占位 + 工具标签 + AI 徽标 + 标题热度。 */
.ai-rc {
  flex: 0 0 auto;
  width: clamp(150px, 42vw, 182px);
  scroll-snap-align: start;
  text-decoration: none;
}

.ai-rc--crimson {
  --g1: #ff3b5c;
  --g2: #1a0d14;
}

.ai-rc--blue {
  --g1: #4fa8ff;
  --g2: #0a1830;
}

.ai-rc--cyan {
  --g1: #2bc0d4;
  --g2: #0a2229;
}

.ai-rc--pink {
  --g1: #ff5fd2;
  --g2: #18062b;
}

.ai-rc--gold {
  --g1: #e6b873;
  --g2: #241a0d;
}

.ai-rc--violet {
  --g1: #9b6bff;
  --g2: #140a22;
}

.ai-rc--soft-blue {
  --g1: #7aa6ff;
  --g2: #101830;
}

.ai-rc--mint {
  --g1: #5fc9b0;
  --g2: #0f2420;
}

.ai-rc--green {
  --g1: #3de0a8;
  --g2: #07241a;
}

.ai-rc--orange {
  --g1: #ff8a3d;
  --g2: #2a1408;
}

.ai-rc--lavender {
  --g1: #c9a0ff;
  --g2: #1c1430;
}

.ai-rc--rose {
  --g1: #ff6177;
  --g2: #2a0d14;
}

.ai-rc__fr {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-cover);
  background: linear-gradient(
    150deg,
    var(--g1, #ff3b5c),
    var(--g2, #1a0d14)
  );
  transition:
    transform 0.34s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.34s;
}

.ai-rc:hover .ai-rc__fr {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -16px var(--g1, #ff3b5c);
}

.ai-rc__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.ai-rc__fr::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(
    130% 90% at 50% -10%,
    rgba(255, 255, 255, 0.18),
    transparent 55%
  );
}

.ai-rc__fr::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    transparent 42%,
    rgba(0, 0, 0, 0.62)
  );
}

.ai-rc__tool,
.ai-rc__ai,
.ai-rc__cap,
.ai-rc__cmp {
  position: absolute;
  z-index: 2;
}

.ai-rc__tool {
  left: 9px;
  top: 9px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
}

.ai-rc__ai {
  right: 9px;
  top: 9px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  padding: 3px 8px;
  border-radius: 999px;
}

.ai-rc__ai svg {
  width: 11px;
  height: 11px;
}

.ai-rc__cap {
  left: 0;
  right: 0;
  bottom: 0;
  padding: 11px 12px 12px;
}

.ai-rc__cap .t {
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  line-height: 1.25;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-rc__cap .m {
  margin-top: 3px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
}

.ai-rc__cmp {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0.88;
  transition:
    opacity 0.25s,
    transform 0.25s,
    background 0.25s;
}

.ai-rc:hover .ai-rc__cmp {
  opacity: 1;
  background: rgba(0, 0, 0, 0.58);
  transform: translate(-50%, -50%) scale(1.08);
}

.ai-rc__cmp svg {
  width: 19px;
  height: 19px;
}

.ai-rc__fr--empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-rc__fr--empty .ai-rc__glyph {
  position: relative;
  z-index: 2;
  width: 38px;
  height: 38px;
  color: rgba(255, 255, 255, 0.85);
}
