body {
  margin: 0;
  /*  font-family: system-ui, "Noto Sans JP", sans-serif; */
  font-family: "Helvetica Neue",
    Arial,
    "Hiragino Kaku Gothic ProN",
    "Hiragino Sans",
    "Noto Sans JP",
    Meiryo,
    sans-serif;
  font-size: 11pt;
  background: #f5f5f5;
  color: #222;
  line-height: 1.5;
  overflow-y: scroll;
}

.container {
  max-width: 700px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

h1 {
  font-size: 28px;
  margin-bottom: 0;
}

.full-image {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 15px;
}

.links {
  text-align: center;
  margin: 20px 0 10px;
}

.links a {
  display: inline-block;
  margin-right: 12px;
  color: #0066cc;
  text-decoration: none;
}

.links a:last-child {
  margin-right: 0;
}

/* ----------- 最終更新セクション (一行表示) ------------------ */
.last-update {
  display: flex; /* 横並びにする */
  align-items: baseline; /* ベースラインで揃える */
  background-color: #f0f0f0; /* 薄い背景色 */
  border-left: 5px solid #a8a8a8; /* 左側に目立つ線 */
  padding: 8px 15px;
  border-radius: 4px; /* 角丸 */
  margin: 20px 0;
  font-size: 9pt;
}

/* 「最終更新：」ラベル */
.update-label {
  font-weight: bold;
  color: #333;
  flex-shrink: 0; /* 幅を固定して内容が圧縮されないようにする */
  margin-right: 10px;
}

/* 更新内容 */
.update-content {
  color: #555;
}

h3 {
  font-size: 11pt;
  margin: 0 auto;
}

/* --------------- ABOUT用レイアウト ------------------ */

/* 各セクションのまとまり */
.about-section {
  margin-bottom: 30px; /* セクションごとの間隔を広めに */
}

/* --- 代表プロフィールセクション --- */
.profile-wrapper {
  display: flex; /* アイコンとテキストを横並びにする */
  align-items: flex-start; /* 上端を揃える */
  gap: 20px; /* アイコンとテキストの間隔 */
  margin-bottom: 40px;
  /*    border: 1px solid #acacac;  ボーダーライン */
  background-color: #ffffff; /* 背景色を白に */
  padding: 30px 20px 20px; /* 内側に余白を作る */
  border-radius: 8px; /* 角を少し丸くする */
}

.profile-icon {
  width: 100px;
  height: 100px;
  background-color: #e0e0e0;
  border-radius: 50%;
  flex-shrink: 0;
  margin: 5px 10px;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 10pt;
  color: #666;
  overflow: hidden;
}

/* 実際に画像が入った時のスタイル (imgタグが入ることを想定) */
.profile-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 枠に合わせて画像をトリミング */
  display: block;
}

.profile-text {
  flex-grow: 1; /* 残りのスペースを埋める */
}

/* --- レスポンシブ対応  --- */
@media (max-width: 500px) {
  .profile-wrapper {
    flex-direction: column; /* アイコンとテキストを縦並びにする */
    /*  align-items: center;    /* アイコンを中央揃えにする */
  }

  .profile-icon {
    margin-bottom: 1px; /* アイコンとテキストの間に少し隙間を空ける */
  }

  .profile-text {
    width: 100%; /* 親要素の幅いっぱいに広げる */
    text-align: left; /* 中身の文字は左揃え */
  }
}

/* --------------------------　メッセージフォーム用 ----------------------------*/

/* --- フォーム全体 --- */
.form-container {
  /*  background-color: white; /* 白い背景 */
  padding-top: 8px;
  padding-bottom: 22px;
  padding-right: 20px;
  padding-left: 20px;
  /*  border-radius: 8px;      /* 角丸 */
  margin-top: 10px;
  margin-bottom: 0;
}

/* メッセージフォーム本体 */
.form-group {
  margin-bottom: 12px; /* 項目と項目の間に間隔を開ける */
  display: block;
}

