:root {
  --family-footer-accent: #ff7d30;
  --family-footer-accent-dark: #e86923;
}

body {
  padding-bottom: 240px;
}

.family-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 190px;
  background: #fff;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  will-change: transform, opacity;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0.35s;
}

.family-footer.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s;
}

.family-footer-container {
  width: min(100%, 1080px);
  margin: 0 auto;
  position: relative;
  padding-bottom: 22px;
}

.family-footer h1 {
  margin: 0 0 6px;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  color: var(--family-footer-accent-dark);
  text-align: center;
  letter-spacing: 0.08em;
}

.family-footer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 6px;
}

.family-footer-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  text-decoration: none;
  position: relative;
  border-radius: 26px;
}

.family-footer-link img {
  max-width: 96px;
  width: 100%;
  height: auto;
  border-radius: 24px;
  border: 2px solid #fff;
  background: linear-gradient(145deg, #fffdf9, #ffe9d9);
  box-shadow: 0 20px 35px rgba(255, 125, 48, 0.12),
    0 8px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(0);
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.family-footer-link:hover img,
.family-footer-link:focus-visible img {
  transform: translateY(-8px);
  box-shadow: 0 30px 45px rgba(255, 125, 48, 0.18),
    0 12px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--family-footer-accent);
}

.family-footer-link:focus-visible {
  outline: none;
}

.family-footer-link:focus-visible::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: inherit;
  border: 2px solid var(--family-footer-accent);
  pointer-events: none;
}

.family-footer-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.family-footer-copyright {
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  background: transparent;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: #777;
}

.family-footer-copyright span {
  color: var(--family-footer-accent-dark);
  font-weight: 600;
}

.family-footer-slider {
  display: none;
}

.family-footer-marquee {
  display: none;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 170px;
  }

  .family-footer-container {
    padding-bottom: 18px;
  }

  .family-footer {
    height: 140px;
    padding: 6px 8px;
  }

  .family-footer h1 {
    display: block;
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin-bottom: 6px;
    font-family: Noto Sans JP, sans-serif;
  }

  .family-footer-grid {
    display: none;
  }

  .family-footer-slider {
    display: none;
  }

  .family-footer-marquee {
    display: block;
    margin-bottom: 0;
    padding: 0;
    background: transparent;
    overflow: hidden;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .family-footer-marquee::-webkit-scrollbar {
    display: none;
  }

  .family-footer-marquee-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: family-footer-marquee 18s linear infinite;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
  }

  .family-footer-marquee-track.is-stepped {
    animation: none;
  }

  .family-footer-marquee-group {
    display: flex;
    align-items: center;
    gap: 24px;
  }

  .family-footer-marquee-group + .family-footer-marquee-group {
    margin-left: 24px;
  }

  .family-footer-marquee:active .family-footer-marquee-track,
  .family-footer-marquee:hover .family-footer-marquee-track {
    animation-play-state: paused;
  }

  .family-footer-link {
    padding: 6px;
    outline: none;
  }

  .family-footer-link img {
    display: block;
    vertical-align: middle;
    max-width: 120px;
    border-radius: 16px;
    border: 2px solid #fff;
    box-shadow: 0 4px 8px rgba(255, 125, 48, 0.06),
      0 1px 4px rgba(0, 0, 0, 0.03);
  }

  .family-footer-slider .family-footer-link {
    line-height: 0;
  }

  .family-footer-copyright {
    font-size: 0.65rem;
    margin-top: 8px;
  }

  .family-footer-marquee .family-footer-link {
    flex: 0 0 auto;
  }

  .family-footer-marquee .family-footer-link img {
    width: 120px;
  }

  @keyframes family-footer-marquee {
    0% {
      transform: translate3d(0, 0, 0);
    }
    100% {
      transform: translate3d(-50%, 0, 0);
    }
  }
}
