/* 首页 V2 - 基于 Figma 设计稿 (node-id=61:2745 素材宝（全科）首页) 1:1 高保真样式 */
:root {
  /* Figma 画板 375px 宽，html 根字号按屏幕宽度等比缩放，375px 时 1px = 0.02rem。
     用法：直接填 Figma 的 px 数字，如 height: calc(104 * var(--px))。 */
  --px: 0.02rem;

  --iv2-primary: #5283ff;
  --iv2-primary-rgb: 82, 131, 255;
  --iv2-primary-soft: rgba(82, 131, 255, 0.15);
  --iv2-primary-border: rgba(82, 131, 255, 0.2);
  --iv2-secondary: #2f5fd5;
  --iv2-error: #ee0a24;
  --iv2-bg: #f0f4fa;
  --iv2-card-bg: #ffffff;
  --iv2-on-surface: #262626;
  --iv2-on-variant: #4e5969;
  --iv2-muted: #999999;
  --iv2-silver: #bfbfbf;
  --iv2-border: #eeeeee;
  --iv2-outline: #d8e1f1;
  --iv2-radius-sm: 0.08rem;
  --iv2-radius-md: 0.16rem;
  --iv2-radius-lg: 0.24rem;
  --iv2-radius-full: 999px;
  --iv2-shadow: 0 0.04rem 0.16rem rgba(235, 239, 248, 0.8);
}

html,
body {
  background-color: var(--iv2-bg);
  color: var(--iv2-on-surface);
  -webkit-tap-highlight-color: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  padding-bottom: calc(1.24rem + env(safe-area-inset-bottom, 0px));
}

[v-cloak] {
  display: none !important;
}

.iv2-page {
  min-height: 100vh;
  background-color: var(--iv2-bg);
  box-sizing: border-box;
}

.index-wrap.iv2-page {
  display: block;
  background-color: var(--iv2-bg);
}

.iv2-page button,
.iv2-page input {
  font-family: inherit;
}

/* ========== Header Search ========== */
.iv2-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #ffffff;
  /* Figma 61:2794 Search 搜索框: px-16 py-8 */
  padding: calc(8 * var(--px)) calc(16 * var(--px));
  padding-top: calc(8 * var(--px) + env(safe-area-inset-top, 0px));
}

.iv2-search {
  display: flex;
  align-items: center;
  width: 100%;
  /* Figma: h-36, px-12, gap-4 */
  height: calc(36 * var(--px));
  padding: 0 calc(12 * var(--px));
  gap: calc(4 * var(--px));
  box-sizing: border-box;
  background: #f3f3f3;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.iv2-search:active {
  background: #ebebeb;
}

.iv2-search-icon {
  /* Figma: size-20，gap 由 .iv2-search 提供 */
  width: calc(20 * var(--px));
  height: calc(20 * var(--px));
  flex-shrink: 0;
  background: url("../images/index-figma/icon_search.svg") center / contain no-repeat;
}

.iv2-search-text {
  flex: 1;
  min-width: 0;
  /* Figma 61:2794: Body/Medium 14/22，居中 */
  font-size: calc(14 * var(--px));
  line-height: calc(22 * var(--px));
  text-align: center;
  color: rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== Main content ========== */
.iv2-main {
  /* Figma: 内容左右 16px，搜索框到 Banner 12px */
  padding: calc(12 * var(--px)) calc(16 * var(--px)) calc(24 * var(--px));
  box-sizing: border-box;
  /* 建立独立层叠上下文：卡片角标/播放按钮的 z-index 被限制在内容区内部，
     不再和底部导航(.common-fixBar z-index:2)、悬浮球等固定元素比较层级 */
  position: relative;
  z-index: 0;
}

/* Figma 区块间距：宫格→分区、分区→分区 均 20px */
.iv2-stack > * + * {
  margin-top: calc(20 * var(--px));
}

/* 顶部 Banner → 金刚区 为 16px（Figma 256→272） */
.iv2-stack > .iv2-banner:not(.iv2-banner-mid) + * {
  margin-top: calc(16 * var(--px));
}

/* 分区尾部 Banner 紧接按钮，仅保留 Banner 到下一分区的间距 */
.iv2-stack > section + .iv2-banner-mid {
  margin-top: 0;
}

/* 分区之间无 Banner 时，取消后一个 section 的 margin-top，由前一个 section 底部的 dual-btns (padding-bottom: 20px) 维持间距 */
.iv2-stack > section + section {
  margin-top: 0;
}

/* ========== Banner ========== */
.iv2-banner {
  position: relative;
  width: 100%;
  border-radius: calc(12 * var(--px));
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--iv2-shadow);
}