/* 説明文のスタイル */
.form-description {
  font-size: 10pt; /* フォントを小さく */
  color: #474747; /* 文字色を少し薄く */
  margin: 20px 0;
  line-height: 1.3;
}

/* ラベル */
.form-group label {
  display: block;
  font-size: 11.5pt;
  /*  font-weight: bold;  ラベルを太字 */
  margin-top: 25px;
  margin-bottom: 10px;
  padding: 0;
}

/* 入力フィールド */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  width: 100%;
  padding: 4px 6px;
  box-sizing: border-box;
  margin-top: 2px;
  display: block;
  line-height: 1.4;
}

/* メッセージフォーム用の行間 */
form,
form label,
form input,
form textarea,
form button {
  line-height: 0.5; /*  行間 */
}

/* 送信ボタンの装飾 */
button[type="submit"] {
  margin-top: 0;
  padding: 16px;
  background-color: #333; /* 色 */
  color: white;
  border: none;
  cursor: pointer;
}

/* ------------------ ヘッダーの基本設定 ------------------- */
#main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  /* height: 55px; */
  transition: top 0.3s ease-in-out;
}

/* ヘッダーを画面外に隠すための設定 */
#main-header.header-hidden {
  top: -55px; /* ロゴ高さ40px + 上下padding 15px*2 = 70px */
}

/* ヘッダー内部のレイアウト調整用コンテナ */
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 15px;
  max-width: 720px;
  margin: 0 auto;
}

/* --- ロゴエリアの設定 --- */
.site-logo {
  margin: 0;
  padding: 0;
  font-size: 11pt; /* サイト名（文字）の大きさ */
  font-weight: bold;
}

/* --- ロゴエリアの設定に追加するCSS --- */
.site-logo img {
  width: 40px;
  height: 40px;
  padding-left: 10px;
  display: block;
}

/* ------------ メニューの設定 ---------------- */
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.main-nav li {
  margin-left: 20px;
}

.main-nav a {
  text-decoration: none;
  color: #333333;
  padding: 5px 10px;
  font-size: 11pt;
  font-weight: bold;
  transition: backgund-rocolor 0.3s;
}

.main-nav a:hover {
  background-color: #ffee06;
  color: #f76f00;
  border-radius: 4px;
}

/* ----------- GALLERY プルダウンメニュー  ---------------- */

/* 親メニューアイテム (GALLERY) */
.main-nav ul li.has-dropdown {
  position: relative;
}

/* サブメニュー全体 (.dropdown-menu) */
.main-nav ul li.has-dropdown ul.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  list-style: none;
  padding: 0;
  margin: 0;
  display: none;
  z-index: 10;
  background: #fff;
  border: 1px solid #ddd;
  min-width: 100px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* .is-active クラスがついたときに表示 */
.main-nav ul li.has-dropdown.is-active ul.dropdown-menu {
  display: block;
}

/* サブメニューの各項目 */
.main-nav ul li.has-dropdown ul.dropdown-menu li {
  display: block;
  margin: 0;
  padding: 0;
}

/* サブメニューのリンク */
.main-nav ul li.has-dropdown ul.dropdown-menu a {
  display: block;
  white-space: nowrap;
  padding: 8px 15px;
  font-size: 10pt;
  text-align: center;
  color: #222;
  text-decoration: none;
}

/* サブメニューのリンク（ホバー時） */
.main-nav ul li.has-dropdown ul.dropdown-menu a:hover {
  background-color: #e5ffb5;
  color: #0066cc;
}

/* --- コンテンツの隠れ防止 --- */
#header-spacer {
  height: 55px; /* ヘッダーの高さ */
}

/* --- ハンバーガーアイコンの基本スタイル --- */
#nav-toggle {
  display: none; /* 初期状態では隠す (PC) */
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1010;
}

#nav-toggle .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background-color: #333;
  transition: all 0.3s;
  border-radius: 3px;
}

