/* 全体の基本スタイル */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #fafafa;
  color: #333;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

/* ヘッダー */
header {
  background: #222;
  color: #fff;
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* ロゴ */
.site-logo {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  margin: 0;
}

/* ハンバーガーアイコン */
.menu-toggle {
  display: none;
  font-size: 1.6rem;
  color: white;
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 0;
}

/* ナビゲーション */
#main-nav {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

#main-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.25rem 0.4rem;
}

/* セクション共通 */
section {
  padding: 2rem;
  text-align: center;
}

/* セクションタイトル帯 */
section h2 {
  display: block;
  width: 100%;
  max-width: 860px;
  margin: 0 auto 1.5rem auto;
  padding: 0.6rem 1rem;
  font-size: 1.2rem;
  font-weight: bold;
  color: #fff;
  background-color: #222;
  border-radius: 6px;
  text-align: left;
  box-sizing: border-box;
}

/* ギャラリー（Rosuuri風） */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  max-width: 860px;
  margin: 0 auto;
  justify-content: center;
  padding: 0 1rem;
}

.gallery img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0;
  display: block;
  margin: 0 auto;
  transition: transform 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 1s ease forwards;
}

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

.gallery img:nth-child(1) { animation-delay: 0.2s; }
.gallery img:nth-child(2) { animation-delay: 0.4s; }
.gallery img:nth-child(3) { animation-delay: 0.6s; }

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* モーダル拡大表示 */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.85);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.modal.show {
  display: flex;
}

.modal-content {
  width: auto;
  height: auto;
  max-width: 95vw;
  max-height: 90vh;
  margin: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(0,0,0,0.6);
  object-fit: contain;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 2rem;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

/* 上に戻るボタン */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #333;
  color: #fff;
  font-size: 1.5rem;
  padding: 0.5rem 0.8rem;
  border-radius: 50%;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  z-index: 1000;
  opacity: 0;               /* ← 追加 */
  pointer-events: none;     /* ← 追加 */
  transition: opacity 0.4s ease; /* ← 追加 */
}



.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}



/* フッター */
footer {
  background: #222;
  color: #fff;
  text-align: center;
  padding: 1.2rem 2rem;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}

/* SNSリンク（横スクロール対応） */
.sns-links {
  display: flex;
  flex-wrap: nowrap;               /* 折り返し禁止で横並び */
  overflow-x: auto;                /* 横スクロール許可 */
  gap: 1rem;
  padding: 0.5rem 1rem;
  scroll-padding-left: 1rem;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  box-sizing: border-box;
  justify-content: flex-start;     /* 左寄せで自然な並び */
  white-space: nowrap;             /* 横並びを強制 */
}

.sns-links a {
  flex: 0 0 auto;                  /* 折り返さず横並び */
  padding: 0.5rem 1rem;
  border-radius: 20px;
  text-decoration: none;
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
  transition: background 0.3s ease;
  display: inline-block;
}

