@charset "utf-8";

/* 基本リセット */
body{
  margin:0;
  background-image:url(m_background.png); /* ← これ追加 */
  background-size:cover;
  background-position:center;
  background-attachment:fixed; /* ← スクロールしても固定 */
}

.header-box {
  position: fixed;        /* ← 上部固定にしておく */
  top: 35px;              /* ← 50px下に移動！ */
  left: 0;
  right: 0;
  margin:  auto;
  display: flex;
  justify-content: space-between; /* 左右端に配置 */
  align-items: center;
  
  height: 60px;
  padding: 0 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.icon-box img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s;
}

.icon-box img:hover {
  transform: scale(1.1);
}

.icon-box img {
  margin: 0 10px; /* ← 左右に10pxの余白を追加 */
}

/* 最下段（フッター） */
.footer-box {
  position: fixed;     /* ← 下に固定 */
  bottom: 22px;
  left: 50%;           /* 画面中央基準に配置 */
  left: 0; right: 0; margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: clamp(40px, 8vh, 70px); /* 画面比率に応じて高さ調整 */
  padding: 0 30px;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);  
  z-index: 5;         /* 他の要素より前面に表示 */
}

/* フッター内のアイコン */
.footer-icon img {
  width: 45px;
  height: 45px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s;
}

.footer-icon img:hover {
  transform: scale(1.1);
}
/* スクロールする部分 */
.messages-scroll{
  margin-top:120px; /* ヘッダーの下 */
  margin-bottom:120px; /* フッターの上 */
  overflow-y:auto;
  height:calc(100vh - 240px); /* 上下の余白を除いた高さ */
  display:flex;
  flex-direction:column;
  gap:20px; /* 画像の間隔 */
}

.messages-scroll img{
  width:100%;
  display:block;
}