/* --- レスポンシブ対応 (768px以下) --- */
@media (max-width: 768px) {
  /* ハンバーガーアイコンを表示 */
  #nav-toggle {
    display: block;
  }

  /* メニュー本体の設定: 画面全体に展開 */
  .main-nav {
    display: none;
    position: fixed;
    top: 55px;
    left: 0;
    width: 100%;
    background-color: #fff;
    z-index: 90;
    box-shadow: 0 4px 5px rgba(0, 0, 0, 0.1);
    padding: 0;
    height: calc(100vh - 60px);
    overflow-y: auto;
  }

  /* JSで .is-open が付いたらメニューを表示 */
  .main-nav.is-open {
    display: block;
  }

  /* メニュー項目を縦並びに戻す */
  .main-nav ul {
    display: block;
    padding: 0;
    margin: 0;
  }

  .main-nav ul li {
    display: block;
    border-bottom: 1px solid #eee;
    margin: 0; /* PC用 margin-left を打ち消す */
  }

  .main-nav a {
    padding: 12px 20px;
    text-align: left;
    font-size: 14pt;
    display: block;
  }

  .main-nav a:hover {
    border-radius: 0;
  }

  .main-nav ul li:last-child {
    border-bottom: none;
  }

  /* ナビゲーションリスト内の各リンク */
  .main-nav ul li a {
    padding: 15px 20px;
    text-align: center;
    display: block;
    font-size: 12.5pt;
    text-decoration: none;
    color: #222;
    transition: background-color 0.3s;
  }

  /* スライド展開するプルダウンメニューのスタイル */
  .main-nav ul li.has-dropdown {
    position: static;
  }

  .main-nav ul li.has-dropdown ul.dropdown-menu {
    position: static;
    transform: none;
    border: none;
    box-shadow: none;
    background: transparent;
    display: block;
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
    padding: 0;
    min-width: unset;
  }

  .main-nav ul li.has-dropdown:hover ul.dropdown-menu {
    height: 0;
  }

  .main-nav ul li.has-dropdown.is-active ul.dropdown-menu {
    height: 105px;
  }

  /* サブメニューのリンク（見た目を調整） */
  .main-nav ul li.has-dropdown ul.dropdown-menu a {
    text-align: center;
    padding: 15px 20px;
    font-size: 11pt;
    color: #f76f00;
    display: block;
  }
}

/* ------------------ フッターの設定 ------------------------ */
#main-footer {
  background-color: #f5f5f5;
  color: #868686;
  padding-bottom: 20px;
  text-align: center;
}

/* フッター内部 */
.footer-inner {
  max-width: 700px;
  padding-top: 8px;
  margin: 0 auto;
}

/* コピーライトテキスト */
.copyright {
  font-size: 9pt;
  margin: 0;
  text-align: center;
}

/* -------------- MEMOページのスタイル ---------------- */

/* memoページ */
.diary-entry {
  background-color: #fff;
  border-radius: 8px;
  padding: 15px 25px 25px;
  margin-bottom: 25px;
}

.diary-entry h3 {
  text-align: left;
  font-size: 13pt;
  margin-top: 3px;
  margin-bottom: 3px;
}

.diary-date {
  color: #e68200e3;
  font-size: 9.5pt;
}

.diary-body {
  white-space: pre-wrap; /* JSON内の改行(\n)を反映 */
}

/* --- ページヘッダー (タイトル＋説明文) --- */
.memo-header {
  display: flex;
  align-items: flex-end;
  margin-bottom: 10px;
}

/* タイトル (h1) */
.memo-header h1 {
  font-size: 16pt;
  text-align: left;
  margin-bottom: 0;
  margin-right: 15px;
}

/* 説明文のスタイル */
.memo-description {
  font-size: 10pt;
  color: #474747;
  margin: 0;
  line-height: 2.3;
}