.iv2-banner .swiper-container,
.iv2-banner .swiper-slide {
  width: 100%;
  height: calc(104 * var(--px));
}

.iv2-banner .swiper-slide a,
.iv2-banner .swiper-slide .banner-placeholder {
  display: block;
  width: 100%;
  height: 100%;
}

.index-wrap.iv2-page .iv2-banner img,
.iv2-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: calc(12 * var(--px));
}

.iv2-banner-mid .swiper-container,
.iv2-banner-mid .swiper-slide,
.iv2-banner-mid {
  height: calc(104 * var(--px));
}

.iv2-banner .swiper-pagination {
  bottom: calc(6 * var(--px)) !important;
}

.iv2-banner .swiper-pagination-bullet {
  width: calc(6 * var(--px));
  height: calc(6 * var(--px));
  background: rgba(255, 255, 255, 0.55);
  opacity: 1;
  margin: 0 0.06rem !important;
}

.iv2-banner .swiper-pagination-bullet-active {
  background: #fff;
  width: calc(12 * var(--px));
  border-radius: calc(6 * var(--px));
}

.iv2-banner-static {
  display: block;
  width: 100%;
  height: calc(104 * var(--px));
  text-decoration: none;
  border-radius: calc(12 * var(--px));
  overflow: hidden;
}

.iv2-banner-static img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: calc(12 * var(--px));
}

/* ========== 金刚区 (Figma 1:1731 6宫格 & 4+3 历史布局兼容) ========== */
/* Figma 1:1731 Grid 宫格: padding 8px 0, rounded-12, drop-shadow 0 0 16px rgba(235, 239, 248, 1) */
.iv2-cate-panel {
  background: #ffffff;
  border-radius: calc(12 * var(--px));
  padding: calc(8 * var(--px)) 0;
  box-shadow: 0 0 calc(16 * var(--px)) 0 rgba(235, 239, 248, 1);
  box-sizing: border-box;
}

/* 6 宫格单行布局 (Figma 1:1731) */
.iv2-cate-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  padding: 0 calc(4 * var(--px)) calc(4 * var(--px));
  align-items: start;
  box-sizing: border-box;
  width: 100%;
}

/* 4+3 历史布局保留兼容 */
.iv2-cate-panel.is-legacy {
  padding: calc(12 * var(--px)) 0;
  box-shadow: 0 0 calc(8 * var(--px)) 0 #ebeff8;
}

.iv2-cate-row {
  width: 100%;
}

/* 第一行：4 个 68.6px 固定列，左右 8px，列间均匀分布，行高 82px */
.iv2-cate-row-top {
  display: grid;
  grid-template-columns: repeat(4, calc(68.6 * var(--px)));
  justify-content: space-between;
  padding: calc(4 * var(--px)) calc(8 * var(--px));
  margin-bottom: calc(8 * var(--px));
  align-items: start;
  box-sizing: border-box;
}

/* 收起态（showFreeClaim=false）：首行 3 项平分，与下行三列对齐 */
.iv2-cate-panel.is-compact .iv2-cate-row-top {
  grid-template-columns: repeat(3, 1fr);
}

.iv2-cate-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-appearance: none;
}

.iv2-cate-item:active .iv2-cate-icon {
  transform: scale(0.95);
}

