/* ベースグループ */
body {
  color: #222;
  font-family: sans-serif; /* ゴシック体 */
  line-height: 1.5;
}
a {
  color: #0069ff;
}
img {
  max-width: 100%;
  vertical-align: top;
}
ul {
  list-style: none;
}
/* ヘッダー */
.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%);
}
.first-guide {
  position: relative;
}

/* 吹き出し本体 */
.guide-balloon {
  position: absolute;
  top: 100%; /* タブの真下に配置 */
  left: 50%;
  transform: translateX(-50%);
  background: #ff8c00; /* オレンジ色 */
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  white-space: nowrap;
  z-index: 999;
  margin-top: 10px; /* タブとの隙間（調整可） */
}

/* 下向き三角（吹き出しのしっぽ） */
.guide-balloon::before {
  content: "";
  position: absolute;
  top: -10px; /* 本体の上端に接するように */
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 10px solid #ff8c00; /* オレンジの三角 */
}
.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: 20px; /* 前のセクションとの余白として20px空ける */
  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;
}

/* コンテンツエリア */
.content {
  max-width: 1230px;
  padding: 60px 15px;
  margin-right: auto; /* 中央寄せ */
  margin-left: auto; /* 中央寄せ */
  background-color: #efefef;
}
.content--has-column {
  display: flex;
  justify-content: space-between;
}
.content__main {
  flex: 1;
  margin-right: 3.25203%;
}
.content__side {
  flex: 0 0 260px;
  display: block;
}

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

.vertical-posts__item {
  padding-top: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ddd;
}

.vertical-posts__item:first-child {
  padding-top: 0;
}

.vertical-posts__header {
  margin-bottom: 10px;
}

.vertical-posts__header > *:last-child {
  margin-right: 0;
}

.vertical-posts__date {
  margin-right: 10px;
}

.vertical-posts__title {
  text-decoration: none;
}

.vertical-posts__labels {
  display: inline-flex; /* ラベルリストと日付を横並びにし、かつそれぞれのラベル自体もフレックスアイテムとして扱うことができる */
  flex-wrap: wrap;
  margin-bottom: -10px;
}

.vertical-posts__labels > *:last-child {
  margin-right: 0;
}

.vertical-posts__label {
  margin-right: 10px;
  margin-bottom: 10px;
}

.label {
  display: inline-block; /* これにより親の段落のtext-alignの値を継承されることで、ボタンの揃えのためにCSSをいちいち書く必要がない */
  padding: 0.2em 0.3em; /* テキストの上下の余白、左右の余白。これにより長いテキストが入ってもボタン外にあふれない */
  background-color: #e25c00;
  color: #fff; /* 文字の色 */
  font-size: 0.75rem; /* remの基準となるルート要素(通常はhtml要素)のfont-sizeは16px。そのため、.75rem → 12px */
  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%;
}

.media__img {
  width: 100%;
}

.media__body {
  flex: 1;
}

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

/* メディアクエリ適用時 */
@media screen and (max-width: 768px) {
  .content--has-column {
    flex-direction: column;
  }
  .content__main {
    margin-right: 0;
    margin-bottom: 60px;
  }
  .content__side {
    flex-direction: column-reverse;
    justify-content: space-between;
  }
}

.note-text {
  font-size: 0.75rem; /* remの基準となるルート要素(通常はhtml要素)のfont-sizeは16px。そのため、.75rem → 12px */
}

.card {
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
  background-color: #fff;
}

.card__img-wrapper {
  position: relative; /* 下でposition: absolute;を使用するため、画像の起点がこの要素となるよう指定している */
  /* 画像の表示領域としての高さを確保。下でposition: absolute;を使用するため、heightでは高さをうまく確保できない */
  padding-top: 100%; /*画像の縦横比はおおよそ16:9になる */
  overflow: hidden; /* 画像のトリミングのために使用 */
}

.card__img {
  /* width以外のプロパティは画像を天地中央でトリミングするためのテクニック */
  /* これらのテクニックにより、今後想定しないサイズの画像が使用されても、ある程度までは自動で天地中央揃えでトリミングできる */
  position: absolute;
  top: 50%;
  width: 100%; /* 横幅いっぱいに表示させる */
  transform: translateY(-50%);
}

.card__body {
  padding: 15px;
}

.card__body > *:last-child {
  margin-bottom: 0;
}

.card__title {
  margin-bottom: 5px;
  font-size: 1.125rem;
  font-weight: bold;
}

.card__text {
  color: #777;
}

.card--link {
  display: block;
  color: currentColor;
  text-decoration: none;
  transition: 0.25s;
}

.card--link .card__title,
.card--link .card__text {
  transition: 0.25s;
}

.card--link:focus,
.card--link:hover {
  opacity: 0.75;
}

.card--link:focus .card__title,
.card--link:focus .card__text,
.card--link:hover .card__title,
.card--link:hover .card__text {
  color: #e25c00;
  text-decoration: underline;
}

/* フッター */
.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;
}
