/* ベース */
body {
  font-family: sans-serif;
}

/* レイアウト */
img {
  max-width: 100%;
  height: auto;
}
ul {
  list-style: none;
}
.ly_cont {
  /* 左中央揃えのための指定 */
  max-width: 1200px;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

/* ヘッダー */
.header {
  padding-top: 20px;
  border-bottom: 1px solid #ddd;
}
.header__inner {
  margin-right: auto; /* 中央寄せ */
  margin-left: auto; /* 中央寄せ */
}
.header-utilities {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.header-nav {
  display: flex;
  justify-content: space-around;
  margin-left: -40px;
  margin-right: -5px;
  margin-bottom: -1px;
  max-width: 100%;
  box-sizing: content-box;
}
.nav__image {
  width: 50px;
}
.header-nav__item {
  flex-grow: 1;
  text-align: center;
}
.header-nav__item:last-child .header-nav__link::after {
  content: none;
}
.header-nav__link {
  position: relative;
  display: block;
  border-bottom: 4px solid transparent;
  color: #222;
  text-decoration: none;
  transition: 0.25s;
}
.header-nav__link:focus,
.header-nav__link:hover {
  border-bottom-color: #e25c00;
}
.header-nav__link::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 1px;
  height: 20px;
  background-color: #ddd;
  transform: translateY(-50%);
}
.pie-img {
  max-width: 650px;
}
.sub-pie-img {
  max-width: 650px;
}
.barh-img {
  max-width: 650px;
}
.plot-img {
  max-width: 650px;
}
.level1-heading {
  padding: 30px 10px; /* テキストの上下の余白、左右の余白。見出しモジュールに関しては相対値のemでなく計算が容易な固定値のpxを使用する */
  background: linear-gradient(#777, rgba(0, 0, 0, 0));
  color: #fff; /* 文字の色 */
  font-size: 2rem; /* remの基準となるルート要素(通常はhtml要素)のfont-sizeは16px。そのため、2rem → 32px */
  text-align: center; /* 段落で指定する文字揃え ※見出しの位置もこれに従う */
}
.level1-heading__inner {
  font-family: SimSun;
  position: relative;
  display: inline-block; /* これにより親の段落のtext-alignの値を継承されることで、見出しの揃えのためにCSSをいちいち書く必要がない */
  transform: translateY(
    -20%
  ); /* テキストと下線をセットとして天地中央揃えに見えるよう調整。これをしないと下寄りに見えてしまう */
}
.level1-heading__inner::after {
  /* after疑似要素を使用して下線を生成 */
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%; /* 下線の起点をテキストの中央に設定 */
  width: 80px;
  height: 1px;
  background-color: currentColor;
  transform: translateX(
    -50%
  ); /* 下線を対象要素(下線)の半分の大きさ分(50%)、左に寄せる(マイナス) */
}

/* コンテンツエリア */
.level2-heading {
  padding-bottom: 10px; /* 見出し下の余白。見出しモジュールに関しては相対値のemでなく計算が容易な固定値のpxを使用する */
  margin-top: 100px; /* 前のセクションとの余白として100px空ける */
  margin-bottom: 20px; /* 次のセクションとの余白として20px空ける */
  border-bottom: 4px solid #a5a3a2; /* 下線を設定 */
  font-size: 1.75rem; /* remの基準となるルート要素(通常はhtml要素)のfont-sizeは16px。そのため、1.75rem → 28px */
  font-weight: bold;
}
.level3-heading {
  padding-bottom: 6px; /* 見出し下の余白。見出しモジュールに関しては相対値のemでなく計算が容易な固定値のpxを使用する */
  border-bottom: 2px solid #a5a3a2; /* 下線を設定 */
  font-size: 1.5rem; /* remの基準となるルート要素(通常はhtml要素)のfont-sizeは16px。そのため、1.5rem → 24px */
  font-weight: bold;
}
.media {
  display: flex; /* 画像とテキストを横並び、かつ、天地中央揃えに */
  align-items: center;
}

.media__img-wrapper {
  /* スクリーンサイズを縮小した際に画像、テキストの両方を自然に縮小させるための指定 */
  flex: 0 1 27.58333%; /* flex-grow flex-shrink flex-bias */
  /* スクリーンサイズを縮小した際に合わせて縮小する余白を指定 */
  margin-right: 3.33333%;
  margin-left: 0px;
}
.media__img-title {
  font-size: 1.125rem;
  font-weight: bold;
  text-align: center; /* 段落で指定する文字揃え ※見出しの位置もこれに従う */
}
.media__body {
  flex: 1;
}

/* .media__body内の最後の子要素の下部の余白を取る */
.media__body > *:last-child {
  /* 説明文がなくなってもタイトルが天地中央揃えから10px分上にずれないようにする */
  margin-bottom: 0;
}
.media__title {
  margin-bottom: 10px;
  font-size: 1.125rem;
  font-weight: bold;
}

.media__text {
  /* css-wipeではスタイリングなし */
}

@media screen and (max-width: 768px) {
  .media {
    /* Flexboxを解除 */
    display: block; /* メディアクエリ適用時、画像が上、テキストが下の縦並びレイアウトに */
    align-items: left;
  }
  .media__img-wrapper {
    margin-right: 0;
    margin-bottom: 20px;
  }
  .media__img-title {
    margin-top: 60px;
  }
  .pie-img {
    width: 350px;
  }
  .sub-pie-img {
    width: 350px;
  }
  .barh-img {
    width: 350px;
  }
  .plot-img {
    width: 350px;
  }
}

@media screen and (min-width: 768px) and (max-width: 1080px) {
  .media {
    display: block;
  }
}

.after-icon::after {
  display: inline-block; /* これにより親の段落のtext-alignの値を継承されることで、ボタンの揃えのためにCSSをいちいち書く必要がない */
  margin-top: 100px;
  margin-left: 0.3em; /* アイコンの左側の余白 */
  margin-right: 0.3em; /* アイコンの右側の余白 */
  color: #e25c00; /* 文字の色 */
  font-family: "Font Awesome 5 Free";
  font-weight: 900; /* Font Awesomeのアイコンを表示させるための指定 */
}
.after-icon--chevron-right::after {
  /* 三角形の1辺がないような矢印は「chevron」と呼ばれる */
  content: "";
  width: 0.375em;
  height: 0.375em;
  border-top: 0.125em solid #e25c00; /* 右向き矢印のベース */
  border-right: 0.125em solid #e25c00; /* 右向き矢印のベース */
  /* 上2行で描画したボーダーを傾けることで、右向きの矢印にする。
  rotate (45deg)だけで左向きの矢印にできるが、テキストに対して若干下寄りになるため、
  天地中央揃えにするためにtranslateY (-30%)を加える */
  transform: rotate(45deg) translateY(-30%);
}

/* アサイド */
.level4-heading {
  padding-left: 6px; /* 見出しの左の余白。見出しモジュールに関しては相対値のemでなく計算が容易な固定値のpxを使用する */
  border-left: 2px solid #a5a3a2; /* 見出しの左側に傍線を設定 */
  font-size: 1.5rem; /* remの基準となるルート要素(通常はhtml要素)のfont-sizeは16px。そのため、1.25rem → 20px */
  font-weight: bold;
}

/* フッター */
/* フッター */
.footer {
  padding-top: 20px;
  padding-bottom: 20px;
  background-color: #222;
}
.footer--border-top-gray {
  border-top: 1px solid #777;
}
.footer__inner {
  margin-right: auto; /* 中央寄せ */
  margin-left: auto; /* 中央寄せ */
}
.footer-nav {
  display: flex;
  justify-content: space-around;
  margin-left: -40px;
  margin-right: -5px;
  max-width: 100%;
  box-sizing: content-box;
}
.footer-nav__item {
  flex: 1;
  text-align: center;
}
.footer-nav__item > *:last-child {
  margin-bottom: 0;
}
.footer-nav__item:last-child .footer-nav__link::after {
  content: none;
}
.footer-nav__link {
  position: relative;
  display: block;
  padding-top: 15px;
  padding-bottom: 15px;
  margin-bottom: 10px;
  color: #fff;
  text-decoration: none;
}
.footer-nav__link:focus,
.footer-nav__link:hover {
  text-decoration: underline;
}
.footer-nav__link::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 1px;
  height: 15px;
  background-color: currentColor;
  transform: translateY(-50%);
}
.footer-copyright {
  display: block;
  color: #ddd;
  font-size: 12px;
  text-align: center;
}
.img-flex {
  display: flex;
}

/* 個別画像ローディングオーバーレイ（Three.js版） */
.image-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff; /* 完全な白背景 */
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05); /* 内側にほんのり影を落とす */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.image-loading-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
}

/* Three.js を挿入するための枠 */
.cube-box {
  width: 60px;
  height: 60px;
}