/* Figma 1:1731: size-40, rounded-16, 内部图标 size-32 */
.iv2-cate-icon {
  position: relative;
  width: calc(40 * var(--px));
  height: calc(40 * var(--px));
  border-radius: calc(16 * var(--px));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
  box-sizing: border-box;
}

.iv2-cate-panel.is-legacy .iv2-cate-icon {
  width: calc(48 * var(--px));
  height: calc(48 * var(--px));
  margin-bottom: calc(6 * var(--px));
}

.iv2-cate-icon img {
  width: calc(32 * var(--px));
  height: calc(32 * var(--px));
  object-fit: contain;
}

.iv2-cate-icon .iv2-svg {
  width: calc(32 * var(--px));
  height: calc(32 * var(--px));
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.iv2-cate-icon .iv2-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.iv2-cate-badge {
  position: absolute;
  z-index: 1;
  top: calc(-3 * var(--px));
  right: calc(-4 * var(--px));
  padding: calc(1 * var(--px)) calc(5 * var(--px));
  border-radius: 999px;
  font-size: calc(9 * var(--px));
  line-height: calc(12 * var(--px));
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
}

.iv2-cate-badge.is-limit {
  background: #ff4d4f;
}

.iv2-cate-badge.is-new {
  background: #ff4d4f;
  border-radius: calc(5 * var(--px)) calc(10 * var(--px)) calc(10 * var(--px)) 0;
}

.iv2-cate-badge.is-yen {
  background: #ffb020;
}

/* Figma 61:2807: Body/Small 12/20, Font Gy1 90% */
.iv2-cate-label {
  font-size: calc(12 * var(--px));
  line-height: calc(20 * var(--px));
  height: calc(20 * var(--px));
  color: rgba(0, 0, 0, 0.9);
  font-weight: 400;
  text-align: center;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 第二行：素材免费领占前半区并水平居中，教学视频、官方客服各占 1/4 */
.iv2-cate-row-bottom {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  padding: calc(4 * var(--px)) 0;
  align-items: start;
  box-sizing: border-box;
}

/* Figma 61:2828: 136×54, rounded-16, border 0.5px #E5EDFF, 渐变 -90deg #FDF4EF→#EEEEF6 */
.iv2-cate-capsule {
  width: calc(136 * var(--px));
  height: calc(54 * var(--px));
  /*margin-top: calc(7 * var(--px));*/
  justify-self: center;
  background: linear-gradient(-90deg, #fdf4ef 0%, #eeeef6 100%);
  border: 0.5px solid #e5edff;
  border-radius: calc(16 * var(--px));
  display: flex;
  align-items: center;
  padding: 0 calc(12 * var(--px));
  position: relative;
  cursor: pointer;
  box-sizing: border-box;
}

.iv2-cate-capsule:active {
  opacity: 0.92;
  transform: scale(0.98);
}

/* Figma 61:2839: 24×16, top--2, rounded 10/20/20/0, 文字 11px 白色 */
.iv2-capsule-badge {
  position: absolute;
  top: calc(-2 * var(--px));
  right: calc(-4 * var(--px));
  width: calc(24 * var(--px));
  height: calc(16 * var(--px));
  background: #ff4d4f;
  color: #fff;
  font-size: calc(11 * var(--px));
  font-weight: 600;
  text-align: center;
  padding: 0;
  border-radius: calc(10 * var(--px)) calc(20 * var(--px)) calc(20 * var(--px)) 0;
  line-height: calc(16 * var(--px));
}

/* Figma 61:2832: size-32, 距文字 8px */
.iv2-capsule-icon {
  width: calc(32 * var(--px));
  height: calc(32 * var(--px));
  margin-right: calc(8 * var(--px));
  flex-shrink: 0;
  object-fit: contain;
}

.iv2-capsule-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Figma 61:2830: 12px Semibold / lh16 */
.iv2-capsule-title {
  font-size: calc(12 * var(--px));
  font-weight: 600;
  color: rgba(0, 0, 0, 0.9);
  line-height: calc(16 * var(--px));
  white-space: nowrap;
}

/* Figma 61:2831: 10px #EE0A24 / lh15 */
.iv2-capsule-sub {
  font-size: calc(10 * var(--px));
  color: #ee0a24;
  line-height: calc(15 * var(--px));
  white-space: nowrap;
}

/* 第二行（隐藏胶囊卡片时）：3 项 1:1:1 平分，与首行三列对齐 */
.iv2-cate-row-twoway {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  padding: calc(4 * var(--px)) calc(8 * var(--px));
  box-sizing: border-box;
}

/* ========== Section Header ========== */
/* Figma 61:2849: 高 24px，标题 17/24 Semibold tracking .15px，之后 12px 间隔到内容 */
.iv2-section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(24 * var(--px));
  margin-bottom: calc(12 * var(--px));
}

.iv2-section-title {
  font-size: calc(17 * var(--px));
  line-height: calc(24 * var(--px));
  font-weight: 600;
  color: #000000;
  margin: 0;
  letter-spacing: calc(0.15 * var(--px));
}

/* Figma 61:2851: gap-2，更多 12/20 rgba(0,0,0,.4)，箭头 14px */
.iv2-section-more {
  display: inline-flex;
  align-items: center;
  gap: calc(2 * var(--px));
  font-size: calc(12 * var(--px));
  line-height: calc(20 * var(--px));
  color: rgba(0, 0, 0, 0.4);
  text-decoration: none;
}

.iv2-section-more img {
  width: calc(14 * var(--px));
  height: calc(14 * var(--px));
}

/* ========== 3 列瀑布/网格 (精选海报 & 热门视频) ========== */
/* Figma 61:2854: 3 列，列间 10px，行间 12px（343 = 107.667×3 + 10×2） */
.iv2-poster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(12 * var(--px)) calc(10 * var(--px));
  width: 100%;
  box-sizing: border-box;
}

/* 窄屏(<375px)：减少为两列，保证海报卡片可读性 */
@media (max-width: 374px) {
  .iv2-poster-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Figma 61:2855: 107.667×192.541，图片满铺 + 白色文字面板浮于底部 */
.iv2-poster-card {
  position: relative;
  aspect-ratio: 107.667 / 192.541;
  background: #ffffff;
  border-radius: calc(8 * var(--px));
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.iv2-poster-card:active {
  transform: scale(0.98);
}

.iv2-poster-cover {
  position: absolute;
  inset: 0;
  background: #eaf1ff;
  overflow: hidden;
  border-radius: calc(8 * var(--px));
}

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

/* 大类标签 Figma 1:11: 30×14, 9px/12 Medium, rounded 8px 左上+右下, 黑半透明白字 */
.iv2-media-badge.is-left {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  box-sizing: border-box;
  min-width: calc(30 * var(--px));
  height: calc(14 * var(--px));
  background: rgba(0, 0, 0, 0.45);
  font-size: calc(9 * var(--px));
  font-weight: 500;
  line-height: calc(11 * var(--px));
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 calc(4 * var(--px));
  border-radius: calc(8 * var(--px)) 0 calc(8 * var(--px)) 0;
  color: #ffffff;
  white-space: nowrap;
}

.iv2-media-badge.is-free {
  position: absolute;
  top: calc(4 * var(--px));
  right: calc(4 * var(--px));
  z-index: 3;
  background: #ff4d4f;
  color: #ffffff;
  font-size: calc(9 * var(--px));
  font-weight: 600;
  padding: 0 calc(4 * var(--px));
  border-radius: calc(4 * var(--px));
  line-height: calc(14 * var(--px));
}

/* 视频播放图标 Figma 61:2907: size-32，居于图片区中部（距卡片顶 64px） */
.iv2-poster-cover .iv2-play {
  position: absolute;
  left: 50%;
  top: calc(64 * var(--px));
  transform: translate(-50%, -50%);
  width: calc(32 * var(--px));
  height: calc(32 * var(--px));
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.iv2-poster-cover .iv2-play::after {
  content: '';
  width: 0;
  height: 0;
  border-top: calc(6 * var(--px)) solid transparent;
  border-bottom: calc(6 * var(--px)) solid transparent;
  border-left: calc(9 * var(--px)) solid #ffffff;
  margin-left: calc(2 * var(--px));
}

/* Figma 61:2857: 白色面板绝对定位于卡片底部，p-8，下圆角 8px，内部 gap-8 */
.iv2-poster-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: calc(8 * var(--px));
  background: #ffffff;
  border-radius: 0 0 calc(8 * var(--px)) calc(8 * var(--px));
  display: flex;
  flex-direction: column;
  gap: calc(8 * var(--px));
  box-sizing: border-box;
}

/* Figma 61:2859: 11px Semibold / lh11 纯黑 */
.iv2-poster-name {
  font-size: calc(11 * var(--px));
  line-height: calc(11 * var(--px));
  font-weight: 600;
  color: #000000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Figma 61:2860: gap-4 */
.iv2-chip-row {
  display: flex;
  gap: calc(4 * var(--px));
  overflow: hidden;
}

/* Figma 61:2862: 26×14, rounded-2, #E5E6EB, 文字 9px/12 #4E5969 */
.iv2-chip {
  background: #e5e6eb;
  color: #4e5969;
  font-size: calc(9 * var(--px));
  line-height: calc(14 * var(--px));
  height: calc(14 * var(--px));
  min-width: calc(26 * var(--px));
  text-align: center;
  padding: 0 calc(4 * var(--px));
  border-radius: calc(2 * var(--px));
  white-space: nowrap;
  flex-shrink: 0;
  box-sizing: border-box;
  border: none;
}

/* Figma: 分享数与「套用」按钮同一行（按钮绝对定位在右侧） */
.iv2-poster-foot {
  position: relative;
  display: flex;
  align-items: center;
}

/* Figma 61:2867: 9px/16 #CCCCCC Medium */
.iv2-poster-meta {
  font-size: calc(9 * var(--px));
  line-height: calc(16 * var(--px));
  font-weight: 500;
  color: #cccccc;
  white-space: nowrap;
}

/* Figma 61:2868: h-18, rounded-99, bg rgba(82,131,255,.26), 11px Semibold, 右侧 -1px */
.iv2-poster-action {
  position: absolute;
  right: calc(-1 * var(--px));
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: calc(18 * var(--px));
  padding: 0 calc(8 * var(--px));
  background: rgba(82, 131, 255, 0.26);
  color: #5283ff;
  font-size: calc(11 * var(--px));
  font-weight: 600;
  border-radius: calc(99 * var(--px));
  white-space: nowrap;
}

/* ========== 优质文章卡片列表 ========== */
/* Figma 61:2753: px-8 py-12, rounded-8 */
.iv2-article-card {
  background: #ffffff;
  border-radius: calc(8 * var(--px));
  padding: calc(12 * var(--px)) calc(8 * var(--px));
  box-sizing: border-box;
}

/* Figma 61:2755: 封面与正文 gap-12；条目间 16px + 分割线 + 16px */
.iv2-article-item {
  position: relative;
  display: flex;
  gap: calc(12 * var(--px));
  cursor: pointer;
  align-items: flex-start;
}

.iv2-article-item + .iv2-article-item {
  margin-top: calc(16 * var(--px));
  padding-top: calc(16 * var(--px));
  border-top: 0.5px solid #e7e7e7;
}

/* Figma 61:2756: 96×64 (3:2), rounded-8 */
.iv2-article-cover {
  position: relative;
  width: calc(96 * var(--px));
  height: calc(64 * var(--px));
  flex-shrink: 0;
  border-radius: calc(8 * var(--px));
  overflow: hidden;
  background: #eaf1ff;
}

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

/* Figma 61:2754: flex-1，高 70.569px，三段两端对齐 */
.iv2-article-body {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: calc(70.569 * var(--px));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Figma 61:2757: 13px Medium / lh16, tracking .5px, #262626 */
.iv2-article-title {
  margin: 0;
  font-size: calc(13 * var(--px));
  line-height: calc(16 * var(--px));
  letter-spacing: calc(0.5 * var(--px));
  font-weight: 500;
  color: #262626;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-all;
}

/* Figma: 与卡片标签同规格 26×14 / 9px / #E5E6EB，gap-4 */
.iv2-article-chips {
  display: flex;
  align-items: center;
  gap: calc(4 * var(--px));
  height: calc(14 * var(--px));
  overflow: hidden;
}

.iv2-article-foot {
  display: flex;
  align-items: center;
  height: calc(14.946 * var(--px));
  /* 让位给右下角绝对定位的「查看」按钮 */
  padding-right: calc(60 * var(--px));
}

/* Figma 61:2765: 9.964px / lh14.946 / #BFBFBF, gap-8 */
.iv2-article-stats {
  font-size: calc(9.964 * var(--px));
  line-height: calc(14.946 * var(--px));
  color: #bfbfbf;
  display: flex;
  align-items: center;
  gap: calc(8 * var(--px));
  white-space: nowrap;
}

/* Figma 61:2768: 右下角 h-24, px-8 py-4, rounded-99, bg rgba(82,131,255,.26), 12/20 Semibold */
.iv2-article-action {
  position: absolute;
  right: 0;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: calc(24 * var(--px));
  padding: calc(4 * var(--px)) calc(8 * var(--px));
  background: rgba(82, 131, 255, 0.26);
  border: none;
  color: #5283ff;
  font-size: calc(12 * var(--px));
  line-height: calc(20 * var(--px));
  font-weight: 600;
  border-radius: calc(99 * var(--px));
  box-sizing: border-box;
  white-space: nowrap;
}

/* ========== 底部双按钮 (更多 + 换一批) ========== */
/* Figma 61:2875: gap-10，距上方内容 12px，下留 20px */
.iv2-dual-btns {
  display: flex;
  align-items: center;
  gap: calc(10 * var(--px));
  margin-top: calc(12 * var(--px));
  padding-bottom: calc(20 * var(--px));
}

/* Figma 61:2876: 78×40, rounded-1000, border #D8E1F1, 16/24 #999 */
.iv2-btn-more {
  width: calc(78 * var(--px));
  height: calc(40 * var(--px));
  border-radius: 1000px;
  border: 1px solid #d8e1f1;
  background: transparent;
  color: #999999;
  font-size: calc(16 * var(--px));
  line-height: calc(24 * var(--px));
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.iv2-btn-more:active {
  background: rgba(0, 0, 0, 0.05);
}

/* Figma 61:2879: flex-1 h-40, rounded-100, border #5283FF, gap-4, 16/24 Semibold */
.iv2-btn-refresh {
  flex: 1;
  height: calc(40 * var(--px));
  border-radius: 100px;
  border: 1px solid #5283ff;
  background: transparent;
  color: #5283ff !important;
  font-size: calc(16 * var(--px));
  line-height: calc(24 * var(--px));
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(4 * var(--px));
  cursor: pointer;
  box-sizing: border-box;
  padding: 0;
  -webkit-appearance: none;
  transition: all 0.2s ease;
}

.iv2-btn-refresh span {
  color: #5283ff !important;
  font-weight: 600;
}

.iv2-btn-refresh:active:not(:disabled):not(.is-disabled) {
  background: rgba(82, 131, 255, 0.08);
}

/* Figma 61:2881: size-16 */
.iv2-btn-refresh img {
  width: calc(16 * var(--px));
  height: calc(16 * var(--px));
}

/* 禁用/置灰状态（数量 < 6 或全无） */
.iv2-btn-refresh:disabled,
.iv2-btn-refresh.is-disabled {
  border-color: #d8e1f1 !important;
  background: transparent !important;
  color: #c0c4cc !important;
  cursor: not-allowed !important;
  pointer-events: none;
}

.iv2-btn-refresh:disabled span,
.iv2-btn-refresh.is-disabled span {
  color: #c0c4cc !important;
}

.iv2-btn-refresh:disabled img,
.iv2-btn-refresh.is-disabled img {
  opacity: 0.35;
  filter: grayscale(100%);
}

/* ========== 到底分割提示 ========== */
.iv2-end-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0 0.2rem;
}

.iv2-end-line {
  flex: 1;
  height: 1px;
  background: #eeeeee;
}

.iv2-end-text {
  font-size: 0.28rem;
  line-height: 0.4rem;
  color: #999999;
  padding: 0 0.24rem;
  white-space: nowrap;
}

.iv2-end-text em {
  color: #5283ff;
  font-style: normal;
  font-weight: 500;
  cursor: pointer;
}

/* ========== 行业模式悬浮球 ========== */
.iv2-industry-fab {
  position: fixed;
  right: calc(10 * var(--px));
  /* 底部 TabBar 62px + 安全区 + 20px 间距 */
  bottom: calc(82 * var(--px) + env(safe-area-inset-bottom, 0px));
  z-index: 14;
  width: calc(64 * var(--px));
  height: calc(66 * var(--px));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: fab-enter 0.5s ease, fab-idle 3s ease-in-out 0.5s infinite;
  -webkit-tap-highlight-color: transparent;
}

.iv2-industry-fab img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0.08rem 0.16rem rgba(25, 71, 161, 0.2));
}

.iv2-industry-fab.bouncing {
  animation: fab-bounce 0.5s ease;
}

@keyframes fab-enter {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes fab-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.08rem); }
}

@keyframes fab-bounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.2) rotate(-10deg); }
  60% { transform: scale(0.95) rotate(6deg); }
  100% { transform: scale(1) rotate(0); }
}

