.background012 {
  background-color: #fff7d8; /* 背景色追加 */
}
	
/* グリッド */
.grid-btn028 {
  display: grid;
  gap: 16px;
  padding: 10px;
  margin: 30px auto 0;
  max-width: 1200px;
  box-sizing: border-box;
}

/* カード全体（長方形に調整） */
.card028 {
  position: relative;
  width: 100%;
  background: #fff;
  border-radius: 12px;
  border: 5px solid #b1bac7;
  box-sizing: border-box;
  cursor: pointer;
  transition: 0.2s;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  height: 0;
  padding-top: 50%;
}

/* 画像（上部で飛び出す） */
.card028 img {
  width: 45%;
  max-width: 260px;
  height: auto;
  object-fit: contain;
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

/* テキスト */
.card028 p {
  margin-top: -40px;
  font-weight: bold;
  font-size: 18px;
  z-index: 2;
  position: relative;
}

/* PC：4列 */
@media (min-width: 701px) {
  .grid-btn028 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* スマホ：2列 */
@media (max-width: 700px) {
  .grid-btn028 {
    grid-template-columns: repeat(2, 1fr);
  }
}
	
/* 新しいボタンのグリッド */
.grid-btn029 {
  display: grid;
  gap: 16px;
  padding: 10px;
  margin: 20px auto 0;
  max-width: 1200px;
  box-sizing: border-box;
}

.card029 {
  position: relative;
  display: flex;           
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: #fff;
  border: 5px solid #b1bac7;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: 0.2s;
}

.card029 img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.card029 p {
  margin: 0;
}

.card028 .cut-arrow-svg {
  position: absolute;
  left: 93%;
  top: 73%;
  width: 15%;     /* SVGの形に合わせて調整 */
  height: auto;
  z-index: 3;
  pointer-events: none;
}
	
.card029 .cut-arrow-svg {
  position: absolute;
   right: -2px;     /* 親の右端に固定 */
  bottom: -2px;    /* 親の下端に固定 */
  width: 7%;     /* SVGの形に合わせて調整 */
  height: auto;
  z-index: 3;
  pointer-events: none;
}
	
.card028:hover,
.card029:hover {
  background: #000;
  color: #fff;
  transform: translateY(-4px);
}

/* PC：2列 */
@media (min-width: 701px) {
  .grid-btn029 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* スマホ：1列 */
@media (max-width: 700px) {
  .grid-btn029 {
    grid-template-columns: 1fr;
  }
}
	
.title028 {
  padding: 6px 12px;
  width: 100%;
  text-align: center;
  margin: 30px auto 0;
}
	
.title028 img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}
	
.titlearrow012 {
  font-size: 32px;
  font-weight: bold;
  display: inline-block;
  position: relative;
  padding: 6px 12px;
  width: 100%;
  text-align: center;
  margin: 30px auto 0;
}

/* 下線 */
.titlearrow012::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: -12px;
  width: 0;
  height: 10px;
  background: #0097a7;
  transform-origin: left;
}

/* 矢印 */
.titlearrow012::before {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 0;
  height: 0;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 20px solid #0097a7;
}

/* アニメーション用クラス */
.titlearrow012.animate::after {
  animation: line 1s forwards linear;
}
.titlearrow012.animate::before {
  animation: arrowMove 1s forwards linear;
}

/* 下線アニメーション */
@keyframes line {
  to { width: 100%; }
}

/* 矢印アニメーション */
@keyframes arrowMove {
  0% { left: 0; }
  100% { left: 100%; transform: translateX(-100%); }
}
	
.image-row012 {
  display: flex;
  justify-content: center; /* 横並び中央寄せ */
  flex-wrap: wrap; /* 小さい画面で折り返す */
  margin: 20px 0;
  gap: 10px; /* 画像間の隙間 */
  background-color: #fff7d8; /* 背景色 */
}

.image-row012 img {
  width: calc((100% - 20px) / 3); /* 3枚並ぶように計算 */
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.image-row012 img.show {
  opacity: 1;
  transform: translateX(0);
}
	
@media (max-width: 820px) {
.titlearrow012 {
  font-size: 24px;
}
	
  .image-row012 img {
  width:80%;
  }
}

.modal {
  display: none; /* 初期は非表示 */
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.modal-content {
  position: relative; 
  background: #fff2bf;
  width: 90%;
  max-width: 800px;
  padding-bottom: 50px; /* ボタン用の余白を確保 */
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  overflow: hidden;
  animation: fadein 0.3s ease;
}

@keyframes fadein {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
	
.main-title {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  color: #000;
  padding: 40px;
  font-size: 32px;
  font-weight: bold;
  text-align: center;
  background: url('https://www.typing-gate.com/wordpress2/wp-content/themes/typing/img/item/typing-school/wave-shape.png') repeat-x;
  background-size: contain;
  animation: bg-loop 48s linear infinite;
  cursor: pointer;
}

@keyframes bg-loop {
  from { background-position-x: 0; }
  to { background-position-x: -100%; }
}

.page {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 25px;
  flex-wrap: wrap;
  box-sizing: border-box;
}

.left-image,
.text-and-character {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 260px;
  flex-direction: column;
  gap: 20px; 
}

.left-image img {
  max-width: 80%;
  height: auto;
}

.right-text {
  position: relative;
  width: 80%;
  font-size: 1.2em;
  line-height: 1.8;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.right-text::before {
  content: "";
  position: absolute;
  bottom: -30px;
  right: 50%;
  transform: translateX(50%);
  border: 20px solid transparent;
  border-top-color: #fff;
}
	
/* --- 吹き出し出現アニメーション --- */
@keyframes bubble-pop {
  0% {
    transform: scale(0.6) translateY(10px);
    opacity: 0;
  }
  60% {
    transform: scale(1.05) translateY(-3px);
    opacity: 1;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* 吹き出しアニメーション用クラス */
.bubble-animate {
  animation: bubble-pop 0.4s ease-out;
}

.character {
  width: 100px;
  transition: 0.1s;
}

#page-counter {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  align-self: center;
}

/* --- ナビゲーションボタン全体の配置 --- */
.nav-buttons {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}

/* --- 共通ボタンスタイル --- */
.nav-buttons button {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  color: white;
  background: #0097a7;
  font-size: 18px;
  transition: background 0.2s;
  white-space: nowrap;
}

/* --- 丸ボタン（矢印） --- */
.arrow-button {
  width: 40px;
  height:40px;
  border-radius: 50%;
  position: relative;
}

/* --- 三角形をCSSで描画 --- */
.arrow-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-style: solid;
}

/* 左矢印 */
#prev-btn::before {
  border-width: 10px 14px 10px 0;
  border-color: transparent white transparent transparent;
}

/* 右矢印 */
#next-btn::before {
  border-width: 10px 0 10px 14px;
  border-color: transparent transparent transparent white;
}

/* --- メニューボタン --- */
#pre-btn {
  width: 80px;
  height: 40px;
  border-radius: 8px;
  font-size: 16px;
}

/* --- ホバー時の共通効果 --- */
.nav-buttons button:hover {
  background: #00bcd4;
}

/* スマホ縦向き */
@media (max-width: 768px) and (orientation: portrait) {
  .page { flex-direction: column; padding: 15px; gap: 20px; }
  .main-title { font-size: 20px; padding: 20px; }
  .right-text { width: 90%; font-size: 1em; line-height: 1.6; }
  .right-text::before { bottom: -20px; border-width: 12px; }
  .character { width: 90px; }
  .nav-buttons { margin-top: 20px; }
  .nav-buttons button { padding: 10px 18px; font-size: 14px; }
}

/* スマホ横向き */
@media (max-width: 768px) and (orientation: landscape) {
  .page { flex-direction: row; justify-content: space-around; padding: 10px; alignment-adjust}
  .main-title { font-size: 20px; padding: 20px; }
  .left-image,
  .text-and-character {flex: 0 0 45%; }
  .left-image img {max-width: 100%; height: auto;}
  .right-text { width: 90%; font-size: 1em; line-height: 1.6; }
  .character { width: 70px; }
}

#island-video {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border: 5px solid #b1bac7; 
  border-radius: 12px; 
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
	
#video-progress-container {
  width: 100%;
  height: 6px;
  background: #ddd;
  border-radius: 3px;
  overflow: hidden;
}

#video-progress-bar {
  width: 0%;
  height: 100%;
  background: #ffae00;
  transition: width 0.1s linear;
}