.sns-links a[href*="twitter"] { background: #1d9bf0; }
.sns-links a[href*="pixiv"] { background: #0096fa; }
.sns-links a[href*="instagram"] { background: #e1306c; }
.sns-links a[href*="artstation"] { background: #0f4c81; }
.sns-links a[href*="bsky.app"] { background: #0075FF; }

.sns-links a:hover {
  opacity: 0.8;
}

/* お問い合わせ */
.contact-intro {
  font-size: 1rem;
  line-height: 1.7;
  color: #444;
  margin-bottom: 1rem;
}

.contact-intro .jp-note {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: #666;
}

.form-embed {
  max-width: 860px;
  margin: 1rem auto;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  overflow: hidden;
}

.form-embed iframe {
  display: block;
  width: 100%;
  height: 78vh;
  min-height: 560px;
  border: 0;
  background: #fff;
}

@media (max-width: 640px) {
  .form-embed iframe {
    height: 84svh;
    min-height: 520px;
  }
}

.contact-fallback {
  font-size: 0.95rem;
  color: #555;
  margin-top: 1rem;
}

/* スマホ：ハンバーガー表示＋ナビ開閉＋ギャラリー2列 */
@media (max-width: 768px) {
  .menu-toggle {
    display: inline-block;
    margin-left: auto;
  }
  
/* Fanartセクションの左右余白を縮めて、画像領域を最大化 */
  #fanart {
    padding: 2rem 1rem 1.5rem; /* ← 上:2rem, 左右:1rem, 下:1.5rem に調整 */
}
  }
  
  #main-nav {
    position: absolute;
    top: 3.6rem;
    right: 1rem;
    flex-direction: column;
    background: #222;
    padding: 0.75rem;
    border-radius: 8px;
    gap: 0.6rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.28s ease, transform 0.28s ease;
    pointer-events: none;
    z-index: 999;
  }

  #main-nav.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  #main-nav a {
    font-size: 0.95rem;
  }

   /* 2列固定＋画面端まで広げる（PCには影響なし） */
  .gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2列固定 */
    gap: 0.75rem;                           /* 余白は最小限（好みで調整） */
    max-width: 95vw;                       /* 画面幅いっぱい */
    margin: 0 auto;                              /* センター寄せを解除して全幅化 */
    padding: 0;                             /* 余計な左右paddingを削除 */
  }

  /* 枠いっぱいに表示（画像自体のピクセルは変えない） */
  .gallery img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;                     /* 既存の角丸維持 */
  }
}
}

/* フッター内コピーライト調整 */
footer .copyright {
  margin-top: 1rem; /* SNSとの間隔 */
  font-size: 0.85rem;
  color: #ccc;
}

@media (min-width: 769px) {
  .sns-links {
    justify-content: center;
    overflow-x: visible;
  }
}

  /* ▼ PCのとき、ナビを右端に寄せる */
  #main-nav {
    margin-left: auto;
  }
}

.about-text {
  max-width: 860px;
  margin: 0 auto;
  padding-top: 0.4rem;
  text-align: left;
  line-height: 1.8;
  font-size: 1rem;
  color: #444;
}

.about-text h3 {
  font-size: 1.1rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #222;
  font-weight: bold;
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.4rem;
}

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

.skills-list li {
  margin-bottom: 0.8rem;
  padding-left: 1.2rem;
  position: relative;
  font-size: 0.95rem;
  color: #333;
}

.skills-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #888;
}

/* PC表示の調整（スマホには影響なし） */
@media (min-width: 769px) {
  /* ギャラリーを3列にしてコンパクトに */
  .gallery {
    grid-template-columns: repeat(3, 1fr); /* ← 2列でもOK。好みで調整可能 */
    gap: 1.2rem;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1rem;
  }

  .gallery img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
  }

  /* ナビゲーションをPCで常時表示にする */
  #main-nav {
    display: flex !important;
    position: static !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    background: none !important;
    gap: 1rem;
  }

  /* ハンバーガーアイコンはPCでは非表示 */
  .menu-toggle {
    display: none !important;
  }

    header {
    padding: 1.2rem 2rem;
    align-items: center;
  }

  #main-nav {
    flex-direction: row !important;
    align-items: center;
    padding: 0 !important;
  }
/* Aboutセクションの帯と文章の間隔調整 */
#about h2 {
  margin-bottom: 1rem !important;
  }
}


/* Aboutセクションの帯と文章の間隔調整（全デバイス共通） */
#about h2 {
  margin-bottom: 0.6rem !important;
}

.about-text {
  padding-top: 0rem !important;
}


/* ロゴを中央に固定配置 */
.site-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: max-content;
  margin: 0;
  pointer-events: none; /* ← ロゴがナビを邪魔しないように */
}

/* ヘッダーを relative にして基準点を作る */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  position: relative; /* ← 追加 */
}

/* 言語切り替えボタン（ヘッダー左上固定） */
.language-switch {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000; /* ヘッダーより上に */
  background: rgba(255, 255, 255, 0.85);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: bold;
  color: #333;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.language-switch a {
  color: #333;
  text-decoration: none;
  margin: 0 3px;
}

.language-switch a:hover {
  color: #007bff;
}
.about-text p {
  margin-bottom: 1.2rem; /* ← 段落の下に余白を追加 */
  line-height: 1.8;       /* ← 行間も少し広めに */
}


