/* ==========================================================================
   blocks.css — 页面区块层：页头、页脚、各页独有的段落骨架
   加载顺序：tokens → base → layout → components → blocks（最后）
   本文件里的 @media 一律紧跟自己定义的区块，不要挪到 layout.css，
   否则同优先级下会被后加载的文件静默盖掉。
   ========================================================================== */

/* ---- 深色区块的文字基线 --------------------------------------------------
   layout.css 只管背景，components.css 只管 .t-* 档位，
   这里补「区块默认字色」，让没挂 .t-* 的裸文本也是对的。 */
.section--deep {
  color: var(--text-invert-body);
}

.section--deep h2,
.section--deep h3,
.section--deep h4 {
  color: var(--text-invert);
}

/* ==========================================================================
   1. 页头
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}

/* JS 在滚动后加 .is-stuck，把分隔线显出来。
   不用 scroll 事件驱动样式，没 JS 时也完全可用。 */
.site-header.is-stuck {
  border-bottom-color: var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  height: 84px;
}

/* ---- 品牌 ---- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--text);
}

.brand:hover {
  color: var(--text);
}

.brand__mark {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  object-fit: cover;
  flex: 0 0 auto;
}

.brand__text {
  font-family: var(--font-brand);
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--brand-ink);
}

/* ---- 主导航 ---- */
.nav {
  display: flex;
  align-items: center;
  gap: var(--sp-7);
  flex: 1 1 auto;
  justify-content: center;
}

.nav__link {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-body);
  white-space: nowrap;
}

.nav__link:hover {
  color: var(--brand-ink);
}

/* 当前页。用 aria-current 而不是自己加 .is-active，
   读屏也能拿到「这是当前页」。 */
.nav__link[aria-current="page"] {
  color: var(--brand-ink);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex: 0 0 auto;
}

/* ---- 汉堡按钮：只在窄屏出现 ---- */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: var(--r-sm);
  color: var(--text);
}

.nav-toggle:hover {
  background: var(--brand-surface);
}

.nav-toggle__close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__close {
  display: block;
}

@media (max-width: 1024px) {
  .nav {
    gap: var(--sp-5);
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: grid;
  }

  /* 导航改为从页头下方展开的一整块。
     关键：不依赖 JS 也能看到链接（JS 只负责加 .is-open）。 */
  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--sp-3) var(--gutter) var(--sp-5);
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }

  .nav[hidden] {
    display: none !important;
  }

  .nav__link {
    padding: var(--sp-4) 0;
    font-size: var(--fs-md);
    border-bottom: 1px solid var(--line);
  }

  .nav__link:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 560px) {
  .site-header__inner {
    height: 68px;
  }

  .brand__text {
    font-size: 22px;
  }
}

/* ==========================================================================
   2. 首页 Hero
   ========================================================================== */

.hero {
  background: linear-gradient(180deg, var(--card) 0%, var(--brand-surface) 100%);
  overflow: hidden;
}

.hero__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-10);
  padding-block: var(--sp-12);
}

.hero__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-5);
}

.hero__title {
  font-size: var(--fs-display);
  font-weight: 900;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
}

/* 标题第二行用品牌色。用 span 而不是给整个 h1 上色，
   因为第一行要留墨色 —— 全蓝会让标题失去重量。 */
.hero__title-accent {
  color: var(--brand-ink);
}

.hero__lead {
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
  color: var(--text-body);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
}

/* 平台一行：用分隔点而不是 flex gap，换行时点不会孤零零跑到行首 */
.hero__platforms {
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  line-height: var(--lh-relaxed);
}

.hero__platforms li {
  display: inline;
  /* 防止 "Android TV" 被从中间拆成 Android / TV 两行 */
  white-space: nowrap;
}

.hero__platforms li + li::before {
  content: "·";
  margin-inline: 8px;
  color: var(--text-faint);
}

