/* Homepage catalogue density kept separate from the fingerprinted core UI. */
@media (max-width: 620px) {
  /* The latest rail should show a useful scan of titles, not two oversized
     posters. This applies equally to TV, anime, and movies. */
  .home-page .latest-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 8px;
  }

  .home-page .latest-grid .card-copy {
    padding-top: 9px;
  }

  .home-page .latest-grid .card-copy h3 {
    display: -webkit-box;
    min-height: 2.35em;
    margin-bottom: 5px;
    overflow: hidden;
    font-size: .86rem;
    font-weight: 750;
    line-height: 1.18;
    text-overflow: clip;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .home-page .latest-grid .card-copy p {
    min-height: 0;
    font-size: .71rem;
    font-weight: 650;
    line-height: 1.35;
    -webkit-line-clamp: 2;
  }

  .home-page .latest-grid .rating-badge {
    padding: 5px 7px;
    font-size: .68rem;
  }

  .home-page .latest-grid .rating-badge svg {
    width: 11px;
  }
}

@media (max-width: 389px) {
  .home-page .latest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Make a time-sensitive channel move clear at the exact point where viewers
   are looking for a Telegram destination, without competing with download. */
.telegram-channel-moved {
  position: relative;
  width: min(100%, 390px);
  margin-top: 18px;
  padding: 12px 15px;
  border: 1px solid color-mix(in srgb, var(--accent) 58%, transparent);
  border-radius: 14px;
  background: linear-gradient(110deg, var(--accent-soft), rgba(255, 255, 255, .035));
  box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 15%, transparent);
  animation: telegram-channel-pulse 3.8s ease-in-out infinite;
}

.telegram-channel-moved .telegram-channel-kicker {
  margin-bottom: 2px;
  color: var(--accent);
  font-size: .61rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.telegram-channel-moved strong {
  color: var(--text);
  font-size: .9rem;
}

.telegram-channel-moved:hover {
  border-color: var(--accent);
  background: linear-gradient(110deg, color-mix(in srgb, var(--accent) 19%, transparent), rgba(255, 255, 255, .06));
  animation-play-state: paused;
}

@keyframes telegram-channel-pulse {
  0%, 62%, 100% { box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 15%, transparent); transform: translateY(0); }
  74% { box-shadow: 0 14px 36px color-mix(in srgb, var(--accent) 32%, transparent); transform: translateY(-2px); }
}

@media (max-width: 620px) {
  .telegram-channel-moved {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .telegram-channel-moved {
    animation: none;
  }
}