/* ========== 空状态 & 骨架屏 ========== */
.iv2-empty {
  padding: 0.48rem 0.2rem;
  text-align: center;
  color: #999999;
  font-size: 0.24rem;
}

/* 渐进式阶梯提示（数量 < 6 条时） */
.iv2-count-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.08rem;
  margin-top: 0.2rem;
  padding: 0.12rem 0.24rem;
  background: rgba(82, 131, 255, 0.06);
  border-radius: 0.12rem;
  font-size: 0.22rem;
  line-height: 0.32rem;
  color: #5283ff;
  text-align: center;
}

.iv2-count-tip::before {
  content: '';
  width: 0.26rem;
  height: 0.26rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235283ff'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E") center / contain no-repeat;
  flex-shrink: 0;
}

/* 0 条时的精美占位卡片 */
.iv2-empty-card {
  background: #ffffff;
  border-radius: 0.24rem;
  padding: 0.48rem 0.32rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--iv2-shadow);
  box-sizing: border-box;
}

.iv2-empty-icon {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background-color: #edf4ff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.2rem;
  background-size: 0.6rem 0.6rem;
  background-position: center;
  background-repeat: no-repeat;
}

.iv2-empty-icon.is-poster {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235283ff'%3E%3Cpath d='M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z'/%3E%3C/svg%3E");
}

