@charset "UTF-8";
@import url("https://fonts.googleapis.com/css2?family=Oooh+Baby&display=swap");
/*－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－

全ページ共通

－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－*/
html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: "Zen Kaku Gothic New", YuGothic, "Yu Gothic medium", "Hiragino Sans", Meiryo, "sans-serif";
  font-size: 1.6rem;
  color: #333;
  letter-spacing: 2px;
  line-height: 1.8;
  background-color: rgba(250, 244, 232, 0.3);
}
@media screen and (max-width: 520px) {
  body {
    font-size: 1.4rem;
  }
}
body::before, body::after {
  position: fixed;
  left: 0;
  content: "";
  display: block;
  width: 100%;
  height: 20px;
  background-image: linear-gradient(90deg, #c0d9d3 30%, #ffee7c);
  z-index: 3;
}
body::before {
  top: 0;
}
body::after {
  bottom: 0;
}

*:hover,
*::before,
*::after {
  transition: 0.2s;
}

/*－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－

文字

－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－*/
p {
  margin: 20px 0;
  letter-spacing: 1px;
  text-align: justify;
}

a {
  color: inherit;
}

/*－－－－－－－－－－ 見出し －－－－－－－－－－*/
h1,
h2,
h3,
h4,
h5 {
  font-family: "Oooh Baby", "Zen Kaku Gothic New", YuGothic, "Yu Gothic medium", "Hiragino Sans", Meiryo, "sans-serif";
  font-weight: normal;
  letter-spacing: 4px;
  text-align: center;
  text-transform: uppercase;
  word-break: break-all;
}

/*－－－－－－－－－－ 大見出し －－－－－－－－－－*/
.headingL {
  font-size: clamp(3rem, 2.8rem + 1vw, 4rem);
  margin: 40px 0;
  margin: clamp(3rem, 2.8rem + 1vw, 4rem) 0;
}
.headingL.ja {
  font-size: clamp(2.4rem, 2.24rem + 0.8vw, 3.2rem);
}

/* 特定フレーズの改行制御 */
.nowrap {
  white-space: nowrap;
}

/* 国名の文字サイズ調整 */
.country-name {
  font-size: clamp(1.8rem, 1.7rem + 0.5vw, 2.5rem);
}

/*－－－－－－－－－－ 中見出し －－－－－－－－－－*/
.headingM {
  font-size: clamp(2.4rem, 2.28rem + 0.6vw, 3rem);
  margin: clamp(2rem, 1.8rem + 1vw, 3rem) 0;
}
.headingM.ja {
  font-size: clamp(2rem, 1.92rem + 0.4vw, 2.4rem);
}

/*－－－－－－－－－－ 小見出し －－－－－－－－－－*/
.headingS {
  font-size: clamp(2rem, 1.96rem + 0.2vw, 2.2rem);
  margin: 20px 0;
}
.headingS.ja {
  font-size: clamp(1.8rem, 1.76rem + 0.2vw, 2rem);
}

/*－－－－－－－－－－ 最小見出し －－－－－－－－－－*/
.headingSS {
  font-size: clamp(1.8rem, 1.76rem + 0.2vw, 2rem);
  margin: 20px 0;
}

/*－－－－－－－－－－ 文字装飾 －－－－－－－－－－*/
.right {
  text-align: right;
}

.center {
  text-align: center;
}

.marker {
  background: linear-gradient(transparent 60%, #c0d9d3 60%);
}

.label {
  display: block;
  margin: 20px 0;
  padding: 2px 10px;
  background-color: #ffee7c;
  width: -moz-fit-content;
  width: fit-content;
}

/*－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－

アイコン等

－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－*/
.la,
.las,
.lab {
  font-size: 1.2em;
  color: #c0d9d3;
  position: relative;
  top: 2px;
}

/* 矢印 */
.arrow {
  width: 20px;
  height: 20px;
  border: 2px solid #c0d9d3;
  border-bottom: 0;
  border-left: 0;
  transform: rotate(45deg);
  -webkit-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  -o-transform: rotate(45deg);
}

/* キャラクターページ間ナビゲーション */
.page-nav {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.page-nav a {
  color: #000;
  /* font-weight: bold; */
  text-decoration: none;
}

.page-nav a:hover {
  text-decoration: underline;
}

/*－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－

入力フォーム、ボタン

－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－*/
/* 入力フォーム */
input,
textarea {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  padding: 10px 20px 8px 20px;
  border: 1px solid #c0d9d3;
  margin: 10px 0;
}

/* ボタン */
.btn {
  display: block;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-color: #c0d9d3;
  color: #fff;
  text-align: center;
  text-decoration: none;
  padding: 3px 10px;
  border: 1px solid #c0d9d3;
  transition: 0.2s;
  -webkit-transition: 0.2s;
  -moz-transition: 0.2s;
  -ms-transition: 0.2s;
  -moz-transition: 0.2s;
}
.btn:hover {
  cursor: pointer;
  background-color: #ffee7c;
}

/*－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－

リスト

－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－*/
.list,
.list-number {
  margin: 20px 0;
}

.list li {
  position: relative;
  margin-left: 16px;
}
.list li::before {
  position: absolute;
  top: 8px;
  left: -16px;
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  background-color: #c0d9d3;
  border-radius: 50%;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  -ms-border-radius: 50%;
  -o-border-radius: 50%;
}

/*－－－－－－－－－－ 数字付きリスト －－－－－－－－－－*/
.list-number {
  list-style-type: decimal-leading-zero;
  list-style-position: inside;
}
.list-number li {
  text-indent: -3.4rem;
  padding-left: 3.6rem;
}
.list-number li > :not(:first-child) {
  text-indent: 0;
}

/*－－－－－－－－－－ 表リスト －－－－－－－－－－*/
.gridlist {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 20px;
}
.gridlist .gridlist__label,
.gridlist .gridlist__text {
  padding: 6px 12px 4px;
}
.gridlist .gridlist__label {
  display: flex;
  align-items: center;
  background-color: #c0d9d3;
  color: #fff;
}

/* スマホ */
@media screen and (max-width: 520px) {
  .gridlist {
    grid-template-columns: 1fr;
  }
}
/*－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－

枠組み

－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－*/
.box {
  position: relative;
  padding: 20px 40px 40px;
  margin: 140px 0;
  background-color: #fff;
}
.box::before {
  position: absolute;
  top: 0;
  left: 0;
  content: "";
  display: block;
  width: 100%;
  height: 10px;
  background-color: #c0d9d3;
}
.box > :first-child {
  margin-top: 0;
}
.box > :last-child {
  margin-bottom: 0;
}
.box .box__title {
  position: relative;
  margin-top: -1.6em;
  z-index: 2;
}

.news-history {
  max-height: 16rem;
  overflow-y: auto;
  padding-right: 12px;
  scrollbar-gutter: stable;
}

.news-history dt:not(:first-of-type) {
  margin-top: 12px;
}

.news-history dd {
  margin-left: 1em;
}

/* スマホ */
@media screen and (max-width: 520px) {
  .box {
    padding: 10px 20px 20px;
    margin: 100px 0;
  }

  .news-history {
    max-height: 15rem;
    padding-right: 8px;
  }

  .box .box__title {
    margin-top: -1.4em;
  }

  .mainwrapper#top .box__title {
    font-size: clamp(2rem, 8.4vw, 3rem);
    letter-spacing: clamp(0.06em, 0.6vw, 0.16em);
    white-space: nowrap;
    word-break: keep-all;
  }
}
/*－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－

SNSアイコンリスト

－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－*/
.snslist {
  justify-content: center;
  margin: 40px 0 40px;
}
.snslist .snslist__item {
  width: 100px;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #c0d9d3;
  border-radius: 50%;
  transition: 0.2s;
  -webkit-transition: 0.2s;
  -moz-transition: 0.2s;
  -ms-transition: 0.2s;
  -moz-transition: 0.2s;
}
.snslist .snslist__item a {
  text-decoration: none;
  color: #fff;
  font-size: 2.4rem;
}
.snslist .snslist__item .lab,
.snslist .snslist__item .las {
  margin: 6px 1px 3px 3px;
  font-size: 6rem;
  color: #fff;
}
.snslist .snslist__item:hover {
  background-color: #ffee7c;
}
.snslist .snslist__item:hover.twitter {
  background-color: #1DA1F2;
}
.snslist .snslist__item:hover.instagram {
  background-color: #CF2E92;
}
.snslist .snslist__item:hover.facebook {
  background-color: #4267b2;
}
.snslist .snslist__item:hover.youtube {
  background-color: #DA1725;
}
.snslist .snslist__item:hover.tumblr {
  background-color: #39475D;
}

/* スマホ */
@media screen and (max-width: 520px) {
  .snslist.flex {
    gap: 10px;
  }
  .snslist.flex .snslist__item {
    width: 80px;
    height: 80px;
  }
  .snslist.flex .snslist__item .lab,
  .snslist.flex .snslist__item .las {
    font-size: 4rem;
  }
}
.snslist2 {
  justify-content: center;
  margin: 40px 0;
}
.snslist2 .snslist__item {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #c0d9d3;
  padding: 10px 0;
  border-radius: 9999px;
  transition: 0.2s;
  -webkit-transition: 0.2s;
  -moz-transition: 0.2s;
  -ms-transition: 0.2s;
  -moz-transition: 0.2s;
  -webkit-border-radius: 9999px;
  -moz-border-radius: 9999px;
  -ms-border-radius: 9999px;
  -o-border-radius: 9999px;
}
.snslist2 .snslist__item a {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-size: 2.4rem;
}
.snslist2 .snslist__item .lab,
.snslist2 .snslist__item .las {
  margin: 6px 1px 3px 3px;
  font-size: 3.4rem;
  color: #fff;
}
.snslist2 .snslist__item:hover {
  background-color: #ffee7c;
}
.snslist2 .snslist__item:hover.twitter {
  /* background-color: #1DA1F2; */
  background-color: #000;
}
.snslist2 .snslist__item:hover.instagram {
  background-color: #CF2E92;
}
.snslist2 .snslist__item:hover.facebook {
  background-color: #4267b2;
}
.snslist2 .snslist__item:hover.youtube {
  background-color: #DA1725;
}
.snslist2 .snslist__item:hover.tumblr {
  background-color: #39475D;
}

/* スマホ */
@media screen and (max-width: 520px) {
  .snslist2.grid {
    gap: 10px;
  }
  .snslist2.grid .snslist__item {
    padding: 0;
  }
  .snslist2.grid .snslist__item a {
    gap: 8px;
    font-size: 2rem;
  }
  .snslist2.grid .snslist__item .las, .snslist2.grid .snslist__item .lab {
    font-size: 2.6rem;
  }
}
/*－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－

レイアウト

－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－*/
/*－－－－－－－－－－ 横並び －－－－－－－－－－*/
.flex {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  /* 表示サイズを変えたい場合は200pxの部分を変更 */
  gap: 20px;
  justify-content: center;
  align-items: center;
}

/* キャラクターグリッド */
.character-grid {
  grid-template-columns: repeat(5, 140px);
}

/* キャラクターグリッド内の画像を円形にする（仮のサムネ用） */
.character-grid .grid__item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* 右下アイコン用オーバーレイと文字表示 */
.character-grid .chara-icon {
  position: relative;
}
.character-grid .chara-icon .overlay-text {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  background-color: rgba(0,0,0,0.5);
  color: #FFF;
  font-size: 2.2rem;
  font-family: "Zen Kaku Gothic New", YuGothic, "Yu Gothic medium", "Hiragino Sans", Meiryo, "sans-serif";
  text-align: center;
  pointer-events: none;
}
.character-grid .chara-icon img {
  display: block;
}

/* ホバー時の色反転 */
.character-grid .chara-icon:hover .overlay-text {
  background-color: rgba(220,220,220,0.8);
  color: #000;
}

/* スマホ */
@media screen and (max-width: 520px) {
  .character-grid {
    grid-template-columns: repeat(3, 100px);
    gap: 12px;
  }
  
  .character-grid .chara-icon .overlay-text {
    font-size: 1.4rem;
  }
}

/* モバイルSサイズ（320px以下） */
@media screen and (max-width: 360px) {
  .character-grid {
    grid-template-columns: repeat(3, 80px);
    gap: 8px;
  }

  .news-history {
    max-height: 15rem;
    padding-right: 8px;
  }

  
  .character-grid .chara-icon .overlay-text {
    font-size: 1rem;
  }
}

/*－－－－－－－－－－ 2カラム表示 －－－－－－－－－－*/
.--2column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 60px;
}

/* タブレット、スマホでは１カラム */
@media screen and (max-width: 768px) {
  .--2column {
    grid-template-columns: 1fr;
  }
}
/*－－－－－－－－－－ 左右反対 －－－－－－－－－－*/
.reverse {
  flex-direction: row-reverse;
}

/*－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－

全体のレイアウト

－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－*/
/*－－－－－－－－－－ コンテンツ全体の横幅、余白 －－－－－－－－－－*/
.mainwrapper {
  padding: 60px 10px;
}
.mainwrapper > :first-child {
  margin-top: 0;
}

/* スマホ時は固定ヘッダー分の上余白を少し増やす */
@media screen and (max-width: 520px) {
  .mainwrapper {
    padding-top: 84px;
  }
}

/* PC */
@media screen and (min-width: 1025px), print {
  .mainwrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 20px;
  }
}
/*－－－－－－－－－－ セクション －－－－－－－－－－*/
section {
  margin: 60px 0;
}
section > :first-child {
  margin-top: 0;
}
section > :last-child {
  margin-bottom: 0;
}
section section:first-of-type {
  padding-top: 0;
}
section section:last-of-type {
  padding-bottom: 0;
}

