@import url("root.css");

/*－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－
  
  ＩＮＤＥＸ
  
  －－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－*/


.fv {
 .fv_illust {
  height: calc(100vh - 140px);
  margin-bottom: 30px;

  img {
   width: 100%;
   height: 100%;
   object-fit: cover;
   object-position: center;
   border-radius: 20px;
   border: 4px solid var(--color-main);
  }
 }
}

@media screen and (min-width: 768px),
print {
 .fv {
  grid-template-columns: 1fr 2fr;

  .fv_illust {
   position: sticky;
   top: 110px;
   height: calc(100vh - 140px);

   img {
    height: 100%;
   }
  }

  .fv_text {
   section:first-child {
    padding-top: 0;
   }
  }
 }
}

/*－－－－－－－－－－  更新履歴 －－－－－－－－－－*/

.update__wrap {
 margin: 20px 0px;

 .headingM {
  margin-bottom: 10px;
 }
}

.update {
 height: 140px;
 overflow-y: auto;
 padding: 4px;
 padding-right: 20px;
 border-top: 2px solid var(--color-main);
 border-bottom: 2px solid var(--color-main);

 .update__item {
  display: flex;
  gap: 0px 20px;
  padding: 10px 0;

  time {
   font-weight: 600;
   flex-shrink: 0;
  }
 }

 .update__item:not(:last-child) {}
}


/* スマホ */
@media screen and (max-width: 520px) {
 .update__item {
  flex-direction: column;
  gap: 4px;
 }
}


/*－－－－－－－－－－ TOPIC －－－－－－－－－－*/
.topiclist {
 margin-top: 30px;
}

.topiclist__item.grid {
 gap: 10px 20px;
 margin-bottom: 30px;
 align-items: flex-start;

 &:last-child {
  margin-bottom: 0px;

  p {
   margin-bottom: 0px;
  }
 }
}


/*－－－－－－－－－－ Profile －－－－－－－－－－*/
.profile__inner.grid {
 margin-top: 40px;
 gap: 20px;
 align-items: flex-start;
}

.profile__img {
 padding: 0 20px;
}

.profile__img img {
 border-radius: 50%;
 margin: auto;
}

/*  SNSアイコン  */
.social-icons {
 display: flex;
 gap: 2px;
 flex-wrap: wrap;
 margin-top: 18px;
}

.social-icons a {
 width: 46px;
 height: 46px;
 border-radius: 50%;
 display: flex;
 align-items: center;
 justify-content: center;
 text-decoration: none;
 transition: all 0.2s ease;
 background-color: rgba(255, 255, 255, 0.1); /* 普段からうっすら丸い背景を敷く */
}

.social-icons a:hover {
 transform: translateY(-3px);
 background-color: rgba(255, 255, 255, 0.2); /* ホバー時は少し明るくする */
}

.social-icons svg {
 width: 20px;
 height: 20px;
 fill: #ffffff; /* アイコンを白にする */
}

/* ---- 1. ヘッダー側のSNSアイコン（右上のメニュー内） ---- */
.header .social-icons {
    gap: 12px !important; /* アイコン同士の間隔を広げる（お好みで10px〜16pxで調整OK） */
    margin-left: 20px !important; /* 左側（BLOGボタンとの間）にスキマを作る */
    align-items: center !important;
}

.header .social-icons a {
    background-color: transparent !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
}

.header .social-icons svg {
    fill: #ffffff !important; /* アイコン自体をパキッと白くする */
    width: 20px;
    height: 20px;
    opacity: 1 !important; /* 透明度を100%にする */
}

.header .social-icons a:hover svg {
    opacity: 0.7 !important; /* ホバーした時に少しだけ薄くするおしゃれ演出 */
}


/* ---- 2. プロフィール側のSNSアイコン（さっき直したやつ） ---- */
.profile__inner .social-icons a {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.profile__inner .social-icons svg {
    fill: #ffffff !important;
    width: 20px;
    height: 20px;
}




/*－－－－－－－－－－ Contact －－－－－－－－－－*/
.mailform {
 margin-top: 30px;
}


/*－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－

Gallery

－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－*/
.gallery-header {
 margin-bottom: 40px;
 padding-bottom: 20px;
 border-bottom: 4px solid var(--color-main);
}

.gallery-content {
 :target {
  scroll-margin-top: 100px;
 }


}

.gallerylist {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
 /* 160pxの数字を変更することで、画像の最小幅を調整できます。 */
 gap: 40px;
 padding: 2px;
}

.gallerylist__item {
 aspect-ratio: 3 / 4;
 overflow: hidden;
 cursor: pointer;
 background-color: var(--color-bg);
 border-radius: 20px;
}

.gallerylist__item img {
 width: 100%;
 height: 100%;
 object-fit: cover;
 transition: transform 0.4s ease;
}

.gallerylist__item:hover img {
 transform: scale(1.05);
}

/* 画像表示：全画面レイアウト */
#detail-view {
 position: fixed;
 top: 0;
 left: 0;
 width: 100vw;
 height: 100vh;
 background-color: var(--color-bg);
 display: flex;
 align-items: center;
 justify-content: center;
 z-index: 2000;
 cursor: pointer;
}


.detail-content {
 width: 90%;
 height: 90%;
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;

 p {
  max-width: 80%;
 }
}

#full-image {
 max-width: 100%;
 max-height: 100%;
 object-fit: contain;
 margin-bottom: 20px;
}

/* 表示切り替え用クラス */
.hidden {
 display: none !important;
}

/*－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－

Blog

－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－*/

.blog-header {
 margin-bottom: 60px;
 padding-bottom: 20px;
 border-bottom: 4px solid var(--color-main);
}

.control-links {
 position: absolute;
 top: 100px;
 right: 20px;
}

.mainarea {}

