.page-home {
  --home-radius-lg: 28px;
  --home-radius-md: 18px;
  --home-glow-orange: 0 10px 28px rgba(255,106,0,.32);
  --home-glow-blue: 0 10px 28px rgba(0,208,255,.28);
  --home-glow-pink: 0 10px 28px rgba(255,75,140,.28);
  background: var(--c-light);
  line-height: 1.5;
}

.page-home .home-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, var(--c-dark-1) 0%, #200f2e 45%, var(--c-dark-2) 100%);
  padding: 24px 0 56px;
}

.page-home .hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .32;
  pointer-events: none;
}

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

.page-home .home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}

.page-home .home-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-home .home-hero-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.page-home .breadcrumb ol {
  display: flex;
  padding: 0;
  margin: 0;
  list-style: none;
  color: var(--c-light-text);
  font-size: .85rem;
}

.page-home .home-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-home .home-version-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid rgba(0,208,255,.45);
  border-radius: var(--radius-pill);
  color: var(--c-blue);
  background: rgba(0,208,255,.08);
  font-family: var(--font-mono);
  font-size: .78rem;
  box-shadow: var(--home-glow-blue);
}

.page-home .home-hero-titlewrap {
  max-width: 860px;
}

.page-home .home-hero h1 {
  margin: 0;
  color: var(--c-light-text);
  font-family: var(--font-head);
  font-size: 2.2rem;
  line-height: 1.2;
  letter-spacing: .02em;
  text-shadow:
    0 0 8px rgba(255,75,140,.55),
    0 0 24px rgba(255,106,0,.45),
    0 0 48px rgba(0,208,255,.3);
}

.page-home .home-hero-lead {
  max-width: 720px;
  margin: 10px 0 0;
  color: rgba(255,242,229,.84);
  font-size: .95rem;
}

.page-home .home-tile-matrix {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.page-home .home-tile-matrix .tile {
  position: relative;
  display: block;
  min-height: 118px;
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  color: var(--c-ink);
  text-decoration: none;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.15), 0 8px 20px rgba(0,0,0,.28);
  transition: transform .2s ease, box-shadow .2s ease;
  overflow: hidden;
}

.page-home .home-tile-matrix .tile:hover,
.page-home .home-tile-matrix .tile:focus-visible {
  transform: translateY(-4px);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.12), 0 16px 30px rgba(0,0,0,.32);
}

.page-home .home-tile-matrix .tile-count {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.1;
}

.page-home .home-tile-matrix .tile-label {
  display: block;
  margin-top: 10px;
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: .01em;
}

.page-home .home-tile-matrix .tile-desc {
  display: block;
  margin-top: 4px;
  font-size: .8rem;
  font-weight: 600;
  opacity: .82;
}

.page-home .home-tile-matrix .tile-go {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-size: 1.3rem;
  font-weight: 700;
}

.page-home .home-tile-matrix .tile-deco-img {
  position: absolute;
  right: -16px;
  bottom: -16px;
  width: 96px;
  height: 96px;
  border-radius: 18px;
  object-fit: cover;
  opacity: .35;
  pointer-events: none;
  transform: rotate(-8deg);
}

.page-home .home-tile-matrix .tile-span-2 { grid-column: span 1; }

.page-home .home-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: 32px 20px;
  max-width: var(--container-w);
  margin: 0 auto;
}

.page-home .home-main-left,
.page-home .home-main-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.page-home .home-tool-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, var(--c-orange), var(--c-yellow));
  color: var(--c-ink);
  text-decoration: none;
  box-shadow: var(--home-glow-orange);
  transition: transform .2s ease;
}

.page-home .home-tool-banner:hover {
  transform: translateY(-2px);
}

.page-home .home-tool-banner-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(26,10,30,.18);
  font-size: 1.4rem;
  font-weight: 800;
}

.page-home .home-tool-banner-copy {
  display: flex;
  flex-direction: column;
  flex: 1;
  line-height: 1.4;
}

