html {
  min-height: 100%;
  background: #252525;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > main {
  width: 100%;
  flex: 1 0 auto;
}

.mega-footer {
  flex: 0 0 auto;
  margin-top: auto;
}

.mega-footer-grid {
  grid-template-columns: 1.5fr 1fr 1fr;
}

.mega-footer-brand > a {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.mega-footer-brand > a > b,
.mega-footer-brand > a picture {
  display: block;
}

.mega-footer-brand > a img {
  display: block;
  width: min(100%, 300px);
  height: auto;
}

.mega-footer-brand > a > span {
  font-size: 16px;
  line-height: 1.7;
}

.mega-footer a[href*="/author/ishitani/"],
.mega-footer nav[aria-label="運営サービス"] {
  display: none;
}

@media (max-width: 860px) {
  body:not(:has(.article-mobile-action)) {
    padding-bottom: 0 !important;
  }

  .mega-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .mega-footer-grid {
    grid-template-columns: 1fr;
  }

  .mega-footer-brand > a img {
    width: min(100%, 260px);
  }
}
