.extplatforms--compact {
  box-sizing: border-box;
  width: min(100% - 32px, 840px);
  margin: clamp(24px, 4vw, 44px) auto;
  padding: clamp(18px, 3vw, 26px) 0 0;
  border-top: 1px solid rgba(255,255,255,.14);
  color: #fff;
  text-align: center;
  font-family: inherit;
  container-type: inline-size;
}

.extplatforms--compact .extplatforms__center {
  margin: 0;
  padding: 0;
  width: 100%;
}

.extplatforms--compact .extplatforms__title {
  margin: 0;
  color: #fff;
  font: inherit;
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: normal;
  text-wrap: balance;
}

.extplatforms--compact .extplatforms__atitle {
  margin: 7px 0 16px;
  color: #d3cedb;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
}

.extplatforms--compact .extplatforms__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.extplatforms--compact .extplatforms__item {
  box-sizing: border-box;
  display: flex;
  flex: 0 0 calc((100% - 10px) / 2);
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin: 0;
  padding: 10px 4px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  background: #19171f;
  color: #fff;
  text-decoration: none;
  line-height: 1.25;
}

.extplatforms--compact .extplatforms__item:hover,
.extplatforms--compact .extplatforms__item:focus-visible {
  border-color: #c390ff;
  background: #20192b;
}

.extplatforms--compact .extplatforms__item:focus-visible {
  outline: 2px solid #c390ff;
  outline-offset: 2px;
}

.extplatforms--compact .extplatforms__logo {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 5px;
  margin: 0 0 2px;
  border-radius: 8px;
  background: #fff;
}

.extplatforms--compact .extplatforms__logo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

.extplatforms--compact .extplatforms__name {
  color: #fff;
  font-weight: 750;
  font-size: 13px;
}

.extplatforms--compact .extplatforms__cta {
  margin-top: auto;
  color: #d3acff;
  font-weight: 500;
  font-size: 12px;
}

@container (min-width: 440px) {
  .extplatforms--compact .extplatforms__item {
    flex-basis: calc((100% - 20px) / 3);
  }
}

@container (min-width: 625px) {
  .extplatforms--compact .extplatforms__item {
    flex-basis: calc((100% - 40px) / 5);
  }
}

.sm-lesson-panel .extplatforms--compact {
  display: none;
}

/* Preserve the tile size across the full and compact cards. */
#official-platforms .extplatforms__logo {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 0;
  border-radius: 26%;
  background: linear-gradient(145deg, #fff 10%, #f6f7fa 58%, #e8ebf3 100%);
}

#official-platforms:not(.extplatforms--compact) .extplatforms__logo {
  box-sizing: border-box;
  width: 72px;
  height: 72px;
}

#official-platforms .extplatforms__logo:has(img:is([src$="/2gis.png"], [src$="/zoon.png"], [src$="/vk.png"])) {
  background: #161616;
}

#official-platforms .extplatforms__logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#official-platforms .extplatforms__logo img[src$="/2gis.png"] {
  transform: scale(1.14);
}

#official-platforms .extplatforms__logo img:is([src$="/yandex-maps.png"], [src$="/otzovik.png"]) {
  mix-blend-mode: multiply;
}

#official-platforms .extplatforms__logo img[src$="/yandex-maps.png"] {
  transform: scale(1.18);
}

#official-platforms .extplatforms__logo img[src$="/otzovik.png"] {
  transform: scale(.94);
}

#official-platforms .extplatforms__logo::after {
  content: "";
  position: absolute;
  inset: -25% auto -25% 0;
  width: 42%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 28%) 50%, transparent);
  transform: translateX(-180%) skewX(-20deg);
  animation: sm-review-shine 10s linear infinite;
}

#official-platforms .extplatforms__item:nth-child(2) .extplatforms__logo::after {
  animation-delay: .14s;
}

#official-platforms .extplatforms__item:nth-child(3) .extplatforms__logo::after {
  animation-delay: .28s;
}

#official-platforms .extplatforms__item:nth-child(4) .extplatforms__logo::after {
  animation-delay: .42s;
}

#official-platforms .extplatforms__item:nth-child(5) .extplatforms__logo::after {
  animation-delay: .56s;
}

@keyframes sm-review-shine {
  0%, 3% { transform: translateX(-180%) skewX(-20deg); }
  15%, 100% { transform: translateX(320%) skewX(-20deg); }
}

@media (prefers-reduced-motion: reduce) {
  #official-platforms .extplatforms__logo::after {
    animation: none;
  }
}
