/* ==========================================
   Profile Page Styles (css/prof.css)
   
   Updated layout adjustments (SD icon aligned below standing picture)
   Loaded after def.css
========================================== */

/* 1. 全体レイアウト調整 */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 2rem;
  text-align: left;
}

@media (min-width: 992px) {
  .profile-grid {
    grid-template-columns: 340px 1fr;
    align-items: start;
  }
}

/* 2. 画像ガード（保存・ドラッグ禁止対策） */
.image-container {
  position: relative;
  overflow: hidden;
  display: block; /* absoluteされた子要素による高さ0化バグを防ぐ */
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-select: none;
}

/* 画像の上に透明なカバーを重ねて右クリックやドラッグを物理ガード */
.image-guard {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: transparent;
  cursor: default;
}

.protected-img {
  pointer-events: none !important;
  -webkit-touch-callout: none !important;
  user-select: none !important;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain; /* 見切れないように全体表示(contain)に変更 */
}

/* 3. 各イラスト・画像枠のデザイン */
/* 左カラム：立ち絵・SDイラスト */
.visual-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

/* 立ち絵・SDラッパー（縦並びのコンテナに変更） */
.standing-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* 立ち絵とSDイラストの間の余白 */
  width: 100%;
  max-width: 320px;
  margin-bottom: 1.5rem;
}

/* 立ち絵枠 */
.standing-frame {
  width: 100%;
  height: 520px;
  border: 4px double var(--primary-lavender);
  border-radius: 20px;
  background: #FFF9FF;
  box-shadow: var(--card-shadow);
  padding: 12px;
}
.standing-frame .image-container {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #fdfbff;
}

/* SDイラスト枠（重ね合わせを解除し、立ち絵の真下に幅を合わせて配置） */
.sd-frame-overlap {
  position: relative; /* absoluteから変更 */
  width: 100%;        /* 立ち絵の横幅（親要素の100%）に合わせる */
  aspect-ratio: 1 / 1; /* 正方形を維持（元の画像比率に合わせる場合は調整可能） */
  height: auto;       /* 高さを自動計算に */
  border: 4px double var(--primary-lavender); /* 立ち絵とデザインラインを統一 */
  border-radius: 20px;
  padding: 12px;
  background: #FFF9FF;
  box-shadow: var(--card-shadow);
  z-index: 10;
}
.sd-frame-overlap .image-container {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

/* SDスライド用のフェードアニメーション */
.sd-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}
.sd-slide.active {
  opacity: 1;
}

/* 4. 自己紹介テキスト領域 */
.info-column {
  background: #FCF8FF;
  border-radius: 24px;
  padding: 2.5rem;
  border: 1px solid rgba(193, 176, 230, 0.2);
}

/* 右カラム上部用：プロフィールヘッダー */
.profile-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px dashed rgba(193, 176, 230, 0.2);
  padding-bottom: 1.5rem;
}

/* アイコン枠 (右カラムのヘッダー内に移動) */
.icon-frame {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px solid var(--primary-lavender);
  background: white;
  padding: 4px;
  box-shadow: 0 8px 20px rgba(106, 93, 138, 0.12);
  flex-shrink: 0;
}
.icon-frame .image-container {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}

.profile-name {
  font-size: 2.2rem;
  color: var(--text-main);
  margin-bottom: 0.3rem;
  font-weight: bold;
}
.profile-subname {
  font-size: 1rem;
  color: var(--text-sub);
  margin-bottom: 0;
}

.profile-intro {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-main);
  margin-bottom: 2rem;
}

/* プロフィール基本情報テーブル */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2.5rem;
}
.info-table th, .info-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px dashed rgba(193, 176, 230, 0.2);
}
.info-table th {
  width: 140px;
  color: var(--primary-lavender);
  font-weight: bold;
  text-align: left;
}
.info-table td {
  color: var(--text-main);
}

/* 横並び調整用のサブグリッド */
.info-sub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .info-sub-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* 5. SNSリンクボタン */
.sns-section-title {
  font-size: 1.2rem;
  color: var(--text-main);
  margin-bottom: 1rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sns-section-title::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 18px;
  background: var(--primary-lavender);
  border-radius: 4px;
}

.sns-btn-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.8rem;
}

.sns-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: bold;
  text-decoration: none;
  color: white;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.sns-btn:hover {
  transform: translateY(-2px);
}

/* 各種SNS用パステル系カラー定義 */
.sns-youtube {
  background: linear-gradient(135deg, #FF9E9E, #FF6B6B);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
}
.sns-twitch {
  background: linear-gradient(135deg, #B5A2F2, #9146FF);
  box-shadow: 0 4px 12px rgba(145, 70, 255, 0.2);
}
.sns-x {
  background: linear-gradient(135deg, #7D8690, #1F2328);
  box-shadow: 0 4px 12px rgba(31, 35, 40, 0.2);
}
.sns-bluesky {
  background: linear-gradient(135deg, #76C4FF, #0085FF);
  box-shadow: 0 4px 12px rgba(0, 133, 255, 0.2);
}
.sns-mirrativ {
  background: linear-gradient(135deg, #FFB866, #FF8200);
  box-shadow: 0 4px 12px rgba(255, 130, 0, 0.2);
}

/* ==========================================
   FontAwesomeのトーフ（バツ付き四角）文字化け対策
========================================== */
.fa,
.fa-brands,
.fa-regular,
.fa-solid,
.fab,
.far,
.fas {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", sans-serif !important;
}

/* スマホ対応調整 */
@media screen and (max-width: 768px) {
  .standing-frame {
    height: 420px;
  }
  /* スマホでの個別サイズ制限設定を解除 */
  .sd-frame-overlap {
    padding: 12px;
    border-radius: 20px;
  }
  .info-column {
    padding: 1.5rem;
  }
  .sns-btn-container {
    grid-template-columns: 1fr;
  }
  .profile-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}