/* 390 宽放不下这 6 个平台名，一定会换行。
   一旦换行，中点分隔符要么跑到行首、要么留在行末，两种都像排错；
   而且靠 nowrap 只能保住 "Android TV" 不被拆，它整块换行时会把 "·" 一起带走。
   窄屏索性改成 flex 换行 + 间距分隔：断行只发生在项与项之间，且不带任何残留符号。 */
@media (max-width: 560px) {
  .hero__platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 14px;
  }

  .hero__platforms li + li::before {
    content: none;
  }
}

.hero__note {
  margin-top: var(--sp-1);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
  font-size: var(--fs-3xs);
  color: var(--text-faint);
  width: 100%;
}

/* ---- 右侧设备位 ---- */
.hero__aside {
  flex: 0 0 auto;
  width: 576px;
  max-width: 100%;
}

.hero__devices {
  position: relative;
  display: flex;
  align-items: flex-start;
  width: 100%;
  padding-bottom: 96px;
}

.hero__window {
  flex: 0 1 470px;
  min-width: 0;
  margin-top: var(--sp-6);
}

.hero__phone {
  flex: 0 0 auto;
  width: 246px;
  margin-left: -140px;
  margin-top: 116px;
}

/* 设备上的弹幕浮层。绝对定位在容器里，窄屏直接隐藏—— */
/* 它们尺寸固定，容器缩下去一定会压到设备上。 */
.hero__danmaku {
  position: absolute;
  z-index: 2;
}

.hero__danmaku--a {
  left: 8%;
  top: 4%;
}

.hero__danmaku--b {
  right: 2%;
  top: 34%;
}

.hero__danmaku--c {
  /* 34% 会让它压在 .hero__data 卡右边缘上（卡宽 212 / 容器 576 = 36.8%，
     而卡片 z-index 更高，实际是卡片盖住弹幕左端 16px）。挪到 40% 让开。 */
  left: 40%;
  bottom: 6%;
}

/* 规格悬浮卡：压在设备左下角 */
.hero__data {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 3;
  width: 212px;
  padding: var(--sp-4) var(--sp-5);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}

.hero__data-title {
  margin-bottom: var(--sp-3);
  font-size: var(--fs-3xs);
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 1024px) {
  .hero__aside {
    width: 470px;
  }

  .hero__phone {
    width: 210px;
    margin-left: -120px;
  }

  .hero__devices {
    padding-bottom: 88px;
  }
}

@media (max-width: 900px) {
  .hero__inner {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-11);
  }

  .hero__body {
    max-width: none;
  }

  .hero__aside {
    width: 100%;
  }

  /* 竖排：窗口在上占满，手机居中缩小落在下面；
     弹幕浮层全部撤掉，固定尺寸在窄容器里必然压字。 */
  .hero__devices {
    flex-direction: column;
    align-items: center;
    padding-bottom: 0;
  }

  .hero__window {
    flex: 0 0 auto;
    width: 100%;
    margin-top: 0;
  }

  .hero__phone {
    width: 200px;
    margin-left: 0;
    margin-top: var(--sp-8);
  }

  .hero__danmaku {
    display: none;
  }

  .hero__data {
    position: static;
    width: 100%;
    margin-top: var(--sp-8);
  }
}

/* ==========================================================================
   3. 价值卡（首页四张）
   ========================================================================== */

.points {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  height: 100%;
}

.points__title {
  font-size: var(--fs-h6);
  font-weight: 700;
}

/* ==========================================================================
   4. 播放器实景区（首页，深色）
   ========================================================================== */

.showcase {
  display: flex;
  gap: var(--sp-6);
  align-items: stretch;
}

.showcase__main {
  flex: 0 1 660px;
  min-width: 0;
}

.showcase__stage {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: #000;
  box-shadow: var(--shadow-md);
}

.showcase__stage img {
  width: 100%;
  object-fit: cover;
}

