/* Both existing images contain a 275 × 183 flag at the bottom. */
.china-flag-slot > img,
.english-panel-flag > img.china-flag-full {
  display: block;
  height: auto !important;
  aspect-ratio: 275 / 183 !important;
  object-fit: cover;
  object-position: center bottom !important;
}

.english-panel-flag > img.china-flag-full {
  width: 100%;
}

.course-cover > .china-flag-slot {
  --flag-frame-height: 170px;
}

.course-card-media > .china-flag-slot {
  --flag-frame-height: 220px;
}

.china-flag-slot {
  display: grid;
  place-items: center;
  block-size: var(--flag-frame-height);
}

.china-flag-slot > img {
  width: min(100%, calc(var(--flag-frame-height) * 275 / 183));
  border-radius: 22px;
}

.course-cover > .china-flag-slot > img {
  border: 1px solid #e0ebf4;
}

.course-card-media--china::after {
  display: none !important;
}

@media (max-width: 820px) {
  .china-flag-slot {
    block-size: auto;
    aspect-ratio: 16 / 10;
  }

  .china-flag-slot > img {
    width: calc(100% * 10 / 16 * 275 / 183);
  }
}