.iv2-empty-icon.is-video {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235283ff'%3E%3Cpath d='M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4z'/%3E%3C/svg%3E");
}

.iv2-empty-icon.is-article {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235283ff'%3E%3Cpath d='M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z'/%3E%3C/svg%3E");
}

.iv2-empty-title {
  font-size: 0.28rem;
  font-weight: 600;
  color: #262626;
  line-height: 0.4rem;
}

.iv2-empty-desc {
  font-size: 0.22rem;
  color: #999999;
  line-height: 0.32rem;
  margin-top: 0.08rem;
  margin-bottom: 0.28rem;
}

.iv2-empty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 0.64rem;
  padding: 0 0.36rem;
  border-radius: 999px;
  background: #5283ff;
  color: #ffffff;
  font-size: 0.26rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 0.04rem 0.12rem rgba(82, 131, 255, 0.3);
}

.iv2-empty-btn:active {
  background: #4070eb;
}

@keyframes iv2-skel {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.42; }
}

.iv2-skel {
  pointer-events: none;
}

.iv2-skel-block {
  display: block;
  background: #eaf1ff;
  border-radius: 0.08rem;
  animation: iv2-skel 1.2s ease-in-out infinite;
}

.iv2-skel-fill {
  position: absolute;
  inset: 0;
  border-radius: 0;
}

