/* ヘッダー全体 */
.header{
    background: linear-gradient(to right, #ff9eb3, #ffa0c5);
    color: #fff;
    position: sticky;
    z-index: 1200;
  
    /* 下の帯をグラデにする（ここがポイント） */
    border-image: linear-gradient(to right, #ff9eb3, #ffa0c5) 1; /* 同じグラデで描画 */
  
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding-top: 20px;
    padding-bottom: 0;
    margin-bottom: 0;
  }


/* ロゴ画像 */
.logo-img {
    height: 48px;
    transition: transform 0.3s ease;
}
.logo-img:hover {
    transform: scale(1.05);
}

@media (max-width: 576px) {
  .logo-img {
    height: 32px;
  }
}

/* ログイン・新規登録ボタン共通 */
.login-btn {
    background-color: rgba(255, 255, 255, 0.85);
    color: #d6336c;
    border: none;
    font-weight: 500;
    transition: transform 0.2s ease;
    cursor: pointer;
}
.login-btn:hover {
    background-color: #fff;
    box-shadow: 0 0 4px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* ログイン中のユーザー名の強調 */
.header strong {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fffacd;
    letter-spacing: 0.02em;
}

/* 検索アイコンボタン */
#toggleSearchBtn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid #fff;
    color: #fff;
    transition: all 0.2s ease;
  }

  #toggleSearchBtn:hover {
    background: rgba(255, 255, 255, 0.35);
    color: #fff;
  }

@media (max-width: 576px) {
    #toggleSearchBtn {
        width: 32px !important;
        height: 32px !important;
        font-size: 16px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
      }
}

/* 検索フォームのスライドアニメーション */
.search-slide {
    background: #fff6f9;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.3s ease;
    padding: 0 0;
    border-radius: 0 0 10px 10px;
    position: relative;
    z-index: 1195;
}

.search-slide.show {
    max-height: 100px;
    opacity: 1;
    padding: 10px 0;
}
/* スマホ時のボタン縮小 */
@media (max-width: 576px) {
  .auth-buttons {
    gap: 4px;
  }

  .auth-buttons a,
  .auth-buttons button {
    font-size: 0.75rem;
    padding: 3px 8px;
    min-width: auto;
    white-space: nowrap;
  }

  .header {
    padding: 12px 16px !important;
  }
  #userMenu {
    position: fixed !important;
    top: 70px !important; /* ヘッダーの下にずらす */
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 auto !important;
    transform: none !important;
    box-sizing: border-box !important;
    padding: 0 12px !important;
    border-radius: 0 0 12px 12px !important;
    z-index: 1300 !important;
  }

  .user-menu-custom {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 10px 12px;
    margin: 0 auto;
  }
  .user-menu-custom a{
    font-size: 1.2rem;
  }
  
}
/* プルダウン */
.user-menu-custom {
    min-width: 220px; /* ← デフォルトより広くする */
    white-space: nowrap; /* ← 改行させない */
    background: linear-gradient(to right, #ff9eb3, #ffa0c5);
    border-radius: 12px;
    border: 1px solid #f3c6d2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 1.2rem;
    color: white;
}

.user-menu-custom a,
.user-menu-custom button {
    color: white !important;
    background: none;
    border: none;
    font-size: 0.9rem;
}

.user-menu-custom a:hover,
.user-menu-custom button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.header .auth-buttons {
    margin-right: 40px;
  }

  .mobile-menu {
    display: none;                 /* JSでblockにされる */
    background: linear-gradient(180deg, #ffd6e5 0%, #fff 80%);
    /* 画面端まで広げる（JSがleft/right=0をセット） */
    border-radius: 0 0 16px 16px;  /* 下だけやさしく丸める */
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(214, 51, 108, .15);
    padding: 8px 14px;
    box-shadow: 0 10px 24px rgba(214, 51, 108, 0.12);
    backdrop-filter: blur(2px);    /* iOSでも上品に馴染む（対応端末のみ） */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  /* ULのデフォルト余白を消して、左右のズレを無くす */
  .mobile-menu .list-unstyled {
    margin: 0 !important;
    padding: 4px 0 !important;
  }

  .mobile-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 6px;
    text-decoration: none;
    color: #c2185b;                /* ブランド寄りのピンク */
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 0, 0, .05);
  }
  .mobile-menu a:last-child {
    border-bottom: none;
  }

  /* アイコンのトーンを少しだけ薄く */
  .mobile-menu i {
    opacity: .85;
  }

  /* タップ時のフィードバック */
  .mobile-menu a:active {
    background: rgba(214, 51, 108, .06);
    border-radius: 8px;
  }

/* ハンバーガーボタン */
.hamburger {
    width: 36px;
    height: 36px;
    background-color: #fff5f9;
    border: 2px solid #ffc0cb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 2px 6px rgba(255, 182, 193, 0.3);
    transition: background-color 0.3s ease;
  }
  
  .hamburger:hover {
    background-color: #ffe2ed;
  }
  
  .hamburger i {
    color: #d6336c;
    font-size: 18px;
  }

  #mobileMenu {
    display: none;
    z-index: 1090;
}

/* ▼ .open が付与されたときに表示 */
#mobileMenu.open {
    display: block;
}

#userInfoToggle {
    position: relative;
  }

  #userMenu {
    position: absolute; 
    z-index: 1300 !important;
    top: calc(100% + 6px); /* 少し下にずらす */
    right: 0;
    left: auto;
    transform: none;
    width: auto;
  }

  .header .login-btn{
    --pink1: #ff9eb3;
    --pink2: #ffa0c5;
  
    border-radius: 9999px !important;
    padding: 10px 18px !important;
    font-weight: 700 !important;
    letter-spacing: .02em !important;
    line-height: 1 !important;
    cursor: pointer;
  
    /* デフォルト＝ログイン（ガラス調＋グラデ枠） */
    background:
      linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.75)) padding-box,
      linear-gradient(90deg, var(--pink1), var(--pink2)) border-box !important;
    border: 1px solid transparent !important;
    color: #c2185b !important;
  
    box-shadow: 0 2px 8px rgba(214, 51, 108, .12) !important;
    transition: transform .15s ease, box-shadow .2s ease, filter .2s ease !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  .header .login-btn:hover{
    filter: brightness(1.03);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(214, 51, 108, .18) !important;
  }
  
  /* すぐ隣の2個目＝新規登録（中身グラデ塗り） */
  .header .login-btn + .login-btn{
    background: linear-gradient(90deg, var(--pink1), var(--pink2)) !important;
    color: #fff !important;
    border: 0 !important;
  }
  .header .login-btn + .login-btn:hover{
    filter: brightness(1.06);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(214, 51, 108, .25) !important;
  }
  
  /* フォーカス */
  .header .login-btn:focus-visible{
    outline: 2px solid #fff !important;
    outline-offset: 2px !important;
  }