/* Local-published, twenty-poster homepage wall. No global hero height or loading changes. */
#view-home[data-ranking-revisit="true"] { animation: none; }
#view-home .home-ranking-covers {
  position: relative;
  z-index: 3;
  display: block;
  width: min(1540px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 14px;
  min-width: 0;
  color: var(--text-0);
}
#view-home .home-ranking-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 10px; }
#view-home .home-ranking-head[hidden] { display: none; }
#view-home .home-ranking-head h2 { margin: 0 0 6px; font-size: 20px; line-height: 1.4; color: var(--text-0); }
#view-home .home-ranking-head p { margin: 0; font-size: 12px; line-height: 1.6; color: var(--text-2); }
#view-home .home-ranking-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
#view-home .home-ranking-status { display: none; margin: 0; color: var(--text-2); font-size: 12px; line-height: 1.6; }
#view-home .home-ranking-status:not(.is-error) { display: none; }
#view-home .home-ranking-status.is-error { display: block; margin: 7px 10px 0; color: var(--warning, #ddb26a); }
#view-home .home-ranking-empty { padding: 18px 10px; margin: 0; color: var(--text-2); font-size: 13px; }
#view-home .home-ranking-wall {
  --poster-width: clamp(140px, 18vw, 220px);
  --poster-step: calc((100% - var(--poster-width)) / 9.5);
  --poster-row-pitch: calc(var(--poster-width) * 25 / 22);
  position: relative; width: 100%;
  height: calc(var(--poster-width) * 4 / 3 + var(--poster-row-pitch) + 32px);
  margin: 48px auto 0; isolation: isolate; opacity: .78;
}
/* Match the legacy stage fades without restoring its absolute hero height. */
#view-home .home-ranking-wall::before,
#view-home .home-ranking-wall::after { content: ""; position: absolute; pointer-events: none; z-index: 5; }
#view-home .home-ranking-wall::before {
  inset: -50px;
  background: radial-gradient(circle at 50% 30%, transparent 0 38%, rgba(0,0,0,.72) 78%);
}
#view-home .home-ranking-wall::after {
  left: -8%; right: -8%; bottom: -12%; height: 45%;
  background: linear-gradient(180deg, transparent, #000 78%);
}
#view-home .home-ranking-wall[hidden], #view-home .home-ranking-empty[hidden],
#view-home .home-ranking-image-state[hidden], #view-home .home-ranking-media img[hidden] { display: none; }
#view-home .home-ranking-card {
  --column: 0; --row: 0; --offset: 0px;
  position: absolute; left: calc(var(--column) * var(--poster-step)); top: calc(var(--row) * var(--poster-row-pitch));
  width: var(--poster-width); aspect-ratio: 3 / 4; border-radius: 18px;
  transform: translate3d(0, var(--offset), 0); opacity: 1; filter: none;
  border: 1px solid rgba(255,255,255,.12); background: #11131a;
  box-shadow: 0 22px 54px rgba(0,0,0,.72); will-change: auto;
  transition: transform .32s ease, filter .32s ease, box-shadow .32s ease, border-color .32s ease, opacity .32s ease;
}
#view-home .home-ranking-card::after {
  background: linear-gradient(180deg, rgba(255,255,255,.15), transparent 28%),
    linear-gradient(0deg, rgba(0,0,0,.88), transparent 55%);
}
#view-home .home-ranking-card:hover, #view-home .home-ranking-card:focus-visible {
  z-index: 20; transform: translate3d(0, calc(var(--offset) - 30px), 0) scale(1.12);
  border-color: rgba(136,255,246,.9);
  box-shadow: 0 0 0 1px rgba(136,255,246,.55), 0 0 38px rgba(80,236,255,.42), 0 34px 78px rgba(0,0,0,.86);
}
#view-home .home-ranking-media { filter: brightness(.68) saturate(.94); }
#view-home .home-ranking-card:hover .home-ranking-media, #view-home .home-ranking-card:focus-visible .home-ranking-media { filter: brightness(1.12) saturate(1.12); transform: scale(1.04); }
@media (min-width: 768px) {
  #view-home .home-ranking-wall:has(.home-ranking-card:hover) .home-ranking-card:not(:hover):not(:focus-visible),
  #view-home .home-ranking-wall:has(.home-ranking-card:focus-visible) .home-ranking-card:not(:hover):not(:focus-visible) {
    opacity: .52; filter: brightness(.62) saturate(.86);
  }
}
#view-home .home-ranking-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
#view-home .home-ranking-image-state { position: absolute; inset: 0; display: grid; place-content: center; padding: 14px; color: #cbd2e6; font-size: 12px; text-align: center; }
#view-home .home-ranking-meta { left: 14px; right: 14px; bottom: 14px; gap: 5px; }
#view-home .home-ranking-meta strong { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: clamp(12px, 1.4vw, 18px); line-height: 1.15; overflow-wrap: anywhere; }
#view-home .home-ranking-meta span { padding: 3px 5px; font-size: 10px; line-height: 1.4; white-space: normal; }
#view-home .home-ranking-card:focus-visible .home-ranking-meta,
#view-home .home-ranking-card[data-image-state="missing"] .home-ranking-meta,
#view-home .home-ranking-card[data-image-state="failed"] .home-ranking-meta { opacity: 1; transform: none; }
/* Keep all twenty covers; the second row sits half a pitch between the first. */
#view-home .home-ranking-pos-1 { --column: 0; }
#view-home .home-ranking-pos-2 { --column: 1; }
#view-home .home-ranking-pos-3 { --column: 2; }
#view-home .home-ranking-pos-4 { --column: 3; }
#view-home .home-ranking-pos-5 { --column: 4; }
#view-home .home-ranking-pos-6 { --column: 5; }
#view-home .home-ranking-pos-7 { --column: 6; }
#view-home .home-ranking-pos-8 { --column: 7; }
#view-home .home-ranking-pos-9 { --column: 8; }
#view-home .home-ranking-pos-10 { --column: 9; }
#view-home .home-ranking-pos-11 { --column: .5; --row: 1; }
#view-home .home-ranking-pos-12 { --column: 1.5; --row: 1; }
#view-home .home-ranking-pos-13 { --column: 2.5; --row: 1; }
#view-home .home-ranking-pos-14 { --column: 3.5; --row: 1; }
#view-home .home-ranking-pos-15 { --column: 4.5; --row: 1; }
#view-home .home-ranking-pos-16 { --column: 5.5; --row: 1; }
#view-home .home-ranking-pos-17 { --column: 6.5; --row: 1; }
#view-home .home-ranking-pos-18 { --column: 7.5; --row: 1; }
#view-home .home-ranking-pos-19 { --column: 8.5; --row: 1; }
#view-home .home-ranking-pos-20 { --column: 9.5; --row: 1; }
html[data-theme="light"] #view-home .home-ranking-wall { opacity: 1; }
html[data-theme="light"] #view-home .home-ranking-wall::before {
  inset: -20px -12px;
  background: radial-gradient(ellipse at 50% 40%, rgba(255,255,255,.34), transparent 66%);
}
html[data-theme="light"] #view-home .home-ranking-wall::after { display: none; }
html[data-theme="light"] #view-home .home-ranking-card { background: #c9d3e2; border-color: rgba(100,114,151,.20); box-shadow: 0 15px 28px rgba(45,61,90,.16); }
html[data-theme="light"] #view-home .home-ranking-card::after {
  background: linear-gradient(180deg, rgba(255,255,255,.18), transparent 28%),
    linear-gradient(0deg, rgba(20,28,43,.58), transparent 58%);
}
html[data-theme="light"] #view-home .home-ranking-media { filter: brightness(.93) saturate(1) contrast(.98); }
html[data-theme="light"] #view-home .home-ranking-card:hover,
html[data-theme="light"] #view-home .home-ranking-card:focus-visible {
  border-color: rgba(91,85,217,.72); box-shadow: 0 0 0 1px rgba(91,85,217,.24), 0 20px 42px rgba(58,74,112,.26);
}
html[data-theme="light"] #view-home .home-ranking-image-state { color: #4b5570; }
@media (max-width: 767px) {
  #view-home .home-ranking-covers { order: 4; width: 100%; margin: 0; padding: 0; }
  #view-home .home-ranking-head { flex-direction: column; align-items: flex-start; gap: 10px; padding: 0; }
  #view-home .home-ranking-head h2 { font-size: 18px; }
  #view-home .home-ranking-head p, #view-home .home-ranking-status { font-size: 12px; }
  #view-home .home-ranking-status.is-error { margin: 8px 0 0; }
  #view-home .home-ranking-wall {
    display: flex; gap: 10px; height: auto; margin: 6px 0 0; padding: 6px 2px 16px; opacity: 1;
    overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scrollbar-width: thin;
  }
  #view-home .home-ranking-wall::before, #view-home .home-ranking-wall::after { display: none; }
  #view-home .home-ranking-card {
    position: relative; flex: 0 0 130px; width: 130px; left: auto; top: auto;
    aspect-ratio: 3 / 4; border-radius: 12px; transform: none; box-shadow: 0 4px 10px rgba(0,0,0,.2); scroll-snap-align: start;
  }
  #view-home .home-ranking-card:hover, #view-home .home-ranking-card:focus-visible { transform: none; }
  #view-home .home-ranking-media, #view-home .home-ranking-card:hover .home-ranking-media,
  #view-home .home-ranking-card:focus-visible .home-ranking-media { filter: none; transform: none; }
  #view-home .home-ranking-meta { opacity: 1; transform: none; left: 8px; right: 8px; bottom: 8px; }
  #view-home .home-ranking-meta strong { -webkit-line-clamp: 2; font-size: 12px; }
  #view-home .home-ranking-meta span { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  #view-home .home-ranking-card, #view-home .home-ranking-media, #view-home .home-ranking-meta { transition: none; }
  #view-home .home-ranking-card:hover .home-ranking-media, #view-home .home-ranking-card:focus-visible .home-ranking-media { transform: none; }
}
@media (prefers-reduced-motion: reduce) and (min-width: 768px) {
  #view-home .home-ranking-card:hover, #view-home .home-ranking-card:focus-visible { transform: translate3d(0, var(--offset), 0); }
}