/* 日記の画像コンテナ */
.diary-image-container {
  margin: 10px 0 15px;
  text-align: center;
}

/* 日記の画像本体 */
.diary-image {
  max-width: 100%;
  max-height: 700px;
  width: auto;
  height: auto;
  display: block;
}

/* ----------------- LINKページ  ----------------- */

/* リンク集のセクション */
.link-section {
  margin-top: 40px; /* ブクマ、友人、感謝の間隔 */
}

/* 各カテゴリタイトルのスタイル */
.link-category-title {
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
  margin-bottom: 10px;
  font-size: 11pt;
  font-weight: bold;
  color: #353535;
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 項目全体（li）のスタイル */
.link-list li {
  margin-bottom: 10px;
  padding-left: 5px; /* バナー・リンクだけ少しだけ左側下げる */
}

/* バナー画像を囲むリンクタグ */
.banner-wrapper {
  display: inline-block;
  line-height: 0; /* リンクの上下の余分なスペースを消す */
  margin-top: 7px;
}

/* バナー画像 */
.banner-wrapper img {
  display: block;
  border: none;
  max-width: none;
  height: auto;
}

/* ----------- LINKページ テキストリンク用　-------------------- */

/* リストマーカー（黒点）を非表示にする */
.no-marker-list {
  list-style: none !important;
}

/* FRIENDSセクションのテキストリンクを黒色にする */
.no-marker-list a {
  color: #222 !important;
  /*   text-decoration: none;  下線を消す指示 */
  font-size: 11pt;
  padding: 2px 0;
  display: inline-block;
}

/* ホバー時の装飾も調整 */
.no-marker-list a:hover {
  color: #444 !important;
  text-decoration: underline;
}

/* ------------------- 自サイト案内のスタイル ------------------- */

/* 自サイト案内（カード型） */
.my-site-card {
  display: flex;
  gap: 20px;
  background: #fff;
  /* border: 1px solid #eee; */
  padding: 20px;
  border-radius: 4px;
  align-items: flex-start;
  margin-top: 15px;
}

/* 左側：バナー画像エリア */
.my-site-banner {
  flex-shrink: 0;
  width: 200px;
}

.my-site-banner img {
  max-width: 100%;
  height: auto;
  border: 1px solid #ddd;
  display: block;
  margin: 0 auto 8px;
}

.banner-note {
  font-size: 9pt;
  color: #888;
}

/* 右側：情報エリア */
.my-site-info {
  flex-grow: 1;
  font-size: 10pt;
}

/* 項目ごとの行 */
.info-row {
  margin-bottom: 10px;
}

.info-row:last-child {
  margin-bottom: 0;
}

/* 項目ラベル（URLなど） */
.info-label {
  font-weight: bold;
  display: block;
  font-size: 9pt;
  color: #555;
  margin-bottom: 2px;
}

/* サイト名などのテキスト */
.site-name-text {
  font-size: 12pt;
  font-weight: bold;
  margin-bottom: 4px;
}

.master-name {
  font-size: 10pt;
  font-weight: normal;
  margin-left: 10px;
}

/* コピー用inputのデザイン調整（高さを低く） */
.copy-input {
  width: 100%;
  padding: 4px 6px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  background: #f9f9f9;
  font-size: 10pt;
  color: #444;
  border-radius: 2px;
}

.copy-input:focus {
  background: #fff;
  border-color: #888;
  outline: none;
}

/* スマホ対応：縦並びに戻す */
@media (max-width: 400px) {
  .my-site-card {
    flex-direction: column;
  }

  .my-site-banner {
    width: 100%;
    margin-bottom: 15px;
    text-align: left;
  }

  .my-site-banner img {
    margin: 0 0 5px 0;
    width: 200px;
  }
}

/* ============================
   GALLERY：共通
   ============================ */

.gallery-section {
  margin-top: 40px;
  margin-bottom: 40px;
}

.gallery-section-title {
  font-size: 14pt;
  margin-bottom: 5px;
}

.gallery-section-description {
  font-size: 10pt;
  color: #555;
  margin-top: 0;
  margin-bottom: 15px;
}

/* フィルタボタン行 */
.gallery-filter {
  margin-bottom: 15px;
}

.gallery-filter-button {
  display: inline-block;
  margin-right: 3px;
  margin-bottom: 6px;
  padding: 4px 10px;
  font-size: 9.5pt;
  border-radius: 999px;
  border: 1px solid #ccc;
  background: #ffffff;
  cursor: pointer;
}

.gallery-filter-button.is-active {
  background: #f76f00;
  color: #ffffff;
  border-color: #f76f00;
}

/* イラスト一覧グリッド（サムネ正方形） */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* PC時の例 */
  gap: 12px;
}

