.page-home {
  --home-teal-deep: #073640;
  --home-orange-deep: #9c3925;
  --home-cream: #fff8e7;
  --home-blue: #d9e4ec;
  --home-sand: #e2d6c2;
  --home-ink: #2b2b2b;
  --home-yellow: #f2b705;
  --home-rose: #d65a8a;
  --home-paper: #f5f0e8;

  background: var(--bg-paper);
  color: var(--text-main);
}

.page-home .home-hero {
  position: relative;
  background: var(--bg-teal);
  color: var(--text-invert);
  overflow: hidden;
  padding: var(--sp-lg) 0 var(--sp-xl);
}

.page-home .home-hero::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  background: repeating-linear-gradient(90deg, var(--accent-yellow) 0 6px, rgba(11, 59, 71, 0.55) 6px 12px);
  z-index: 3;
  pointer-events: none;
}

.page-home .home-hero::after {
  content: "";
  position: absolute;
  top: -6%;
  right: 0;
  width: 70%;
  height: 116%;
  background: var(--bg-orange);
  clip-path: polygon(22% 0, 100% 0, 100% 100%, 0% 100%);
  z-index: 0;
}

.page-home .home-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-lg);
  align-items: center;
}

.page-home .hero-copy {
  padding-right: 0;
}

.page-home .hero-copy::before {
  content: "";
  display: block;
  width: 76px;
  height: 14px;
  margin-bottom: var(--sp-md);
  background: var(--accent-yellow);
  clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%);
}

.page-home .breadcrumb-list {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  list-style: none;
  margin: 0 0 var(--sp-md);
  padding: 0;
  font-size: var(--text-caption);
  color: rgba(245, 240, 232, 0.72);
}

.page-home .breadcrumb-list a {
  color: rgba(245, 240, 232, 0.88);
  text-decoration: none;
}

.page-home .breadcrumb-list a:hover {
  color: var(--accent-yellow);
}

.page-home .breadcrumb-current {
  color: var(--accent-yellow);
}

.page-home .hero-kicker {
  display: inline-block;
  margin: 0 0 var(--sp-sm);
  padding: var(--sp-xs) var(--sp-sm);
  background: rgba(242, 183, 5, 0.14);
  border: 1px solid rgba(242, 183, 5, 0.4);
  border-radius: 99px;
  font-size: var(--text-caption);
  letter-spacing: 0.06em;
  color: var(--accent-yellow);
}

.page-home .hero-title {
  margin: 0 0 var(--sp-md);
  font-family: var(--font-head);
  font-size: var(--text-h1);
  line-height: 1.15;
  max-width: 900px;
}

.page-home .hero-lead {
  margin: 0;
  font-size: var(--text-base);
  color: rgba(245, 240, 232, 0.86);
  max-width: 720px;
  line-height: 1.7;
}

.page-home .hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  margin: var(--sp-lg) 0;
}

.page-home .hero-stat {
  display: inline-flex;
  flex-direction: column;
  min-width: 88px;
  padding: var(--sp-sm) var(--sp-md);
  background: rgba(255, 248, 231, 0.08);
  border: 1px solid rgba(255, 248, 231, 0.22);
  border-radius: var(--radius);
  font-size: var(--text-caption);
  color: rgba(245, 240, 232, 0.78);
}

.page-home .hero-stat b {
  font-family: var(--font-head);
  font-size: 1.9rem;
  line-height: 1.1;
  color: var(--text-invert);
}

.page-home .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
}

.page-home .hero-actions .btn {
  border: 2px solid rgba(255, 248, 231, 0.55);
  background: transparent;
  color: var(--text-invert);
  border-radius: 99px;
  padding: var(--sp-sm) var(--sp-lg);
  font-weight: 700;
  text-decoration: none;
  font-size: var(--text-small);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.page-home .hero-actions .btn-primary {
  background: var(--accent-yellow);
  border-color: var(--accent-yellow);
  color: var(--text-deep);
}

.page-home .hero-actions .btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 248, 231, 0.16);
}

.page-home .hero-actions .btn-primary:hover {
  background: var(--accent-yellow);
  color: var(--text-deep);
}

.page-home .hero-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--card-cream);
  border-radius: var(--radius-lg);
  transform: rotate(1.5deg);
  box-shadow: var(--shadow-raised);
}

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

.page-home .hero-poster-badge {
  position: absolute;
  top: var(--sp-md);
  left: var(--sp-md);
  background: var(--accent-yellow);
  color: var(--text-deep);
  border: none;
}

.page-home .hero-poster-note {
  position: absolute;
  left: var(--sp-md);
  bottom: var(--sp-md);
  padding: var(--sp-xs) var(--sp-sm);
  background: rgba(11, 59, 71, 0.85);
  color: var(--text-invert);
  border-radius: 99px;
  font-size: var(--text-caption);
  letter-spacing: 0.04em;
}

