/* ======= レイアウト ======= */
.container {
  position: relative;
  display: flex;
  gap: 20px;
}
a{
  text-decoration: none;
}
.container-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #effaff 0%, #ffffff 60%);
  z-index: -1;
}

/* ======= ヘッダー（アイコン＋名前） ======= */
.mypage-header {
  display: flex;
  align-items: center;
  background: #fff;
  padding: 25px;
  border-radius: 14px;
  margin-bottom: 25px;
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
}

.mypage-header img {
  width: 85px;
  height: 85px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.mypage-info h2 {
  margin: 0;
  font-size: 22px;
  color: #222;
}

.mypage-info .meta {
  margin-top: 4px;
  font-size: 14px;
  color: #666;
}

.mypage-info .subtitle {
  font-size: 13px;
  color: #0096fa;
  font-weight: 600;
  margin-top: 8px;
}

/* ======= フォロー数 ======= */
.mypage-follow-info {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  font-size: 14px;
  color: #333;
}

.mypage-follow-info p {
  margin: 4px 0;
}

/* ======= フォローボタン ======= */
.follow-btn {
  display: inline-block;
  padding: 10px 20px;
  margin: 10px 0 25px;
  background: #0096fa;
  color: #fff;
  border: none;
  border-radius: 22px;
  font-weight: bold;
  cursor: pointer;
  transition: background .2s;
}
.follow-btn:hover { background: #007ed1; }
.follow-btn:disabled {
  background: #aaa;
  cursor: default;
}

/* ======= タイトル ======= */
.mypage-gallery-title {
  margin: 25px 0 10px;
  font-size: 20px;
  border-left: 4px solid #0096fa;
  padding-left: 10px;
}

/* ======= ギャラリー ======= */
.mypage-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px,1fr));
  gap: 25px;
}

.mypage-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  position: relative;
}

.mypage-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.mypage-card-title {
  font-size: 14px;
  padding: 10px;
  color: #333;
}

/* ======= 設定ボタン（投稿者本人のみ） ======= */
.mypage-card-setting {
  position: absolute;
  top: 8px;
  right: 8px;
}

.setting-btn {
  padding: 6px 10px;
  background: rgba(0,0,0,.65);
  color: #fff;
  border: none;
  font-size: 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: opacity .2s;
}
.setting-btn:hover { opacity: .8; }

/* ======= モーダル ======= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 50;
}
.modal.show { display: flex; }

.modal-content {
  background: #fff;
  width: 300px;
  padding: 25px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.modal-content h3 {
  margin-bottom: 12px;
  font-size: 18px;
}

.delete-btn {
  background: #ff5252;
  color: #fff;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  margin-top: 8px;
  cursor: pointer;
  transition: background .2s;
}
.delete-btn:hover { background:#e04444; }

.close-btn {
  margin-top: 15px;
  background: #aaa;
  color:#fff;
  padding: 8px 14px;
  border:none;
  border-radius: 6px;
  cursor:pointer;
}
.close-btn:hover { background:#888; }

/* ======= スマホ対応 ======= */
@media(max-width:768px){
  .mypage-header img { width:65px; height:65px; }
  .mypage-info h2 { font-size:18px; }
  .mypage-gallery { grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); }
}

@media(max-width:480px){
  .mypage-header { padding:18px; }
  .mypage-header img { width:55px; height:55px; margin-right:12px; }
  .mypage-info h2 { font-size:16px; }
  .mypage-gallery { grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap:15px; }
  .mypage-card img { height:120px; }
}
.mypage-card {
  position: relative !important;
}

.mypage-card-setting {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 50 !important;
  opacity: 1 !important;
  display: block !important;
}

.setting-btn {
  background: rgba(0,0,0,.7);
  padding: 6px 10px;
  font-size: 12px;
  color: #fff;
  border-radius: 4px;
}
.mypage-filter {
  display: flex;
  gap: 12px;
  padding: 10px 0 15px;
  flex-wrap: wrap;
}

.filter-item {
  background: #f7f7ff;
  border: 1px solid #ddd;
  border-radius: 14px;
  padding: 6px 12px;
  font-size: 14px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: 0.2s;
}

.filter-item:hover {
  background: #eef;
}

.filter-item input {
  margin-right: 6px;
}
