/* ──────────────────────────────────────────────────────────
   共通リセット
────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

/* ──────────────────────────────────────────────────────────
   メニューの右からスライドイン全体
────────────────────────────────────────────────────────── */
#profileMenu {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.97);
  transform: translateX(100%);
  transition: transform 0.4s ease;
  z-index: 999;
}
#profileMenu.open {
  transform: translateX(0);
}

/* ──────────────────────────────────────────────────────────
   １）プロフィールヘッダー ロゴ画像
────────────────────────────────────────────────────────── */
.profile-header {
  /* ハンバーガーアイコン分の上余白を確保 */
  padding: 80px 0 16px;
  text-align: center;
  margin: 0;
}
.profile-logo {
  width: 60vw;      /* 画面幅の60% */
  max-width: 300px; /* 最大300px */
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: cover;
}

/* ──────────────────────────────────────────────────────────
   ２）アップロード＆プレビュー部
────────────────────────────────────────────────────────── */
.profile-body {
  display: flex;
  gap: 24px;
  padding: 0 24px 24px;
}
.upload-section {
  flex: 1;
}
.upload-section label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.upload-section input[type="file"] {
  width: 100%;
}
.preview-section {
  flex: 1;
  text-align: center;
}
.preview-section .preview-img,
.preview-section #previewImg {
  width: 100%;
  max-width: 240px;
  height: auto;
  object-fit: cover;
  border: 1px solid #ccc;
  margin-bottom: 16px;
  display: block;
}
.menu-col--right form {
  margin-top: 24px;
  text-align: center;
}
.menu-col--right form input[type="file"] {
  display: block;
  margin: 8px auto;
}
.menu-col--right form button[type="submit"],
#uploadBtn {
  display: inline-block;
  width: 80%;
  max-width: 200px;
  padding: 12px 0;
  margin: 16px auto 0;
  background-color: #f5a623;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}
.menu-col--right form button[type="submit"]:hover,
#uploadBtn:hover {
  background-color: #e6a842;
}

/* ──────────────────────────────────────────────────────────
   ３）メニューリンク部
────────────────────────────────────────────────────────── */
.menu-links {
  list-style: none;
  padding: 0;
  margin: 0 24px;
}
.menu-links li + li {
  margin-top: 16px;
}
.menu-links a {
  display: block;
  padding: 12px 16px;
  background: #fff;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s;
}
.menu-links a:hover {
  background: #f0f0f0;
}

/* ──────────────────────────────────────────────────────────
   ブレイクポイント：スマホ小画面（≤600px）
────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  /* スライドイン中は縦並び・中央揃え */
  #profileMenu .menu-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 80px;
  }
  /* ロゴ */
  .profile-header {
    padding: 0;
    margin-bottom: 16px;
    width: 80vw;
    max-width: 240px;
  }
  .profile-logo {
    width: 100%;
  }
  /* アップロード／プレビュー縦並び */
  .profile-body {
    flex-direction: column;
    gap: 16px;
    padding: 0 16px 24px;
    width: 100%;
  }
  /* 入力／プレビュー幅 */
  .upload-section,
  .preview-section {
    width: 100%;
    max-width: 300px;
  }
  /* ボタン */
  .menu-col--right form button[type="submit"],
  #uploadBtn {
    width: 100%;
    max-width: 240px;
  }
  /* メニューリンクを幅いっぱいに */
  .menu-links {
    width: 100%;
    padding: 0 16px;
  }
  .menu-links a {
    width: 100%;
    box-sizing: border-box;
  }
}

/* ──────────────────────────────────────────────────────────
   ブレイクポイント：中画面（601px〜900px）
────────────────────────────────────────────────────────── */
@media (min-width: 601px) and (max-width: 900px) {
  .profile-logo {
    width: 50vw;
    max-width: 350px;
  }
  .profile-body {
    gap: 20px;
    padding: 0 20px 24px;
  }
  .menu-col--right form button[type="submit"],
  #uploadBtn,
  .preview-section .preview-img {
    max-width: 260px;
  }
}

/* ──────────────────────────────────────────────────────────
   ブレイクポイント：大画面（901px〜1200px）
────────────────────────────────────────────────────────── */
@media (min-width: 901px) and (max-width: 1200px) {
  .profile-logo {
    width: 40vw;
    max-width: 400px;
  }
  .profile-body {
    flex-direction: row;
    gap: 24px;
    padding: 0 24px 24px;
  }
  .menu-col--right form button[type="submit"],
  #uploadBtn,
  .preview-section .preview-img {
    max-width: 300px;
  }
}

/* ──────────────────────────────────────────────────────────
   デスクトップ（1201px以上）では特に制限なし
────────────────────────────────────────────────────────── */