.page-home .section-latest,
.page-home .section-filters,
.page-home .section-cloud,
.page-home .section-version {
  background: var(--bg-paper);
  padding: var(--sp-xl) 0;
}

.page-home .section-rank,
.page-home .section-timeline {
  background: var(--bg-orange);
  padding: var(--sp-xl) 0;
  color: var(--text-invert);
}

.page-home .section-bundles {
  background: var(--bg-teal);
  padding: var(--sp-xl) 0;
  color: var(--text-invert);
  position: relative;
  overflow: hidden;
}

.page-home .section-head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-md);
  flex-wrap: wrap;
  margin-bottom: var(--sp-lg);
}

.page-home .section-kicker {
  writing-mode: vertical-rl;
  font-size: var(--text-caption);
  letter-spacing: 0.1em;
  color: var(--text-muted);
  border-left: 2px solid var(--accent-yellow);
  padding-left: var(--sp-xs);
  text-transform: uppercase;
}

.page-home .section-rank .section-head .section-kicker,
.page-home .section-timeline .section-head .section-kicker,
.page-home .section-bundles .section-head .section-kicker {
  color: rgba(245, 240, 232, 0.78);
  border-color: var(--accent-yellow);
}

.page-home .section-title {
  margin: 0;
  font-family: var(--font-head);
  font-size: var(--text-h2);
  color: var(--text-main);
}

.page-home .section-rank .section-title,
.page-home .section-timeline .section-title,
.page-home .section-bundles .section-title {
  color: var(--text-invert);
}

.page-home .section-more {
  margin-left: auto;
  font-size: var(--text-small);
  color: var(--bg-orange);
  text-decoration: none;
  border-bottom: 2px solid var(--accent-yellow);
  padding-bottom: 2px;
}

.page-home .section-rank .section-more,
.page-home .section-timeline .section-more,
.page-home .section-bundles .section-more {
  color: var(--accent-yellow);
}

.page-home .latest-scroll {
  display: flex;
  gap: var(--sp-md);
  overflow-x: auto;
  padding: var(--sp-sm) var(--sp-sm) var(--sp-lg);
  scroll-snap-type: x mandatory;
}

.page-home .latest-scroll .card {
  scroll-snap-align: start;
}

.page-home .ep-card {
  flex: 0 0 min(78vw, 280px);
  background: var(--card-cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-home .ep-card .card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--card-blue);
}

.page-home .ep-card .card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.page-home .card-media-tags {
  position: absolute;
  left: var(--sp-sm);
  bottom: var(--sp-sm);
  display: flex;
  gap: var(--sp-xs);
}

.page-home .ep-card .card-body {
  padding: var(--sp-sm) var(--sp-md) var(--sp-md);
}

.page-home .ep-card .card-title {
  margin: 0 0 var(--sp-xs);
  font-family: var(--font-head);
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--text-main);
}

.page-home .ep-card .card-meta {
  margin: 0 0 var(--sp-sm);
  font-size: var(--text-caption);
  color: var(--text-muted);
}

.page-home .ep-card .card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-sm);
}

.page-home .ep-card .card-badges {
  display: flex;
  gap: var(--sp-xs);
  flex-wrap: wrap;
}

.page-home .ep-card .card-quick {
  font-size: var(--text-caption);
  color: var(--bg-orange);
  text-decoration: none;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.page-home .ep-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-raised);
}

.page-home .ep-card:hover .card-media img {
  transform: scale(1.04);
}

.page-home .ep-card:hover .card-quick {
  opacity: 1;
}

@media (hover: none) {
  .page-home .ep-card .card-quick {
    opacity: 1;
  }
}

.page-home .rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}

.page-home .rank-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: var(--sp-sm);
  row-gap: var(--sp-xs);
  align-items: center;
  background: var(--card-cream);
  border-radius: var(--radius);
  padding: var(--sp-sm) var(--sp-md);
  color: var(--text-main);
  box-shadow: var(--shadow);
}

.page-home .rank-row:nth-child(1),
.page-home .rank-row:nth-child(2),
.page-home .rank-row:nth-child(3) {
  background: var(--card-blue);
}

.page-home .rank-order {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.6rem;
  color: var(--bg-orange);
  text-align: center;
}

.page-home .rank-order.rank-top {
  color: var(--accent-yellow);
}

.page-home .rank-row .list-main {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-wrap: wrap;
}

.page-home .rank-row .list-main-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--text-base);
}

.page-home .rank-type {
  font-size: var(--text-caption);
  background: var(--label-clarity);
  color: #fff;
  border-radius: 99px;
  padding: 2px 8px;
  white-space: nowrap;
}