/* PC */
@media screen and (min-width: 1025px), print {
  section {
    margin: 100px 0;
  }
}
/*－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－

プロフィール

－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－*/
.myname {
  font-size: clamp(3rem, 1.909rem + 5.45vw, 6rem);
  margin-top: -1.6em;
}
.mobile-br {
  display: none;
}
@media screen and (max-width: 520px) {
  .mobile-br {
    display: block;
  }
}
.myname div {
  font-size: clamp(2rem, 1.96rem + 0.2vw, 2.2rem);
}

.profile__img {
  padding: 0 40px;
  text-align: center;
}
.profile__img img {
  max-width: 750px;
  width: 100%;
  height: auto;
  margin: auto;
  border-radius: 0;
}

/* イラストギャラリー遷移用リンク画像 */
.profile__img .illustration-link {
  position: relative;
  display: block;
  width: min(100%, 520px);
  margin: 0 auto;
  overflow: hidden;
}
.profile__img .illustration-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}
.profile__img .illustration-link:hover::before,
.profile__img .illustration-link:focus::before {
  opacity: 1;
}
.profile__img .illustration-link img {
  width: 100%;
}

/*－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－

ヘッダー

－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－*/
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  z-index: 5;
  background: linear-gradient(90deg, #c0d9d3 30%, #ffee7c);
}
.global-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  min-height: 42px;
  align-items: stretch;
  justify-content: center;
  gap: 0;
}
.global-nav ul li {
  margin: 0;
}
.global-nav a {
  position: relative;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  padding: 0 1.4rem;
  min-height: 42px;
}
.global-nav a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}
.global-nav a:hover::before,
.global-nav a:focus::before {
  opacity: 1;
}