.showcase__danmaku {
  position: absolute;
  z-index: 2;
}

.showcase__danmaku--a {
  left: 5%;
  top: 12%;
}

.showcase__danmaku--b {
  right: 6%;
  top: 26%;
}

.showcase__danmaku--c {
  left: 10%;
  bottom: 22%;
}

.showcase__danmaku--d {
  left: 6%;
  bottom: 7%;
}

.showcase__side {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

/* 画面下方的播放状态行（时间 / 清晰度） */
.showcase__meta {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-top: var(--sp-4);
  font-family: var(--font-mono);
  font-size: var(--fs-3xs);
  color: var(--text-invert-faint);
}

/* 「一起看房间已连接 3 人」——不是弹幕气泡，是叠在画面上的状态提示。
   没有底色，所以必须靠文字阴影保证在任何一帧画面上都读得清。 */
.showcase__note {
  font-size: var(--fs-2xs);
  color: #d6e8ff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.7);
}

@media (max-width: 900px) {
  .showcase {
    flex-direction: column;
  }

  .showcase__main {
    flex: 0 0 auto;
    width: 100%;
  }

  /* 弹幕压在缩小的画面上会盖住内容，只留两条 */
  .showcase__danmaku--c,
  .showcase__danmaku--d {
    display: none;
  }
}

/* ==========================================================================
   5. 三步上手
   序号圆点用 components.css 的 .step-item__no（品牌底 + 白字 Baloo 2），
   这里只补「卡片里怎么排」这一层。
   ========================================================================== */

.steps .card {
  gap: var(--sp-4);
}

/* ==========================================================================
   6. 下载横幅（首页，蓝底）
   ========================================================================== */

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-9);
  padding: var(--sp-9) var(--sp-10);
  background: var(--brand);
  border-radius: var(--r-xl);
}

.cta__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-width: 0;
}

.cta__title {
  font-size: var(--fs-h3);
  font-weight: 800;
  color: #fff;
  line-height: var(--lh-snug);
}

.cta__lead {
  font-size: var(--fs-md);
  color: rgba(255, 255, 255, 0.86);
}

/* 横幅里的第三行小字，比 .cta__lead 再淡一档 */
.cta__note {
  font-size: var(--fs-2xs);
  color: rgba(255, 255, 255, 0.78);
}

/* 深蓝横幅里的链接必须显式给色：不写会落回主蓝，与底色 1:1 判红 */
.cta__note a {
  color: #DCEBFF;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  flex: 0 0 auto;
}

@media (max-width: 900px) {
  .cta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-7);
    padding: var(--sp-8) var(--sp-7);
  }
}

@media (max-width: 560px) {
  .cta__actions {
    width: 100%;
  }

  .cta__actions .btn {
    width: 100%;
  }
}

/* ==========================================================================
   7. 内页页头
   ========================================================================== */

.page-hero {
  background: linear-gradient(180deg, var(--card) 0%, var(--brand-surface) 100%);
  padding-block: var(--sp-11) var(--sp-10);
}

.page-hero__inner {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  align-items: flex-start;
}

.page-hero__title {
  font-size: var(--fs-lead);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-hero__lead {
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
  color: var(--text-body);
}

/* ---- 深色版页头：番剧源页用，跟下面的深色区块连成一片 ---- */
.page-hero--dark {
  background: var(--deep);
}

.page-hero--dark .page-hero__title {
  color: var(--text-invert);
}

.page-hero--dark .page-hero__lead {
  color: var(--text-invert-body);
}

.page-hero--dark .eyebrow {
  color: var(--brand-mark);
}

/* ==========================================================================
   8. 下载页 · 系统识别条
   ========================================================================== */

.detect {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8);
  padding: var(--sp-7) var(--sp-8);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.detect__body {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-5);
  min-width: 0;
}

.detect__icon {
  flex: 0 0 auto;
}

.detect__text {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-width: 0;
}