/* 与文章正文实测尺寸对齐：标题 2×16、标签 14、底部 14.946 */
.iv2-skel-title {
  height: calc(32 * var(--px));
  width: 95%;
}

.iv2-skel-chip {
  height: calc(14 * var(--px));
  width: 36%;
}

.iv2-skel-line {
  height: calc(14.946 * var(--px));
  width: 100%;
}

/* ========== 缺省 / 封面缺失占位图状态 ========== */
:root {
  --iv2-broken-start: #edf4ff;
  --iv2-broken-mid: #f7faff;
  --iv2-broken-end: #e3edff;
}

.iv2-poster-cover.is-broken,
.iv2-article-cover.is-broken {
  background: linear-gradient(160deg, var(--iv2-broken-start) 0%, var(--iv2-broken-mid) 58%, var(--iv2-broken-end) 100%) !important;
}

/* 海报缺失占位图案：相框/图片矢量图标 */
.iv2-poster-cover.is-broken::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 35%;
  z-index: 1;
  width: 0.64rem;
  height: 0.64rem;
  transform: translate(-50%, -50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235283ff'%3E%3Cpath d='M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z'/%3E%3C/svg%3E")
  center / contain no-repeat;
  opacity: 0.35;
  pointer-events: none;
}

/* 视频缺失占位：中心播放按钮依然醒目可见 */
.iv2-poster-cover.is-video.is-broken::before {
  display: none;
}