/* ハンバーガーボタン（デスクトップでは非表示） */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  margin-left: auto;
  line-height: 1;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: 0.3s;
}
/* 開いた状態でXに変化 */
header.is-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
header.is-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}
header.is-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* スマホ */
@media screen and (max-width: 520px) {
  header {
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 4px 12px;
  }
  .nav-toggle {
    display: block;
  }
  .global-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, #c0d9d3 30%, #ffee7c);
    z-index: 5;
  }
  header.is-open .global-nav {
    display: block;
  }
  .global-nav ul {
    flex-direction: column;
    padding: 0 0 8px;
  }
  .global-nav ul li {
    margin: 0;
  }
  .global-nav a {
    padding: 0.7rem 1.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
  }
}

/*－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－

フッター

－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－*/
footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 4;
}
footer small {
  display: block;
  font-size: 1rem;
  color: #fff;
  text-align: center;
}

/*－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－

モーダル

－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－*/
/* モーダルを開くボタン */
.modal-open{
  position: fixed;
  top: 50%;
  left: 50%;
  font-size: 16px;
  font-weight: bold;
  width: 300px;
  height: 60px;
  color: #fff;
  background: #000;
  border: none;
  cursor: pointer;
  /* center the button */
  transform: translate(-50%, -50%);
}

