/* 空 · 水 · 云 · 鸟 —— 首页样式

   只作用于首页（body.home）。全局设计系统在 site.css，这里放首屏 KV、番剧卡、
   已完结区、资讯列表，以及滚动入场 / 顶栏 / 进度线 / 区块色。
*/

.finished-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(230px, 1fr));
  gap:10px;
}

.finished-card{
  display:flex;
  gap:10px;
  align-items:center;
  padding:8px;
  border-radius:var(--radius-sm);
  background:var(--card);
  border:1px solid var(--border);
  color:inherit;
  cursor:pointer;
  transition:border-color .2s var(--ease), background .2s var(--ease);
}

/* 已完结卡现在是真链接（爬虫可见 + 可新标签打开），悬停给一点反馈 */
.finished-card:hover{
  border-color:var(--border-strong);
  background:var(--bg-soft);
}

.fc-cover{
  width:44px;
  height:62px;
  flex:0 0 auto;
  border-radius:6px;
  overflow:hidden;
  background:var(--bg-soft);
}

.fc-cover img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.fc-body{
  min-width:0;
  flex:1;
}

.fc-body h3{
  margin:0 0 2px;
  font-size:var(--fs-sm);
  line-height:1.35;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.fc-jp{
  font-size:var(--fs-2xs);
  color:var(--soft);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.fc-meta{
  display:flex;
  gap:8px;
  align-items:center;
  margin-top:4px;
  font-size:var(--fs-2xs);
  color:var(--muted);
}

.fc-score{
  color:var(--gold);
  font-weight:600;
}

body.home{
  /* expo-out：站内 --ease 不够快，单独给一个 */
  --tate-ease:cubic-bezier(.16, 1, .3, 1);
  /* 后台 titleColors 是为白底选的，压到深色 KV 上会发灰 → 逐字提亮 */
  --tate-c1:#a8c8de;
  /* 空 */
  --tate-c2:#94b5d1;
  /* 水 */
  --tate-c3:#a8b0bd;
  /* 云 */
  --tate-c4:#e4a081;
  /* 鸟 */;
}

/* 满幅用 100vw，防多出横向滚动条 */
html:has(body.home){
  overflow-x:clip;
}

body.home{
  overflow-x:clip;
}

/* 顶到 topbar 下沿 */
body.home .wrap{
  padding-top:0;
}

/* KV 本体：满幅铺开 */
body.home .banner-row{
  position:relative;
  display:block;
  width:100vw;
  margin:0 0 44px calc(50% - 50vw);
  max-width:none;
  height:clamp(420px, 46cqw, 680px);
  min-height:var(--bg-banner-h, 420px);
  /* 后台 backgroundBannerHeight 作高度下限 */
  overflow:hidden;
  isolation:isolate;
  background:#0b0e13;
  container-type:inline-size;
  /* 下方尺寸全用 cqw，随 KV 宽度等比缩放 */;
}

/* 背景图：34s 极慢推近（用 scale/translate，不用 transform） */
body.home .banner-row .banner-img{
  position:absolute;
  inset:0;
  z-index:0;
  flex:none;
  width:100%;
  height:100%;
  max-width:none;
  max-height:none;
  object-fit:cover;
  object-position:54% 40%;
  opacity:1;
  transform:none;
  transition:none;
  border-radius:0;
  box-shadow:none;
  animation:ttKb 34s ease-in-out infinite alternate;
  will-change:scale, translate;
  -webkit-mask-image:linear-gradient(180deg, #000 74%, rgba(0, 0, 0, .4) 93%, transparent 100%);
  mask-image:linear-gradient(180deg, #000 74%, rgba(0, 0, 0, .4) 93%, transparent 100%);
}

@keyframes ttKb{
  from{
    scale:1.05;
    translate:0 0;
  }
  to{
    scale:1.14;
    translate:-1.4% 0;
  }
}

/* 氛围遮罩：左重右轻，压暗左侧托字 */
body.home .banner-row::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
  background:    linear-gradient(90deg, rgba(6, 9, 14, .82) 0%, rgba(6, 9, 14, .56) 24%, rgba(6, 9, 14, .16) 50%, rgba(6, 9, 14, .05) 72%, rgba(6, 9, 14, .32) 100%),     linear-gradient(180deg, rgba(6, 9, 14, .42) 0%, rgba(6, 9, 14, .02) 32%, rgba(6, 9, 14, .48) 100%);
}

/* 立轴：标题列 ｜ 金线 ｜ 罗马字侧栏 ／ 落款印 */
body.home .hero-side{
  position:relative;
  z-index:2;
  display:grid;
  grid-template-columns:auto auto;
  grid-template-rows:auto auto auto;
  align-content:center;
  justify-content:start;
  column-gap:clamp(12px, 1.6cqw, 26px);
  row-gap:clamp(14px, 2.2cqw, 30px);
  min-height:100%;
  padding:clamp(44px, 7cqw, 96px) clamp(24px, 3cqw, 40px) clamp(44px, 6cqw, 80px) clamp(26px, 6.8cqw, 124px);
  text-align:left;
  transform:none;
  opacity:1;
}

body.home .hero-side h1{
  grid-area:1/1;
  writing-mode:vertical-rl;
  font-family:var(--font-display, "Noto Serif SC", "Songti SC", serif);
  font-size:clamp(30px, 5.1cqw, 72px);
  font-weight:300;
  line-height:1.08;
  letter-spacing:.3em;
  padding-top:.3em;
  padding-right:clamp(9px, 1.1cqw, 17px);
  border-right:1px solid rgba(230, 207, 154, .45);
  text-shadow:0 2px 22px rgba(2, 5, 10, .72);
  white-space:nowrap;
  overflow-wrap:normal;
}

/* .sep 由 applyConfig() 生成，竖排下藏掉 */
body.home .hero-side h1 .sep{
  display:none;
}

body.home .hero-side h1>span{
  display:inline-block;
  position:relative;
  top:0;
  will-change:opacity, filter, transform, translate, rotate;
}

/* 罗马字侧栏（伪元素，不加节点） */
body.home .hero-side::before{
  content:"Sora · Mizu · Kumo · Tori";
  grid-area:1/2;
  align-self:start;
  writing-mode:vertical-rl;
  font-family:var(--font-latin, system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif);
  font-size:clamp(8.5px, .95cqw, 11px);
  letter-spacing:.32em;
  padding-top:.32em;
  color:rgba(255, 255, 255, .6);
  text-transform:uppercase;
  white-space:nowrap;
}

/* 落款朱印 */
body.home .hero-side::after{
  content:"KSYN";
  grid-area:2/1;
  justify-self:start;
  display:grid;
  place-items:center;
  width:clamp(32px, 3.2cqw, 40px);
  aspect-ratio:1/1;
  border:1px solid rgba(230, 207, 154, .78);
  border-radius:2px;
  font-family:var(--font-latin, system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif);
  font-size:clamp(7.5px, .8cqw, 10px);
  letter-spacing:.06em;
  color:rgba(236, 214, 164, .95);
  writing-mode:horizontal-tb;
  margin-left:clamp(2px, .5cqw, 8px);
}

/* 副标题（后台 subtitleEnabled 打开时才存在） */
body.home .hero-side .hero-sub{
  grid-area:3/1/4/3;
  margin:0;
  font-size:clamp(11px, 1.1cqw, 13.5px);
  letter-spacing:.22em;
  color:rgba(255, 255, 255, .62);
}

/* 右下角滚动指示 */
body.home .scroll-cue{
  position:absolute;
  z-index:3;
  left:auto;
  right:clamp(20px, 3.4cqw, 52px);
  bottom:clamp(14px, 2.6cqw, 34px);
  transform:none;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  font-size:var(--fs-2xs);
  letter-spacing:.3em;
  text-transform:uppercase;
  color:rgba(255, 255, 255, .55);
  opacity:0;
  animation:ttCue .9s 1.6s ease forwards;
}

@keyframes ttCue{
  to{
    opacity:1;
  }
}

/* 字色提亮：盖掉后台注入的内联 style */
body.home .hero-side h1>span:nth-child(1){
  color:var(--tate-c1)!important;
}

body.home .hero-side h1>span:nth-child(3){
  color:var(--tate-c2)!important;
}

body.home .hero-side h1>span:nth-child(5){
  color:var(--tate-c3)!important;
}

body.home .hero-side h1>span:nth-child(7){
  color:var(--tate-c4)!important;
}

/* 入场动效：四字各有各的运笔 */
body.home .hero-side h1>span:nth-child(1){
  animation:a5In 1.15s var(--tate-ease) .30s both, a5Sky 9.6s ease-in-out -2.4s infinite;
}

body.home .hero-side h1>span:nth-child(3){
  animation:a5In 1.15s var(--tate-ease) .46s both, a5Water 7.2s ease-in-out -4.1s infinite;
}

body.home .hero-side h1>span:nth-child(5){
  animation:a5In 1.15s var(--tate-ease) .62s both, a5Cloud 11s ease-in-out -6.3s infinite;
}

body.home .hero-side h1>span:nth-child(7){
  animation:a5In 1.15s var(--tate-ease) .78s both, a5BirdFloat 8.4s ease-in-out -1.6s infinite, a5BirdTilt 2.6s ease-in-out -.4s infinite;
}

@keyframes a5In{
  0%{
    opacity:0;
    filter:blur(15px);
    transform:translateY(-.24em);
  }
  58%{
    opacity:1;
    filter:blur(1px);
  }
  100%{
    opacity:1;
    filter:blur(0);
    transform:translateY(0);
  }
}

@keyframes a5Sky{
  0%, 100%{
    translate:0 -.02em;
  }
  50%{
    translate:0 -.19em;
  }
}

@keyframes a5Water{
  0%, 100%{
    translate:0 -.06em;
    rotate:.9deg;
  }
  50%{
    translate:0 .10em;
    rotate:-.9deg;
  }
}

@keyframes a5Cloud{
  0%, 100%{
    translate:-.10em 0;
    text-shadow:0 2px 22px rgba(2, 5, 10, .72);
  }
  50%{
    translate:.10em 0;
    text-shadow:0 0 9px rgba(206, 228, 255, .5), 0 2px 22px rgba(2, 5, 10, .6);
  }
}

@keyframes a5BirdFloat{
  0%, 100%{
    translate:0 -.09em;
  }
  50%{
    translate:0 .04em;
  }
}

@keyframes a5BirdTilt{
  0%, 100%{
    rotate:-1.6deg;
  }
  50%{
    rotate:1.6deg;
  }
}

/* 侧栏与朱印的入场 */
@keyframes gfFade{
  from{
    opacity:0;
  }
  to{
    opacity:1;
  }
}

@keyframes gfStamp{
  0%{
    opacity:0;
    transform:scale(1.5) rotate(-8deg);
  }
  55%{
    opacity:1;
    transform:scale(.97) rotate(.6deg);
  }
  100%{
    opacity:1;
    transform:scale(1) rotate(0);
  }
}

body.home .hero-side::before{
  animation:gfFade 1.3s ease 1.2s both;
}

body.home .hero-side::after{
  animation:gfStamp 1.1s var(--tate-ease) 1.45s both;
}

/* 窄屏兜底：竖排横向占宽小，高度会顶满 */
@container (max-width:560px){
  body.home .hero-side{
    padding-left:clamp(22px, 7cqw, 40px);
    column-gap:10px;
  }
  body.home .hero-side::before{
    display:none;
  }
  body.home .hero-side h1{
    font-size:clamp(26px, 7.6cqw, 34px);
  }
  body.home .hero-side{
    grid-template-columns:auto;
  }
}

/* 系统开启「减少动态效果」时全部静止 */
@media (prefers-reduced-motion:reduce){
  body.home .banner-row .banner-img{
    animation:none!important;
    scale:1;
    translate:0 0;
  }
  body.home .hero-side h1>span{
    animation:none!important;
    opacity:1!important;
    filter:none!important;
    transform:none!important;
    translate:none!important;
    rotate:none!important;
  }
  body.home .hero-side::before{
    animation:none!important;
    opacity:1;
  }
  body.home .hero-side::after{
    animation:none!important;
    opacity:1;
    transform:none;
  }
  body.home .scroll-cue{
    animation:none!important;
    opacity:1;
  }
}

/* 下半段色板 */
body.home{
  --ink:#22262c;
  --ink-2:#565d68;
  --ink-3:#8b939f;
  --rule:rgba(34, 38, 44, .14);
  --rule-soft:rgba(34, 38, 44, .075);
  --gold:#b08d4f;
}

/* 数字一律等宽，表格式对齐 */
body.home .anime .time-pill,
body.home .anime .score-pill,
body.home .anime .hot,
body.home .anime .eps,
body.home .weekday .badge,
body.home .fc-meta,
body.home .news-date{
  font-variant-numeric:tabular-nums;
}

/* 区块标题：标题下压一条金短线 */
body.home .section-head{
  position:relative;
  margin-bottom:26px;
  padding-bottom:13px;
  border-bottom:1px solid var(--rule-soft);
  align-items:baseline;
  gap:14px;
}

body.home .section-head::after{
  content:'';
  position:absolute;
  left:0;
  bottom:-1px;
  width:52px;
  height:2px;
  background:var(--gold);
}

body.home .section-head h2{
  font-size:var(--fs-3xl);
  font-weight:600;
  letter-spacing:.1em;
  color:var(--ink);
}

body.home .section-head h2 .accent{
  background:none;
  -webkit-background-clip:initial;
  background-clip:initial;
  color:var(--gold);
}

body.home .section-head .sub{
  font-size:var(--fs-xs);
  letter-spacing:.06em;
  color:var(--ink-3);
  font-weight:400;
}

/* 星期条：白胶囊容器 → 节目单分格 */
body.home .weekday-bar{
  background:none;
  border:0;
  box-shadow:none;
  border-radius:0;
  padding:0;
  width:100%;
  gap:0;
  display:grid;
  grid-template-columns:repeat(7, 1fr);
  border-top:1px solid var(--rule);
  border-bottom:1px solid var(--rule);
  margin-bottom:28px;
}

body.home .weekday{
  border-radius:0;
  border:0;
  background:none;
  padding:13px 2px 10px;
  min-width:0;
  border-bottom:2px solid transparent;
  margin-bottom:-1px;
  /* 下划线压住底部分隔线 */
  gap:1px;
  transition:color .25s var(--ease), border-color .25s var(--ease);
}

body.home .weekday:hover{
  background:none;
  color:var(--ink);
}

body.home .weekday .d{
  font-size:var(--fs-2xs);
  font-weight:500;
  letter-spacing:.22em;
  color:var(--ink-3);
  opacity:1;
}

body.home .weekday .n{
  font-size:var(--fs-sm);
  font-weight:600;
  letter-spacing:.12em;
  color:var(--ink-2);
  transition:color .25s var(--ease);
}

/* 当前查看日只留金线。JS 初始只加 .today，从不加 .active */
body.home .weekday.active{
  color:var(--ink);
  background:none;
  box-shadow:none;
  border-bottom-color:var(--gold);
}

body.home .weekday.active .n{
  color:var(--ink);
  font-weight:700;
}

body.home .weekday.active .d{
  color:var(--gold);
}

/* 今天：金色文字；选中态由金线表达 */
body.home .weekday.today .d{
  color:var(--gold);
  opacity:.85;
}

body.home .weekday.today .n{
  color:var(--gold);
}

/* 当日更新数：橙色胶囊 → 金色小字 */
body.home .weekday .badge{
  display:inline-block;
  background:none;
  /* 文字场景用「文字金」：白底 4.52:1（装饰金 --gold 只有 3.10:1，小字不达标） */
  color:var(--gold-text, var(--gold));
  padding:0;
  border-radius:0;
  margin-top:4px;
  font-size:var(--fs-2xs);
  font-weight:600;
  letter-spacing:.1em;
}

/* 季度切换：给「动作」一个名字 + 一道金线框 */
body.home .anime-toolbar{
  gap:12px;
  row-gap:14px;
}

/* 用 flex order 把标签插到星期条之后、下拉之前 */
body.home .anime-toolbar::before{
  content:'切换季度';
  order:1;
  align-self:center;
  white-space:nowrap;
  font-size:var(--fs-xs);
  font-weight:600;
  letter-spacing:.18em;
  color:var(--gold);
}

body.home .anime-toolbar .weekday-bar{
  order:0;
}

body.home .anime-toolbar .season-select{
  order:2;
}

body.home .anime-toolbar .season-hint{
  order:3;
}

body.home .season-select{
  appearance:none;
  -webkit-appearance:none;
  /* 印金描边 + 极淡金底，读起来像一个动作而不是一个数值 */
  border:1px solid rgba(176, 141, 79, .55);
  border-radius:2px;
  background-color:rgba(176, 141, 79, .055);
  box-shadow:none;
  padding:10px 34px 10px 15px;
  font-size:var(--fs-base);
  font-weight:600;
  letter-spacing:.09em;
  color:var(--ink);
  /* 自绘箭头改印金（原色灰到看不见） */
  background-image:linear-gradient(45deg, transparent 50%, var(--gold) 50%),                    linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position:calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size:5px 5px, 5px 5px;
  background-repeat:no-repeat;
  transition:color .22s var(--ease), border-color .22s var(--ease), background-color .22s var(--ease);
}

body.home .season-select:hover{
  color:var(--gold);
  border-color:var(--gold);
  background-color:rgba(176, 141, 79, .14);
}

body.home .season-select:focus-visible{
  outline:2px solid var(--gold);
  outline-offset:2px;
}

body.home .season-hint{
  align-self:center;
  font-size:var(--fs-xs);
  letter-spacing:.06em;
  color:var(--ink-3);
  padding-left:12px;
  border-left:1px solid var(--rule-soft);
}

body.home .season-hint:empty{
  display:none;
}

/* 本季模式无提示，别留一道孤零零的竖线 */

/* 卡片：去卡壳，图直接落纸白 */
body.home .anime-grid{
  grid-template-columns:repeat(auto-fill, minmax(212px, 1fr));
  gap:32px 22px;
}

body.home .anime{
  background:none;
  border:0;
  border-radius:0;
  box-shadow:none;
  transition:none;
}

body.home .anime:hover{
  transform:none;
  box-shadow:none;
  border-color:transparent;
}

body.home .anime .cover{
  border-radius:2px;
  background:var(--rule-soft);
}

/* 图上压字要可读：底部压一层渐隐 */
body.home .anime .cover::after{
  content:'';
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:58%;
  background:linear-gradient(to top, rgba(8, 11, 16, .66), rgba(8, 11, 16, .20) 46%, rgba(8, 11, 16, 0));
  pointer-events:none;
  z-index:1;
}

body.home .anime:hover .cover img{
  transform:scale(1.035);
}

body.home .anime .body{
  padding:12px 1px 0;
}

body.home .anime h3{
  font-size:var(--fs-md);
  font-weight:600;
  letter-spacing:.035em;
  line-height:1.5;
  color:var(--ink);
}

/* 标题是真链接（爬虫可见 / 可新标签打开 / 可右键复制地址）。
   行高字号都不动，避免卡高跳变。 */
body.home .anime .card-t{
  color:inherit;
  text-decoration:none;
  transition:color .2s var(--ease);
}

body.home .anime .card-t:hover{
  color:var(--gold-text);
}

body.home .anime .jp{
  font-size:var(--fs-2xs);
  letter-spacing:.1em;
  color:var(--ink-3);
  margin-top:5px;
  margin-bottom:0;
}

/* 标签：蓝底胶囊 → 直角灰字，用「·」串联 */
body.home .anime .tags{
  gap:0;
  margin-top:7px;
}

body.home .anime .tag, body.home .anime .tag:nth-child(1){
  background:none;
  border:0;
  border-radius:0;
  padding:0;
  font-size:var(--fs-2xs);
  letter-spacing:.08em;
  color:var(--ink-3);
}

body.home .anime .tags .tag + .tag::before{
  content:' · ';
  color:var(--rule);
}

/* 进度条：渐变胶囊 → 1.5px 印金细线 */
body.home .anime .ep-bar{
  height:1.5px;
  border-radius:0;
  background:var(--rule-soft);
  margin-top:13px;
}

body.home .anime .ep-bar > i{
  border-radius:0;
  background:var(--gold);
}

body.home .anime .ep-bar.done > i{
  background:var(--ink-3);
}

/* 图上压字：白胶囊/黑玻璃 → 无底白字 + 投影 */
body.home .anime .time-pill,
body.home .anime .score-pill{
  background:none;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  box-shadow:none;
  border-radius:0;
  padding:0;
  top:auto;
  bottom:11px;
  z-index:2;
  color:#fff;
  text-shadow:0 1px 9px rgba(10, 14, 20, .78), 0 0 3px rgba(10, 14, 20, .5);
}

/* 播出时刻放大成「节目单时刻」大数字，做出字号层级 */
body.home .anime .time-pill{
  left:11px;
  bottom:11px;
  display:flex;
  align-items:flex-end;
  gap:7px;
  font-size:var(--fs-2xl);
  font-weight:700;
  line-height:1;
  letter-spacing:.01em;
  font-variant-numeric:tabular-nums;
  text-shadow:0 2px 14px rgba(6, 9, 13, .9), 0 1px 3px rgba(6, 9, 13, .95);
}

body.home .anime .time-pill::before{
  content:'';
  flex:0 0 auto;
  width:2px;
  height:16px;
  background:var(--gold);
  margin-bottom:1px;
}

/* 次日小标 / 时间待定 / 往季日期不是「时刻」，不跟着放大 */
body.home .anime .time-pill .nd{
  background:none;
  padding:0;
  margin:0 0 1px;
  border-radius:0;
  color:#f0d9a8;
  font-size:var(--fs-2xs);
  font-weight:600;
  letter-spacing:.14em;
  line-height:1;
}

body.home .anime .time-pill.na{
  left:11px;
  bottom:12px;
  font-size:var(--fs-base);
  font-weight:500;
  letter-spacing:.1em;
  color:rgba(255, 255, 255, .92);
}

body.home .anime .time-pill.na::before{
  height:12px;
  background:rgba(240, 217, 168, .6);
}

/* 评分与时刻同基线：卡底变成「左时刻 / 右评分」 */
body.home .anime .score-pill{
  right:11px;
  bottom:14px;
  font-size:var(--fs-xs);
  font-weight:700;
  letter-spacing:.06em;
  color:#f4e7cc;
}

/* 底部元信息去虚线、小字化。margin-top 必须留 auto（卡脚贴底） */
body.home .anime .meta{
  border-top:0;
  padding-top:14px;
  margin-top:auto;
  font-size:var(--fs-2xs);
  letter-spacing:.05em;
  color:var(--ink-3);
}

body.home .anime .hot{
  color:var(--ink-3);
  font-weight:500;
  font-size:var(--fs-2xs);
  letter-spacing:.05em;
}

body.home .anime .hot::before{
  content:'热度';
  font-size:var(--fs-2xs);
  letter-spacing:.16em;
  color:var(--ink-3);
  opacity:.72;
  margin-right:5px;
}

body.home .anime .eps{
  font-size:var(--fs-2xs);
  letter-spacing:.04em;
  color:var(--ink-3);
}

body.home .anime .eps b{
  color:var(--ink-2);
  font-weight:600;
}

/* 卡片槽位化：统一各槽高度，消掉一排里高低不齐 */

/* 标题：两行是 clamp 上限，短标题也把两行占住 */
body.home .anime h3{
  min-height:3em;
}

/* 日文副题：固定一行高，空槽保留同高 */
body.home .anime .jp{
  min-height:1.35em;
  margin-top:6px;
}

/* 标签：锁死单行 —— 换行是高度跳变的主要来源 */
body.home .anime .tags{
  flex-wrap:nowrap;
  overflow:hidden;
  min-height:1.4em;
  -webkit-mask-image:linear-gradient(to right, #000 calc(100% - 24px), transparent);
  mask-image:linear-gradient(to right, #000 calc(100% - 24px), transparent);
}

/* 进度条：三种状态永远占位同高 */
body.home .anime .ep-bar.is-empty{
  background:repeating-linear-gradient(90deg,              var(--rule-soft) 0 3px,  transparent 3px 8px);
}

body.home .anime .ep-bar.is-empty > i{
  background:transparent;
}

/* 卡脚贴底由 margin-top:auto + grid stretch 保证，此处不再另设 */

/* 首卡不做特殊化 */

/* 已完结区：去白卡框，缩略图直角 */
body.home .finished-grid{
  grid-template-columns:repeat(auto-fill, minmax(238px, 1fr));
  gap:18px 22px;
}

body.home .finished-card{
  background:none;
  border:0;
  border-radius:0;
  padding:0;
  gap:12px;
}

body.home .finished-card .fc-cover{
  width:42px;
  height:60px;
  border-radius:2px;
  background:var(--rule-soft);
}

body.home .finished-card h3{
  font-size:var(--fs-base);
  font-weight:600;
  letter-spacing:.035em;
  color:var(--ink);
}

body.home .finished-card .fc-jp{
  font-size:var(--fs-2xs);
  letter-spacing:.08em;
  color:var(--ink-3);
}

body.home .finished-card .fc-meta{
  font-size:var(--fs-2xs);
  letter-spacing:.05em;
  color:var(--ink-3);
  gap:7px;
  margin-top:5px;
}

body.home .finished-card .fc-score{
  color:var(--gold);
  font-weight:600;
}

/* 资讯：面板式行 → 索引式行 */
body.home .news-feed{
  gap:0;
  border-top:1px solid var(--rule-soft);
}

body.home .news-item{
  position:relative;
  border:0;
  border-radius:0;
  box-shadow:none;
  border-bottom:1px solid var(--rule-soft);
  padding:15px 0;
  transition:padding-left .34s var(--ease);
}

body.home .news-item:hover{
  background:none;
  box-shadow:none;
  transform:none;
  border-color:var(--rule-soft);
  padding-left:16px;
}

body.home .news-item::before{
  content:'';
  position:absolute;
  left:0;
  top:14px;
  bottom:14px;
  width:2px;
  background:var(--gold);
  opacity:0;
  transition:opacity .34s var(--ease);
}

body.home .news-item:hover::before{
  opacity:1;
}

body.home .news-title{
  font-size:var(--fs-base);
  font-weight:500;
  letter-spacing:.025em;
  line-height:1.62;
  color:var(--ink);
}

body.home .news-orig{
  font-size:var(--fs-2xs);
  letter-spacing:.03em;
  color:var(--ink-3);
  margin-top:4px;
}

body.home .news-src{
  background:none;
  border:0;
  border-radius:0;
  padding:0;
  font-size:var(--fs-2xs);
  font-weight:500;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--ink-3);
  opacity:.68;
}

body.home .news-meta{
  gap:10px;
}

body.home .news-date{
  font-size:var(--fs-2xs);
  letter-spacing:.05em;
  color:var(--ink-3);
}

body.home .news-go{
  font-size:var(--fs-2xs);
  color:var(--ink-3);
}

body.home .news-item:hover .news-go{
  color:var(--gold);
  transform:translate(2px, -2px);
}

/* 窄屏兜底 */
@media (max-width:640px){
  body.home .weekday-bar{
    grid-template-columns:repeat(7, 1fr);
  }
  body.home .weekday{
    padding:9px 0 8px;
  }
  body.home .weekday .d{
    font-size:var(--fs-2xs);
    letter-spacing:.12em;
  }
  body.home .weekday .n{
    font-size:var(--fs-2xs);
    letter-spacing:.04em;
  }
  body.home .weekday .badge{
    font-size:var(--fs-2xs);
    letter-spacing:.04em;
  }
  body.home .section-head h2{
    font-size:var(--fs-xl);
  }
  body.home .anime-grid{
    grid-template-columns:repeat(auto-fill, minmax(148px, 1fr));
    gap:26px 14px;
  }
  body.home .news-item:hover{
    padding-left:10px;
  }
  /* 窄屏卡宽只剩 148px 起，大号时刻会把两端挤到一起 */
  body.home .anime .time-pill{
    left:8px;
    bottom:8px;
    font-size:var(--fs-xl);
    gap:5px;
  }
  body.home .anime .time-pill::before{
    width:1.5px;
    height:12px;
  }
  body.home .anime .time-pill .nd{
    font-size:var(--fs-2xs);
    letter-spacing:.08em;
  }
  body.home .anime .time-pill.na{
    left:8px;
    bottom:9px;
    font-size:var(--fs-xs);
  }
  body.home .anime .time-pill.na::before{
    height:9px;
  }
  body.home .anime .score-pill{
    right:8px;
    bottom:10px;
    font-size:var(--fs-2xs);
  }
  /* 工具条：标签与下拉在窄屏独占一行 */
  body.home .anime-toolbar::before{
    font-size:var(--fs-2xs);
    letter-spacing:.14em;
  }
  body.home .season-select{
    font-size:var(--fs-xs);
    padding:8px 30px 8px 12px;
    min-height:44px;      /* 触控目标 ≥44px（WCAG 2.5.5 AAA）；窄屏拇指更好按 */
  }
  body.home .season-hint{
    font-size:var(--fs-2xs);
    padding-left:9px;
  }
}

/* 角色「客串」标：联动角色一眼可辨 */
body.home .anime-detail .ad-role.is-guest .avatar{
  position:relative;
}

body.home .anime-detail .ad-role.is-guest .avatar::after{
  content:"客串";
  position:absolute;
  top:0;
  right:0;
  z-index:3;
  padding:3px 6px 3px 7px;
  font-size:var(--fs-2xs);
  font-weight:700;
  line-height:1;
  letter-spacing:.14em;
  color:#8a6d3b;
  background:rgba(176, 141, 79, .14);
  border-left:1px solid rgba(176, 141, 79, .42);
  border-bottom:1px solid rgba(176, 141, 79, .42);
  border-radius:0 8px 0 2px;
  /* 与 .avatar 的 8px 圆角重合 */
  pointer-events:none;
  /* 别挡住 hover 与立绘 */;
}

/* 系统减少动效 */
@media (prefers-reduced-motion:reduce){
  body.home *{
    transition-duration:.01ms!important;
  }
  body.home .anime:hover .cover img{
    transform:none;
  }
}

/* 首页文字色。这里**必须**带 !important：后台配置里的 cssVars 会被 JS 内联写到
   <html style="--soft:…">（applyConfig 的 setCss），内联样式优先于任何选择器。
   取值留到 ≥4.8:1 的余量 —— 原值 4.50 / 4.51 刚好压在 AA 线上，显示器 Gamma、
   抗锯齿或字体渲染差异都可能把它压到线下。 */
body.home{
  --soft:#6b7280 !important;      /* 4.83:1（原 #717782 = 4.50:1） */
  --muted:#667182 !important;     /* 4.94:1，本就达标 */
  --ink-3:#6b7280;                /* 4.83:1（原 #717781 = 4.51:1）；与 --soft 同族灰，合并成同一个值 */
  --gold-text:#8f7240;            /* 4.52:1，金色**文字**专用（--gold #b08d4f 只做装饰/描边） */
}

/* 金色文字消费点改用 --gold-text */
body.home .weekday.today .n,
body.home .weekday.today .d,
body.home .weekday.active .d,
body.home .finished-card .fc-score{
  color:var(--gold-text, var(--gold));
}

/* 备案链接 #5b8db8 = 3.53:1 ✗ → --water-deep = 5.66:1 ✓ */
body.home .icp a{
  color:var(--water-deep);
}

/* 焦点可见（WCAG 2.4.7） */
body.home .anime:focus-visible,
body.home .anime .card-t:focus-visible,
body.home .finished-card:focus-visible,
body.home .weekday:focus-visible,
body.home .news-item:focus-visible,
body.home .season-select:focus-visible{
  outline:2px solid var(--gold);
  outline-offset:3px;
}

/* 深色封面上的焦点环换亮金，免得和遮罩糊在一起 */
body.home .anime:focus-visible{
  outline-color:#d8b978;
}

/* 图上压字遮罩补一条「底部平台」（WCAG 1.4.3） */
body.home .anime .cover::after{
  height:52%;
  background:linear-gradient(to top,     rgba(8, 11, 16, .74) 0%,     rgba(8, 11, 16, .62) 26%,     rgba(8, 11, 16, .18) 58%,     rgba(8, 11, 16, 0));
}

/* 等宽数字：评分列 / 周表数字不再横向抖动 */
body.home .score-pill,
body.home .finished-card .fc-score,
body.home .finished-card .fc-meta,
body.home .anime .meta,
body.home .weekday .n{
  font-variant-numeric:tabular-nums;
  font-feature-settings:"tnum" 1;
}

/* 卡片 hover / 焦点反馈 */
body.home .anime:hover .cover,
body.home .anime:focus-visible .cover{
  filter:brightness(1.04);
}

/* 长标题兜底（WCAG 1.4.4 / 1.3.1） */
body.home .finished-card h3,
body.home .finished-card .fc-jp{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* 触控目标 ≥44px（WCAG 2.5.8 / 2.5.5） */
body.home .icp a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 2px;
}

/* 下拉控件内边距统一 */
body.home .season-select{
  padding-right:34px;
}

/* skip link（WCAG 2.4.1） */
body.home .a11y-skip{
  position:absolute;
  left:-9999px;
  top:0;
  z-index:var(--z-skip);
  padding:12px 20px;
  background:var(--ink);
  color:#fff;
  font-size:var(--fs-base);
  font-weight:600;
  letter-spacing:.06em;
  border-radius:0 0 10px 0;
  text-decoration:none;
}

body.home .a11y-skip:focus{
  left:0;
}

/* #main 落地时不被顶栏遮住 */
body.home #main:focus{
  outline:none;
}

/* 令牌 */
body.home{
  --mt-dur:.88s;
  /* 时长取三个参考站的中位 0.85s */
  --mt-ease:cubic-bezier(.16, 1, .3, 1);
  /* expo-out */
  --mt-y:18px;
  --mt-blur:0px;
  /* 默认不模糊：卡片量大，模糊=大量合成层 */
  --mt-bar:0;
  /* 阅读进度 0~1，JS 写入 */
  --mt-sec:#5b8db8;
  /* 当前区块色，随 data-nowsection 变 */;
}

/* 滚动入场揭示 */

/* 默认全可见：只有 JS 标了 .mt 的元素才隐藏 */

/* 只动 opacity + translate，不带 filter —— .anime 内部有绝对定位面板 */
body.home .mt{
  opacity:0;
  translate:0 var(--mt-y);
  transition:    opacity   var(--mt-dur) var(--mt-ease) var(--mt-d, 0ms),     translate var(--mt-dur) var(--mt-ease) var(--mt-d, 0ms);
}

body.home .mt.mt-in{
  opacity:1;
  translate:0 0;
}

/* 只给区块标题与工具条上 blur */
body.home .mt.mt-bl{
  filter:blur(6px);
  transition:    opacity   var(--mt-dur) var(--mt-ease) var(--mt-d, 0ms),     translate var(--mt-dur) var(--mt-ease) var(--mt-d, 0ms),     filter    var(--mt-dur) var(--mt-ease) var(--mt-d, 0ms);
}

body.home .mt.mt-bl.mt-in{
  filter:blur(0px);
}

/* 内容重渲染时快揭示，别让切换等 0.9s */
body.home .mt.mt-fast{
  --mt-dur:.46s;
}

/* 顶栏：下滚收起 / 上滚回弹 */

/* 用 transform 而非 padding：sticky 改 padding 会顶位移 */
body.home .topbar{
  transition:transform .5s var(--mt-ease),  box-shadow .5s var(--mt-ease);
  box-shadow:0 1px 0 rgba(60, 90, 120, 0);
}

body.home.mt-down .topbar{
  transform:translateY(-102%);
  box-shadow:0 8px 26px rgba(60, 90, 120, .08);
}

/* 阅读进度细线，随区块换色 */
body.home .topbar::after{
  content:'';
  position:absolute;
  left:0;
  right:0;
  bottom:-1px;
  height:1px;
  background:linear-gradient(90deg, var(--mt-sec) 0%, var(--mt-sec) 62%, rgba(201, 169, 110, .25) 100%);
  transform:scaleX(var(--mt-bar));
  transform-origin:0 50%;
  pointer-events:none;
}

body.home[data-nowsection="finished"]{
  --mt-sec:#c9a96e;
}

body.home[data-nowsection="news"]{
  --mt-sec:#7a8599;
}

/* 缓动统一：hover 换 expo-out，只改曲线不改位移 */

/* 卡片抬升已在上面去掉，这里只改曲线手感 */
body.home .anime .cover img{
  transition:transform .72s var(--mt-ease);
}

body.home .news-item, body.home .finished-card{
  transition:translate .55s var(--mt-ease),  border-color .55s var(--mt-ease);
}

/* 周表下划线滑动而不是硬切 */
body.home .weekday{
  transition:color .35s var(--mt-ease),  border-bottom-color .45s var(--mt-ease);
}

/* 系统减少动效 */
@media (prefers-reduced-motion: reduce){
  body.home .mt{
    opacity:1 !important;
    translate:none !important;
    filter:none !important;
    transition:none !important;
  }
  body.home .topbar,   body.home.mt-down .topbar{
    transform:none !important;
    transition:none !important;
  }
  body.home .topbar::after{
    display:none;
  }
  body.home .anime .cover img,
  body.home .news-item,
  body.home .finished-card,
  body.home .weekday{
    transition:none !important;
  }
}
