@font-face {
  font-family: motoya;
  src: url(../fonts/MTXma6kp.ttc);
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: relative;
  background: url("../images/back.png") no-repeat center center fixed;
  background-size: cover;
  font-family: 'motoya', sans-serif;
}

#image-container {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 0;
}

.fade-image {
  position: absolute;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
  object-fit: contain;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  pointer-events: none;
}

.fade-image.active {
  opacity: 1;
  pointer-events: auto;
}

#button-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.4);
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.switch-button {
  font-size: 2.2em;
  font-family:'motoya', sans-serif;
  font-weight: bold;
  color: white;
  padding: 10px 30px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: linear-gradient(to bottom, #6ec1ff, #005b99);
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.switch-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 10px rgba(0,0,0,0.4);
}

@media (max-width: 768px) {

  #button-container {
    display: flex;
    flex-wrap: wrap;               /* ← 折り返しを許可 */
    justify-content: center;       /* ← 中央揃え */
    gap: 6px;
    padding: 10px;
  }

  .switch-button {
    flex: 0 1 45%;                 /* ← 約半分の幅で2列化 */
    font-size: 1em;
    padding: 8px 12px;
    text-align: center;
  }

  #image-container {
    justify-content: flex-end; /* 下に揃える */
    align-items: center;
  }

  .fade-image {
    width: 100%;
    height: auto;
    bottom: 0;
    transform: scale(1.5);        /* ← 150% 拡大 */
    transform-origin: bottom;     /* ← 下を基準に拡大 */
  }
}