/* ===== 一覧サムネイル下のキャプションを非表示 ===== */
.gallery-grid .gallery-caption {
  display: none;
}

/* スマホ時：3列 */
@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}



.gallery-item {
  cursor: pointer;
}

.gallery-thumb-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 正方形にする */
  overflow: hidden;
  background: #eee;
}

.gallery-thumb-wrapper img.gallery-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* サムネイルの縮小を高品質化 */
.gallery-thumb-wrapper img.gallery-thumb {
  image-rendering: auto;
  -webkit-optimize-contrast: auto;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.gallery-caption {
  margin: 4px 0 0;
  font-size: 9pt;
  color: #333;
}



/* ============================
   GALLERY：モーダル
   ============================ */

.gallery-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 2000;
}

.gallery-modal.is-open {
  display: block;
}

.gallery-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}


/* ===== 左右クリックゾーン（グラデーションホバー） ===== */
/* 透明クリック領域（画像の左右） */
.gallery-modal-clickzone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;          /* 真ん中 20% は画像クリック用に空ける */
  cursor: pointer;
  z-index: 2;
  background: transparent;
}

/* 左右位置 */
.gallery-modal-clickzone-left {
  left: 0;
}

.gallery-modal-clickzone-right {
  right: 0;
}

/* ★ hover で色を出さないようにする */
@media (hover: hover) {
  .gallery-modal-clickzone:hover {
    background: transparent;
  }
}






/* ===== モーダル本体：常に画面中央に表示 ===== */
.gallery-modal-inner {
  position: fixed;             /* ← absolute から fixed に変更 */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);  /* 画面中央に */
  max-width: none;             /* コンテンツ幅に縛られないようにする */
  width: auto;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

/* ===== 画像：余白なしでそのまま表示 ===== */
/* ============================
   基本（スマホ含む初期状態）
   ============================ */
/* ============================
   ★ モーダル 画像：調整前の安定状態 ★
   ============================ */

.gallery-modal-image-wrapper {
  position: relative;
  text-align: center;
  margin: 0;
  overflow: hidden;
}

.gallery-modal-image-wrapper img {
  max-width: 100vh;
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}


/* ============================
   スマホ（今まで通り）
   ============================ */
@media (max-width: 768px) {
  .gallery-modal-arrow {
    display: none;
  }

  .gallery-modal-image-wrapper {
    max-width: none;
  }

  .gallery-modal-image-wrapper img {
    max-width: 100vw;
  }
}



/* ===== キャプション：暗い背景側に外付け表示 ===== */
.gallery-modal-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -37px;             /* 画像の外・下に出す */
 /* text-align: center;     中央ぞろえにするならこれ */
  font-size: 10pt;
  color: #ffffff;
  padding: 8px 12px;
 /* background: rgba(0, 0, 0, 0.6); */
  margin: 0;
}


/* モーダル内「×」のボタン 
.gallery-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 16pt;
  cursor: pointer;
}  */

.gallery-modal-nav {
  border: none;
  background: #f5f5f5;
  padding: 6px 14px;
  font-size: 11pt;
  cursor: pointer;
  margin-right: 8px;
}