/* 画像グリッド用のボタン調整 */
.modal-grid button {
  background: transparent;
  border: none;
  padding: 0;
}
.modal-grid button img {
  display: block;
}

/* グリッド内アイテム */
.modal-item {
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  transition: background-color 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 240px; /* 固定高さでグリッドの高さ差を解消 */
  box-sizing: border-box;
}
.modal-item:hover,
.modal-item:focus-within {
  background-color: #f0f0f0; /* 薄いグレー */
}
.modal-thumb {
  width: 170px;
  height: 170px;
  object-fit: cover;
  display: block;
}
.modal-title {
  margin-top: 4px;
  font-size: 1.4rem;
  color: #333;
  /* allow wrapping but we will shrink long names via script */
  min-height: 2.2rem; /* タイトル領域を確保して高さ差を防ぐ */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  text-align: center;
  word-break: keep-all;
}

/* helper class applied when a title was too wide; font-size can be tuned */
.modal-title--small {
  font-size: 1.4rem;
}

/* base grid layout extracted from inline html */
.modal-grid {
  display: grid;
  grid-template-columns: repeat(4, 180px);
  gap: 16px;
  justify-content: center;
  align-items: start;
  max-width: 800px;
  margin: 20px auto 0;
}

/* スマホ時は2列にして画像を縮小 */
@media (max-width: 600px) {
  .modal-grid {
    grid-template-columns: repeat(2, 140px);
  }

  .modal-thumb {
    width: 130px;
    height: 130px;
  }

  /* 文字サイズと間隔を縮小 */
  .modal-title {
    font-size: 0.5rem;
  }

  .modal-item {
    padding: 4px;
    height: 200px; /* モバイルは高さを少し小さく */
  }

  /* モーダル本体のテキストとパディング縮小 */
  .modal-content {
    padding: 10px;
    font-size: 1.0rem;
    line-height: 1.6;
  }

  .modal-content p {
    margin: 0.8em 0;
  }
}


