.page-home {
  --home-tile-radius: 14px;
  --home-ink-deep: #2C3E50;
  background: var(--c-bg);
}

.page-home .section-head {
  margin-bottom: 26px;
}

/* ---------- 01 分类磁贴 ---------- */
.page-home .home-tiles {
  padding: 42px 0 18px;
}

.page-home .home-tagribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 26px;
}

.page-home .home-tagribbon span {
  background: var(--c-yellow);
  color: var(--c-ink);
  border: 1px solid rgba(52, 73, 94, 0.08);
  border-radius: 999px;
  padding: 7px 15px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  box-shadow: var(--shadow-sm);
}

.page-home .home-tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 118px;
  grid-auto-flow: dense;
  gap: 14px;
}

.page-home .home-tile {
  position: relative;
  min-height: 0;
  border-radius: var(--radius-cut);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-decoration: none;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.page-home .home-tile::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.page-home .home-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.page-home .home-tile--large {
  grid-row: span 2;
  grid-column: span 2;
}

.page-home .home-tile__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.page-home .home-tile__name {
  position: relative;
  z-index: 1;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 800;
  color: var(--c-white);
}

.page-home .home-tile__count {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--c-white);
  line-height: 1.2;
}

.page-home .home-tile__go {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  color: var(--c-white);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: rgba(52, 73, 94, 0.24);
}

.page-home .home-tile__svg {
  position: absolute;
  right: 16px;
  bottom: 18px;
  width: 58px;
  height: 58px;
  z-index: 1;
}

.page-home .home-tile--cta {
  background: var(--c-ink);
}

.page-home .home-tile--cta .home-tile__name {
  font-size: 14px;
}

.page-home .home-tile--cta .home-tile__count {
  font-size: 17px;
  color: var(--c-yellow);
}

/* ---------- 02 题材标签云 ---------- */
.page-home .home-tagcloud {
  padding: 44px 0;
}

.page-home .home-tagcloud__wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 14px;
  align-items: baseline;
}

.page-home .home-tagcloud .tag {
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.page-home .home-tagcloud .tag:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: var(--shadow-sm);
}

.page-home .home-tag--xl { font-size: 24px; padding: 8px 18px; }
.page-home .home-tag--lg { font-size: 19px; padding: 7px 16px; }
.page-home .home-tag--md { font-size: 15px; padding: 6px 13px; }
.page-home .home-tag--sm { font-size: 12px; padding: 5px 10px; }

/* ---------- 03 更新书讯流 ---------- */
.page-home .home-updates {
  padding: 44px 0;
}

.page-home .home-updates__filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--c-line);
}

.page-home .home-updates__batches {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.page-home .update-batch {
  background: var(--c-bg-card);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  border-top: 5px solid var(--c-blue);
}

.page-home .update-batch--alt {
  border-top-color: var(--c-purple);
}

.page-home .update-batch__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.page-home .update-batch__label {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 16px;
  color: var(--c-ink);
}

.page-home .update-batch__count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--c-ink);
  background: var(--c-line);
  padding: 3px 10px;
  border-radius: 999px;
}

.page-home .update-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--c-line);
  align-items: flex-start;
}

.page-home .update-item:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.page-home .update-item__thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.page-home .update-item__body {
  flex: 1;
  min-width: 0;
}

.page-home .update-item__title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 4px;
}

.page-home .update-item__title a {
  color: var(--c-ink);
  text-decoration: none;
}

.page-home .update-item__title a:hover {
  color: var(--c-orange);
}

.page-home .update-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 5px;
}

.page-home .update-item__tags .tag {
  font-size: 12px;
  padding: 2px 8px;
}

.page-home .update-item__chapter {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c-ink);
  opacity: 0.75;
}

.page-home .update-item__badges {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  flex-shrink: 0;
}

/* ---------- 04 热门榜单 ---------- */
.page-home .home-hot {
  padding: 44px 0;
}

