.place-home-gallery {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: var(--spacing-lg);
  padding-bottom: var(--spacing-5xl);
}

.place-home-gallery__title {
  margin: 0;
  color: var(--neutral-tx2-title);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-28);
}

.place-home-gallery__list {
  display: grid;
  width: 100%;
  aspect-ratio: 1280 / 1017;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: var(--spacing-sm);
}

.place-home-gallery-card {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  color: var(--semantic-white);
  text-decoration: none;
}

.place-home-gallery-card--large {
  grid-column: span 2;
  grid-row: span 2;
}

/* 2026-10-29 — PC 는 9칸, 모바일 2열은 10칸(Figma 390 2×5) */
.place-home-gallery-card:nth-child(n + 10) {
  display: none;
}

.place-home-gallery-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.place-home-gallery-card::after {
  position: absolute;
  inset: 50% 0 0;
  background: linear-gradient(to bottom, transparent, rgb(0 0 0 / 45%));
  content: "";
  pointer-events: none;
}

.place-home-gallery-card__title {
  position: absolute;
  right: var(--spacing-sm);
  bottom: var(--spacing-sm);
  left: var(--spacing-sm);
  z-index: 1;
  overflow: hidden;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-20);
  text-overflow: ellipsis;
  text-shadow: 0 2px 8px rgb(0 0 0 / 7%);
  white-space: nowrap;
}

.place-home-gallery-card:focus-visible {
  outline: var(--stroke-2) solid var(--brand-primary-dark);
  outline-offset: var(--stroke-2);
}

@media (max-width: 767px) {
  .place-home-gallery {
    padding-bottom: var(--spacing-lg);
  }

  .place-home-gallery__title {
    font-size: var(--font-size-xl);
    line-height: var(--line-height-22);
  }

  .place-home-gallery__list {
    aspect-ratio: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    gap: 6px;
  }

  .place-home-gallery-card:nth-child(10) {
    display: block;
  }

  .place-home-gallery-card,
  .place-home-gallery-card--large {
    aspect-ratio: 3 / 4;
    grid-column: auto;
    grid-row: auto;
  }

  .place-home-gallery-card__title {
    right: var(--spacing-xs);
    bottom: var(--spacing-xs);
    left: var(--spacing-xs);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-16);
  }
}