html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: sans-serif;
  overflow: hidden; /* 全体のスクロールを無効にする */
}

header {
  background: #333;
  color: white;
  text-align: center;
  padding: 1rem;
}

.left-banner,
.right-banner {
  width: 120px;
  background: #eee;
  padding: 1rem;
  text-align: center;
  height: calc(100% - 100px); /* ヘッダーとフッター分を除外 */
  position: fixed;
  top: 80px; /* ヘッダーの高さ分 */
}

.left-banner {
  left: 0;
}

.right-banner {
  right: 0;
}

.main-wrapper {
  position: absolute;
  top: 80px; /* ヘッダーの高さ分 */
  bottom: calc(24px + 2 * 2px); /* フッターの高さ分 */
  left: 120px; /* 左バナー幅 */
  right: 120px; /* 右バナー幅 */
  overflow-y: auto;
  background: #fafafa;
  padding: 1rem;
}

/* footerが消えた時 */
.main-wrapper.no-footer {
  bottom: 0;
}

/* スマホ用の固定バナー */
.fixed-banner {
  display: none;
}

footer {
  background: #fafafa;
  color: black;
  font-size: 12pt; /* 16px相当 */
  text-align: center;
  padding: 2px;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 24px;
  z-index: 10;
}

footer a:link,
footer a:hover,
footer a:visited {
  color: black;
  text-decoration: underline;
}

/* モーダルの背景（黒い薄い背景） */
.modal {
  display: none; /* 初期状態は非表示 */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

/* モーダルの中身部分（白いボックス） */
.modal-content {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  width: 80%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.2s ease-out;
}

/* スクロール領域 */
.modal-body {
  max-height: 50vh; /* 表示する高さを制限 */
  overflow-y: auto; /* 縦スクロールを有効化 */
  padding-right: 5px; /* スクロールバーで内容が隠れないよう少し余白 */
}

/* 閉じるボタン（×） */
.close {
  float: right;
  font-size: 28px;
  cursor: pointer;
}

/* スマホ用レイアウト */
@media (max-width: 768px) {
  .left-banner,
  .right-banner {
    display: none;
  }

  .main-wrapper {
    left: 0;
    right: 0;
    top: 80px;
    bottom: calc(24px + 2 * 2px + 50px); /* フッター + 固定バナー */
  }

  /* footerが消えた時 */
  .main-wrapper.no-footer {
    bottom: 50px;
  }

  /* スマホ用の固定バナー */
  .fixed-banner {
    display: block;
    position: fixed;
    bottom: calc(24px + 2px * 2);
    left: 0;
    width: 100%;
    height: 50px;
    background: #ff6600;
    color: white;
    text-align: center;
    line-height: 50px;
    z-index: 999;
  }

  .fixed-banner.no-footer {
    bottom: 0;
  }

  footer {
    font-size: 8pt; /* 10.2px相当 */
  }
}