.detect__title {
  font-size: var(--fs-h6);
  font-weight: 700;
}

.detect__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  /* 不能用 word-break: break-all —— 它无视自然断点，任何字符处都断，
     窄屏下会把 windows-x64.exe 切成 wind / ows-x64.exe（读起来像另一个包名）。
     break-word 只在整段放不下时才断，且优先用空格、"·"、连字符这些真实断点。 */
  overflow-wrap: break-word;
}

.detect__actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-2);
}

.detect__hint {
  font-size: var(--fs-3xs);
  color: var(--text-faint);
}

/* 识别条与下面「手动选择」之间要拉开一整个区块的距离，
   两者同处一个 .section，靠这条 margin 而不是再套一层 section。 */
.detect {
  margin-bottom: var(--sp-12);
}

@media (max-width: 768px) {
  .detect {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-6);
    padding: var(--sp-6);
  }

  .detect__actions {
    align-items: stretch;
  }

  .detect__actions .btn {
    width: 100%;
  }

  .detect__hint {
    text-align: center;
  }
}

/* 平台列表末尾的 GitHub 出口条。
   直接复用 .card 的白底 / 描边 / 圆角，只把纵向卡片掰成横向一行，
   规格（内边距、圆角、间距）与上面的 .detect 条保持一致。 */
.repo-bar {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8);
  margin-top: var(--sp-5);
  padding: var(--sp-7) var(--sp-8);
  border-radius: var(--r-lg);
}

.repo-bar__body {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-5);
  min-width: 0;
}

.repo-bar__text {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-width: 0;
}

.repo-bar__title {
  font-size: var(--fs-h6);
  font-weight: 700;
}

@media (max-width: 768px) {
  .repo-bar {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-6);
    padding: var(--sp-6);
  }

  .repo-bar .btn {
    width: 100%;
  }
}

/* ==========================================================================
   9. 功能页 · 能力分组
   分组头用 components.css 的 .group-head / __no / __title，
   这里只负责「组与组之间的间距」和「组内卡片栅格的对齐」。
   ========================================================================== */

.group + .group {
  margin-top: var(--sp-12);
}

.group .group-head {
  padding-bottom: var(--sp-4);
  margin-bottom: var(--sp-7);
  border-bottom: 1px solid var(--line);
}

/* 同一组内的卡片必须等高，否则长文案那张会把整排撑歪 */
.group .grid {
  align-items: stretch;
}

@media (max-width: 560px) {
  .group .group-head {
    align-items: flex-start;
  }
}

/* ==========================================================================
   10. 番剧源页 · 三步流
   ========================================================================== */

.flow-row {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}

.flow-row__step {
  flex: 1 1 0;
  min-width: 0;
}

@media (max-width: 900px) {
  .flow-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ---- 真实界面实景图：唯一一处「用产品自己的截图讲规则」 ---------------- */
.live-shot {
  margin: var(--sp-12) 0 0;
}

.live-shot__cap {
  margin-bottom: var(--sp-4);
  font-size: var(--fs-2xs);
  color: var(--text-muted);
}

.live-shot .shot {
  box-shadow: var(--shadow-sm);
}

/* 这张 1200×325 的界面截图里全是 12–13px 的小字。
   缩到 390 宽的容器里只剩 1/3 大小，字号掉到 4px 左右 —— 等于什么都没放。
   与其给一张看不清的缩略图，不如保住可读宽度让它横滑，并明说能滑。 */
@media (max-width: 900px) {
  .live-shot .shot {
    overflow-x: auto;
  }

  .live-shot .shot img {
    min-width: 900px;
  }

  .live-shot__cap::after {
    content: "（可左右滑动看原图）";
    color: var(--text-faint);
  }
}

/* ==========================================================================
   11. 番剧源页 · AI 面板
   ========================================================================== */
.ai {
  display: flex;
  gap: var(--sp-10);
  align-items: flex-start;
}

.ai__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.ai__panel {
  flex: 0 0 auto;
  width: 660px;
  max-width: 100%;
  padding: var(--sp-7);
  background: var(--deep-card);
  border: 1px solid var(--deep-line);
  border-radius: var(--r-lg);
}

.ai__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-bottom: var(--sp-5);
  margin-bottom: var(--sp-5);
  border-bottom: 1px solid var(--deep-line);
}