.page-home .home-hot__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.page-home .home-hot__item {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-areas:
    "rank meta"
    "meter meter";
  gap: 8px 14px;
  align-items: center;
  background: var(--c-bg-card);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  border-left: 5px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.page-home .home-hot__item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.page-home .home-hot__item:nth-child(1) { border-left-color: var(--c-orange); }
.page-home .home-hot__item:nth-child(2) { border-left-color: var(--c-blue); }
.page-home .home-hot__item:nth-child(3) { border-left-color: var(--c-green); }
.page-home .home-hot__item:nth-child(4) { border-left-color: var(--c-yellow); }
.page-home .home-hot__item:nth-child(5) { border-left-color: var(--c-purple); }
.page-home .home-hot__item:nth-child(6) { border-left-color: var(--c-teal); }

.page-home .home-hot__rank {
  grid-area: rank;
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 700;
  color: var(--c-ink);
  line-height: 1;
}

.page-home .home-hot__thumb {
  grid-area: thumb;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  display: none;
}

.page-home .home-hot__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-home .home-hot__thumb--plain {
  display: none;
  position: relative;
  background: var(--c-line);
}

.page-home .home-hot__deco {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  transform: rotate(18deg);
  top: 20px;
  left: 20px;
}

.page-home .home-hot__deco--cyan { background: var(--c-teal); }
.page-home .home-hot__deco--orange { background: var(--c-orange); }
.page-home .home-hot__deco--yellow { background: var(--c-yellow); }
.page-home .home-hot__deco--violet { background: var(--c-purple); }
.page-home .home-hot__deco--ink { background: var(--c-ink); }

.page-home .home-hot__meta {
  grid-area: meta;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-home .home-hot__name {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 800;
  color: var(--c-ink);
}

.page-home .home-hot__cat {
  font-size: 12px;
  font-family: var(--font-head);
  color: var(--c-ink);
  opacity: 0.65;
}

.page-home .home-hot__meter {
  grid-area: meter;
}

.page-home .home-hot__meter-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--c-ink);
  margin-bottom: 6px;
}

.page-home .home-hot__meter-track {
  height: 8px;
  background: var(--c-line);
  border-radius: 999px;
  overflow: hidden;
}

