/* BL Compass V16.2 — image-frame and mobile-fit patch.
   CSS-only presentation update: no SEO copy, metadata, drama data, filters, or watch links changed. */

/* All editorial drama art in V16 is authored at 16:9. Keep the display frame at
   the same ratio so faces/compositions are not cropped by narrow fixed-height boxes. */
.poster.has-photo {
  height: auto !important;
  aspect-ratio: 16 / 9;
}
.poster.has-photo img.poster-image {
  object-fit: cover;
  object-position: center center;
  transform: none;
}

.art-card {
  min-height: 0;
}
.art-inner.has-photo {
  height: auto !important;
  aspect-ratio: 16 / 9;
  padding: 0;
}
.art-inner.has-photo img.detail-art-image {
  object-fit: cover;
  object-position: center center;
  transform: none;
}

/* Homepage editorial collage uses the same 16:9 source ratio. */
.hero-art.has-image {
  min-height: 0 !important;
  aspect-ratio: 16 / 9;
}
.hero-art.has-image img.hero-art-image {
  object-fit: cover;
  object-position: center center;
}

/* Mobile-first polish. The site already collapses to one column; these overrides
   make each drama card behave like a natural phone card rather than a desktop card
   squeezed into a narrow viewport. */
@media (max-width: 640px) {
  html, body {
    overflow-x: hidden;
  }

  .page-shell {
    width: min(calc(100% - 24px), var(--max));
  }

  .hero {
    padding: 30px 0 26px;
  }

  .hero-title {
    font-size: clamp(2.2rem, 10.8vw, 3.25rem) !important;
    line-height: 1.01;
  }

  html[data-lang="zh"] .hero-title {
    font-size: clamp(2.05rem, 10.2vw, 3.05rem) !important;
    line-height: 1.08;
  }

  h1 {
    font-size: clamp(2.2rem, 10.5vw, 3.35rem) !important;
    line-height: 1.02;
  }

  html[data-lang="zh"] h1 {
    font-size: clamp(2.05rem, 9.8vw, 3.1rem) !important;
    line-height: 1.1;
  }

  .hero-copy {
    font-size: 1.02rem !important;
    line-height: 1.58;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 48px;
  }

  .hero-art.has-image {
    width: 100%;
  }

  .section {
    padding: 34px 0;
  }

  .cards,
  .cards.four,
  .cards.two {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .drama-card {
    min-height: 0;
    border-radius: 20px;
  }

  .poster.has-photo {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .card-body {
    padding: 17px 16px 19px;
    gap: 10px;
  }

  .drama-title {
    font-size: clamp(1.38rem, 6vw, 1.62rem);
    line-height: 1.08;
  }

  .drama-original {
    font-size: .95rem;
  }

  .tags {
    gap: 6px;
  }

  .tag {
    padding: 6px 9px;
    font-size: .78rem;
  }

  .mini-score {
    gap: 6px;
    font-size: .88rem;
  }

  .read-link {
    margin-top: 5px;
    padding: 10px 14px;
    font-size: .9rem;
  }

  .section-card {
    padding: 19px;
  }

  .art-card {
    padding: 12px;
    border-radius: 22px;
  }

  .art-inner,
  .art-inner.has-photo {
    border-radius: 17px;
  }

  .art-caption {
    margin-top: 10px;
    font-size: .8rem;
  }

  .quick-grid,
  .viewer-form,
  .match-grid,
  .two-col {
    grid-template-columns: 1fr !important;
  }

  .watch-table {
    max-width: 100%;
  }
}

/* Preserve the intentional KinnPorsche crop established in earlier versions. */
.poster.mafia img.poster-image {
  object-position: center 24%;
}
.art-inner.has-photo.mafia-photo img.detail-art-image {
  object-position: center 24%;
}