.page-home .home-tool-banner-copy strong {
  font-size: 1.1rem;
  letter-spacing: .02em;
}

.page-home .home-tool-banner-copy span {
  font-size: .82rem;
  opacity: .85;
}

.page-home .home-latest {
  padding: 22px 18px;
  border-radius: var(--radius-lg);
  background: var(--c-light);
}

.page-home .section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.page-home .section-title {
  position: relative;
  margin: 0;
  padding-left: 16px;
  font-family: var(--font-head);
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--c-ink);
}

.page-home .section-title::before {
  content: "◆";
  position: absolute;
  left: -6px;
  color: var(--c-orange);
}

.page-home .section-desc {
  font-family: var(--font-mono);
  font-size: .8rem;
}

.page-home .section-more {
  color: var(--c-link-dark);
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
}

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

.page-home .latest-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fffdf9;
  box-shadow: 0 4px 14px rgba(26,10,30,.1);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.page-home .latest-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(26,10,30,.16);
}

.page-home .latest-card-art {
  position: relative;
  display: block;
  height: 96px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.page-home .latest-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-home .latest-card-art.art-orange { background: linear-gradient(120deg, #ff9e00, var(--c-orange)); }
.page-home .latest-card-art.art-teal { background: linear-gradient(120deg, #39e6cf, var(--c-teal)); }
.page-home .latest-card-art.art-yellow { background: linear-gradient(120deg, #ffe066, var(--c-yellow)); }
.page-home .latest-card-art.art-blue { background: linear-gradient(120deg, #6fe4ff, var(--c-blue)); }
.page-home .latest-card-art.art-purple { background: linear-gradient(120deg, #c98bff, #8e4bff); }
.page-home .latest-card-art.art-pink { background: linear-gradient(120deg, #ff8ab8, var(--c-pink)); }

.page-home .latest-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.page-home .badge-serial {
  background: var(--c-teal);
  color: #062a24;
}

.page-home .latest-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px 14px;
}

.page-home .latest-card-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 800;
  color: var(--c-ink);
}

.page-home .latest-card-meta {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: #5a4458;
}

.page-home .home-rank {
  padding: 22px 16px;
  border-radius: var(--radius-lg);
  background: #fffaf2;
}

.page-home .home-rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-home .home-rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: var(--radius-md);
  background: #fff5e8;
  transition: transform .15s ease, box-shadow .15s ease;
}

.page-home .home-rank-row:hover {
  transform: translateX(2px);
  box-shadow: 0 6px 14px rgba(26,10,30,.08);
}

.page-home .home-rank-idx {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-weight: 800;
}

.page-home .home-rank-row:nth-child(-n+3) .home-rank-idx { background: var(--c-orange); color: #1a0a1e; }
.page-home .home-rank-row:nth-child(n+4):nth-child(-n+6) .home-rank-idx { background: var(--c-pink); color: #fff2e5; }
.page-home .home-rank-row:nth-child(n+7) .home-rank-idx { background: var(--c-blue); color: #0a1e26; }

.page-home .home-rank-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.page-home .home-rank-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: .92rem;
  font-weight: 800;
  color: var(--c-ink);
}

.page-home .home-rank-cat {
  font-size: .75rem;
  font-weight: 600;
  color: #7d4f68;
}

.page-home .home-rank-heat {
  min-width: 44px;
  text-align: right;
  font-size: .9rem;
  font-weight: 800;
  color: #8a2b4a;
}

.page-home .home-rank-row .metric-bar {
  display: block;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(26,10,30,.08);
  overflow: hidden;
}

.page-home .home-rank-row .metric-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.page-home .home-rank-row:nth-child(-n+3) .metric-bar-fill { background: linear-gradient(90deg, var(--c-orange), var(--c-yellow)); }
.page-home .home-rank-row:nth-child(n+4):nth-child(-n+6) .metric-bar-fill { background: linear-gradient(90deg, var(--c-pink), var(--c-orange)); }
.page-home .home-rank-row:nth-child(n+7) .metric-bar-fill { background: linear-gradient(90deg, var(--c-blue), var(--c-teal)); }

.page-home .home-tags {
  padding: 22px 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(140deg, #1e0c2b 0%, #3a0f20 100%);
}

.page-home .home-tags .section-title { color: var(--c-light-text); }
.page-home .home-tags .section-desc { color: rgba(255,242,229,.72); }

.page-home .home-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-home .home-tag-cloud .tag-item {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 700;
  transition: transform .15s ease, filter .15s ease;
}

.page-home .home-tag-cloud .tag-item:hover {
  transform: translateY(-2px) scale(1.04);
  filter: brightness(1.08);
}

.page-home .tag-size-xl { font-size: 1.08rem; padding: 10px 18px; }
.page-home .tag-size-lg { font-size: .98rem; padding: 8px 15px; }
.page-home .tag-size-md { font-size: .88rem; padding: 6px 13px; }
.page-home .tag-size-sm { font-size: .78rem; padding: 5px 10px; }

.page-home .home-tags-foot {
  display: inline-block;
  margin-top: 16px;
  color: var(--c-blue);
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
}

.page-home .home-batch {
  background: linear-gradient(135deg, var(--c-dark-1) 0%, #13071d 60%, var(--c-dark-2) 100%);
  padding: 44px 0 56px;
}

.page-home .home-batch-inner {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.page-home .home-batch .section-title { color: var(--c-light-text); }
.page-home .home-batch .section-desc { color: rgba(255,242,229,.72); }

.page-home .home-batch-strip {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.page-home .home-batch-scale {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .22;
  pointer-events: none;
}

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

.page-home .home-batch-timeline {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.page-home .home-batch-node {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255,242,229,.07);
  border-left: 4px solid var(--c-orange);
  color: var(--c-light-text);
}

.page-home .home-batch-date {
  font-size: .78rem;
  opacity: .8;
}

.page-home .home-batch-id {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--c-yellow);
}

.page-home .home-batch-count {
  font-size: .82rem;
  color: var(--c-teal);
}

.page-home .home-batch-cats {
  font-size: .8rem;
  opacity: .75;
}

.page-home .home-batch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.page-home .home-batch-actions .btn {
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  text-decoration: none;
}

.page-home .home-batch-actions .btn-primary {
  background: var(--c-orange);
  color: var(--c-ink);
  box-shadow: var(--home-glow-orange);
}

.page-home .home-batch-actions .btn-ghost {
  border: 1px solid rgba(255,242,229,.5);
  color: var(--c-light-text);
  background: transparent;
}

@media (min-width: 560px) {
  .page-home .home-hero h1 { font-size: 2.5rem; }
  .page-home .home-tile-matrix { grid-template-columns: repeat(2, 1fr); }
  .page-home .home-tile-matrix .tile-span-2 { grid-column: span 2; }
  .page-home .home-latest-grid { grid-template-columns: repeat(2, 1fr); }
  .page-home .home-batch-timeline { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 920px) {
  .page-home .home-tile-matrix { grid-template-columns: repeat(4, 1fr); }
  .page-home .home-tile-matrix .tile-span-2 { grid-column: span 2; }
  .page-home .home-main { grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); align-items: start; }
  .page-home .home-batch-timeline {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-flow: column;
  }
  .page-home .home-batch-node {
    min-height: 168px;
    justify-content: center;
    border-left: none;
    border-top: 4px solid var(--c-orange);
  }
}

@media (min-width: 1200px) {
  .page-home .home-hero { padding: 28px 0 64px; }
  .page-home .home-latest-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .home-tile-matrix .tile,
  .page-home .latest-card,
  .page-home .home-tool-banner,
  .page-home .home-rank-row {
    transition: none;
    transform: none;
  }
}
