.mystory-page .card-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.mystory-page .card-gallery.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(82%, 920px);
  margin-inline: auto;
}

.mystory-page[data-layout="tabs"] .card-gallery .tab-media-frame {
  height: 390px;
  min-height: 390px;
  max-height: 390px;
  padding: .65rem;
  background: #f7f8f9;
}

body.mystory-page[data-layout="tabs"] .card-gallery .tab-media-frame img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.mystory-page .mechanic-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.mystory-page .mechanic-step {
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-top: 4px solid #8b1116;
  background: #fff;
}

.mystory-page .mechanic-step strong {
  display: block;
  margin-bottom: .35rem;
}

@media (max-width: 900px) {
  .mystory-page .card-gallery,
  .mystory-page .card-gallery.three-up { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mystory-page .mechanic-flow { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .mystory-page .card-gallery,
  .mystory-page .card-gallery.three-up { grid-template-columns: 1fr; }
  .mystory-page[data-layout="tabs"] .card-gallery .tab-media-frame { height: 460px; min-height: 460px; max-height: 460px; }
}