.page-home .rank-row:nth-child(2) .rank-type,
.page-home .rank-row:nth-child(4) .rank-type,
.page-home .rank-row:nth-child(6) .rank-type,
.page-home .rank-row:nth-child(8) .rank-type,
.page-home .rank-row:nth-child(10) .rank-type {
  background: var(--label-sub);
}

.page-home .rank-extra {
  grid-column: 2 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
}

.page-home .rank-progress {
  font-size: var(--text-caption);
  color: var(--text-muted);
  white-space: nowrap;
}

.page-home .rank-metric {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-sm);
  font-size: var(--text-caption);
  color: var(--text-muted);
}

.page-home .metric-track {
  display: block;
  width: 92px;
  height: 6px;
  background: rgba(43, 43, 43, 0.14);
  border-radius: 99px;
  overflow: hidden;
}

.page-home .metric-fill {
  display: block;
  height: 100%;
  background: var(--state-hot);
  border-radius: 99px;
}

.page-home .metric-fill.rank-fill-98 { width: 98%; }
.page-home .metric-fill.rank-fill-94 { width: 94%; }
.page-home .metric-fill.rank-fill-91 { width: 91%; }
.page-home .metric-fill.rank-fill-88 { width: 88%; }
.page-home .metric-fill.rank-fill-84 { width: 84%; }
.page-home .metric-fill.rank-fill-80 { width: 80%; }
.page-home .metric-fill.rank-fill-79 { width: 79%; }
.page-home .metric-fill.rank-fill-75 { width: 75%; }
.page-home .metric-fill.rank-fill-71 { width: 71%; }
.page-home .metric-fill.rank-fill-68 { width: 68%; }

.page-home .filter-matrix {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-sm);
}

.page-home .filter-matrix .tile {
  position: relative;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--sp-md);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-home .filter-matrix .tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-raised);
}

.page-home .tile-label {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.2;
}

.page-home .tile-count {
  font-size: var(--text-small);
  opacity: 0.85;
  margin-top: 2px;
}

.page-home .tile-poster-img {
  position: absolute;
  right: -14px;
  bottom: -22px;
  width: 78%;
  height: auto;
  opacity: 0.28;
  pointer-events: none;
  transform: rotate(6deg);
  border-radius: 8px;
}

.page-home .tag-group .tag {
  text-decoration: none;
}

.page-home .bundle-bg-img {
  position: absolute;
  right: -70px;
  bottom: -30px;
  width: 420px;
  max-width: 58%;
  height: auto;
  opacity: 0.13;
  pointer-events: none;
}

.page-home .section-bundles .container {
  position: relative;
  z-index: 1;
}

.page-home .bundle-stack {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xl);
}

.page-home .bundle-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-md);
  margin-bottom: var(--sp-md);
}

.page-home .bundle-title {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--text-invert);
}

.page-home .bundle-more {
  color: var(--accent-yellow);
  font-size: var(--text-small);
  text-decoration: none;
  border-bottom: 1px solid rgba(242, 183, 5, 0.5);
  padding-bottom: 2px;
}

.page-home .bundle-scroll {
  display: flex;
  gap: var(--sp-sm);
  overflow-x: auto;
  padding-bottom: var(--sp-sm);
  scroll-snap-type: x mandatory;
}

.page-home .bundle-card {
  flex: 0 0 168px;
  scroll-snap-align: start;
  background: var(--card-cream);
  color: var(--text-main);
  border-radius: var(--radius);
  border-left: 8px solid var(--accent-rose);
  padding: var(--sp-md);
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-home .bundle-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-raised);
}

.page-home .bundle-card-no {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--accent-rose);
  line-height: 1.1;
}

.page-home .bundle-card-title {
  margin: var(--sp-sm) 0 var(--sp-xs);
  font-family: var(--font-head);
  font-size: 1rem;
  line-height: 1.4;
}

.page-home .bundle-card-meta {
  margin: 0 0 var(--sp-sm);
  font-size: var(--text-caption);
  color: var(--text-muted);
}

.page-home .bundle-card-link {
  font-size: var(--text-caption);
  color: var(--bg-orange);
  text-decoration: none;
  font-weight: 700;
}

.page-home .cloud-wrap {
  background: var(--card-blue);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  margin-bottom: var(--sp-lg);
}

.page-home .tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
}