.news-header021 {
  margin-bottom: 16px;
  text-align: left;
}

.news-header021 h2 {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  margin: 0;
}
	
.news-list021 {
  list-style: none;
  padding: 0;   /* 親ulの余白を削除 */
  margin: 0;
}

.news-item021 {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;  /* 左右の余白は0に */
  border-bottom: 1px solid #ccc;
  background: #fff;
  flex-wrap: nowrap;
  overflow-x: auto;
}

/* 日付 */
.news-date021 {
  color: #666;
  font-size: 14px;
  flex-shrink: 0;
  width: auto;   /* 固定幅をやめて自然幅に */
  min-width: 60px; /* 必要に応じて最小幅だけ確保 */
}

/* ロゴ */
.news-logo021 {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.news-logo021 img {
  width: 50px;
  height: auto;
}

/* タイトル */
.news-title021 {
  font-weight: bold;
  font-size: 16px;
  line-height: 1.4;
  flex: 1 1 200px;   /* 横幅に応じて伸縮、折り返し可能 */
  white-space: normal; /* 折り返し許可 */
}

/* スマホ対応 */
@media (max-width: 480px) {
  .news-date021 {
    font-size: 13px;
  }

  .news-logo021 img {
    width: 40px;
  }

  .news-title021 {
    font-size: 15px;
  }

}