.page-home .home-hot__meter-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.page-home .home-hot__meter-1 { width: 96%; background: linear-gradient(90deg, var(--c-orange), #FFB347); }
.page-home .home-hot__meter-2 { width: 91%; background: linear-gradient(90deg, var(--c-blue), #85D0F5); }
.page-home .home-hot__meter-3 { width: 87%; background: linear-gradient(90deg, var(--c-green), #B2F2C6); }
.page-home .home-hot__meter-4 { width: 82%; background: linear-gradient(90deg, var(--c-yellow), #F9E58B); }
.page-home .home-hot__meter-5 { width: 78%; background: linear-gradient(90deg, var(--c-purple), #D2A5E8); }
.page-home .home-hot__meter-6 { width: 74%; background: linear-gradient(90deg, var(--c-teal), #8DE3D2); }

/* ---------- 05 系列合集轨道 ---------- */
.page-home .home-series {
  padding: 44px 0;
}

.page-home .home-series .section-head__kicker,
.page-home .home-series .section-head__title {
  color: var(--c-white);
}

.page-home .home-series .section-head__more {
  color: var(--c-yellow);
}

.page-home .home-series__track {
  align-items: stretch;
  padding-bottom: 8px;
}

.page-home .home-series .h-scroll__item {
  width: 82vw;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
}

.page-home .series-block--violet {
  background: linear-gradient(160deg, #6C3483 0%, #2C3E50 70%);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.page-home .series-block--cyan {
  background: linear-gradient(160deg, #148F77 0%, #1B4F72 70%);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.page-home .series-block--gold {
  background: linear-gradient(160deg, #B9770E 0%, #7E5109 70%);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.page-home .series-block__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.page-home .series-block__index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.14);
  padding: 3px 9px;
  border-radius: 999px;
}

.page-home .series-block__name {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  color: var(--c-white);
}

.page-home .series-block__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.page-home .series-block__row--3 {
  grid-template-columns: repeat(3, 1fr);
}

.page-home .series-block__row--2 {
  grid-template-columns: repeat(2, 1fr);
}

.page-home .series-book {
  min-width: 0;
}

.page-home .series-book__cover {
  position: relative;
  height: 210px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--c-ink);
  margin-bottom: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.24);
}

.page-home .series-book__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-home .series-book__cover .badge {
  position: absolute;
  top: 8px;
  left: 8px;
}

.page-home .series-book__cover--fallback {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
}

.page-home .series-book__cover--teal {
  background: linear-gradient(160deg, #1ABC9C 0%, #2C3E50 68%);
}

.page-home .series-book__cover--violet {
  background: linear-gradient(160deg, #9B59B6 0%, #2C3E50 68%);
}

.page-home .series-book__cover--blue {
  background: linear-gradient(160deg, #3498DB 0%, #2C3E50 68%);
}

.page-home .series-book__cover--ink {
  background: linear-gradient(160deg, #34495E 0%, #1A252F 68%);
}

.page-home .series-book__cover--gold {
  background: linear-gradient(160deg, #F1C40F 0%, #B9770E 68%);
}

.page-home .series-book__fallback-mark {
  font-size: 38px;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1;
}

.page-home .series-book__name {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  color: var(--c-white);
  text-align: center;
}

.page-home .series-book__progress {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  margin-top: 2px;
}

/* ---------- 06 章节进度列表 ---------- */
.page-home .home-progress {
  padding: 44px 0;
}

.page-home .home-progress__list {
  background: var(--c-bg-card);
  border-radius: var(--radius-lg);
  padding: 4px 18px;
  box-shadow: var(--shadow-sm);
}

.page-home .home-progress .entry-row {
  border-bottom: 1px dashed var(--c-line);
}

.page-home .home-progress .entry-row:last-child {
  border-bottom: 0;
}

.page-home .home-progress__pagination {
  margin-top: 22px;
  justify-content: center;
}

/* ---------- 07 阅读帮助 ---------- */
.page-home .home-help {
  padding: 44px 0;
}

.page-home .home-help__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.page-home .home-help__card {
  position: relative;
  padding: 26px 20px 22px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.page-home .home-help__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.page-home .home-help__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
}

.page-home .home-help__card:nth-child(1)::before { background: var(--c-orange); }
.page-home .home-help__card:nth-child(2)::before { background: var(--c-green); }
.page-home .home-help__card:nth-child(3)::before { background: var(--c-blue); }
.page-home .home-help__card:nth-child(4)::before { background: var(--c-purple); }

.page-home .home-help__card-title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--c-ink);
}

.page-home .home-help__card-text {
  font-size: 14px;
  line-height: 1.75;
  color: var(--c-ink);
  margin-bottom: 18px;
  flex: 1;
}

.page-home .home-help__btn {
  align-self: flex-start;
  text-decoration: none;
}

/* ---------- 媒体查询：平板与桌面 ---------- */
@media (min-width: 640px) {
  .page-home .home-tile-grid {
    grid-auto-rows: 132px;
    gap: 16px;
  }

  .page-home .home-tile__name {
    font-size: 18px;
  }

  .page-home .home-tile__count {
    font-size: 24px;
  }

  .page-home .home-updates__batches {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .page-home .update-item__thumb {
    width: 84px;
    height: 84px;
  }

  .page-home .home-hot__item {
    grid-template-columns: 48px 1fr auto;
    grid-template-areas: "rank meta meter";
    gap: 12px 16px;
  }

  .page-home .home-hot__meter {
    width: 220px;
  }

  .page-home .home-hot__thumb,
  .page-home .home-hot__thumb--plain {
    display: block;
  }

  .page-home .home-hot__item {
    grid-template-columns: 48px 76px 1fr auto;
    grid-template-areas: "rank thumb meta meter";
  }

  .page-home .home-series .h-scroll__item {
    width: 600px;
  }

  .page-home .series-block__row {
    gap: 14px;
  }

  .page-home .series-book__cover {
    height: 230px;
  }

  .page-home .home-help__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (min-width: 1024px) {
  .page-home .home-tile-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 132px;
    gap: 18px;
  }

  .page-home .home-tile--large {
    min-height: 0;
  }

  .page-home .home-hot__list {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .page-home .home-hot__item {
    grid-template-columns: 56px 96px 1fr 320px;
  }

  .page-home .home-hot__meter {
    width: 320px;
  }

  .page-home .home-series .h-scroll__item {
    width: 720px;
  }

  .page-home .series-block__row {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .page-home .series-block__row--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-home .series-block__row--2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-home .series-book__cover {
    height: 250px;
  }

  .page-home .home-help__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

@media (min-width: 1280px) {
  .page-home .home-tile-grid {
    grid-auto-rows: 144px;
  }

  .page-home .home-tile--large {
    min-height: 0;
  }
}
