body {
  margin: 0;
  font-family: sans-serif;
  max-width: 768px;
  margin: auto;
  background: #fff;
  background-image: url("img/back.png"); /* 追加 */
  background-size: cover;                /* 全体に広げる */
  background-repeat: no-repeat;           /* 繰り返さない */
  background-position: center center;     /* 中央寄せ */
}

header {
  background: url("img/top.png") no-repeat center center;
  background-size: cover;
  height: 180px;
  width: 760px;
}

nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 20px 0;
}

nav button {
  width: 80px;         /* ボタンの幅を大きめに */
  height: 80px;        /* ボタンの高さも大きめに */
  background: #12b5b5;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;       /* 画像を中央に配置 */
  align-items: center;
  justify-content: center;
  padding: 0;
}

nav button img.img3 {
  width: 64px;         /* 画像の幅を統一 */
  height: 64px;        /* 画像の高さを統一 */
  object-fit: contain; /* 画像比率維持で収める */
  display: block;
}

.section-title {
  background: #12b5b5;
  height: 40px;
  margin: 20px;
  text-align: center;
  line-height: 40px;
  font-weight: bold;
}

.section-video {
  background: #ffffff;
  margin: 30px;
  text-align: center;
  line-height: 40px;
  font-weight: bold;
  width: 400px;
  height: auto;
  max-width: 100%;
  border-radius: 8px;
}

.section-video video {
  width: 250px;
  height: auto;
  max-width: 100%;
  border-radius: 8px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0 20px;
  margin-bottom: 20px; /* ← 追加 */
}

.grid div {
  background: #bef7ff;
  height: 100px;
  border-radius: 8px;
}

footer {
  text-align: center;
  margin: 10px 0;    
}

footer button {
  background: #12b5b5; /* プロフィールボタンの色を指定 */
  border: none;
  padding: 10px 40px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  color: #000000;         /* 文字色を白に */
}

footer button:hover {
  background: #0e8e8e; /* ホバー時は少し濃い色に */
}

.button {
  position: relative;
  width: 230px;
  height: 100px;
  border: none;
  background: none;
  cursor: pointer;
}

.grid-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 36px;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 0 0 8px #333;
  pointer-events: none;
  z-index: 2;
}

.grid .button img {
  width: 200px;
  height: 87px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}


.top-button {
  padding: 10px 20px;
  font-size: 16px;
  margin-bottom: 30px;
  border: 1px solid #999;
  background-color: white;
  cursor: pointer;
}

.main-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 50px;
}

.text-box {
  flex: 1;
  text-align: left;
  font-size: 16px;
  line-height: 1.8;
  word-break: break-word;
}

.image-box {
  width: 200px;
  height: 200px;
  border: 1px solid #ccc;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}


.unity-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  transform: scale(0.8); 
  overflow-y: auto;
}

#unityContainer {
  width: 768/2px;
  height: 1024px;
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#unity-canvas {
  width: 768px;
  height: 1024px;
  background: #000;
  border: 1px solid #ccc;
  display: block;
}

/* script.htmlのgridボタンだけ黒＆角丸にする */
body.script .grid .button {
  background: #000;
  border-radius: 12px;
}
