@charset "utf-8";

body {
  background-image: url("images/room.png");
  background-size: cover;
  background-position: center;
  width: 100%;
  height: 100vh;
}

header {}

.main-menu {
  height: 0;
  position: absolute;
  top: 60px;
  right: 10px;
  width: 180px;
  overflow: hidden;
  background-color: #FFF;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: height .5s;
   z-index: 3;
}

#navBtn:checked~.main-menu {
  height: 220px;
  border: 3px solid #000;

}

#navBtn {
  display: none;
}

label {
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 10px;
  display: block;
  text-align: center;
  color: #FFF;
}

.open {
  z-index: 100;
  width: 40px;
  height: 40px;
  border: 3px solid #000;
  border-radius: 50%;
}

/*humburger button*/

.open::before,
.open::after {
  content: "";
}

.open span,
.open::before,
.open::after {
  content: "";
  position: absolute;
  top: 19px;
  left: 30%;
  width: 40%;
  border-bottom: 3px solid #000;
  transition: transform .5s;
}

.open::before {
  transform: translateY(-8px);
}

.open::after {
  transform: translateY(8px);
}

/*close button*/
#navBtn:checked+.open {
  background: #FFF;
}

#navBtn:checked+.open span {
  transform: scaleX(0);
}

#navBtn:checked+.open::before {
  transform: rotate(45deg);
}

#navBtn:checked+.open::after {
  transform: rotate(-45deg);
}

.main-menu ul li {
  text-align: center;
}

.main-menu ul li a {
  color: #000;
  display: block;
  padding: 10px 20px;
}

.main-menu ul li a:hover {
  background: #ff8c00;
}


/* 1. 全体を包む大元の箱を「基準の場所」にする */
main {
  position: relative;
  /* 子要素の位置合わせの基準になります */
  width: 100%;
  height: 100vh;
  /* 画面全体の高さに設定（必要に応じて調整） */
  overflow: hidden;
}

/* 2. すべての画像パーツを「自由に重ねられる状態」にする */
main div {
  position: absolute;
  /* 重ね合わせの基本設定 */
  top: 50%;   /* 画面の縦の中央 */
  left: 50%;  /* 画面の横の中央 */
  /* 要素自体の中心を基準点にする ＋ 中央からのズレ（px）をここで調整できます */
  transform: translate(-50%, -50%);

}

main img {
  width: 100%;
  /* 親divの幅に合わせる */
  height: auto;
}


.grandma {
  width: 300px;
  /* おばあちゃんの大きさ */
  z-index: 1;
  transform: translate(calc(-50% + 5%), calc(-50% - 20%));
}

.table {
  width: 1920px;
  z-index: 2;
  /* 奥 */
  transform: translate(calc(-50% ), calc(-50% - 5%));
}