.iv2-poster-cover.is-video.is-broken .iv2-play {
  background-color: rgba(82, 131, 255, 0.45);
}

/* 文章缺失占位图案：文档/文章矢量图标 */
.iv2-article-cover.is-broken::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 0.56rem;
  height: 0.56rem;
  transform: translate(-50%, -50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235283ff'%3E%3Cpath d='M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z'/%3E%3C/svg%3E")
  center / contain no-repeat;
  opacity: 0.35;
  pointer-events: none;
}

/* ========== 左侧分享动态 Toast (提高层级防止被卡片角标遮挡) ========== */
.left-fixBtn {
  position: fixed;
  left: 0;
  bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  z-index: 30 !important;
  display: flex;
  align-items: center;
  width: 2.3rem;
  padding: 0.1rem 0.14rem;
  font-size: 0.2rem;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(0.1rem);
  -webkit-backdrop-filter: blur(0.1rem);
  color: #ffffff;
  border-radius: 0 0.6rem 0.6rem 0;
  box-shadow: 0 0.04rem 0.12rem rgba(0, 0, 0, 0.15);
}

.left-fixBtn > img {
  width: 0.48rem;
  height: 0.48rem;
  margin-right: 0.1rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.left-fixBtn .left-title {
  width: 1.5rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* ========== 邀请有礼浮窗 ========== */
.iv2-float {
  position: fixed;
  right: 0.2rem;
  bottom: calc(1.4rem + env(safe-area-inset-bottom, 0px));
  z-index: 15;
  width: 1.2rem;
}

.iv2-float img {
  width: 100%;
  height: auto;
  display: block;
}

/* tabbar */
.iv2-page .common-fixBar {
  box-shadow: 0 -0.02rem 0.16rem rgba(0, 0, 0, 0.06);
}

/* 右侧悬浮球 */
.ql-fab-wrapper {
  z-index: 30 !important;
}