.onelogbox {
 margin-bottom: 60px;
 background-color: var(--color-#2b2b3d);
 color: var(--color-text);
 padding: 30px;
 border-radius: 40px;
 border: 2px solid var(--color-main);

 .oneloginfo {
  display: flex;
  justify-content: flex-end;
  gap: 0px 20px;
  font-size: 0.8em;
  color: var(--color-main);

  time,
  >span {
   display: flex;
   align-items: center;
   gap: 4px;

   svg {
    width: 16px;
    height: 16px;
   }
  }
 }
}

.pagenavi {

 .pagelinks {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;

  .prevlink,
  .nextlink {
   display: flex;
   align-items: center;
   gap: 4px;
   padding: 4px 10px 4px 12px;
  }
 }

 .pagenums {
  text-align: center;

  a {
   display: inline-block;
   width: 38px;
   height: 38px;
  }
 }


 a {
  padding: 8px;
  text-decoration: none;
  transition: background-color 0.3s ease;
  border-radius: 999px;
 }

 a:hover {
  background-color: var(--color-main);
  color: var(--color-white);
 }
}

/* テンプレート元のクリック判定（擬似要素）を無効化して PhotoSwipe を優先させる */
.gallerylist_item::after,
.gallerylist_item::before {
  pointer-events: none !important;
}


/* ここからイラスト・漫画のサムネイル設定　*/
/* イラストエリアのサムネイル並列＆サイズ調整 */
.illust-area {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* スマホでは基本2列にする */
  gap: 12px; /* 画像同士のすき間 */
  margin-top: 20px;
}

.illust-area a {
  display: block;
  width: 100%; /* グリッドの幅いっぱいに広げる */
  aspect-ratio: 3 / 4; /* 縦長比率をキープ */
  overflow: hidden;
  border-radius: 8px; /* 角を少し丸くする（不要なら消してOK） */
}

.illust-area img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 枠いっぱいに綺麗に切り抜いて表示 */
  transition: opacity 0.2s ease;
}

/* ホバーした時にちょっと薄くする演出 */
.illust-area a:hover img {
  opacity: 0.8;
}

/* 漫画エリアの表紙を横並びにする */
.manga-area {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 漫画の表紙も2列にする */
  gap: 12px; /* 表紙同士のすき間 */
  margin-top: 20px;
}

/* 漫画のul自体の余白やリスト装飾をリセット */
.manga-area ul.gallerylist {
  display: contents;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 漫画の表紙サムネイルサイズ調整 */
.manga-area ul.gallerylist img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
  transition: opacity 0.2s ease;
}

.manga-area ul.gallerylist a:hover img {
  opacity: 0.8;
}

.hidden-page {
  display: none !important;
}



/* R18要素の親枠を相対位置にする */
.gallerylist_item.r18-item a {
  position: relative;
  display: block;
}

/* ★ R18バッジのデザイン（右上に配置） */
.r18-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  background-color: #e63946; /* 目立つ赤色 */
  color: #ffffff;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  pointer-events: none; /* タップの邪魔をしない */
}

/* マウスを乗せたら（ホバーで）ぼかしが消える */
.r18-item a:hover img {
  filter: blur(0);
  opacity: 0.8;
}

/* ==========================================
   キャプション（ポイピクリンク）のスタイル
========================================== */

/* キャプション全体の箱（位置や背景の調整） */
.pswp__custom-caption {
  position: absolute;
  bottom: 20px;          /* 画面の下からの距離 */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75); /* 背景の黒さ（透明度） */
  padding: 8px 16px;     /* 箱の中の余白 */
  border-radius: 20px;   /* 角の丸み */
  z-index: 1000;
  text-align: center;
  white-space: nowrap;
}

/* ポイピクリンクの文字デザイン */
.pswp__custom-caption a.caption-link {
  color: #ff69b4;        /* ここは文字の色（ピンク） */
  text-decoration: underline; /* 下線 */
  font-weight: bold;     /* ここは文字の太さ（太字） */
  font-size: 14px;       /* ここはフォントのサイズ */
}

/* リンクにマウスを乗せたときの色 */
.pswp__custom-caption a.caption-link:hover {
  color: #ff8da1;        /* マウスホバー時の文字色 */
}

/* ★中身（リンク）が空っぽの時は、黒い箱自体を隠す！ */
.pswp__custom-caption:empty {
  display: none;
}


/* スマホ（画面幅767px以下）の時だけプロフィール画像をコンパクトにする */
@media screen and (max-width: 767px) {
  .profile__img img {
    width: 200px !important;  /* お好みのサイズ（120px〜150pxあたり） */
    height: 200px !important;
    object-fit: cover !important;
    margin: 0 auto !important; /* 中央寄せ */
  }
}


/* PC表示（画面幅768px以上）のサムネイルサイズを強制制御 */
@media screen and (min-width: 768px) {

  /* ギャラリー全体が横に広がりすぎるのを防ぐ */
  .gallery-content,
  section#illust,
  section#manga {
    max-width: 900px !important; /* PCでの表示幅をキュッと狭める */
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* 3列に綺麗に並べる（4列にしたい場合は 3 を 4 に変更） */
  .pswp-gallery.illust-area,
  .manga-area {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
  }

  /* サムネイル1枚あたりの枠（高さ）をほどよく固定 */
  .pswp-gallery.illust-area a,
  .manga-area a {
    display: block !important;
    width: 100% !important;
    height: 240px !important; /* ★サムネイルの高さ！大きければ200px等に調整可 */
    overflow: hidden !important;
    border-radius: 8px !important;
  }

  /* 画像を切らずに綺麗に中央で収める */
  .pswp-gallery.illust-area img,
  .manga-area img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center top !important; /* 顔（上部）を中心に表示 */
  }
}

