.dramas-hero .lessons-hero-content {
  max-width: 42rem;
}

.dramas-page .lessons-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 540px);
  gap: 1.25rem;
  align-items: start;
}

.dramas-page .detail-panel {
  position: sticky;
  top: 88px;
}

.drama-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.drama-search {
  flex: 1 1 220px;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--surface);
}

.drama-search:focus {
  outline: none;
  border-color: var(--navy-light);
  box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.12);
}

.drama-filter-note {
  margin: 0 0 1rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.drama-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.85rem;
}

.drama-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  padding: 0;
}

.drama-card:hover {
  border-color: var(--navy-light);
  box-shadow: var(--shadow);
}

.drama-card.selected {
  border-color: var(--red);
  box-shadow: 0 0 0 2px var(--red-glow);
}

.drama-card-poster {
  aspect-ratio: 2 / 3;
  width: 100%;
  object-fit: cover;
  background: linear-gradient(145deg, var(--navy-light), var(--cream));
  display: block;
}

.drama-card-poster--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  background: linear-gradient(145deg, #e8edf5 0%, #f5efe6 100%);
}

.drama-card-body {
  padding: 0.7rem 0.75rem 0.8rem;
}

.drama-card-kr {
  margin: 0 0 0.15rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
}

.drama-card-en {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.drama-card-meta {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--red);
}

/* Detail — poster left, info right */
.drama-detail-card {
  padding: 0;
  overflow: hidden;
}

.drama-detail-layout {
  display: grid;
  grid-template-columns: minmax(200px, 46%) minmax(0, 1fr);
  min-height: 560px;
}

.drama-detail-poster-col {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #eef2f8 0%, #f8f4ee 100%);
  padding: 1rem;
  min-height: 100%;
}

.detail-poster {
  width: 100%;
  height: auto;
  max-height: min(72vh, 640px);
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(30, 58, 95, 0.12);
}

.detail-poster--fallback {
  width: 100%;
  min-height: 320px;
  max-height: min(72vh, 640px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: var(--navy);
  background: linear-gradient(145deg, #e8edf5 0%, #f5efe6 100%);
  border-radius: 4px;
}

.drama-detail-info {
  padding: 1.25rem 1.35rem 1.35rem;
  overflow-y: auto;
  max-height: min(78vh, 680px);
}

.detail-drama-title {
  margin: 0 0 0.15rem;
  text-align: left;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
}

.detail-drama-kr {
  margin: 0 0 0.65rem;
  text-align: left;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.detail-drama-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.detail-drama-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 100px;
  background: var(--navy-light);
  color: var(--navy);
}

.detail-plot {
  margin-bottom: 1rem;
}

.detail-plot p {
  margin: 0.35rem 0 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text);
}

.detail-cast-list {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
}

.detail-cast-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.84rem;
  line-height: 1.4;
}

.detail-cast-list li:last-child {
  border-bottom: none;
}

.detail-cast-kr {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.detail-lesson-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.detail-lesson-link {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--red);
  text-decoration: none;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--red-glow);
  border-radius: 100px;
}

.detail-lesson-link:hover {
  background: var(--red-glow);
}

.detail-image-credit {
  margin: 0.85rem 0 0;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: left;
  line-height: 1.4;
}

@media (max-width: 1100px) {
  .dramas-page .lessons-layout {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  }

  .drama-detail-layout {
    min-height: 500px;
  }
}

@media (max-width: 900px) {
  .dramas-page .lessons-layout {
    grid-template-columns: 1fr;
  }

  .dramas-page .detail-panel {
    position: static;
  }

  .drama-detail-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .drama-detail-poster-col {
    min-height: 360px;
    padding: 1.25rem;
  }

  .detail-poster {
    max-height: 420px;
  }

  .drama-detail-info {
    max-height: none;
    overflow: visible;
  }

  .drama-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}

@media (max-width: 720px) {
  .drama-search {
    font-size: 16px;
    min-height: 48px;
    flex: 1 1 100%;
  }

  .drama-card {
    min-height: 44px;
  }

  .drama-detail-poster-col {
    padding: 1rem;
  }

  .detail-lesson-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .drama-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  .drama-detail-poster-col {
    min-height: 260px;
  }

  .detail-poster {
    max-height: 320px;
  }
}