.ai__panel-title {
  font-size: var(--fs-h6);
  font-weight: 700;
  color: var(--text-invert);
}

/* 横向布局要「正文 + 64 间距 + 660 面板」≈1200px 才有呼吸空间，低于此直接转纵向。
   两个坑都在这一条里躲掉：
   ① 断点定太晚（原来 900）→ 正文列被压成 0 宽，内容真的会消失；
   ② 转纵向后如果给面板 width:100% → 配置面板被拉成通栏，也不对。
   所以纵向时只切方向 + align-items，面板保持 660 卡片形态靠左，
   靠它自带的 max-width:100% 在窄屏自适应。 */
@media (max-width: 1200px) {
  .ai {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-8);
  }
}

/* ==========================================================================
   12. 帮助页 · FAQ 与更新日志
   ========================================================================== */

/* 手风琴本体在 components.css（.qa），这里只管栅格里的对齐 */
.faq__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.changelog {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

/* 版本卡下方的补充说明行 */
.changelog__note {
  margin-top: var(--sp-7);
  font-size: var(--fs-2xs);
  color: var(--text-muted);
}

/* ==========================================================================
   13. 关于页 · 项目信息与技术栈
   ========================================================================== */

.about {
  display: flex;
  gap: var(--sp-12);
  align-items: flex-start;
}

.about__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.about__aside {
  flex: 0 0 auto;
  width: 420px;
  max-width: 100%;
}

.techstack {
  padding: var(--sp-7);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.techstack__title {
  margin-bottom: var(--sp-5);
  font-size: var(--fs-h6);
  font-weight: 700;
}

@media (max-width: 1024px) {
  .about {
    gap: var(--sp-10);
  }

  .about__aside {
    width: 360px;
  }
}

@media (max-width: 900px) {
  .about {
    flex-direction: column;
    gap: var(--sp-9);
  }

  .about__aside {
    width: 100%;
  }
}

/* ==========================================================================
   14. 下载页 · 命中系统的那张平台卡
   JS 按 UA 识别后加上 .is-recommended。没 JS 时不留任何痕迹，
   静态页面照样是可用的 —— 只是少了「替你选好了」这层便利。
   ========================================================================== */

.plat.is-recommended {
  border-color: var(--brand-mark);
  box-shadow: 0 0 0 3px var(--brand-surface);
}

.plat.is-recommended::before {
  content: "推荐";
  position: absolute;
  top: -10px;
  right: var(--sp-5);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: #fff;
  font-size: var(--fs-4xs);
  font-weight: 600;
  line-height: 1.6;
}

/* ==========================================================================
   15. 页脚
   ========================================================================== */
.site-footer {
  background: var(--footer);
  color: var(--text-invert-body);
  padding-block: var(--sp-11) var(--sp-8);
}

.footer__top {
  display: flex;
  gap: var(--sp-12);
  align-items: flex-start;
  padding-bottom: var(--sp-9);
}

.footer__brand {
  flex: 0 0 auto;
  width: 340px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.footer__brand .brand {
  color: var(--text-invert);
}

.footer__brand .brand:hover {
  color: var(--text-invert);
}

/* 字标默认是品牌蓝，压在深色页脚上会糊 —— 这里必须覆盖成白 */
.footer__brand .brand__text {
  color: var(--text-invert);
}

.footer__desc {
  font-size: var(--fs-xs);
  line-height: var(--lh-relaxed);
  color: var(--text-invert-muted);
}

.footer__cols {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-8);
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.footer__col-title {
  font-size: var(--fs-2xs);
  font-weight: 700;
  color: var(--text-invert);
}

.footer__link {
  font-size: var(--fs-xs);
  color: var(--text-invert-muted);
}

.footer__link:hover {
  color: var(--text-invert);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  padding-top: var(--sp-7);
  border-top: 1px solid var(--deep-line);
  font-size: var(--fs-3xs);
  color: var(--text-invert-faint);
}

.footer__disclaimer {
  text-align: right;
}

/* ---- 友情链接（数据 /friend-links.json · 渲染 /friend-links.js） ---------
   页脚三段制的中间一段：上面是品牌与三列导航，下面是版权与免责。

   🔴 这里的 DOM 不归我们管：两个文件都由站外的 Friend Link Manager 后台
   推送覆盖，它只往 #friendLinks 里塞一个 `<ul class="friend-links">`，
   里面是裸的 li > a。所以样式一律写成 `.footer__friends-body .friend-links …`
   这种「以对方产出为准」的形态 —— 按自己的想法手写 li / a 的类名，
   下一次推送就全失效。外层容器叫 .footer__friends，刻意避开 ul 的
   .friend-links，否则两套规则会互相打脸。

   没有数据时容器是空的，靠 :has() 让整块（连标题一起）不占位 ——
   比留一条空标题栏体面，也不需要 JS 去加 hidden。 */
.footer__friends {
  display: none;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--sp-8);
  padding-block: var(--sp-7);
  border-top: 1px solid var(--deep-line);
}

.footer__friends:has(.friend-links > li) {
  display: grid;
}

/* 行高写成 32px = 胶囊的实际高度，标题才会和第一排胶囊垂直居中对齐。
   用 padding-top 硬凑的话，胶囊换行或字号调整时又会错位。 */
.footer__friends-title {
  font-size: var(--fs-2xs);
  font-weight: 700;
  line-height: 32px;
  color: var(--text-invert);
}

/* ul 本身（widget 产出的 .friend-links）—— 只做排布，不碰外观 */
.footer__friends-body .friend-links {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
}

.footer__friends-body .friend-links > li {
  display: flex;
}

/* 胶囊造型沿用 .tag / .pill 的尺寸语言；描边用 inset box-shadow 而不是
   border，和 .btn--ghost 同一个理由：1px 实边框会把高度撑出 2px，
   一排胶囊里只要有一个带边框，基线就歪了。 */
.footer__friends-body .friend-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px var(--deep-line);
  color: var(--text-invert-muted);
  font-size: var(--fs-3xs);
  font-weight: 500;
  line-height: 1.45;
  transition: background-color var(--dur) var(--ease),
    color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.footer__friends-body .friend-links a:hover {
  background: rgba(108, 180, 252, 0.14);
  color: var(--text-invert);
  box-shadow: inset 0 0 0 1px var(--brand-mark);
}

/* 外链标记：只是给「会离开本站」一个视觉信号，装饰性，不承载信息 */
.footer__friends-body .friend-links a::after {
  content: "↗";
  font-size: 11px;
  line-height: 1;
  opacity: 0.6;
}

@media (max-width: 900px) {
  .footer__top {
    flex-direction: column;
    gap: var(--sp-9);
  }

  .footer__brand {
    width: 100%;
  }

  .footer__cols {
    width: 100%;
  }

  /* 标签列收起来，标题独占一行，胶囊在下面自己换行 */
  .footer__friends {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-4);
  }

  .footer__friends-title {
    line-height: var(--lh-snug);
  }
}

@media (max-width: 560px) {
  .footer__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-3);
  }

  .footer__disclaimer {
    text-align: left;
  }

  /* 最窄视口下胶囊收一档内边距，否则一排两三个就会被挤成两行 */
  .footer__friends-body .friend-links a {
    padding: 6px 12px;
  }
}

