:root {
  --custom-rv: 10px; /* 基準サイズ */
}

/* ------------------------
 *   カスタムヘッダー
 * -------------------------------- */
.custom-header {
  margin: 0;
  position: fixed;
  top: 20px; /* デフォルトの上部余白 */
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  padding: 0 20px;
}

.custom-header-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.custom-header-content {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 12px 25px; /* 上下の高さを調整（任意のサイズに変更可能） */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.custom-header-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-left: calc(2 * var(--custom-rv));  /* 左寄りに調整 */
  height: calc(6 * var(--custom-rv)); /* 上下の高さを少し小さく */
}

.custom-header-logo {
  display: flex;
}

.custom-header-logo img {
  width: 120px;
  height: auto;
  object-fit: contain;
}

.custom-header-right {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  padding-right: calc(5 * var(--custom-rv));
  height: calc(6 * var(--custom-rv)); /* 上下の高さを少し小さく */
}

.custom-header-line-btn {
  color: #ffffff;
  font-family: "NotoSansCJKjp-Black", "Noto Sans JP", sans-serif;
  font-size: calc(1.6 * var(--custom-rv));
  font-weight: 900;
  line-height: 1.5;
  white-space: pre-line;
  width: calc(14.5 * var(--custom-rv));
  height: calc(3.5 * var(--custom-rv));
  background: linear-gradient(135deg, #e82598, #ff6b98);
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.custom-header-line-btn:hover {
  opacity: 0.9;
}

.custom-header-login-btn {
  color: #e82598;
  font-family: "NotoSansCJKjp-Black", "Noto Sans JP", sans-serif;
  font-size: calc(1.6 * var(--custom-rv));
  font-weight: 900;
  line-height: 1.5;
  white-space: pre-line;
  margin-right: calc(1 * var(--custom-rv));
  width: calc(14.5 * var(--custom-rv));
  height: calc(3.5 * var(--custom-rv));
  background-color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid #eee;
  transition: all 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.custom-header-login-btn:hover {
  background-color: #f5f5f5;
}

/* スクロール時のヘッダー変化 */
.custom-header.scrolled {
  top: 0;
}

/* スマホ用スタイル */
@media (max-width: 750px) {
  .custom-header {
    position: fixed; /* positionをfixedに変更 */
    top: 10px;
    padding: 0 10px;
  }
  
  .custom-header-content {
    padding: 10px 15px; /* 上下の高さを調整 */
  }
  
  .custom-header-logo img {
    width: 100px; /* ロゴサイズを少し小さく */
    height: auto;
  }
  
  .custom-header-left {
    flex: 0 0 30%; /* 幅を固定 */
    max-width: 30%;
    padding-left: calc(2 * var(--custom-rv)); /* 左寄せ */
    height: calc(5 * var(--custom-rv)); /* 高さ調整 */
  }
  
  .custom-header-right {
    flex: 0 0 70%; /* 幅を固定 */
    max-width: 70%;
    padding-right: calc(2 * var(--custom-rv));
    height: calc(5 * var(--custom-rv)); /* 高さ調整 */
    display: flex;
    justify-content: flex-end;
    gap: 8px; /* ボタン間の間隔 */
  }
  
  /* スマホ時にボタンを横並びにして小さく */
  .custom-header-line-btn,
  .custom-header-login-btn {
    font-size: calc(1.3 * var(--custom-rv)); /* フォントサイズを小さく */
    width: calc(11 * var(--custom-rv)); /* 幅を小さく */
    height: calc(3.5 * var(--custom-rv)); /* 高さを維持 */
    padding: 4px 8px; /* パディングを小さく */
    margin-right: 0; /* マージンをリセット */
  }
  
  .custom-header-login-btn {
    margin-right: 0; /* スマホでは右マージンを削除 */
  }
}
