/* ==========================================================================
   Fabulousite – site cards (top / archive / related)
   Uses tokens from nav-modern.css
   ========================================================================== */
.fs-list { padding: 8px 0 32px; }
.fs-list .fs-wrap { max-width: 1680px; margin: 0 auto; padding: 0 24px; }

.fs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}
.fs-grid--related { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fs-grid__ad { grid-column: 1 / -1; }

/* tile */
.fs-tile-item { min-width: 0; }
.fs-tile {
  position: relative;
  display: block;
  aspect-ratio: 600 / 355;
  overflow: hidden;
  border-radius: 16px;
  background: #eceef1;
  isolation: isolate;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .06), 0 0 0 1px rgba(17, 24, 39, .06);
  text-decoration: none !important;
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s ease;
}
.fs-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}

/* caption over the image */
.fs-tile__cap {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 36px 14px 12px;
  background: linear-gradient(to top, rgba(12, 13, 18, .82) 0%, rgba(12, 13, 18, .55) 55%, rgba(12, 13, 18, 0) 100%);
  color: #fff;
  pointer-events: none;
}
.fs-tile__cat {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.4;
}
.fs-tile__title {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: .01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}
.fs-tile__host {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .78);
  transition: max-height .3s ease, opacity .3s ease;
}

/* hover */
.fs-tile:hover,
.fs-tile:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 22px 40px -22px rgba(17, 24, 39, .55), 0 0 0 1px rgba(17, 24, 39, .06);
}
.fs-tile:hover img,
.fs-tile:focus-visible img { transform: scale(1.045); }
.fs-tile:hover .fs-tile__host,
.fs-tile:focus-visible .fs-tile__host { max-height: 20px; opacity: 1; }
.fs-tile:focus-visible { outline: 3px solid var(--fs-accent, #ff4f6d); outline-offset: 3px; }

/* related section spacing on single page */
.fs-related .fs-grid { margin-top: 0; }
.fs-grid--related .fs-tile__cat { display: none; } /* 全カード同じカテゴリなので非表示 */

/* autopager loader */
#next .next-box { text-align: center; padding: 24px 0 8px; }
#next .next-box a { color: var(--fs-sub, #6b7280); }

@media (max-width: 1080px) {
  .fs-grid--related { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .fs-grid--related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .fs-list .fs-wrap { padding: 0 16px; }
  .fs-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
  .fs-grid--related { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .fs-tile { border-radius: 14px; }
}
@media (max-width: 520px) {
  .fs-grid { grid-template-columns: 1fr; }
  .fs-grid--related { grid-template-columns: 1fr; }
  .fs-tile__host { max-height: 20px; opacity: 1; } /* no hover on touch */
}
@media (hover: none) {
  .fs-tile__host { max-height: 20px; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .fs-tile, .fs-tile img, .fs-tile__host { transition: none !important; }
}