/* ==========================================================================
   16. 下载页 · 版本信息条与更新日志
   两块的 HTML 都由 .workbuddy/tools/sync_release.py 生成 —— 换版式才动这里，
   日常版本更新不要手改 HTML。
   ========================================================================== */

/* ---- 版本信息条（内页页头里那一条） --------------------------------------
   复用 .card 的白底 / 描边 / 圆角，只把纵向卡片掰成横向一行，
   规格与「识别条」「仓库条」同一家族。 */
.release-bar {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8);
  width: 100%;
  padding: var(--sp-6) var(--sp-7);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.release-bar__body {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  min-width: 0;
}

.release-bar__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.release-bar__label {
  font-size: var(--fs-3xs);
  color: var(--text-faint);
}

/* 版本号用品牌字标字体，和页头 AniBaka 字标同一套字形 */
.release-bar__ver {
  font-family: var(--font-brand);
  font-size: var(--fs-h4);
  line-height: 1.15;
  color: var(--brand-ink);
}

.release-bar__build {
  margin-left: 7px;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--text-muted);
}

.release-bar__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  overflow-wrap: break-word;
}

/* ---- 更新日志 ------------------------------------------------------------ */
.release-log {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

/* .card 是 flex 容器，而 <details> 必须留在 block —— 浏览器靠它收起内容，
   覆写成 flex 会出现「折叠也照样显示」。视觉仍然复用 .card。 */
.release-log__item {
  display: block;
  padding: var(--sp-7);
}

.release-log__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

/* 折叠行：抹掉浏览器默认三角，改用自带箭头，各浏览器外观一致 */
summary.release-log__head {
  cursor: pointer;
  list-style: none;
}

summary.release-log__head::-webkit-details-marker {
  display: none;
}

.release-log__ver {
  font-family: var(--font-brand);
  font-size: var(--fs-h4);
  color: var(--text);
}

.release-log__build,
.release-log__date {
  font-family: var(--font-mono);
  font-size: var(--fs-3xs);
  color: var(--text-faint);
}

.release-log__badge {
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: var(--brand-surface);
  color: var(--brand-ink);
  font-size: var(--fs-3xs);
}

/* 变更条数推到行尾，让版本号与条数分列两端 */
.release-log__count {
  margin-left: auto;
  font-size: var(--fs-3xs);
  color: var(--text-faint);
}

.release-log__chev {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform var(--dur) var(--ease);
}

.release-log__item[open] .release-log__chev {
  transform: rotate(180deg);
}

.release-log__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  margin-top: var(--sp-5);
}

