/* ==========================================================================
   Home page — /index.html
   ========================================================================== */

.home-page {
  min-height: calc(100dvh - var(--app-header-height) - var(--app-footer-height) - var(--app-bottom-nav-height) - env(safe-area-inset-bottom));
  padding-bottom: 24px;
  background: var(--bg-primary);
}

/* logo strip that sticks under the secondary header */
.home-header {
  position: sticky;
  top: var(--app-header-height);
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(16px + env(safe-area-inset-top)) 16px 16px;
  background: rgba(20, 1, 39, .94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.home-header__logo {
  width: auto;
  height: 32px;
}

.home-header__rating {
  display: flex;
  overflow: hidden;
  align-items: center;
  border: 1px solid var(--text-on-dark);
  border-radius: var(--radius-sm);
  font-size: 11px;
}

.home-header__rating span,
.home-header__rating strong {
  padding: 4px;
}

.home-header__rating strong {
  color: var(--text-inverse);
  background: var(--text-on-dark);
}

/* sections */
.home-section {
  padding: 0 16px 18px;
}

.home-section h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

/* horizontal rail */
.home-section__row {
  display: grid;
  grid-auto-columns: 120px;
  grid-auto-flow: column;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.home-section__row::-webkit-scrollbar {
  display: none;
}

.home-section__row .drama-card {
  scroll-snap-align: start;
}

/* waterfall grid */
.waterfall-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 10px;
}

/* one title only — let it span the full content width */
.waterfall-grid--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 260px;
}

.waterfall-more {
  display: grid;
  width: 100%;
  min-height: 48px;
  place-items: center;
  color: var(--accent-light);
  background: transparent;
  font-size: 26px;
}

.load-more {
  font-size: 16px;
}

/* ranked cards get a numbered corner badge */
.drama-card__ranking {
  font-weight: 700;
}
