/* Карусель «Фото с занятий» под шапкой. Вариант A: верёвка и прищепки.
   20261120a2: без своей зелёной полосы — фон героя продолжается под фото;
   фото чуть меньше; плашка «Учимся + играем» ближе к фото. */
:root{
  --mkcg-h: 154px;
}
@media (max-width: 640px){
  :root{ --mkcg-h: 120px; }
}

.mkcg{
  --mkcg-speed: 38;
  position: relative;
  width: 100%;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  touch-action: pan-y;
  z-index: 5;
  background: transparent;
  padding: 6px 0 0;
}
.mkcg.is-drag{ cursor: grabbing; }
.mkcg__track{
  display: flex;
  width: max-content;
  will-change: transform;
}
.mkcg__set{ display: flex; flex: none; }
.mkcg__item{
  position: relative;
  flex: none;
  width: 148px;
  height: 148px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 148 36' preserveAspectRatio='none'%3E%3Cpath d='M0 10 Q74 27 148 10' fill='none' stroke='%237a4e2c' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M0 10 Q74 27 148 10' fill='none' stroke='%23c4a06a' stroke-width='1.6' stroke-dasharray='5.5 3.2' stroke-linecap='round'/%3E%3Cpath d='M0 12.8 Q74 29.8 148 12.8' fill='none' stroke='%235e3a20' stroke-width='1' opacity='.35' stroke-linecap='round'/%3E%3C/svg%3E") 0 2px / 100% 36px no-repeat;
}
.mkcg__photo{
  position: absolute;
  left: 16px;
  top: 24px;
  width: 116px;
  height: 87px;
  box-sizing: content-box;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  background: #fffdfa;
  padding: 6px 6px 16px;
  border-radius: 2px;
  box-shadow: 0 6px 14px rgba(40,70,40,.18), 0 1px 0 #fff inset;
  transform: rotate(var(--r, 0deg));
  transform-origin: 50% 0;
  animation: mkcg-sway 4.2s ease-in-out var(--d, 0s) infinite alternate;
}
.mkcg__pin{
  position: absolute;
  left: 50%;
  top: 10px;
  width: 17px;
  height: 26px;
  margin-left: -8.5px;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.25));
}
.mkcg__edge{ display: none; }
@keyframes mkcg-sway{
  from{ transform: rotate(var(--r, 0deg)); }
  to{ transform: rotate(calc(var(--r, 0deg) * -.4)); }
}
@media (max-width: 640px){
  .mkcg{ padding: 4px 0 0; }
  .mkcg__item{ width: 110px; height: 116px; }
  .mkcg__photo{ left: 12px; top: 20px; width: 86px; height: 64px; padding: 4px 4px 13px; }
  .mkcg__pin{ top: 8px; width: 14px; height: 21px; margin-left: -7px; }
}

/* Фон героя заезжает под карусель; плашка чуть ближе к фото. Только на главной, где есть карусель. */
main:has(> #mk-photo-garland) > section.mk-hero-sec{
  margin-top: calc(-1 * var(--mkcg-h));
}
main:has(> #mk-photo-garland) > section.mk-hero-sec .mkh{
  padding-top: calc(var(--mkcg-h) + 22px);
}
@media (max-width: 760px){
  main:has(> #mk-photo-garland) > section.mk-hero-sec .mkh{
    padding-top: calc(var(--mkcg-h) + 10px);
  }
}

@media (prefers-reduced-motion: reduce){
  .mkcg__photo{ animation: none; }
}