/* ===== PC用：画像の外側に固定されるナビ ===== */
/* ナビ本体 */
.gallery-modal-arrow {
  position: fixed;                /* ← absolute → fixed */
  top: 50%;
  transform: translateY(-50%);
  z-index: 5000;
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.7);
  color: #333;
  font-size: 16px;
  cursor: pointer;
  white-space: nowrap;
}


/* 画像の外側・左 */
.gallery-modal-arrow-prev {
  left: -55px;
}

/* 画像の外側・右 */
.gallery-modal-arrow-next {
  right: -55px;
}


@media (min-width: 769px) {
  .gallery-modal-arrow { display: block; }
}


/* ============================
   GALLERY：MANGA （外部リンクカード）
   ============================ */

.manga-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 10px;
}

@media (max-width: 600px) {
  .manga-grid {
    grid-template-columns: 1fr;
  }
}

.manga-item {
  background: #ffffff;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
}

.manga-link {
  display: flex;
  text-decoration: none;
  color: inherit;
}

.manga-thumb-wrapper {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  overflow: hidden;
  background: #eee;
}

.manga-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.manga-meta {
  padding: 8px 10px;
}

.manga-title {
  font-size: 11pt;
  margin: 0 0 4px;
}

.manga-description {
  font-size: 9pt;
  color: #555;
  margin: 0;
}

/* ============================
   ミニ目次（セクションナビ）
   手帳のインデックス風・右端固定
   ============================ */

.mini-nav {
  position: fixed;
  bottom: 20px;
  right: 0; /* JSで上書きされる */
  transform: translateY(0);
  z-index: 1500;

  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-nav button {
  padding: 8px 10px;
  font-size: 10pt;
  border: 1px solid #ccc;
/*  border-right: none;                 右端にピタッとつける */
  border-radius: 4px ;        
  background: #ffffff;
  color: #333;
  cursor: pointer;

  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  min-width: 70px;
  text-align: center;
  line-height: 1.3;
  letter-spacing: 0.03em;
  transition: background 0.2s, transform 0.1s;
}

.mini-nav button:hover {
  background: #f0f0f0;
  transform: translateX(-2px);       /* ちょっとだけ飛び出す感じ */
}

/* ★ 右端にドックしているときだけ右側の線を消す */
.mini-nav--docked button {
  border-right: none;
  border-radius: 4px 0 0 4px ; 
}


/* スワイプで差し込む一時画像（次 / 前） */
.modal-slide-next,
.modal-slide-prev {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  z-index: 6000;   /* 元画像より前面に出す */
}


/* =====================================
   iOS風：2枚同時スライドアニメーション
   ===================================== */


/* 現在の画像（押し出される側） */
.modal-slide-current {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1;
}

/* 次の画像（入ってくる側） */
.modal-slide-next,
.modal-slide-prev {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2;
}

/* 次へ（左スワイプ） */
.modal-slide-next {
  animation: slideInFromRight 0.32s cubic-bezier(.25,.8,.25,1) both;
}

/* 前へ（右スワイプ） */
.modal-slide-prev {
  animation: slideInFromLeft 0.32s cubic-bezier(.25,.8,.25,1) both;
}

/* 現在画像の押し出し */
.modal-slide-current.to-left {
  animation: slideOutToLeft 0.32s cubic-bezier(.25,.8,.25,1) both;
}

.modal-slide-current.to-right {
  animation: slideOutToRight 0.32s cubic-bezier(.25,.8,.25,1) both;
}

/* ===== アニメ定義 ===== */

/* 次が右から入る */
@keyframes slideInFromRight {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

/* 前が左から入る */
@keyframes slideInFromLeft {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

/* 現在が左へ押し出される */
@keyframes slideOutToLeft {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* 現在が右へ押し出される */
@keyframes slideOutToRight {
  from { transform: translateX(0); }
  to   { transform: translateX(100%); }
}