/* モーダルと背景の指定 */
.modal{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  text-align: center;
  background: rgba(0,0,0,0.5);
  padding: 40px 20px;
  overflow: auto;
  opacity: 0;
  visibility: hidden;
  transition: .3s;
  z-index: 9999; /* ensure modal overlays page elements */
  box-sizing: border-box;
}

.modal-title {
  font-size: 1.8rem;
  color: #000;
}

/* responsive fix: override grid item titles on small screens */
@media (max-width: 600px) {
  .modal-grid .modal-title {
    font-size: 1.3rem; /* smaller than default 2rem */
  }
}

/* モーダルの擬似要素の指定 */
.modal:before{
  content: "";
  display: inline-block;
  vertical-align: middle;
  height: 100%;
  margin-left: -0.2em;
}

/* クラスが追加された時の指定 */
.modal.is-active{
  opacity: 1;
  visibility: visible;
}

/* モーダル内側の指定 */
.modal-container{
  position: relative;
  display: inline-block;
  vertical-align: middle;
  max-width: 600px;
  width: 90%;
}

/* モーダルを閉じるボタンの指定 */
.modal-close{
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  top: -20px;
  right: -20px;
  width: 40px;
  height: 40px;
  color: #fff;
  background: #000;
  border-radius: 50%;
  cursor: pointer;
}

/* 前後ナビゲーション */
.modal-nav{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* container に合わせた幅、ただし大画面では広げる */
  width:90%;
  max-width:700px; /* 中間くらいの幅 */
  display:flex;
  justify-content:space-between;
  pointer-events:none; /* 背景クリックの邪魔をしない */
  z-index:10001; /* ボタンよりも上に置いておく */
}

/* 超大画面向けに少し広げるが控えめに */
@media (min-width:1200px) {
  .modal-nav {
    width:92%;
    max-width:800px;
  }
}
.modal-prev,
.modal-next {
  /* ボタンは nav 内で相対位置にする。親幅に収まる */
  pointer-events: auto;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  padding: 8px 12px;
  font-size: 1.6rem;
  cursor: pointer;
  border-radius: 4px;
  z-index: 10002; /* 常に前面 */
}
.modal-prev {
  /* 親 nav の左端に寄せる */
  margin-left: 4px;
}
.modal-next {
  /* 親 nav の右端に寄せる */
  margin-right: 4px;
}
.modal-prev:disabled,
.modal-next:disabled {
  opacity: 0.4;
  cursor: default;
}

/* モーダルのコンテンツ部分の指定 */
.modal-content{
  background: #fff;
  text-align: left;
  line-height: 1.8;
  padding: 20px;
}

/* 画像切り替え用ラッパー */
.modal-image-wrapper{
  display: inline-block;
  max-width: 100%;
}
.modal-image-wrapper img#modal-main-img{
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
.modal-thumbs{
  /* thumbnails below image, not overlapping text */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-top: 8px;
}
.modal-thumbs img{
  width: 48px;
  height: auto;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 4px;
}
.modal-thumbs img.active{
  border-color: #000;
}

/* モーダルのコンテンツ部分のテキストの指定 */
.modal-content p{
  margin: 1em 0;
}