.release-log__group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.release-log__group-title {
  font-size: var(--fs-2xs);
  font-weight: 700;
  color: var(--text);
}

.release-log__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.release-log__list li {
  display: grid;
  /* 标签固定占一列，没有标签的条目也用空槽占位，
     否则同一组里正文起始位置会参差不齐。 */
  grid-template-columns: var(--sp-8) minmax(0, 1fr);
  align-items: start;
  gap: var(--sp-3);
  font-size: var(--fs-xs);
  line-height: var(--lh-relaxed);
  color: var(--text-body);
}

.release-log__tag {
  align-self: start;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--brand-surface);
  color: var(--brand-ink);
  font-size: var(--fs-4xs);
  line-height: 1.75;
  white-space: nowrap;
}

.release-log__tag--void {
  background: none;
}

/* 引用块里的前提说明（「仅限 Windows」「默认关闭」这类），
   不属于变更条目，用竖线明确标成"附注"而不是最后一条修复 */
.release-log__note {
  padding-left: var(--sp-4);
  border-left: 2px solid var(--line-strong);
  font-size: var(--fs-2xs);
  line-height: var(--lh-relaxed);
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .release-bar {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-6);
    padding: var(--sp-6);
  }

  .release-bar .btn {
    width: 100%;
  }

  .release-log__item {
    padding: var(--sp-6);
  }
}