.page-home .tag-cloud .tag {
  display: inline-block;
  padding: var(--sp-xs) var(--sp-sm);
  border-radius: 99px;
  font-size: var(--text-small);
  background: var(--card-cream);
  color: var(--text-main);
  border: 1px solid transparent;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.page-home .tag-cloud .tag:hover {
  transform: translateY(-2px);
  border-color: var(--accent-yellow);
  box-shadow: var(--shadow);
}

.page-home .tag-cloud .cloud-xl {
  font-size: 1.08rem;
  padding: var(--sp-sm) var(--sp-md);
}

.page-home .tag-cloud .cloud-lg {
  font-size: 0.95rem;
}

.page-home .tag-cloud .cloud-md {
  font-size: 0.85rem;
}

.page-home .tag-cloud .cloud-sm {
  font-size: 0.78rem;
}

.page-home .tag-cloud .cloud-yellow {
  background: var(--accent-yellow);
  color: var(--text-deep);
}

.page-home .tag-cloud .cloud-rose {
  background: var(--accent-rose);
  color: var(--text-invert);
}

.page-home .tag-cloud .cloud-teal {
  background: var(--bg-teal);
  color: var(--text-invert);
}

.page-home .tag-cloud .is-clarity {
  background: var(--label-clarity);
  color: #fff;
}

.page-home .tag-cloud .is-subtitle {
  background: var(--label-sub);
  color: #fff;
}

.page-home .index-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: var(--sp-md);
}

.page-home .rail-item {
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card-cream);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: var(--text-caption);
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.page-home .rail-item:hover {
  border-color: var(--accent-rose);
}

.page-home .rail-item.is-current {
  background: var(--accent-yellow);
  color: var(--text-deep);
  border-color: var(--accent-yellow);
}

.page-home .timeline-wrap {
  position: relative;
  padding-left: 24px;
}

.page-home .timeline-wrap::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 99px;
  background: rgba(242, 183, 5, 0.7);
}

.page-home .timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.page-home .timeline-row {
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: var(--sp-sm);
  align-items: center;
  padding: var(--sp-md);
  margin-bottom: var(--sp-sm);
  background: rgba(255, 248, 231, 0.14);
  border: 1px solid rgba(255, 248, 231, 0.18);
  border-radius: var(--radius);
}

.page-home .timeline-node {
  position: absolute;
  left: -24px;
  top: 50%;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent-yellow);
  border: 3px solid var(--bg-orange);
  box-shadow: 0 0 0 2px var(--accent-yellow);
  transform: translateY(-50%);
}

.page-home .timeline-batch {
  font-family: var(--font-head);
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--accent-yellow);
  background: rgba(0, 0, 0, 0.18);
  border-radius: var(--radius);
  text-align: center;
  padding: var(--sp-xs) 0;
}

.page-home .timeline-main {
  min-width: 0;
}

.page-home .timeline-title {
  margin: 0 0 2px;
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--text-invert);
}

.page-home .timeline-meta {
  margin: 0;
  font-size: var(--text-caption);
  color: rgba(245, 240, 232, 0.82);
  line-height: 1.6;
}

.page-home .timeline-state {
  grid-column: 2 / -1;
  justify-self: start;
}

.page-home .timeline-row .status-badge {
  background: var(--state-done);
  color: var(--text-invert);
}

.page-home .timeline-row .status-badge.is-live {
  background: var(--state-live);
  color: var(--text-invert);
}

.page-home .timeline-row .timeline-week {
  background: var(--accent-yellow);
  color: var(--text-deep);
}

.page-home .version-stack {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.page-home .version-panel {
  background: var(--card-cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.page-home .version-panel summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  padding: var(--sp-md);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  background: rgba(15, 76, 92, 0.07);
}

.page-home .version-panel summary::-webkit-details-marker {
  display: none;
}

.page-home .version-panel summary::after {
  content: "+";
  font-size: 1.5rem;
  line-height: 1;
  color: var(--bg-orange);
  font-weight: 400;
}

.page-home .version-panel[open] summary::after {
  content: "–";
}

.page-home .version-panel ul {
  margin: 0;
  padding: var(--sp-md) var(--sp-lg);
}

.page-home .version-panel li {
  margin: var(--sp-xs) 0;
  font-size: var(--text-small);
  line-height: 1.7;
}

.page-home .back-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: var(--sp-lg) var(--sp-lg) var(--sp-xl);
  padding: var(--sp-sm) var(--sp-md);
  background: var(--bg-teal);
  color: var(--text-invert);
  border-radius: 99px;
  font-size: var(--text-small);
  text-decoration: none;
  box-shadow: var(--shadow);
}

@media (prefers-reduced-motion: reduce) {
  .page-home *,
  .page-home *::before,
  .page-home *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media (min-width: 640px) {
  .page-home .filter-matrix {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-home .rank-row {
    grid-template-columns: 52px 200px 1fr;
    align-items: center;
  }

  .page-home .rank-extra {
    grid-column: 3;
  }

  .page-home .timeline-state {
    grid-column: auto;
    justify-self: end;
  }

  .page-home .timeline-row {
    grid-template-columns: 72px 1fr auto;
  }
}

@media (min-width: 900px) {
  .page-home .home-hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .page-home .hero-copy {
    padding-right: var(--sp-xl);
  }

  .page-home .filter-matrix {
    grid-template-columns: repeat(4, 1fr);
  }

  .page-home .tag-cloud .tag:hover {
    transform: translateY(-3px);
  }
}
